lythreeframe 1.2.44 → 1.2.46
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
|
@@ -645,7 +645,6 @@ class SceneComponent extends Component {
|
|
|
645
645
|
throw Error("targetComponent threeObject is invalid");
|
|
646
646
|
}
|
|
647
647
|
this.obj.remove(targetComponent.threeObject);
|
|
648
|
-
console.log("removeChildComponent");
|
|
649
648
|
targetComponent.destroy();
|
|
650
649
|
}
|
|
651
650
|
detachFromParentComponent() {
|
|
@@ -663,11 +662,17 @@ class SceneComponent extends Component {
|
|
|
663
662
|
if (!this.obj) {
|
|
664
663
|
return;
|
|
665
664
|
}
|
|
665
|
+
let toDes = [];
|
|
666
666
|
for (let i = 0; i < this.obj.children.length; ++i) {
|
|
667
667
|
let obj = (_a = this.obj.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
|
|
668
|
-
if (obj)
|
|
669
|
-
|
|
668
|
+
if (obj) {
|
|
669
|
+
toDes.push(obj);
|
|
670
|
+
}
|
|
670
671
|
}
|
|
672
|
+
toDes.forEach((elem) => {
|
|
673
|
+
elem.destroy();
|
|
674
|
+
});
|
|
675
|
+
toDes = [];
|
|
671
676
|
}
|
|
672
677
|
/* horver */
|
|
673
678
|
set isHoverEnabled(bCanHorver) {
|
|
@@ -1509,6 +1514,9 @@ class Viewport {
|
|
|
1509
1514
|
get canvas() {
|
|
1510
1515
|
return this._canvasContainer;
|
|
1511
1516
|
}
|
|
1517
|
+
get outer() {
|
|
1518
|
+
return this._outerContainer;
|
|
1519
|
+
}
|
|
1512
1520
|
get renderer() {
|
|
1513
1521
|
if (!this._renderer) {
|
|
1514
1522
|
throw Error("Renderer is not initialized");
|
|
@@ -1817,7 +1825,7 @@ class Viewport {
|
|
|
1817
1825
|
if (this.postProcessing) {
|
|
1818
1826
|
this.postProcessing.render();
|
|
1819
1827
|
}
|
|
1820
|
-
else {
|
|
1828
|
+
else {
|
|
1821
1829
|
this.renderer.render(this.app.world.scene, this.app.camera);
|
|
1822
1830
|
}
|
|
1823
1831
|
if (this.labelRenderer) {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -643,7 +643,6 @@ class SceneComponent extends Component {
|
|
|
643
643
|
throw Error("targetComponent threeObject is invalid");
|
|
644
644
|
}
|
|
645
645
|
this.obj.remove(targetComponent.threeObject);
|
|
646
|
-
console.log("removeChildComponent");
|
|
647
646
|
targetComponent.destroy();
|
|
648
647
|
}
|
|
649
648
|
detachFromParentComponent() {
|
|
@@ -661,11 +660,17 @@ class SceneComponent extends Component {
|
|
|
661
660
|
if (!this.obj) {
|
|
662
661
|
return;
|
|
663
662
|
}
|
|
663
|
+
let toDes = [];
|
|
664
664
|
for (let i = 0; i < this.obj.children.length; ++i) {
|
|
665
665
|
let obj = (_a = this.obj.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
|
|
666
|
-
if (obj)
|
|
667
|
-
|
|
666
|
+
if (obj) {
|
|
667
|
+
toDes.push(obj);
|
|
668
|
+
}
|
|
668
669
|
}
|
|
670
|
+
toDes.forEach((elem) => {
|
|
671
|
+
elem.destroy();
|
|
672
|
+
});
|
|
673
|
+
toDes = [];
|
|
669
674
|
}
|
|
670
675
|
/* horver */
|
|
671
676
|
set isHoverEnabled(bCanHorver) {
|
|
@@ -1507,6 +1512,9 @@ class Viewport {
|
|
|
1507
1512
|
get canvas() {
|
|
1508
1513
|
return this._canvasContainer;
|
|
1509
1514
|
}
|
|
1515
|
+
get outer() {
|
|
1516
|
+
return this._outerContainer;
|
|
1517
|
+
}
|
|
1510
1518
|
get renderer() {
|
|
1511
1519
|
if (!this._renderer) {
|
|
1512
1520
|
throw Error("Renderer is not initialized");
|
|
@@ -1815,7 +1823,7 @@ class Viewport {
|
|
|
1815
1823
|
if (this.postProcessing) {
|
|
1816
1824
|
this.postProcessing.render();
|
|
1817
1825
|
}
|
|
1818
|
-
else {
|
|
1826
|
+
else {
|
|
1819
1827
|
this.renderer.render(this.app.world.scene, this.app.camera);
|
|
1820
1828
|
}
|
|
1821
1829
|
if (this.labelRenderer) {
|
|
@@ -7,6 +7,7 @@ export declare class Viewport {
|
|
|
7
7
|
get uiDom(): HTMLDivElement | null;
|
|
8
8
|
protected _uiDom: HTMLDivElement | null;
|
|
9
9
|
get canvas(): HTMLElement | null;
|
|
10
|
+
get outer(): HTMLElement | null;
|
|
10
11
|
get renderer(): WebGPURenderer;
|
|
11
12
|
get app(): ThreeJsApp;
|
|
12
13
|
private _renderer;
|