lythreeframe 1.2.46 → 1.2.48

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.
@@ -645,7 +645,7 @@ class SceneComponent extends Component {
645
645
  throw Error("targetComponent threeObject is invalid");
646
646
  }
647
647
  this.obj.remove(targetComponent.threeObject);
648
- targetComponent.destroy();
648
+ // targetComponent.destroy();
649
649
  }
650
650
  detachFromParentComponent() {
651
651
  if (this.parentComponent) {
@@ -1148,6 +1148,7 @@ class AssetManager {
1148
1148
  }
1149
1149
  }
1150
1150
  async loadGltfFromPathAsync(path) {
1151
+ this.setupDracoLoader("/SceneResource/draco/");
1151
1152
  let res = await this.gltfLoader.loadAsync(path);
1152
1153
  return res;
1153
1154
  }
@@ -1155,6 +1156,7 @@ class AssetManager {
1155
1156
  this.gltfLoader.load(path, onLoadFinished);
1156
1157
  }
1157
1158
  loadGltfFromBuffer(data, path, onLoadFinished) {
1159
+ this.setupDracoLoader("/SceneResource/draco/");
1158
1160
  this.gltfLoader.parse(data, path, onLoadFinished);
1159
1161
  }
1160
1162
  loadFile(filepath = '', onLoadFinished) {
@@ -643,7 +643,7 @@ class SceneComponent extends Component {
643
643
  throw Error("targetComponent threeObject is invalid");
644
644
  }
645
645
  this.obj.remove(targetComponent.threeObject);
646
- targetComponent.destroy();
646
+ // targetComponent.destroy();
647
647
  }
648
648
  detachFromParentComponent() {
649
649
  if (this.parentComponent) {
@@ -1146,6 +1146,7 @@ class AssetManager {
1146
1146
  }
1147
1147
  }
1148
1148
  async loadGltfFromPathAsync(path) {
1149
+ this.setupDracoLoader("/SceneResource/draco/");
1149
1150
  let res = await this.gltfLoader.loadAsync(path);
1150
1151
  return res;
1151
1152
  }
@@ -1153,6 +1154,7 @@ class AssetManager {
1153
1154
  this.gltfLoader.load(path, onLoadFinished);
1154
1155
  }
1155
1156
  loadGltfFromBuffer(data, path, onLoadFinished) {
1157
+ this.setupDracoLoader("/SceneResource/draco/");
1156
1158
  this.gltfLoader.parse(data, path, onLoadFinished);
1157
1159
  }
1158
1160
  loadFile(filepath = '', onLoadFinished) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.2.46",
3
+ "version": "1.2.48",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -11,19 +11,19 @@
11
11
  "prepublishOnly": "npm run build"
12
12
  },
13
13
  "peerDependencies": {
14
- "@types/three": "^0.178.0",
14
+ "@types/three": "^0.180.0",
15
15
  "gsap": "^3.12.2",
16
- "three": "^0.178.0"
16
+ "three": "^0.180.0"
17
17
  },
18
18
  "files": [
19
19
  "dist"
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@rollup/plugin-typescript": "^12.1.2",
23
- "@types/three": "^0.178.0",
23
+ "@types/three": "^0.180.0",
24
24
  "gsap": "^3.12.2",
25
25
  "rollup": "^4.35.0",
26
- "three": "^0.178.0",
26
+ "three": "^0.180.0",
27
27
  "tslib": "^2.8.1",
28
28
  "typescript": "^5.8.2"
29
29
  },