lythreeframe 1.0.8 → 1.0.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.
package/dist/bundle.cjs.js
CHANGED
|
@@ -1002,6 +1002,9 @@ class LYAssetManager {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
|
+
loadGltfFromBuffer(data, onLoadFinished) {
|
|
1006
|
+
this.gltfLoader.parse(data, window.location.href, onLoadFinished);
|
|
1007
|
+
}
|
|
1005
1008
|
loadFile(filepath = '', onLoadFinished) {
|
|
1006
1009
|
const loader = new three.FileLoader();
|
|
1007
1010
|
loader.load(filepath, (data) => {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1000,6 +1000,9 @@ class LYAssetManager {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
});
|
|
1002
1002
|
}
|
|
1003
|
+
loadGltfFromBuffer(data, onLoadFinished) {
|
|
1004
|
+
this.gltfLoader.parse(data, window.location.href, onLoadFinished);
|
|
1005
|
+
}
|
|
1003
1006
|
loadFile(filepath = '', onLoadFinished) {
|
|
1004
1007
|
const loader = new FileLoader();
|
|
1005
1008
|
loader.load(filepath, (data) => {
|
|
@@ -2,7 +2,7 @@ import { BufferGeometry, LoadingManager, Material, Mesh, Texture } from 'three';
|
|
|
2
2
|
import { SceneComponent } from "../Object/Components/SceneComponent";
|
|
3
3
|
import { LYLoadTask } from "./Task/Task";
|
|
4
4
|
import { TAssetPointer } from "./AssetPointer/AssetPointer";
|
|
5
|
-
import { DRACOLoader, GLTFLoader } from 'three/examples/jsm/Addons.js';
|
|
5
|
+
import { DRACOLoader, GLTF, GLTFLoader } from 'three/examples/jsm/Addons.js';
|
|
6
6
|
export declare class LYAssetManager {
|
|
7
7
|
protected assetPointer: Map<string, TAssetPointer<BufferGeometry | Texture | Material>>;
|
|
8
8
|
protected readonly dracoLoader: DRACOLoader;
|
|
@@ -16,6 +16,7 @@ export declare class LYAssetManager {
|
|
|
16
16
|
private collectResourcesAndReferences;
|
|
17
17
|
checkMeshResource(mesh: Mesh): void;
|
|
18
18
|
loadMultiGLTFAsGroup(tasks: LYLoadTask[], onProgress?: ((url: string, loaded: number, total: number) => void) | null, onAllFinished?: (() => void) | null): void;
|
|
19
|
+
loadGltfFromBuffer(data: ArrayBuffer | string, onLoadFinished: (gltf: GLTF) => void): void;
|
|
19
20
|
loadFile(filepath: string | undefined, onLoadFinished: (data: any) => void): void;
|
|
20
21
|
addAsset(asset: BufferGeometry | Material | Texture, referenceCount?: number): void;
|
|
21
22
|
releaseAsset(asset: BufferGeometry | Material | Texture): void;
|