@xviewer.js/core 1.0.4-alpha.1 → 1.0.4-alpha.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xviewer.js/core",
3
- "version": "1.0.4-alpha.1",
3
+ "version": "1.0.4-alpha.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/types/Viewer.d.ts CHANGED
@@ -66,7 +66,7 @@ export declare class Viewer extends EventEmitter {
66
66
  get scene(): Scene;
67
67
  get camera(): Camera;
68
68
  get renderer(): WebGLRenderer;
69
- constructor({ root, canvas, input, shadows, sortObjects, resize, orthographic, camera, targetFrameRate, fixedFrameTime, colorSpace, toneMapping, toneMappingExposure, maxDPR, path, resourcePath, dracoPath, orientation, loader, tasker, ...webglOpts }?: {
69
+ constructor({ root, canvas, input, shadows, sortObjects, resize, orthographic, camera, targetFrameRate, fixedFrameTime, colorSpace, toneMapping, toneMappingExposure, maxDPR, path, resourcePath, dracoPath, transcoderPath, orientation, loader, tasker, ...webglOpts }?: {
70
70
  /** 根节点,用于屏幕旋转 */
71
71
  root?: HTMLElement;
72
72
  /** 渲染用的 canvas 元素,如果不提供,默认获取 id 为 "canvas" 的元素 */
@@ -97,6 +97,8 @@ export declare class Viewer extends EventEmitter {
97
97
  resourcePath?: string;
98
98
  /** Draco 压缩解码器路径,默认 Google CDN 地址 */
99
99
  dracoPath?: string;
100
+ /** The WASM transcoder and JS wrapper are available from the examples/jsm/libs/basis directory. */
101
+ transcoderPath?: string;
100
102
  /** 页面方向,AUTO: 自动,LANDSCAPE: 横屏,PORTRAIT: 竖屏 */
101
103
  orientation?: Orientation;
102
104
  /** Creates an orthographic camera */
@@ -8,6 +8,7 @@ export interface LoadProperties {
8
8
  path?: string;
9
9
  resourcePath?: string;
10
10
  dracoPath?: string;
11
+ transcoderPath?: string;
11
12
  manager?: LoadingManager;
12
13
  onLoad: (asset: any) => void;
13
14
  onProgress?: (event: ProgressEvent) => void;
@@ -10,6 +10,7 @@ export interface AssetProperties extends TextureSettings {
10
10
  path?: string;
11
11
  resourcePath?: string;
12
12
  dracoPath?: string;
13
+ transcoderPath?: string;
13
14
  manager?: LoadingManager;
14
15
  onProgress?: (event: ProgressEvent) => void;
15
16
  }
@@ -27,5 +28,5 @@ export declare class ResourceManager {
27
28
  destroy(): void;
28
29
  getLoader(ext: string): Loader;
29
30
  addLoader(Loader: LoaderConstructor): Loader;
30
- loadAsset<T = any>({ url, buffer, ext, path, resourcePath, dracoPath, manager, onProgress, ...props }: AssetProperties): Promise<T>;
31
+ loadAsset<T = any>({ url, ext, onProgress, ...props }: AssetProperties): Promise<T>;
31
32
  }
@@ -1,6 +1,6 @@
1
1
  import { Loader, LoadProperties } from "../asset/Loader";
2
2
  export declare class KTX2Loader extends Loader {
3
3
  extension: string[];
4
- load({ url, path, resourcePath, manager, texSettings, onLoad, onProgress, onError }: LoadProperties): void;
4
+ load({ url, path, resourcePath, transcoderPath, manager, texSettings, onLoad, onProgress, onError }: LoadProperties): void;
5
5
  private _loader;
6
6
  }