lythreeframe 1.2.2 → 1.2.4
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
CHANGED
|
@@ -226,7 +226,7 @@ class SceneComponent extends Component {
|
|
|
226
226
|
let childrens = [];
|
|
227
227
|
for (let i = 0; i < this.threeObject.children.length; ++i) {
|
|
228
228
|
if (!this.threeObject.children[i].userData.LYObject) {
|
|
229
|
-
console.warn("One of children component has no parentActor", this.threeObject.children[i].userData.LYObject, this.threeObject.children[i]);
|
|
229
|
+
// console.warn("One of children component has no parentActor", this.threeObject.children[i].userData.LYObject, this.threeObject.children[i]);
|
|
230
230
|
continue;
|
|
231
231
|
}
|
|
232
232
|
if (this.threeObject.children[i].userData.LYObject.parentActor === this.parentActor) {
|
|
@@ -628,11 +628,14 @@ class SceneComponent extends Component {
|
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
destroyChildren() {
|
|
631
|
+
var _a;
|
|
631
632
|
if (!this.threeObject) {
|
|
632
633
|
return;
|
|
633
634
|
}
|
|
634
635
|
for (let i = 0; i < this.threeObject.children.length; ++i) {
|
|
635
|
-
this.threeObject.children[i].userData.LYObject
|
|
636
|
+
let obj = (_a = this.threeObject.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
|
|
637
|
+
if (obj)
|
|
638
|
+
this.threeObject.children[i].userData.LYObject.destroy();
|
|
636
639
|
}
|
|
637
640
|
}
|
|
638
641
|
/* horver */
|
|
@@ -782,7 +785,6 @@ class MeshComponent extends SceneComponent {
|
|
|
782
785
|
matPtrs.push(ptr);
|
|
783
786
|
});
|
|
784
787
|
super(app, uuid);
|
|
785
|
-
this.obj = null;
|
|
786
788
|
this._geometryPtr = app.assetManager.addGeometryAsset(geometry);
|
|
787
789
|
this._materialPtr = matPtrs;
|
|
788
790
|
matPtrs.forEach((elem) => {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -224,7 +224,7 @@ class SceneComponent extends Component {
|
|
|
224
224
|
let childrens = [];
|
|
225
225
|
for (let i = 0; i < this.threeObject.children.length; ++i) {
|
|
226
226
|
if (!this.threeObject.children[i].userData.LYObject) {
|
|
227
|
-
console.warn("One of children component has no parentActor", this.threeObject.children[i].userData.LYObject, this.threeObject.children[i]);
|
|
227
|
+
// console.warn("One of children component has no parentActor", this.threeObject.children[i].userData.LYObject, this.threeObject.children[i]);
|
|
228
228
|
continue;
|
|
229
229
|
}
|
|
230
230
|
if (this.threeObject.children[i].userData.LYObject.parentActor === this.parentActor) {
|
|
@@ -626,11 +626,14 @@ class SceneComponent extends Component {
|
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
destroyChildren() {
|
|
629
|
+
var _a;
|
|
629
630
|
if (!this.threeObject) {
|
|
630
631
|
return;
|
|
631
632
|
}
|
|
632
633
|
for (let i = 0; i < this.threeObject.children.length; ++i) {
|
|
633
|
-
this.threeObject.children[i].userData.LYObject
|
|
634
|
+
let obj = (_a = this.threeObject.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
|
|
635
|
+
if (obj)
|
|
636
|
+
this.threeObject.children[i].userData.LYObject.destroy();
|
|
634
637
|
}
|
|
635
638
|
}
|
|
636
639
|
/* horver */
|
|
@@ -780,7 +783,6 @@ class MeshComponent extends SceneComponent {
|
|
|
780
783
|
matPtrs.push(ptr);
|
|
781
784
|
});
|
|
782
785
|
super(app, uuid);
|
|
783
|
-
this.obj = null;
|
|
784
786
|
this._geometryPtr = app.assetManager.addGeometryAsset(geometry);
|
|
785
787
|
this._materialPtr = matPtrs;
|
|
786
788
|
matPtrs.forEach((elem) => {
|
|
@@ -4,8 +4,7 @@ import { TAssetPointer } from "../../../AssetManagement/AssetPointer/AssetPointe
|
|
|
4
4
|
import { ThreeJsApp } from "../../../ThreeJsApp";
|
|
5
5
|
export declare class MeshComponent extends SceneComponent {
|
|
6
6
|
get threeObject(): Mesh;
|
|
7
|
-
set threeObject(newThreeObject: Mesh);
|
|
8
|
-
protected obj: Mesh | null;
|
|
7
|
+
protected set threeObject(newThreeObject: Mesh);
|
|
9
8
|
get geometry(): BufferGeometry | null;
|
|
10
9
|
set geometry(geo: BufferGeometry);
|
|
11
10
|
get geometryPtr(): TAssetPointer<BufferGeometry>;
|