... do that the way I intended.

This commit is contained in:
Par Winzell 2018-12-10 10:54:39 -08:00
parent 2ccde8fd72
commit ca62b8de9f
1 changed files with 10 additions and 6 deletions

View File

@ -7,11 +7,15 @@ import { validateBytes } from 'gltf-validator';
interface Model { interface Model {
path: string; path: string;
ignoredIssues?: Array<string>;
} }
const MODELS :Array<Model> = [ const MODELS :Array<Model> = [
{ path: 'fromFacebook/Jon/jon_morph' }, { path: 'fromFacebook/Jon/jon_morph' },
{ path: 'fromFacebook/Jon/troll-final' }, {
path: 'fromFacebook/Jon/troll-final',
ignoredIssues: [ 'ACCESSOR_NON_UNIT' ],
},
{ path: 'fromFacebook/Natalie/GlitchRobot' }, { path: 'fromFacebook/Natalie/GlitchRobot' },
{ path: 'fromFacebook/Ocean/blackvan/blackvan_with_windows' }, { path: 'fromFacebook/Ocean/blackvan/blackvan_with_windows' },
{ path: 'fromFacebook/Ocean/zell_van_vertex_color' }, { path: 'fromFacebook/Ocean/zell_van_vertex_color' },
@ -49,11 +53,11 @@ describe('FBX2glTF', () => {
it('resulting glb should be valid', async() => { it('resulting glb should be valid', async() => {
try { try {
const report = await validateBytes( let options = <any>{};
glbBytes, { if (model.ignoredIssues) {
ignoredIssues: [ 'ACCESSOR_NON_UNIT' ], options.ignoredIssues = model.ignoredIssues;
}, }
); const report = await validateBytes(glbBytes, options);
expect(report.issues.numErrors).to.equal(0); expect(report.issues.numErrors).to.equal(0);
expect(report.issues.numWarnings).to.equal(0); expect(report.issues.numWarnings).to.equal(0);