endset_three_editor 0.1.7 → 0.1.8

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.
@@ -10,7 +10,7 @@ import * as THREE from "three";
10
10
  * 初始化编辑器,挂载到指定 DOM 容器
11
11
  * @param container - 编辑器挂载的 DOM 元素
12
12
  */
13
- export declare function initEditor(container: HTMLElement, mode?: string): void;
13
+ export declare function initEditor(container: HTMLElement, mode?: string, sceneData?: string | object): void;
14
14
  /**
15
15
  * 选中场景中的一个物体,将其附着到变换控制器并显示平移轴
16
16
  * @param obj - 要选中的物体
@@ -62,12 +62,10 @@ export declare function getRenderer(): THREE.WebGLRenderer | null;
62
62
  * @param options.includeHelpers 是否包含辅助对象(网格、灯光等),默认 false
63
63
  * @returns JSON 字符串
64
64
  */
65
- export declare function exportSceneToJSON(options?: {
66
- includeHelpers?: boolean;
67
- }): string;
65
+ export declare function exportSceneToJSON(): string;
68
66
  /**
69
67
  * 从 JSON 数据恢复场景(使用 Three.js 内置 ObjectLoader)
70
68
  * @param json - JSON 字符串或对象
71
69
  * @returns 解析后的 Object3D 或 Scene
72
70
  */
73
- export declare function importSceneFromJSON(json: string | object): THREE.Object3D;
71
+ export declare function loadSceneFromJSON(json: string | object, mode?: string): void;