Don't export lights until the validator understands it.

This commit is contained in:
Par Winzell 2019-01-25 15:44:39 -08:00
parent fd86e1c185
commit 2efc17cbd5
1 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import { validateBytes } from 'gltf-validator';
interface Model { interface Model {
path: string; path: string;
ignoredIssues?: Array<string>; ignoredIssues?: Array<string>;
args?: Array<string>;
} }
const MODELS :Array<Model> = [ const MODELS :Array<Model> = [
@ -21,8 +22,14 @@ const MODELS :Array<Model> = [
{ path: 'fromFacebook/Ocean/zell_van_vertex_color' }, { path: 'fromFacebook/Ocean/zell_van_vertex_color' },
{ path: 'fromFacebook/RAZ/RAZ_ape' }, { path: 'fromFacebook/RAZ/RAZ_ape' },
{ path: 'fromFbxSDK/Box' }, { path: 'fromFbxSDK/Box' },
{ path: 'fromFbxSDK/Humanoid' }, {
{ path: 'fromFbxSDK/Camera' }, path: 'fromFbxSDK/Humanoid',
args: [ '--no-khr-lights-punctual' ],
},
{
path: 'fromFbxSDK/Camera',
args: [ '--no-khr-lights-punctual' ],
},
{ path: 'fromFbxSDK/Normals' }, { path: 'fromFbxSDK/Normals' },
{ path: 'fromGltfSamples/BoxVertexColors/BoxVertexColors' }, { path: 'fromGltfSamples/BoxVertexColors/BoxVertexColors' },
{ path: 'fromGltfSamples/WaterBottle/NewWaterBottle' }, { path: 'fromGltfSamples/WaterBottle/NewWaterBottle' },
@ -41,7 +48,7 @@ describe('FBX2glTF', () => {
const glbPath = path.join(tmpobj.name, modelName + '.glb'); const glbPath = path.join(tmpobj.name, modelName + '.glb');
try { try {
const destPath = await fbx2gltf(fbxPath, glbPath); const destPath = await fbx2gltf(fbxPath, glbPath, model.args || []);
assert.isNotNull(destPath); assert.isNotNull(destPath);
glbBytes = readFileSync(destPath); glbBytes = readFileSync(destPath);
} catch (err) { } catch (err) {