lythreeframe 1.1.7 → 1.1.9

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.
@@ -880,6 +880,9 @@ class MaterialAssetPointer extends TAssetPointer {
880
880
  super(value, referenceCount);
881
881
  this.textures = usedTextures;
882
882
  }
883
+ get texturePointers() {
884
+ return this.textures;
885
+ }
883
886
  release() {
884
887
  for (let texture of this.textures.values()) {
885
888
  texture.release();
@@ -936,16 +939,16 @@ class AssetManager {
936
939
  let children = threejsObject.children;
937
940
  threejsObject.children = [];
938
941
  if (threejsObject.type === "Group" || threejsObject.type === "Object3D") {
939
- newComp = new SceneComponent(threejsObject);
942
+ newComp = new SceneComponent(this.app, threejsObject);
940
943
  }
941
944
  else if (threejsObject.isMesh) {
942
945
  let obj = threejsObject;
943
- newComp = new MeshComponent(obj);
946
+ newComp = new MeshComponent(this.app, obj.geometry, obj.material);
944
947
  // assetManager.#collectMatAndGeoInMesh(threejsObject)
945
948
  threejsObject.layers.set(0);
946
949
  }
947
950
  else {
948
- newComp = new SceneComponent(threejsObject);
951
+ newComp = new SceneComponent(this.app, threejsObject);
949
952
  }
950
953
  if (newComp === null) {
951
954
  threejsObject.children = children;
@@ -878,6 +878,9 @@ class MaterialAssetPointer extends TAssetPointer {
878
878
  super(value, referenceCount);
879
879
  this.textures = usedTextures;
880
880
  }
881
+ get texturePointers() {
882
+ return this.textures;
883
+ }
881
884
  release() {
882
885
  for (let texture of this.textures.values()) {
883
886
  texture.release();
@@ -934,16 +937,16 @@ class AssetManager {
934
937
  let children = threejsObject.children;
935
938
  threejsObject.children = [];
936
939
  if (threejsObject.type === "Group" || threejsObject.type === "Object3D") {
937
- newComp = new SceneComponent(threejsObject);
940
+ newComp = new SceneComponent(this.app, threejsObject);
938
941
  }
939
942
  else if (threejsObject.isMesh) {
940
943
  let obj = threejsObject;
941
- newComp = new MeshComponent(obj);
944
+ newComp = new MeshComponent(this.app, obj.geometry, obj.material);
942
945
  // assetManager.#collectMatAndGeoInMesh(threejsObject)
943
946
  threejsObject.layers.set(0);
944
947
  }
945
948
  else {
946
- newComp = new SceneComponent(threejsObject);
949
+ newComp = new SceneComponent(this.app, threejsObject);
947
950
  }
948
951
  if (newComp === null) {
949
952
  threejsObject.children = children;
@@ -4,6 +4,7 @@ import { TextureAssetPointer } from "./TextureAssetPointer";
4
4
  export declare class MaterialAssetPointer extends TAssetPointer<Material> {
5
5
  protected textures: Map<string, TextureAssetPointer>;
6
6
  constructor(value: Material, usedTextures: Map<string, TextureAssetPointer>, referenceCount?: number);
7
+ get texturePointers(): Map<string, TextureAssetPointer>;
7
8
  release(): void;
8
9
  forceRelease(): void;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",