blockbench-types 5.2.0-beta.0-next.2 → 5.2.0-beta.0-next.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.
@@ -119,7 +119,8 @@ declare class _Animation extends AnimationItem {
119
119
  menu: Menu
120
120
  file_menu: Menu
121
121
  }
122
-
122
+ declare type BBAnimation = _Animation
123
+ declare const BBAnimation = _Animation
123
124
  interface MolangAutoCompletionItem {
124
125
  text: string
125
126
  label: string | undefined
@@ -25,7 +25,6 @@
25
25
  /// <reference types="./molang" />
26
26
  /// <reference types="./outliner" />
27
27
  /// <reference types="./painter" />
28
- /// <reference types="./preview_scene" />
29
28
  /// <reference types="./edit_session" />
30
29
  /// <reference types="./screencam" />
31
30
  /// <reference types="./textures" />
@@ -1,4 +1,7 @@
1
- type ScopedFS = Pick<typeof import("node:fs"),
1
+
2
+ type ScopedFS = Pick<typeof import("node:fs"),
3
+ "access" |
4
+ "accessSync" |
2
5
  "copyFile" |
3
6
  "copyFileSync" |
4
7
  "readFile" |
@@ -15,15 +18,19 @@ type ScopedFS = Pick<typeof import("node:fs"),
15
18
  "rename" |
16
19
  "renameSync" |
17
20
  "rm" |
18
- "rmSync" |
21
+ "rm" |
19
22
  "rmdir" |
20
23
  "rmdirSync" |
21
24
  "unlink" |
22
25
  "unlinkSync" |
23
26
  "stat" |
24
- "statSync"
27
+ "statSync" |
28
+ "watchFile" |
29
+ "unwatchFile" |
30
+ "watch"
25
31
  > & {
26
32
  promises: Pick<typeof import("node:fs").promises,
33
+ "access" |
27
34
  "copyFile" |
28
35
  "readFile" |
29
36
  "writeFile" |
@@ -34,7 +41,8 @@ type ScopedFS = Pick<typeof import("node:fs"),
34
41
  "rm" |
35
42
  "rmdir" |
36
43
  "unlink" |
37
- "stat"
44
+ "stat" |
45
+ "watch"
38
46
  >
39
47
  }
40
48
  interface RequireDialogOptions {
@@ -49,6 +57,8 @@ declare function requireNativeModule(module: 'zlib'): typeof import("node:zlib")
49
57
  declare function requireNativeModule(module: 'timers'): typeof import("node:timers");
50
58
  declare function requireNativeModule(module: 'url'): typeof import("node:url");
51
59
  declare function requireNativeModule(module: 'string_decoder'): typeof import("node:string_decoder");
60
+ declare function requireNativeModule(module: 'stream'): typeof import("node:stream");
61
+ declare function requireNativeModule(module: 'perf_hooks'): typeof import("node:perf_hooks");
52
62
  declare function requireNativeModule(module: 'querystring'): typeof import("node:querystring");
53
63
  declare function requireNativeModule(module: 'child_process', options?: RequireDialogOptions): (typeof import("node:child_process")) | undefined;
54
64
  declare function requireNativeModule(module: 'electron', options?: RequireDialogOptions): (typeof import("node:electron")) | undefined;
@@ -59,3 +69,4 @@ declare function requireNativeModule(module: 'util', options?: RequireDialogOpti
59
69
  declare function requireNativeModule(module: 'os', options?: RequireDialogOptions): (typeof import("node:os")) | undefined;
60
70
  declare function requireNativeModule(module: 'v8', options?: RequireDialogOptions): (typeof import("node:v8")) | undefined;
61
71
  declare function requireNativeModule(module: 'clipboard', options?: RequireDialogOptions): (import('electron').Clipboard) | undefined;
72
+ declare function requireNativeModule(module: 'shell', options?: RequireDialogOptions): (import('electron').Shell) | undefined;
@@ -10,6 +10,7 @@ declare const DisplayMode: {
10
10
  display_base: any
11
11
  animate_preview: Preview
12
12
  groundAnimation(): void
13
+ updateDisplaySkin(): void
13
14
  }
14
15
 
15
16
  declare type DisplaySlotName =
package/custom/group.d.ts CHANGED
@@ -24,7 +24,7 @@ interface GroupOptions {
24
24
  declare class Group extends OutlinerNode {
25
25
  constructor(options: Partial<GroupOptions> | string)
26
26
  /**
27
- * Returns the selected groups
27
+ * Returns the directly selected groups
28
28
  * @Note This only includes directly selected groups, not groups that are selected because the parent is selected
29
29
  */
30
30
  static selected: Group[]
@@ -90,5 +90,7 @@ declare class _Keyframe {
90
90
  data_points: KeyframeDataPoint[]
91
91
  }
92
92
  }
93
+ declare type BBKeyframe = _Keyframe;
94
+ declare const BBKeyframe = _Keyframe;
93
95
 
94
96
  declare function updateKeyframeSelection(): void
package/custom/misc.d.ts CHANGED
@@ -24,50 +24,52 @@ interface BlockbenchEventMap {
24
24
  display_animation_frame: {in_loop: true}
25
25
  display_default_pose: {reduced_updates: boolean}
26
26
  interpolate_keyframes: {animator: BoneAnimator, t: number, time: number, use_quaternions: boolean, keyframe_before: _Keyframe, keyframe_after: _Keyframe}
27
- before_closing: any
28
- create_session: any
29
- join_session: any
30
- quit_session: any
31
- send_session_data: any
32
- receive_session_data: any
33
- user_joins_session: any
34
- user_leaves_session: any
35
- process_chat_message: any
27
+ before_closing: {}
28
+ create_session: {peer: Peer, token: string}
29
+ join_session: {conn: DataConnection}
30
+ quit_session: {}
31
+ send_session_data: {type: string, data: any}
32
+ receive_session_data: {type: string, data: any}
33
+ user_joins_session: EditSession.Client
34
+ user_leaves_session: EditSession.Client
35
+ process_chat_message: {text: string, color: string}
36
36
  loaded_plugin: { plugin: BBPlugin }
37
37
  unloaded_plugin: { plugin: BBPlugin }
38
38
  installed_plugin: { plugin: BBPlugin }
39
39
  uninstalled_plugin: { plugin: BBPlugin }
40
- update_settings: any
40
+ update_settings: {}
41
41
  update_project_settings: Record<string, any>
42
42
  save_project: {model: any, options?: any}
43
43
  load_project: {model: any, path: string}
44
- new_project: any
45
- reset_project: any
46
- close_project: any
47
- saved_state_changed: any
48
- save_model_action: any
49
- add_cube: any
50
- add_mesh: any
51
- add_group: any
52
- add_texture_mesh: any
53
- add_armature: any
54
- add_armature_bone: any
55
- add_bounding_box: any
56
- group_elements: any
57
- update_selection: any
58
- compile_bedrock_animations: any
59
- load_animation: any
60
- load_animation_controller: any
61
- update_keyframe_selection: any
62
- select_all: any
63
- added_to_selection: any
64
- invert_selection: any
65
- canvas_select: any
66
- canvas_click: any
44
+ new_project: {project: ModelProject}
45
+ close_project: {project: ModelProject, on_quit?: boolean}
46
+ saved_state_changed: {project: ModelProject, saved: boolean}
47
+ add_cube: {object: Cube}
48
+ add_mesh: {object: Mesh}
49
+ add_group: {object: Group}
50
+ add_texture_mesh: {object: TextureMesh}
51
+ add_armature: {object: Armature}
52
+ add_armature_bone: {object: ArmatureBone}
53
+ add_bounding_box: {object: BoundingBox}
54
+ group_elements: {object: Group}
55
+ update_selection: void
56
+ compile_bedrock_animation: {animation: Animation, json: any}
57
+ load_animation: {animation: Animation, json: any}
58
+ load_animation_controller: {animation_controller: AnimationController, json: any}
59
+ update_keyframe_selection: void
60
+ select_all: {}
61
+ added_to_selection: {added: OutlinerElement[]}
62
+ invert_selection: {}
67
63
  change_texture_path: {texture: Texture}
68
64
  add_texture: {texture: Texture}
69
- generate_texture_template: any
70
- update_texture_selection: any
65
+ generate_texture_template: {
66
+ options: Record<string, any>
67
+ elements: OutlinerElement[]
68
+ texture: Texture
69
+ resolution_multiplier: number
70
+ data: {face_list: any, box_uv_templates: any}
71
+ }
72
+ update_texture_selection: void
71
73
  init_edit: {aspects: UndoAspects, amended: boolean, save: UndoSave}
72
74
  finish_edit: {aspects: UndoAspects, message: string}
73
75
  finished_edit: {aspects: UndoAspects, message: string} | {remote: true}
@@ -81,10 +83,10 @@ interface BlockbenchEventMap {
81
83
  create_undo_save: {save: UndoSave, aspects: UndoAspects}
82
84
  drop_text: { text: string }
83
85
  paste_text: { text: string }
84
- change_color: any
86
+ change_color: {color: string, secondary?: boolean}
85
87
  select_mode: { mode: Mode }
86
88
  unselect_mode: { mode: Mode }
87
- change_active_panel: any
89
+ change_active_panel: {last_panel: Panel, panel: Panel}
88
90
  resize_window: {event?: Event}
89
91
  change_view_mode: {view_mode: string, previous_view_mode: string}
90
92
  press_key: {input_in_focus?: HTMLElement, event: KeyboardEvent, capture: () => void}
@@ -94,21 +96,21 @@ interface BlockbenchEventMap {
94
96
  delete_format: {format: ModelFormat}
95
97
  select_project: { project: ModelProject }
96
98
  unselect_project: { project: ModelProject }
97
- setup_project: any
98
- update_project_resolution: any
99
- merge_project: any
100
- display_model_stats: any
99
+ setup_project: {project: ModelProject}
100
+ update_project_resolution: {project: ModelProject}
101
+ merge_project: {model: any, path: string}
102
+ display_model_stats: {stats: {label: string, value: number | string}[]}
101
103
  update_view: UpdateViewOptions
102
104
  update_camera_position: {preview: Preview}
103
- render_frame: any
104
- construct_model_loader: any
105
- delete_model_loader: any
106
- update_recent_project_data: any
107
- update_recent_project_thumbnail: any
108
- load_from_recent_project_data: any
105
+ render_frame: {}
106
+ construct_model_loader: {loader: ModelLoader}
107
+ delete_model_loader: {loader: ModelLoader}
108
+ update_recent_project_data: {data: RecentProjectData}
109
+ update_recent_project_thumbnail: {data: RecentProjectData, thumbnail: string}
110
+ load_from_recent_project_data: {data: RecentProjectData}
109
111
  edit_animation_properties: {animation: _Animation}
110
- select_preview_scene: any
111
- unselect_preview_scene: any
112
+ select_preview_scene: {scene: PreviewScene}
113
+ unselect_preview_scene: {scene: PreviewScene}
112
114
  select_animation: {animation: _Animation}
113
115
  remove_animation: {animations: _Animation[]}
114
116
  compile_bedrock_animation_controller_state: {state: AnimationControllerState, json: any}
@@ -120,29 +122,29 @@ interface BlockbenchEventMap {
120
122
  compile_bedrock_animation_controller: {state: AnimationController, json: any}
121
123
  add_animation_controller: {state: AnimationController}
122
124
  edit_animation_controller_properties: {state: AnimationController}
123
- timeline_play: any
124
- timeline_pause: any
125
- unselect_interface: any
126
- reset_layout: any
125
+ timeline_play: {}
126
+ timeline_pause: {}
127
+ unselect_interface: {event: Event}
128
+ reset_layout: {}
127
129
  update_pressed_modifier_keys: {
128
130
  before: {shift: boolean, alt: boolean, ctrl: boolean}
129
131
  now: {shift: boolean, alt: boolean, ctrl: boolean}
130
132
  event: KeyboardEvent
131
133
  }
132
134
  open_bar_menu: {menu: BarMenu}
133
- unselect_all: any
135
+ unselect_all: {}
134
136
  get_face_texture: {face: Face, element: OutlinerElement}
135
- quick_save_model: any
136
- save_editor_state: any
137
- load_editor_state: any
138
- select_no_project: any
139
- flip_node_name: any
137
+ quick_save_model: {}
138
+ save_editor_state: { project: ModelProject }
139
+ load_editor_state: { project: ModelProject }
140
+ select_no_project: {}
141
+ flip_node_name: {pairs: Record<string, string>, node: OutlinerNode, axis: axisNumber, original_name?: string}
140
142
  update_scene_shading: any
141
143
  edit_layer_properties: {layer: TextureLayer}
142
144
  select_texture: {texture: Texture, event: Event}
143
145
  compile_texture_mcmeta: {mcmeta: any}
144
- register_element_type: any
145
- edit_collection_properties: any
146
+ register_element_type: {id: string, constructor: any}
147
+ edit_collection_properties: {collection: Collection}
146
148
  }
147
149
 
148
150
  type BlockbenchEventName = keyof BlockbenchEventMap
@@ -183,14 +185,11 @@ declare const Prop = {
183
185
  show_right_bar: boolean,
184
186
  }
185
187
  declare const Project: ModelProject
186
- declare const ReferenceImageMode: any
187
188
 
188
189
  declare function isStringNumber(value: any): boolean
189
190
 
190
191
  declare function marked(text: string): string
191
192
  declare function pureMarked(text: string): string
192
193
 
193
- declare type ReferenceImage = any
194
- declare const ReferenceImage = any
195
194
  declare type SplineMesh = typeof OutlinerElement & Record<string, any>
196
195
  declare const SplineMesh: typeof OutlinerElement
@@ -11,6 +11,7 @@ declare namespace Painter {
11
11
  const lock_alpha: boolean
12
12
  const erase_mode: boolean
13
13
  const default_brush_presets: any[]
14
+ let screen_space_brush_cursor: HTMLElement
14
15
 
15
16
  function edit(
16
17
  texture: Texture,
@@ -30,6 +31,7 @@ declare namespace Painter {
30
31
  function getMirrorElement(element: OutlinerElement, symmetry_axes: number[]): void
31
32
  function updateNslideValues(): void
32
33
  function getBlendModeCompositeOperation(blend_mode?: string): string
34
+ function getBrushDimensions(size?: number): ArrayVector2
33
35
  function getCanvasToolPixelCoords(uv_point: {x: number, y: number}, texture: Texture): ArrayVector2
34
36
  function getCanvas(texture: Texture): HTMLCanvasElement
35
37
  function copyCanvas(original_canvas: HTMLCanvasElement): HTMLCanvasElement
@@ -1,29 +1,7 @@
1
1
  import { ModelFormat } from "./io/format";
2
2
  import { Filesystem } from "./file_system";
3
3
  import { MessageBoxOptions } from "./interface/dialog";
4
- interface ToastNotificationOptions {
5
- /**
6
- * Text message
7
- */
8
- text: string;
9
- /**
10
- * Blockbench icon string
11
- */
12
- icon?: IconString;
13
- /**
14
- * Expire time in miliseconds
15
- */
16
- expire?: number;
17
- /**
18
- * Background color, accepts any CSS color string
19
- */
20
- color?: string;
21
- /**
22
- * Method to run on click.
23
- * @returns Return `true` to close toast
24
- */
25
- click?: (event: Event) => boolean;
26
- }
4
+ import { ToastNotification, ToastNotificationOptions } from "./interface/toast_notification";
27
5
  export declare const LastVersion: string;
28
6
  export declare const Blockbench: {
29
7
  isWeb: boolean;
@@ -53,7 +31,7 @@ export declare const Blockbench: {
53
31
  registerEdit(): void;
54
32
  getIconNode(icon: IconString | boolean | HTMLElement | (() => (IconString | boolean | HTMLElement)), color?: string): HTMLElement;
55
33
  showQuickMessage(message: any, time?: number): void;
56
- showToastNotification(options: ToastNotificationOptions): any;
34
+ showToastNotification(options: ToastNotificationOptions): ToastNotification;
57
35
  setCursorTooltip(text?: string): void;
58
36
  setProgress(progress: number, time?: number, bar?: string): void;
59
37
  showStatusMessage(message: string, time?: number): void;
@@ -140,7 +118,7 @@ declare const global: {
140
118
  registerEdit(): void;
141
119
  getIconNode(icon: IconString | boolean | HTMLElement | (() => (IconString | boolean | HTMLElement)), color?: string): HTMLElement;
142
120
  showQuickMessage(message: any, time?: number): void;
143
- showToastNotification(options: ToastNotificationOptions): any;
121
+ showToastNotification(options: ToastNotificationOptions): ToastNotification;
144
122
  setCursorTooltip(text?: string): void;
145
123
  setProgress(progress: number, time?: number, bar?: string): void;
146
124
  showStatusMessage(message: string, time?: number): void;
@@ -0,0 +1,48 @@
1
+ export declare const recent_projects: RecentProjectData[];
2
+ export declare function initializeDesktopApp(): void;
3
+ export declare function loadOpenWithBlockbenchFile(): void;
4
+ export type RecentProjectData = {
5
+ name: string;
6
+ path: string;
7
+ icon: string;
8
+ day: number;
9
+ favorite: boolean;
10
+ textures?: string[];
11
+ animation_files?: string[];
12
+ };
13
+ export declare function updateRecentProjects(): void;
14
+ export declare function addRecentProject(data: Partial<RecentProjectData>): void;
15
+ export declare function updateRecentProjectData(): void;
16
+ export declare function updateRecentProjectThumbnail(): Promise<void>;
17
+ export declare function loadDataFromModelMemory(): void;
18
+ export declare function isImageEditorValid(path: string): boolean;
19
+ export declare function changeImageEditor(texture?: Texture, not_found?: boolean): void;
20
+ export declare function openDefaultTexturePath(): void;
21
+ export declare function findExistingFile(paths: string[]): string;
22
+ export declare function createBackup(init: boolean): void;
23
+ declare const global: {
24
+ PathModule: import("path").PlatformPath;
25
+ recent_projects: import("./desktop").RecentProjectData[];
26
+ nativeImage: typeof Electron.NativeImage;
27
+ updateRecentProjects: typeof import("./desktop").updateRecentProjects;
28
+ addRecentProject: typeof import("./desktop").addRecentProject;
29
+ updateRecentProjectData: typeof import("./desktop").updateRecentProjectData;
30
+ loadDataFromModelMemory: typeof import("./desktop").loadDataFromModelMemory;
31
+ changeImageEditor: typeof import("./desktop").changeImageEditor;
32
+ openDefaultTexturePath: typeof import("./desktop").openDefaultTexturePath;
33
+ updateRecentProjectThumbnail: typeof import("./desktop").updateRecentProjectThumbnail;
34
+ createBackup: typeof import("./desktop").createBackup;
35
+ };
36
+ declare global {
37
+ const recent_projects: RecentProjectData[];
38
+ type RecentProjectData = import('./desktop').RecentProjectData;
39
+ const updateRecentProjects: typeof global.updateRecentProjects;
40
+ const addRecentProject: typeof global.addRecentProject;
41
+ const updateRecentProjectData: typeof global.updateRecentProjectData;
42
+ const updateRecentProjectThumbnail: typeof global.updateRecentProjectThumbnail;
43
+ const loadDataFromModelMemory: typeof global.loadDataFromModelMemory;
44
+ const changeImageEditor: typeof global.changeImageEditor;
45
+ const openDefaultTexturePath: typeof global.openDefaultTexturePath;
46
+ const createBackup: typeof global.createBackup;
47
+ }
48
+ export {};
@@ -244,6 +244,10 @@ export interface BrushOptions {
244
244
  * Enable the input for opacity when this tool is selected
245
245
  */
246
246
  opacity: boolean;
247
+ /**
248
+ * Enable the toggle for screen space when this tool is selected
249
+ */
250
+ screen_space: boolean;
247
251
  /**
248
252
  * When the brush size is an even number, offset the snapping by half a pixel so that even size brush strokes can be correctly centered
249
253
  */
@@ -314,7 +314,7 @@ type MessageBoxCommandOptions = string | {
314
314
  };
315
315
  type MessageBoxCheckbox = string | {
316
316
  value?: boolean;
317
- condition: ConditionResolvable;
317
+ condition?: ConditionResolvable;
318
318
  text: string;
319
319
  };
320
320
  export interface MessageBoxOptions {
@@ -359,7 +359,7 @@ interface ConfigDialogOptions extends DialogOptions {
359
359
  }
360
360
  export declare class ConfigDialog extends Dialog {
361
361
  constructor(id: string, options: ConfigDialogOptions);
362
- show(anchor: HTMLElement): this;
362
+ show(anchor?: HTMLElement): this;
363
363
  build(): this;
364
364
  delete(): void;
365
365
  }
@@ -42,7 +42,10 @@ export interface CustomMenuItem {
42
42
  click?(context?: any, event?: Event): void;
43
43
  }
44
44
  export type MenuItem = CustomMenuItem | Action | BarSelect | MenuSeparator | string | ((context: any) => MenuItem);
45
- type MenuOpenPositionAnchor = MouseEvent | HTMLElement | 'mouse';
45
+ export type MenuOpenPositionAnchor = MouseEvent | HTMLElement | {
46
+ clientX: number;
47
+ clientY: number;
48
+ } | 'mouse';
46
49
  export interface MenuOptions {
47
50
  onOpen?(position: MenuOpenPositionAnchor, context?: any): void;
48
51
  onClose?(): void;
@@ -126,5 +126,13 @@ declare const global: {
126
126
  };
127
127
  declare global {
128
128
  const SharedActions: typeof global.SharedActions;
129
+ interface BarItemRegistry {
130
+ rename: Action;
131
+ delete: Action;
132
+ duplicate: Action;
133
+ select_all: Action;
134
+ unselect_all: Action;
135
+ invert_selection: Action;
136
+ }
129
137
  }
130
138
  export {};
@@ -0,0 +1,45 @@
1
+ export interface ToastNotificationOptions {
2
+ id?: string;
3
+ /**
4
+ * Text message
5
+ */
6
+ text: string;
7
+ /**
8
+ * Blockbench icon string
9
+ */
10
+ icon?: IconString;
11
+ /**
12
+ * Expire time in miliseconds
13
+ */
14
+ expire?: number;
15
+ /**
16
+ * Background color, accepts any CSS color string
17
+ */
18
+ color?: string;
19
+ /**
20
+ * Method to run on click.
21
+ * @returns Return `true` to close toast
22
+ */
23
+ click?: (event: Event) => boolean | void;
24
+ /**
25
+ * Method to run on close via the close button.
26
+ * @returns Return `falce` to cancel the close
27
+ */
28
+ onClose?: (event: Event) => boolean | void;
29
+ }
30
+ export declare class ToastNotification {
31
+ node: HTMLLIElement;
32
+ id: string;
33
+ options: ToastNotificationOptions;
34
+ constructor(id: string, options: ToastNotificationOptions);
35
+ delete(): void;
36
+ static notifications: Record<string, ToastNotification>;
37
+ }
38
+ declare const global: {
39
+ ToastNotification: typeof import("./toast_notification").ToastNotification;
40
+ };
41
+ declare global {
42
+ type ToastNotification = import('./toast_notification').ToastNotification;
43
+ const ToastNotification: typeof global.ToastNotification;
44
+ }
45
+ export {};
@@ -0,0 +1,129 @@
1
+ declare global {
2
+ /**
3
+ * The base 3D object that is supported by {@link CSS3DRenderer}.
4
+ *
5
+ * @augments Object3D
6
+ * @three_import import { CSS3DObject } from 'three/addons/renderers/CSS3DRenderer.js';
7
+ */
8
+ class CSS3DObject extends Object3D {
9
+ /**
10
+ * Constructs a new CSS3D object.
11
+ *
12
+ * @param {DOMElement} [element] - The DOM element.
13
+ */
14
+ constructor(element?: DOMElement);
15
+ /**
16
+ * This flag can be used for type testing.
17
+ *
18
+ * @type {boolean}
19
+ * @readonly
20
+ * @default true
21
+ */
22
+ readonly isCSS3DObject: boolean;
23
+ /**
24
+ * The DOM element which defines the appearance of this 3D object.
25
+ *
26
+ * @type {HTMLElement}
27
+ * @readonly
28
+ * @default true
29
+ */
30
+ readonly element: HTMLElement;
31
+ /**
32
+ * Copies of the dom element for rendering with multiple viewports in parallel
33
+ *
34
+ * @type {HTMLElement[]}
35
+ * @readonly
36
+ */
37
+ readonly copy_elements: HTMLElement[];
38
+ /**
39
+ * Whether the back side of the object is culled
40
+ *
41
+ * @type {boolean}
42
+ */
43
+ backface_culling: boolean;
44
+ getCopyElement(): HTMLElement;
45
+ discardCopyElements(): void;
46
+ copy(source: any, recursive: any): this;
47
+ }
48
+ /**
49
+ * A specialized version of {@link CSS3DObject} that represents
50
+ * DOM elements as sprites.
51
+ *
52
+ * @augments CSS3DObject
53
+ * @three_import import { CSS3DSprite } from 'three/addons/renderers/CSS3DRenderer.js';
54
+ */
55
+ class CSS3DSprite extends CSS3DObject {
56
+ /**
57
+ * This flag can be used for type testing.
58
+ *
59
+ * @type {boolean}
60
+ * @readonly
61
+ * @default true
62
+ */
63
+ readonly isCSS3DSprite: boolean;
64
+ /**
65
+ * The sprite's rotation in radians.
66
+ *
67
+ * @type {number}
68
+ * @default 0
69
+ */
70
+ rotation2D: number;
71
+ copy(source: any, recursive: any): this;
72
+ }
73
+ /**
74
+ * This renderer can be used to apply hierarchical 3D transformations to DOM elements
75
+ * via the CSS3 [transform]{@link https://www.w3schools.com/cssref/css3_pr_transform.asp} property.
76
+ * `CSS3DRenderer` is particularly interesting if you want to apply 3D effects to a website without
77
+ * canvas based rendering. It can also be used in order to combine DOM elements with WebGLcontent.
78
+ *
79
+ * There are, however, some important limitations:
80
+ *
81
+ * - It's not possible to use the material system of *three.js*.
82
+ * - It's also not possible to use geometries.
83
+ * - The renderer only supports 100% browser and display zoom.
84
+ *
85
+ * So `CSS3DRenderer` is just focused on ordinary DOM elements. These elements are wrapped into special
86
+ * 3D objects ({@link CSS3DObject} or {@link CSS3DSprite}) and then added to the scene graph.
87
+ *
88
+ * @three_import import { CSS3DRenderer } from 'three/addons/renderers/CSS3DRenderer.js';
89
+ */
90
+ class CSS3DRenderer {
91
+ /**
92
+ * Constructs a new CSS3D renderer.
93
+ *
94
+ * @param {CSS3DRenderer~Parameters} [parameters] - The parameters.
95
+ */
96
+ constructor(parameters?: {});
97
+ /**
98
+ * The DOM where the renderer appends its child-elements.
99
+ *
100
+ * @type {DOMElement}
101
+ */
102
+ domElement: DOMElement;
103
+ /**
104
+ * Returns an object containing the width and height of the renderer.
105
+ *
106
+ * @return {{width:number,height:number}} The size of the renderer.
107
+ */
108
+ getSize: () => {
109
+ width: number;
110
+ height: number;
111
+ };
112
+ /**
113
+ * Renders the given scene using the given camera.
114
+ *
115
+ * @param {Object3D} scene - A scene or any other type of 3D object.
116
+ * @param {Camera} camera - The camera.
117
+ */
118
+ render: (scene: Object3D, camera: Camera, is_main: any) => void;
119
+ /**
120
+ * Resizes the renderer to the given width and height.
121
+ *
122
+ * @param {number} width - The width of the renderer.
123
+ * @param {number} height - The height of the renderer.
124
+ */
125
+ setSize: (width: number, height: number) => void;
126
+ }
127
+ }
128
+ import { Object3D } from 'three';
129
+ export {};
@@ -29,7 +29,7 @@ declare global {
29
29
  lines_mesh: import("three").Line<import("three").BufferGeometry, import("three").LineBasicMaterial>;
30
30
  unselect_listener: Deletable;
31
31
  showToast(): void;
32
- toast: any;
32
+ toast: import("../../interface/toast_notification").ToastNotification;
33
33
  hover(data: any): void;
34
34
  updatePreviewGeometry(): this;
35
35
  addPoint(data: any): void;
@@ -0,0 +1,2 @@
1
+ type SpacingOption = 'proportional' | 'even_start' | 'even_end';
2
+ export {};
@@ -34,7 +34,7 @@ interface MirrorModelingElementTypeOptions {
34
34
  updateCounterpart?(original: OutlinerElement, counterpart: OutlinerElement, context: {}): void;
35
35
  createLocalSymmetry?(element: OutlinerElement, cached_data: any): void;
36
36
  }
37
- export declare function symmetrizeArmature(armature: Armature, mesh: Mesh, affected_vkeys: Set<string>): void;
37
+ export declare function symmetrizeArmature(armature: Armature, mesh: Mesh, affected_vkeys: Set<string>): Mesh | undefined;
38
38
  declare const global: {
39
39
  MirrorModeling: {
40
40
  initial_transformer_position: number;