默认关闭背景
This commit is contained in:
1 parent
f0c7e27552
commit
2ede939a62
4 files changed
+9
-8
No files matched your search
@@ -2,10 +2,11 @@
|
||||
// Local visual diagnostic. The private project/export remain outside version control.
|
||||
const fs = require('fs'), path = require('path');
|
||||
const root = path.resolve(__dirname, '..');
|
||||
const library = '/Users/tianmokeji/Desktop/特效/特效.library/images';
|
||||
const source = process.argv[2] || path.join(library, 'MTV7M6B96MAP6.info/x10.skel');
|
||||
const atlasPath = process.argv[3] || path.join(library, 'MTV7M6B96RPMA.info/x10.atlas');
|
||||
const texturePath = process.argv[4] || path.join(library, 'MTV7M6B9BJ9MS.info/x10.png');
|
||||
const source = process.argv[2];
|
||||
if (!source) throw Error('Usage: node tests/build-x10-comparison.js x10.skel [x10.atlas] [x10.png] [output.html]');
|
||||
const assets = require('../js/spine-utils').discoverAssets(source);
|
||||
const atlasPath = process.argv[3] || assets.atlasPath;
|
||||
const texturePath = process.argv[4] || assets.texturePaths['x10.png'];
|
||||
const output = process.argv[5] || '/tmp/spine-x10-comparison.html';
|
||||
const baseline = process.env.SPINE_COMPARE_BASELINE === '1';
|
||||
const script = s => '<script>' + s.replace(/<\/script/gi, '<\\/script') + '</script>';
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Produce a PNG whose low-alpha RGB values can be represented exactly by
|
||||
// Canvas's 8-bit storage; PMA consumers must preserve those encoded values.
|
||||
const encoded=canvas(),pixels=encoded.createImageData(32,32);
|
||||
for(let i=0;i<pixels.data.length;i+=4)pixels.data.set([64,32,16,8],i);
|
||||
for(let i=0;i<pixels.data.length;i+=4)pixels.data.set([16,8,0,32],i);
|
||||
encoded.putImageData(pixels,0,0);
|
||||
const blob=await new Promise(resolve=>encoded.canvas.toBlob(resolve));
|
||||
const image=new Image();image.src=URL.createObjectURL(blob);await image.decode();
|
||||
|
||||
Reference in new issue
Block a user