lythreeframe 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -854,7 +854,7 @@ class LYAssetManager {
854
854
  this.assetPointer = new Map();
855
855
  this.loadingManager = new three.LoadingManager();
856
856
  this.dracoLoader = new Addons_js.DRACOLoader(this.loadingManager);
857
- this.dracoLoader.setDecoderPath(`../../draco/`);
857
+ this.dracoLoader.setDecoderPath(`./public/draco/`);
858
858
  this.dracoLoader.setDecoderConfig({ type: "js" });
859
859
  this.dracoLoader.preload();
860
860
  this.gltfLoader = new Addons_js.GLTFLoader(this.loadingManager);
@@ -1043,7 +1043,7 @@ class LYAssetManager {
1043
1043
  this.assetPointer.clear();
1044
1044
  }
1045
1045
  }
1046
- let assetManager = new LYAssetManager();
1046
+ const assetManager = new LYAssetManager();
1047
1047
 
1048
1048
  class Delegate {
1049
1049
  constructor() {
@@ -852,7 +852,7 @@ class LYAssetManager {
852
852
  this.assetPointer = new Map();
853
853
  this.loadingManager = new LoadingManager();
854
854
  this.dracoLoader = new DRACOLoader(this.loadingManager);
855
- this.dracoLoader.setDecoderPath(`../../draco/`);
855
+ this.dracoLoader.setDecoderPath(`./public/draco/`);
856
856
  this.dracoLoader.setDecoderConfig({ type: "js" });
857
857
  this.dracoLoader.preload();
858
858
  this.gltfLoader = new GLTFLoader(this.loadingManager);
@@ -1041,7 +1041,7 @@ class LYAssetManager {
1041
1041
  this.assetPointer.clear();
1042
1042
  }
1043
1043
  }
1044
- let assetManager = new LYAssetManager();
1044
+ const assetManager = new LYAssetManager();
1045
1045
 
1046
1046
  class Delegate {
1047
1047
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -16,7 +16,9 @@
16
16
  "@types/three": "^0.173.0"
17
17
  },
18
18
  "files": [
19
- "dist"
19
+ "dist",
20
+ "public",
21
+ "public/draco"
20
22
  ],
21
23
  "devDependencies": {
22
24
  "@rollup/plugin-typescript": "^12.1.2",
@@ -0,0 +1,32 @@
1
+ # Draco 3D Data Compression
2
+
3
+ Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
4
+
5
+ [Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco)
6
+
7
+ ## Contents
8
+
9
+ This folder contains three utilities:
10
+
11
+ * `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser.
12
+ * `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices.
13
+ * `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder.
14
+
15
+ Each file is provided in two variations:
16
+
17
+ * **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco).
18
+ * **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension).
19
+
20
+ Either variation may be used with `THREE.DRACOLoader`:
21
+
22
+ ```js
23
+ var dracoLoader = new THREE.DRACOLoader();
24
+ dracoLoader.setDecoderPath('path/to/decoders/');
25
+ dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support.
26
+ ```
27
+
28
+ Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder).
29
+
30
+ ## License
31
+
32
+ [Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE)