diff --git a/experiments/rollup.config.cjs b/experiments/rollup.config.cjs index 050169c..ea17f2b 100644 --- a/experiments/rollup.config.cjs +++ b/experiments/rollup.config.cjs @@ -1,36 +1,34 @@ -const copy = require('rollup-plugin-copy'); -const { globSync } = require('glob'); +const copy = require("rollup-plugin-copy"); +const { globSync } = require("glob"); module.exports = { - input: globSync('src/js/*.js'), + input: globSync("src/js/*.js"), output: { - dir: 'dist/js', - format: 'iife', + dir: "dist/js", + format: "es", }, plugins: [ copy({ - targets: [ - { src: 'src/**/*.html', dest: 'dist/' }, - ], + targets: [{ src: "src/**/*.html", dest: "dist/" }], }), // Static dependencies copy({ targets: [ - { src: '../t3dtools.js/t3dworker.js', dest: 'dist/static' }, - { src: '../t3dtools.js/t3dworker.wasm', dest: 'dist/static' }, - { src: '../node_modules/w2ui/w2ui-1.4.3.min.js', dest: 'dist/static' }, - { src: '../node_modules/w2ui/w2ui-1.4.3.min.css', dest: 'dist/static' }, - { src: '../node_modules/three/build/three.js', dest: 'dist/static' }, - { src: '../node_modules/three/examples/js/controls/FlyControls.js', dest: 'dist/static' }, - { src: '../node_modules/three/examples/js/controls/PointerLockControls.js', dest: 'dist/static' }, - { src: '../node_modules/three/examples/js/controls/OrbitControls.js', dest: 'dist/static' }, - { src: '../node_modules/three/examples/js/exporters/OBJExporter.js', dest: 'dist/static' }, - { src: '../node_modules/three/examples/js/exporters/GLTFExporter.js', dest: 'dist/static' }, - { src: '../node_modules/jquery/dist/jquery.js', dest: 'dist/static' }, - { src: '../library/build/T3D.js', dest: 'dist/static' }, - { src: '../library/build/T3D.js.map', dest: 'dist/static' }, - { src: '../parser/build/t3d-parser.js', dest: 'dist/static' }, - { src: '../parser/build/t3d-parser.js.map', dest: 'dist/static' }, + { src: "../t3dtools.js/t3dworker.js", dest: "dist/static" }, + { src: "../t3dtools.js/t3dworker.wasm", dest: "dist/static" }, + { src: "../node_modules/w2ui/w2ui-1.4.3.min.js", dest: "dist/static" }, + { src: "../node_modules/w2ui/w2ui-1.4.3.min.css", dest: "dist/static" }, + { src: "../node_modules/three/build/three.js", dest: "dist/static" }, + { src: "../node_modules/three/examples/js/controls/FlyControls.js", dest: "dist/static" }, + { src: "../node_modules/three/examples/js/controls/PointerLockControls.js", dest: "dist/static" }, + { src: "../node_modules/three/examples/js/controls/OrbitControls.js", dest: "dist/static" }, + { src: "../node_modules/three/examples/js/exporters/OBJExporter.js", dest: "dist/static" }, + { src: "../node_modules/three/examples/js/exporters/GLTFExporter.js", dest: "dist/static" }, + { src: "../node_modules/jquery/dist/jquery.js", dest: "dist/static" }, + { src: "../library/build/T3D.js", dest: "dist/static" }, + { src: "../library/build/T3D.js.map", dest: "dist/static" }, + { src: "../parser/build/t3d-parser.js", dest: "dist/static" }, + { src: "../parser/build/t3d-parser.js.map", dest: "dist/static" }, ], }), ], diff --git a/library/src/LocalReader/LocalReader.ts b/library/src/LocalReader/LocalReader.ts index fd54738..67b5324 100644 --- a/library/src/LocalReader/LocalReader.ts +++ b/library/src/LocalReader/LocalReader.ts @@ -285,6 +285,7 @@ class LocalReader { name: map.baseId.toString(), category: "Uncategorized", baseId: map.baseId, + categoryIndex: 99999, }); } } diff --git a/library/tsconfig.json b/library/tsconfig.json index af445e4..9a94c02 100644 --- a/library/tsconfig.json +++ b/library/tsconfig.json @@ -9,6 +9,7 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, + "strictPropertyInitialization": false, "sourceMap": true }, "include": [ diff --git a/utils/package.json b/utils/package.json index 574e336..3c3968b 100644 --- a/utils/package.json +++ b/utils/package.json @@ -20,7 +20,8 @@ "format:check": "prettier --check ./lib && prettier --check ./bin", "lint:check": "eslint ./lib && eslint ./bin", "lint:fix": "eslint ./lib --fix && eslint ./bin --fix", - "test": "exit 0" + "test": "exit 0", + "build": "exit 0" }, "dependencies": { "@types/node": "12.12.17",