lythreeframe 1.2.24 → 1.2.26
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.
- package/dist/bundle.cjs.js +23 -5
- package/dist/bundle.esm.js +23 -5
- package/package.json +5 -5
package/dist/bundle.cjs.js
CHANGED
|
@@ -897,16 +897,34 @@ class TAssetPointer extends TSmartPointer {
|
|
|
897
897
|
if (this.value) {
|
|
898
898
|
this.referenceCount--;
|
|
899
899
|
if (this.referenceCount === 0) {
|
|
900
|
-
|
|
901
|
-
|
|
900
|
+
try {
|
|
901
|
+
this.value.dispose();
|
|
902
|
+
this.value = null;
|
|
903
|
+
}
|
|
904
|
+
catch (e) {
|
|
905
|
+
console.error("Error disposing asset pointer:", e);
|
|
906
|
+
}
|
|
902
907
|
}
|
|
903
908
|
}
|
|
904
909
|
}
|
|
905
910
|
forceRelease() {
|
|
906
911
|
if (this.value) {
|
|
907
|
-
this.value.
|
|
908
|
-
|
|
909
|
-
|
|
912
|
+
if (this.value.userData && this.value.userData["assetPointer"]) {
|
|
913
|
+
delete this.value.userData["assetPointer"];
|
|
914
|
+
}
|
|
915
|
+
if (typeof this.value.dispose === "function") {
|
|
916
|
+
try {
|
|
917
|
+
this.value.dispose();
|
|
918
|
+
this.value = null;
|
|
919
|
+
}
|
|
920
|
+
catch (e) {
|
|
921
|
+
console.warn("Error disposing asset pointer:", e);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
setTimeout(() => {
|
|
925
|
+
//this.value = null;
|
|
926
|
+
this.referenceCount = 0;
|
|
927
|
+
}, 0);
|
|
910
928
|
}
|
|
911
929
|
}
|
|
912
930
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -895,16 +895,34 @@ class TAssetPointer extends TSmartPointer {
|
|
|
895
895
|
if (this.value) {
|
|
896
896
|
this.referenceCount--;
|
|
897
897
|
if (this.referenceCount === 0) {
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
try {
|
|
899
|
+
this.value.dispose();
|
|
900
|
+
this.value = null;
|
|
901
|
+
}
|
|
902
|
+
catch (e) {
|
|
903
|
+
console.error("Error disposing asset pointer:", e);
|
|
904
|
+
}
|
|
900
905
|
}
|
|
901
906
|
}
|
|
902
907
|
}
|
|
903
908
|
forceRelease() {
|
|
904
909
|
if (this.value) {
|
|
905
|
-
this.value.
|
|
906
|
-
|
|
907
|
-
|
|
910
|
+
if (this.value.userData && this.value.userData["assetPointer"]) {
|
|
911
|
+
delete this.value.userData["assetPointer"];
|
|
912
|
+
}
|
|
913
|
+
if (typeof this.value.dispose === "function") {
|
|
914
|
+
try {
|
|
915
|
+
this.value.dispose();
|
|
916
|
+
this.value = null;
|
|
917
|
+
}
|
|
918
|
+
catch (e) {
|
|
919
|
+
console.warn("Error disposing asset pointer:", e);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
setTimeout(() => {
|
|
923
|
+
//this.value = null;
|
|
924
|
+
this.referenceCount = 0;
|
|
925
|
+
}, 0);
|
|
908
926
|
}
|
|
909
927
|
}
|
|
910
928
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lythreeframe",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
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.
|
|
14
|
+
"@types/three": "^0.178.0",
|
|
15
15
|
"gsap": "^3.12.2",
|
|
16
|
-
"three": "^0.
|
|
16
|
+
"three": "^0.178.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.
|
|
23
|
+
"@types/three": "^0.178.0",
|
|
24
24
|
"gsap": "^3.12.2",
|
|
25
25
|
"rollup": "^4.35.0",
|
|
26
|
-
"three": "^0.
|
|
26
|
+
"three": "^0.178.0",
|
|
27
27
|
"tslib": "^2.8.1",
|
|
28
28
|
"typescript": "^5.8.2"
|
|
29
29
|
},
|