@xviewer.js/core 1.0.0-alpha.53 → 1.0.0-alpha.55
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 +8 -51
- package/dist/main.js.map +1 -1
- package/dist/module.js +8 -51
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/Viewer.d.ts +1 -3
- package/types/asset/ResourceManager.d.ts +3 -11
- package/types/index.d.ts +2 -1
package/package.json
CHANGED
package/types/Viewer.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { Orientation } from "./enums/Orientation";
|
|
|
6
6
|
import { AssetProperties, LoaderConstructor } from "./asset/ResourceManager";
|
|
7
7
|
import { __C, __P } from "./types";
|
|
8
8
|
import { Component } from "./Component";
|
|
9
|
-
import { TextureSettings } from "./TextureSettings";
|
|
10
9
|
import { Plugin } from "./Plugin";
|
|
11
10
|
export declare class Viewer extends EventEmitter {
|
|
12
11
|
static __target: Vector3;
|
|
@@ -130,9 +129,8 @@ export declare class Viewer extends EventEmitter {
|
|
|
130
129
|
start(): this;
|
|
131
130
|
stop(): this;
|
|
132
131
|
resize(width?: number, height?: number): void;
|
|
133
|
-
loadAsset(props: AssetProperties
|
|
132
|
+
loadAsset(props: AssetProperties): Promise<any>;
|
|
134
133
|
addLoader(Loader: LoaderConstructor): void;
|
|
135
|
-
load({ url, ext, onProgress, castShadow, receiveShadow, ...props }: AssetProperties & __P<Object3D, typeof Object3D>): Promise<any>;
|
|
136
134
|
timeline(target: Object): import("./tween").TweenChain;
|
|
137
135
|
killTweensOf(target: Object): void;
|
|
138
136
|
traverseMaterials(callback: (mat: Material) => void): void;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { LoadingManager } from "three";
|
|
2
2
|
import { TextureSettings } from "../TextureSettings";
|
|
3
3
|
import { aLoader } from "./aLoader";
|
|
4
|
-
export interface AssetProperties {
|
|
4
|
+
export interface AssetProperties extends TextureSettings {
|
|
5
5
|
ext?: string;
|
|
6
|
-
url?: string
|
|
7
|
-
mainFile: File;
|
|
8
|
-
additionalFiles: File[];
|
|
9
|
-
};
|
|
6
|
+
url?: string;
|
|
10
7
|
onProgress?: (event: ProgressEvent) => void;
|
|
11
8
|
}
|
|
12
9
|
export type LoaderConstructor = new (manager: ResourceManager) => aLoader;
|
|
@@ -14,11 +11,6 @@ export declare class ResourceManager {
|
|
|
14
11
|
static extension(path: string): string;
|
|
15
12
|
static dirname(path: string): string;
|
|
16
13
|
static basename(path: string, ext?: string): string;
|
|
17
|
-
static _parseURL(uri: any): {
|
|
18
|
-
url: string;
|
|
19
|
-
file: any;
|
|
20
|
-
ext: string;
|
|
21
|
-
};
|
|
22
14
|
static _getTextureKey(url: string, settings: TextureSettings): string;
|
|
23
15
|
static _texSettingKeys: string[];
|
|
24
16
|
static _splitTextureSettings(props: TextureSettings & {
|
|
@@ -38,5 +30,5 @@ export declare class ResourceManager {
|
|
|
38
30
|
});
|
|
39
31
|
destroy(): void;
|
|
40
32
|
addLoader(Loader: LoaderConstructor): void;
|
|
41
|
-
loadAsset<T = any>({ url, ext, onProgress, ...props }: AssetProperties
|
|
33
|
+
loadAsset<T = any>({ url, ext, onProgress, ...props }: AssetProperties): Promise<T>;
|
|
42
34
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ export { ObjectInstance } from "./ObjectInstance";
|
|
|
16
16
|
export { property, PropertyManager } from "./PropertyManager";
|
|
17
17
|
export { DeviceInput } from "./DeviceInput";
|
|
18
18
|
export { Orientation } from "./enums/Orientation";
|
|
19
|
-
export
|
|
19
|
+
export { aLoader, type LoadProperties } from "./asset/aLoader";
|
|
20
|
+
export { type AssetProperties } from "./asset/ResourceManager";
|