gl-draw 0.18.3 → 0.18.5
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/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2381,7 +2381,6 @@ declare interface Options_17 {
|
|
|
2381
2381
|
|
|
2382
2382
|
declare interface Options_2 {
|
|
2383
2383
|
container: HTMLElement;
|
|
2384
|
-
stats?: boolean;
|
|
2385
2384
|
helper?: boolean;
|
|
2386
2385
|
controls?: Partial<ControlsParams>;
|
|
2387
2386
|
renderer?: Partial<RendererParams>;
|
|
@@ -2507,7 +2506,6 @@ declare class Pencil {
|
|
|
2507
2506
|
timer: Timer;
|
|
2508
2507
|
userData: Record<string, any>;
|
|
2509
2508
|
static options: {
|
|
2510
|
-
stats: boolean;
|
|
2511
2509
|
helper: boolean;
|
|
2512
2510
|
controls: boolean;
|
|
2513
2511
|
renderer: {
|
|
@@ -2578,6 +2576,7 @@ declare class Pencil {
|
|
|
2578
2576
|
private TweenRaf;
|
|
2579
2577
|
private tweenUpdateRaf;
|
|
2580
2578
|
constructor(options: Options_2);
|
|
2579
|
+
initStats(): void;
|
|
2581
2580
|
use(plugin: any, ...args: any[]): void;
|
|
2582
2581
|
addPage({ sceneOptions, cameraOptions, }?: {
|
|
2583
2582
|
sceneOptions?: SceneParams;
|
|
@@ -2884,7 +2883,7 @@ declare class SceneSerializer {
|
|
|
2884
2883
|
exportScene({ checkTextures }?: {
|
|
2885
2884
|
checkTextures?: boolean | undefined;
|
|
2886
2885
|
}): string;
|
|
2887
|
-
restoreScene(data: string | ArrayBuffer | Object3DJSON, registry?: Record<string, new (...args: any[]) => any>, roomEnvMap?: any): Promise<void>;
|
|
2886
|
+
restoreScene(data: string | ArrayBuffer | Object3DJSON, registry?: Record<string, new (...args: any[]) => any>, roomEnvMap?: any, createIfNeeded?: boolean): Promise<void>;
|
|
2888
2887
|
/**
|
|
2889
2888
|
* 根据 objectType 和 registry 创建 BaseObject 实例
|
|
2890
2889
|
*/
|
|
@@ -2915,6 +2914,11 @@ declare class SceneSerializer {
|
|
|
2915
2914
|
* 去重场景 JSON 中重复的 image、VideoTexture、DataTexture
|
|
2916
2915
|
*/
|
|
2917
2916
|
private _deduplicateSceneJson;
|
|
2917
|
+
/**
|
|
2918
|
+
* 将 sceneJson.images 中的 PNG data URL 转为 WebP 以减小体积
|
|
2919
|
+
*/
|
|
2920
|
+
private _convertPngDataUrlsToWebp;
|
|
2921
|
+
private _pngDataUrlToWebp;
|
|
2918
2922
|
/**
|
|
2919
2923
|
* 遍历 sceneJson 的对象树,提取 _baseObjectOptions 中可共享的大字段
|
|
2920
2924
|
* 相同内容只存储一份,对象中替换为引用索引
|