lythreeframe 1.0.34 → 1.0.36
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
|
@@ -665,8 +665,6 @@ class SceneComponent extends Component {
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
-
// import {BufferGeometry, Material, Mesh, Texture} from "three/webgpu";
|
|
669
|
-
// import {Vector3} from "three/webgpu";
|
|
670
668
|
class MeshComponent extends SceneComponent {
|
|
671
669
|
get threeObject() {
|
|
672
670
|
return this.obj;
|
|
@@ -699,14 +697,17 @@ class MeshComponent extends SceneComponent {
|
|
|
699
697
|
this._geometryPtr = null;
|
|
700
698
|
}
|
|
701
699
|
this._geometryPtr = geo;
|
|
702
|
-
|
|
703
|
-
|
|
700
|
+
let geometry = geo.getValue();
|
|
701
|
+
if (this.threeObject && geometry) {
|
|
702
|
+
this.threeObject.geometry = geometry;
|
|
704
703
|
}
|
|
705
704
|
}
|
|
706
705
|
get material() {
|
|
707
706
|
let mats = [];
|
|
708
707
|
this._materialPtr.forEach((elem) => {
|
|
709
|
-
|
|
708
|
+
let mat = elem.getValue();
|
|
709
|
+
if (mat)
|
|
710
|
+
mats.push(mat);
|
|
710
711
|
});
|
|
711
712
|
return mats;
|
|
712
713
|
}
|
|
@@ -731,9 +732,11 @@ class MeshComponent extends SceneComponent {
|
|
|
731
732
|
this._materialPtr = [];
|
|
732
733
|
}
|
|
733
734
|
let matPtrs = Array.isArray(newMat) ? newMat : [newMat];
|
|
734
|
-
let mats =
|
|
735
|
+
let mats = [];
|
|
735
736
|
matPtrs.forEach((elem) => {
|
|
736
|
-
|
|
737
|
+
let mat = elem.getValue();
|
|
738
|
+
if (mat)
|
|
739
|
+
mats.push(mat);
|
|
737
740
|
elem.addRef();
|
|
738
741
|
});
|
|
739
742
|
if (this.threeObject) {
|
|
@@ -795,10 +798,11 @@ class MeshComponent extends SceneComponent {
|
|
|
795
798
|
return ret;
|
|
796
799
|
}
|
|
797
800
|
destroyObject() {
|
|
801
|
+
var _a;
|
|
798
802
|
if (this.threeObject) {
|
|
799
803
|
this.threeObject.removeFromParent();
|
|
800
804
|
}
|
|
801
|
-
this._geometryPtr.release();
|
|
805
|
+
(_a = this._geometryPtr) === null || _a === void 0 ? void 0 : _a.release();
|
|
802
806
|
let matPtrs = Array.isArray(this._materialPtr) ? this._materialPtr : [this._materialPtr];
|
|
803
807
|
matPtrs.forEach((elem) => {
|
|
804
808
|
elem.release();
|
|
@@ -3127,6 +3131,8 @@ exports.SceneComponent = SceneComponent;
|
|
|
3127
3131
|
exports.SkyActor = SkyActor;
|
|
3128
3132
|
exports.SkyComponent = SkyComponent;
|
|
3129
3133
|
exports.SphereComponent = SphereComponent;
|
|
3134
|
+
exports.TAssetPointer = TAssetPointer;
|
|
3135
|
+
exports.TSmartPointer = TSmartPointer;
|
|
3130
3136
|
exports.ThreeJsApp = ThreeJsApp;
|
|
3131
3137
|
exports.ThreeObjectLibrary = ThreeObjectLibrary;
|
|
3132
3138
|
exports.ToneMappingOptions = ToneMappingOptions;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -663,8 +663,6 @@ class SceneComponent extends Component {
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
// import {BufferGeometry, Material, Mesh, Texture} from "three/webgpu";
|
|
667
|
-
// import {Vector3} from "three/webgpu";
|
|
668
666
|
class MeshComponent extends SceneComponent {
|
|
669
667
|
get threeObject() {
|
|
670
668
|
return this.obj;
|
|
@@ -697,14 +695,17 @@ class MeshComponent extends SceneComponent {
|
|
|
697
695
|
this._geometryPtr = null;
|
|
698
696
|
}
|
|
699
697
|
this._geometryPtr = geo;
|
|
700
|
-
|
|
701
|
-
|
|
698
|
+
let geometry = geo.getValue();
|
|
699
|
+
if (this.threeObject && geometry) {
|
|
700
|
+
this.threeObject.geometry = geometry;
|
|
702
701
|
}
|
|
703
702
|
}
|
|
704
703
|
get material() {
|
|
705
704
|
let mats = [];
|
|
706
705
|
this._materialPtr.forEach((elem) => {
|
|
707
|
-
|
|
706
|
+
let mat = elem.getValue();
|
|
707
|
+
if (mat)
|
|
708
|
+
mats.push(mat);
|
|
708
709
|
});
|
|
709
710
|
return mats;
|
|
710
711
|
}
|
|
@@ -729,9 +730,11 @@ class MeshComponent extends SceneComponent {
|
|
|
729
730
|
this._materialPtr = [];
|
|
730
731
|
}
|
|
731
732
|
let matPtrs = Array.isArray(newMat) ? newMat : [newMat];
|
|
732
|
-
let mats =
|
|
733
|
+
let mats = [];
|
|
733
734
|
matPtrs.forEach((elem) => {
|
|
734
|
-
|
|
735
|
+
let mat = elem.getValue();
|
|
736
|
+
if (mat)
|
|
737
|
+
mats.push(mat);
|
|
735
738
|
elem.addRef();
|
|
736
739
|
});
|
|
737
740
|
if (this.threeObject) {
|
|
@@ -793,10 +796,11 @@ class MeshComponent extends SceneComponent {
|
|
|
793
796
|
return ret;
|
|
794
797
|
}
|
|
795
798
|
destroyObject() {
|
|
799
|
+
var _a;
|
|
796
800
|
if (this.threeObject) {
|
|
797
801
|
this.threeObject.removeFromParent();
|
|
798
802
|
}
|
|
799
|
-
this._geometryPtr.release();
|
|
803
|
+
(_a = this._geometryPtr) === null || _a === void 0 ? void 0 : _a.release();
|
|
800
804
|
let matPtrs = Array.isArray(this._materialPtr) ? this._materialPtr : [this._materialPtr];
|
|
801
805
|
matPtrs.forEach((elem) => {
|
|
802
806
|
elem.release();
|
|
@@ -3096,4 +3100,4 @@ class TransformGizmo extends Pawn {
|
|
|
3096
3100
|
}
|
|
3097
3101
|
}
|
|
3098
3102
|
|
|
3099
|
-
export { Actor, AssetManager, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRenderParam, DefaultSSRParam, DefaultSkyParam, DefaultToneMappingParams, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, LabelComponent, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SkyActor, SkyComponent, SphereComponent, ThreeJsApp, ThreeObjectLibrary, ToneMappingOptions, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
|
|
3103
|
+
export { Actor, AssetManager, AttachmentRules, BoxActor, BoxComponent, Controller, DefaultAppParam, DefaultBloomParam, DefaultDOFParam, DefaultDenoiseParam, DefaultGTAOParam, DefaultOutlineParams, DefaultPostProcessParam, DefaultRenderParam, DefaultSSRParam, DefaultSkyParam, DefaultToneMappingParams, Delegate, DirectionalLightActor, DirectionalLightComponent, FirstPerson, LabelComponent, MeshComponent, Orbital, PlaneActor, PlaneComponent, SceneComponent, SkyActor, SkyComponent, SphereComponent, TAssetPointer, TSmartPointer, ThreeJsApp, ThreeObjectLibrary, ToneMappingOptions, TransformGizmo, Viewport, WebGPUPostProcessFactory, World };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { AssetManager } from "./lythreeframe/AssetManagement/AssetManager";
|
|
2
|
+
export { TAssetPointer } from "./lythreeframe/AssetManagement/AssetPointer/AssetPointer";
|
|
3
|
+
export { TSmartPointer } from './lythreeframe/Container/SmartPointer';
|
|
2
4
|
export { AttachmentRules } from "./lythreeframe/Defines";
|
|
3
5
|
export { Delegate } from "./lythreeframe/Delegate";
|
|
4
6
|
export { ThreeJsApp } from "./lythreeframe/ThreeJsApp";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { BufferGeometry, Material, Mesh, Vector3 } from "three/webgpu";
|
|
1
2
|
import { SceneComponent } from "../SceneComponent";
|
|
2
|
-
import { ThreeJsApp } from "@/lythreeframe/ThreeJsApp";
|
|
3
3
|
import { TAssetPointer } from "@/lythreeframe/AssetManagement/AssetPointer/AssetPointer";
|
|
4
|
-
import {
|
|
4
|
+
import { ThreeJsApp } from "@/lythreeframe/ThreeJsApp";
|
|
5
5
|
export declare class MeshComponent extends SceneComponent {
|
|
6
6
|
get threeObject(): Mesh | null;
|
|
7
7
|
set threeObject(newThreeObject: Mesh);
|