mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-06-04 11:25:44 +08:00
npm: fixed npm example
allows draco3d to be called from same directory or npm package
This commit is contained in:
parent
99b68b23dd
commit
3cbd970d93
@ -16,7 +16,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
const draco3d = require('./draco3d');
|
||||
const draco3d = fs.existsSync('./draco3d') ? require('./draco3d') : require('draco3d');
|
||||
const decoderModule = draco3d.createDecoderModule({});
|
||||
const encoderModule = draco3d.createEncoderModule({});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user