@galacean/engine-loader 2.0.0-alpha.41 → 2.0.0-alpha.43
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/main.js +101 -86
- package/dist/main.js.map +1 -1
- package/dist/module.js +101 -86
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/gltf/GLTFResource.d.ts +3 -3
- package/types/gltf/GLTFUtils.d.ts +1 -1
- package/types/gltf/parser/GLTFParserContext.d.ts +1 -0
- package/types/prefab/PrefabResource.d.ts +2 -2
- package/types/resource-deserialize/utils/BufferReader.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-loader",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.43",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"libs/**/*"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@galacean/engine-
|
|
23
|
-
"@galacean/engine-
|
|
24
|
-
"@galacean/engine-
|
|
22
|
+
"@galacean/engine-math": "2.0.0-alpha.43",
|
|
23
|
+
"@galacean/engine-rhi-webgl": "2.0.0-alpha.43",
|
|
24
|
+
"@galacean/engine-core": "2.0.0-alpha.43"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
|
@@ -32,9 +32,9 @@ export declare class GLTFResource extends ReferResource {
|
|
|
32
32
|
*/
|
|
33
33
|
constructor(engine: Engine, url: string);
|
|
34
34
|
/**
|
|
35
|
-
* Instantiate scene root
|
|
36
|
-
* @param sceneIndex -
|
|
37
|
-
* @returns
|
|
35
|
+
* Instantiate a glTF scene root Entity.
|
|
36
|
+
* @param sceneIndex - The scene index
|
|
37
|
+
* @returns A detached scene-root instance that must be added to a parent Entity or Scene to update and render
|
|
38
38
|
*/
|
|
39
39
|
instantiateSceneRoot(sceneIndex?: number): Entity;
|
|
40
40
|
protected _onDestroy(): void;
|
|
@@ -17,7 +17,7 @@ export declare class GLTFUtils {
|
|
|
17
17
|
/**
|
|
18
18
|
* Get the TypedArray corresponding to the component type.
|
|
19
19
|
*/
|
|
20
|
-
static getComponentType(componentType: AccessorComponentType):
|
|
20
|
+
static getComponentType(componentType: AccessorComponentType): Uint8ArrayConstructor | Float32ArrayConstructor | Uint32ArrayConstructor | Uint16ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor;
|
|
21
21
|
static getNormalizedComponentScale(componentType: AccessorComponentType): number;
|
|
22
22
|
static getAccessorBuffer(context: GLTFParserContext, bufferViews: IBufferView[], accessor: IAccessor): AssetPromise<BufferInfo>;
|
|
23
23
|
static bufferToVector3Array(buffer: TypedArray, byteOffset: number, count: number, normalized: boolean, componentType: AccessorComponentType): Vector3[];
|
|
@@ -21,6 +21,7 @@ export declare class GLTFParserContext {
|
|
|
21
21
|
/** @internal */
|
|
22
22
|
_getPromises: AssetPromise<unknown>[];
|
|
23
23
|
private _resourceCache;
|
|
24
|
+
private readonly _remoteAssetBaseURL;
|
|
24
25
|
private _progress;
|
|
25
26
|
/** @internal */
|
|
26
27
|
_setTaskCompleteProgress: (loaded: number, total: number) => void;
|
|
@@ -13,8 +13,8 @@ export declare class PrefabResource extends ReferResource {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(engine: Engine, url: string);
|
|
15
15
|
/**
|
|
16
|
-
* Instantiate prefab.
|
|
17
|
-
* @returns prefab
|
|
16
|
+
* Instantiate the prefab.
|
|
17
|
+
* @returns A detached prefab instance that must be added to a parent Entity or Scene to update and render
|
|
18
18
|
*/
|
|
19
19
|
instantiate(): Entity;
|
|
20
20
|
/**
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import type { FileHeader } from "./FileHeader";
|
|
1
2
|
export declare class BufferReader {
|
|
2
3
|
data: Uint8Array;
|
|
4
|
+
readonly header?: Readonly<FileHeader>;
|
|
3
5
|
private _dataView;
|
|
4
6
|
private _littleEndian;
|
|
5
7
|
private _position;
|
|
6
8
|
private _baseOffset;
|
|
7
|
-
constructor(data: Uint8Array, byteOffset?: number, byteLength?: number, littleEndian?: boolean);
|
|
9
|
+
constructor(data: Uint8Array, byteOffset?: number, byteLength?: number, littleEndian?: boolean, header?: Readonly<FileHeader>);
|
|
8
10
|
get position(): number;
|
|
9
11
|
get offset(): number;
|
|
10
12
|
nextUint8(): number;
|