blockbench-types 5.0.6 → 5.1.0-beta.0-next.1

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.
Files changed (54) hide show
  1. package/custom/action.d.ts +3 -3
  2. package/custom/animation.d.ts +1 -0
  3. package/custom/cube.d.ts +1 -20
  4. package/custom/group.d.ts +1 -1
  5. package/custom/mesh.d.ts +1 -0
  6. package/custom/misc.d.ts +3 -1
  7. package/custom/molang.d.ts +5 -4
  8. package/custom/outliner.d.ts +99 -66
  9. package/custom/preview_scene.d.ts +3 -1
  10. package/custom/util.d.ts +7 -12
  11. package/generated/animations/timeline_animators.d.ts +2 -1
  12. package/generated/api.d.ts +84 -6
  13. package/generated/auto_backup.d.ts +48 -0
  14. package/generated/file_system.d.ts +6 -1
  15. package/generated/interface/dialog.d.ts +16 -0
  16. package/generated/interface/form.d.ts +8 -0
  17. package/generated/interface/panels.d.ts +20 -0
  18. package/generated/interface/settings.d.ts +46 -0
  19. package/generated/interface/start_screen.d.ts +1 -16
  20. package/generated/interface/themes.d.ts +6 -0
  21. package/generated/io/format.d.ts +9 -1
  22. package/generated/io/formats/bedrock_old.d.ts +1 -1
  23. package/generated/languages.d.ts +45 -0
  24. package/generated/lib/CanvasFrame.d.ts +6 -1
  25. package/generated/main.d.ts +10 -11
  26. package/generated/misc.d.ts +0 -11
  27. package/generated/modeling/mirror_modeling.d.ts +25 -1
  28. package/generated/modeling/scale.d.ts +1 -9
  29. package/generated/modes.d.ts +20 -0
  30. package/generated/outliner/abstract/face.d.ts +40 -0
  31. package/generated/outliner/abstract/outliner_element.d.ts +42 -0
  32. package/generated/outliner/abstract/outliner_node.d.ts +96 -0
  33. package/generated/outliner/billboard.d.ts +0 -1
  34. package/generated/outliner/collections.d.ts +7 -2
  35. package/generated/outliner/spline_mesh.d.ts +0 -1
  36. package/generated/outliner/types/armature.d.ts +59 -0
  37. package/generated/outliner/types/armature_bone.d.ts +90 -0
  38. package/generated/outliner/types/billboard.d.ts +80 -0
  39. package/generated/outliner/types/cube.d.ts +169 -0
  40. package/generated/outliner/types/group.d.ts +65 -0
  41. package/generated/outliner/types/locator.d.ts +26 -0
  42. package/generated/outliner/types/mesh.d.ts +115 -0
  43. package/generated/outliner/types/null_object.d.ts +22 -0
  44. package/generated/outliner/types/spline_mesh.d.ts +219 -0
  45. package/generated/outliner/types/texture_mesh.d.ts +26 -0
  46. package/generated/plugin_loader.d.ts +43 -0
  47. package/generated/preview/reference_images.d.ts +1 -1
  48. package/generated/util/event_system.d.ts +6 -0
  49. package/generated/util/json.d.ts +17 -0
  50. package/generated/util/molang.d.ts +8 -1
  51. package/generated/util/property.d.ts +6 -0
  52. package/generated/util/state_memory.d.ts +14 -1
  53. package/package.json +1 -1
  54. package/custom/io.d.ts +0 -2
@@ -152,4 +152,50 @@ declare global {
152
152
  old: {};
153
153
  };
154
154
  }
155
+ declare const globals: {
156
+ settings: Record<string, Setting>;
157
+ Setting: typeof import("./settings").Setting;
158
+ SettingsProfile: typeof import("./settings").SettingsProfile;
159
+ Settings: {
160
+ profile_menu_button: HTMLElement | null;
161
+ structure: Record<string, {
162
+ name: string;
163
+ open: boolean;
164
+ items: Record<string, Setting>;
165
+ }>;
166
+ stored: Record<string, SettingsValue>;
167
+ dialog: Dialog | null;
168
+ addCategory(id: string, data: {
169
+ name?: string;
170
+ open?: boolean;
171
+ }): void;
172
+ /**
173
+ * Save all settings to the local storage
174
+ */
175
+ saveLocalStorages(): void;
176
+ /**
177
+ * Save the settings and apply changes
178
+ */
179
+ save(): void;
180
+ updateSettingsInProfiles(): void;
181
+ updateProfileButton(): void;
182
+ import(file: any): void;
183
+ /**
184
+ * Returns the value of the specified setting
185
+ */
186
+ get(id: string): SettingsValue;
187
+ openDialog(options?: {
188
+ search_term?: string;
189
+ profile?: string;
190
+ }): void;
191
+ showRestartMessage(settings?: Setting[]): void;
192
+ old: {};
193
+ };
194
+ };
195
+ declare global {
196
+ const settings: typeof globals.settings;
197
+ const Setting: typeof globals.Setting;
198
+ const SettingsProfile: typeof globals.SettingsProfile;
199
+ const Settings: typeof globals.Settings;
200
+ }
155
201
  export {};
@@ -12,7 +12,7 @@ declare global {
12
12
  * @param {number} [data.graphic.aspect_ratio] Section aspect ratio
13
13
  * @param {string} [data.graphic.description] Markdown string
14
14
  * @param {string} [data.graphic.text_color]
15
- * @param {Array.<{text: String, type: String, [list]: Array.String, [click]: Function}>} data.text
15
+ * @param {Array.<{text: String, {type}: [String], [list]: Array.String, {click}: [Function]}>} data.text
16
16
  * @param {'vertical'|'horizontal'} data.layout
17
17
  * @param {Array} data.features
18
18
  * @param {boolean} data.closable
@@ -35,21 +35,6 @@ declare global {
35
35
  description?: string;
36
36
  text_color?: string;
37
37
  };
38
- text: Array<{
39
- text: string;
40
- type: string;
41
- [list]: Array.String;
42
- [click]: Function;
43
- }>;
44
- layout: "vertical" | "horizontal";
45
- features: any[];
46
- closable: boolean;
47
- click: Function;
48
- color: string;
49
- text_color: string;
50
- last: boolean;
51
- insert_after: string;
52
- insert_before: string;
53
38
  }): {
54
39
  delete(): void;
55
40
  };
@@ -93,4 +93,10 @@ declare global {
93
93
  }
94
94
  function loadThemes(): void;
95
95
  }
96
+ declare const global: {
97
+ CustomTheme: typeof import("./themes").CustomTheme;
98
+ };
99
+ declare global {
100
+ const CustomTheme: typeof global.CustomTheme;
101
+ }
96
102
  export {};
@@ -310,5 +310,13 @@ declare global {
310
310
  delete(): void;
311
311
  }
312
312
  }
313
-
313
+ declare const global: {
314
+ ModelFormat: typeof import("./format").ModelFormat;
315
+ Formats: Record<string, ModelFormat>;
316
+ };
317
+ declare global {
318
+ const ModelFormat: typeof global.ModelFormat;
319
+ const Format: ModelFormat;
320
+ const Formats: Record<string, ModelFormat>;
321
+ }
314
322
  export {};
@@ -1,5 +1,5 @@
1
1
  declare global {
2
- function parseGeometry(data: any, args: any): any;
2
+ function parseGeometry(data: any, args: any): void;
3
3
  }
4
4
 
5
5
  export {};
@@ -48,4 +48,49 @@ declare global {
48
48
  toString: () => string;
49
49
  };
50
50
  }
51
+ declare const global: {
52
+ tl: (string: string, variables?: string | number | (string | number)[], default_value?: string) => string;
53
+ Language: {
54
+ /**
55
+ * Translation data for the current language
56
+ */
57
+ data: {};
58
+ /**
59
+ * Language code indicating the currently selected language
60
+ */
61
+ code: string;
62
+ options: {
63
+ en: string;
64
+ cz: string;
65
+ de: string;
66
+ es: string;
67
+ fr: string;
68
+ it: string;
69
+ ja: string;
70
+ ko: string;
71
+ nl: string;
72
+ pl: string;
73
+ pt: string;
74
+ pt_br: string;
75
+ ru: string;
76
+ sv: string;
77
+ tr: string;
78
+ uk: string;
79
+ vi: string;
80
+ zh: string;
81
+ zh_tw: string;
82
+ };
83
+ /**
84
+ * Add translations for custom translation strings
85
+ * @param language Two letter language code, e. G. 'en'
86
+ * @param strings Object listing the translation keys and values
87
+ */
88
+ addTranslations(language: string, strings: Record<string, string>): void;
89
+ toString: () => string;
90
+ };
91
+ };
92
+ declare global {
93
+ const Language: typeof global.Language;
94
+ const tl: typeof global.tl;
95
+ }
51
96
  export {};
@@ -14,5 +14,10 @@ declare global {
14
14
  isEmpty(): boolean;
15
15
  }
16
16
  }
17
-
17
+ declare const global: {
18
+ CanvasFrame: typeof import("./CanvasFrame").CanvasFrame;
19
+ };
20
+ declare global {
21
+ const CanvasFrame: typeof global.CanvasFrame;
22
+ }
18
23
  export {};
@@ -49,16 +49,16 @@ import "./validator";
49
49
  import "./outliner/outliner";
50
50
  import "./outliner/element_panel";
51
51
  import "./outliner/collections";
52
- import "./outliner/group";
53
- import "./outliner/mesh";
54
- import "./outliner/cube";
55
- import "./outliner/billboard";
56
- import "./outliner/texture_mesh";
57
- import "./outliner/armature";
58
- import "./outliner/armature_bone";
59
- import "./outliner/locator";
60
- import "./outliner/null_object";
61
- import "./outliner/spline_mesh";
52
+ import "./outliner/types/group";
53
+ import "./outliner/types/mesh";
54
+ import "./outliner/types/cube";
55
+ import "./outliner/types/billboard";
56
+ import "./outliner/types/texture_mesh";
57
+ import "./outliner/types/armature";
58
+ import "./outliner/types/armature_bone";
59
+ import "./outliner/types/locator";
60
+ import "./outliner/types/null_object";
61
+ import "./outliner/types/spline_mesh";
62
62
  import "./preview/preview";
63
63
  import "./preview/reference_images";
64
64
  import "./preview/screenshot";
@@ -116,5 +116,4 @@ import "./io/formats/skin";
116
116
  import "./io/formats/image";
117
117
  import "./boot_loader";
118
118
  import "./globals";
119
- import "./global_types";
120
119
  export {};
@@ -38,17 +38,6 @@ declare global {
38
38
  let y: number;
39
39
  }
40
40
  const sort_collator: Intl.Collator;
41
- namespace AutoBackup {
42
- let db: IDBDatabase;
43
- function initialize(): void;
44
- function backupOpenProject(): Promise<void>;
45
- function hasBackups(): Promise<any>;
46
- function recoverAllBackups(): Promise<any>;
47
- function removeBackup(uuid: any): Promise<any>;
48
- function removeAllBackups(): Promise<any>;
49
- let loop_timeout: any;
50
- function backupProjectLoop(run_save?: boolean): void;
51
- }
52
41
  namespace TickUpdates {
53
42
  function Run(): void;
54
43
  }
@@ -1,4 +1,4 @@
1
- import { Armature } from "../outliner/armature";
1
+ import { Armature } from "../outliner/types/armature";
2
2
  declare global {
3
3
  const MirrorModeling: {
4
4
  initial_transformer_position: number;
@@ -37,4 +37,28 @@ declare global {
37
37
  }
38
38
  function symmetrizeArmature(armature: Armature, mesh: Mesh, affected_vkeys: Set<string>): void;
39
39
  }
40
+ declare const global: {
41
+ MirrorModeling: {
42
+ initial_transformer_position: number;
43
+ outliner_snapshot: any;
44
+ isCentered(element: OutlinerElement): boolean;
45
+ createClone(original: OutlinerElement, undo_aspects: UndoAspects): any;
46
+ updateParentNodeCounterpart(node: OutlinerNode, original: OutlinerNode): void;
47
+ getEditSide(fallback?: number): number;
48
+ flipCoord(input: number): number;
49
+ getMirrorElement(element: OutlinerElement): OutlinerElement | false;
50
+ isParentTreeSymmetrical(element: OutlinerNode, { center }: {
51
+ center: any;
52
+ }): boolean;
53
+ isParentTreeOpposite(element1: OutlinerNode, element2: OutlinerNode): boolean;
54
+ insertElementIntoUndo(element: OutlinerElement, undo_aspects: UndoAspects, element_before_snapshot?: any): void;
55
+ insertGroupIntoUndo(group: Group, undo_aspects: UndoAspects, before_snapshop?: any): void;
56
+ element_types: Record<string, MirrorModelingElementTypeOptions>;
57
+ registerElementType(type_class: any, options: MirrorModelingElementTypeOptions): void;
58
+ cached_elements: {};
59
+ };
60
+ };
61
+ declare global {
62
+ const MirrorModeling: typeof global.MirrorModeling;
63
+ }
40
64
  export {};
@@ -1,13 +1,5 @@
1
1
  declare global {
2
- namespace ModelScaler {
3
- let dialog: import("../interface/dialog").Dialog;
4
- let overflow: any;
5
- function getScaleGroups(): Group[];
6
- function scaleAll(save: any, size: any): void;
7
- function cancel(): void;
8
- function setPivot(mode: any): void;
9
- function selectOverflow(): void;
10
- }
2
+ const ModelScaler: any;
11
3
  }
12
4
 
13
5
  export {};
@@ -58,4 +58,24 @@ declare global {
58
58
  mobileModeMenu(button: any, event: any): Menu;
59
59
  };
60
60
  }
61
+ declare const global: {
62
+ Mode: typeof import("./modes").Mode;
63
+ Modes: {
64
+ readonly id: any;
65
+ vue: Vue | null;
66
+ selected: boolean | Mode;
67
+ previous_id: string;
68
+ options: Record<string, Mode>;
69
+ animate: boolean;
70
+ display: boolean;
71
+ edit: boolean;
72
+ paint: boolean;
73
+ pose: boolean;
74
+ mobileModeMenu(button: any, event: any): Menu;
75
+ };
76
+ };
77
+ declare global {
78
+ const Modes: typeof global.Modes;
79
+ const Mode: typeof global.Mode;
80
+ }
61
81
  export {};
@@ -0,0 +1,40 @@
1
+ import { Property } from "../../util/property";
2
+ import { OutlinerElement } from "./outliner_element";
3
+ declare global {
4
+ interface FaceOptions {
5
+ texture?: Texture | UUID | false;
6
+ }
7
+ abstract class Face {
8
+ texture: UUID | false | undefined;
9
+ element: OutlinerElement;
10
+ direction?: string;
11
+ uv: any;
12
+ /**
13
+ * Returns a 2D rectangle around the UV face
14
+ */
15
+ getBoundingRect(): any;
16
+ constructor(data: FaceOptions);
17
+ extend(data: FaceOptions): this;
18
+ getTexture(): Texture | undefined | null | false;
19
+ reset(): this;
20
+ /**
21
+ * Returns a save copy of the face, ready for serialization
22
+ */
23
+ getSaveCopy(): {
24
+ uv: any;
25
+ texture: any;
26
+ };
27
+ /**
28
+ * Get a copy for undo tracking
29
+ */
30
+ getUndoCopy(): Face;
31
+ static properties: Record<string, Property<any>>;
32
+ }
33
+ }
34
+ declare const global: {
35
+ Face: typeof import("./face").Face;
36
+ };
37
+ declare global {
38
+ const Face: typeof global.Face;
39
+ }
40
+ export {};
@@ -0,0 +1,42 @@
1
+ import { Property } from "../../util/property";
2
+ import { OutlinerNode } from "./outliner_node";
3
+ type ElementTypeConstructor = {
4
+ new (...args: any[]): OutlinerElement;
5
+ init?(): void;
6
+ properties: Record<string, Property<any>>;
7
+ behavior: any;
8
+ selected: OutlinerElement[];
9
+ };
10
+ declare global {
11
+ interface OutlinerElementData {
12
+ name?: string;
13
+ }
14
+ abstract class OutlinerElement extends OutlinerNode {
15
+ allow_mirror_modeling?: boolean;
16
+ static animator?: BoneAnimator;
17
+ static isParent: false;
18
+ static all: OutlinerElement[];
19
+ static selected: OutlinerElement[];
20
+ constructor(data: OutlinerElementData, uuid?: string);
21
+ init(): this;
22
+ remove(): this;
23
+ showContextMenu(event: MouseEvent): this;
24
+ forSelected(fc: (element: OutlinerElement) => void, undo_tag?: string, selection_method?: 'all_selected' | 'all_in_group'): OutlinerElement[];
25
+ duplicate(): OutlinerElement;
26
+ select(event?: Event, is_outliner_click?: boolean): false | this;
27
+ clickSelect(event: any, outliner_click?: boolean): void;
28
+ markAsSelected(select_children?: boolean): this;
29
+ unselect(unselect_parent?: boolean): this;
30
+ getUndoCopy(): any;
31
+ getSaveCopy(): any;
32
+ static fromSave(obj: any, keep_uuid?: boolean): OutlinerElement;
33
+ static isTypePermitted(type: string): boolean;
34
+ /**Check if any elements of the type are in the project */
35
+ static hasAny(): boolean;
36
+ /**Check if any elements of the type are currently selected */
37
+ static hasSelected(): boolean;
38
+ static types: Record<string, ElementTypeConstructor>;
39
+ static registerType(constructor: ElementTypeConstructor, id: string): void;
40
+ }
41
+ }
42
+ export {};
@@ -0,0 +1,96 @@
1
+ import { Property } from "../../util/property";
2
+ declare global {
3
+ abstract class OutlinerNode {
4
+ name: string;
5
+ uuid: UUID;
6
+ export: boolean;
7
+ locked: boolean;
8
+ parent: (OutlinerNode & OutlinerNodeParentTraits) | 'root';
9
+ selected: boolean;
10
+ old_name?: string;
11
+ children?: OutlinerNode[];
12
+ menu?: Menu;
13
+ type: string;
14
+ name_regex: ((element?: OutlinerNode) => string | boolean) | undefined;
15
+ static animator?: BoneAnimator;
16
+ static isParent: false;
17
+ static all: OutlinerNode[];
18
+ static selected: OutlinerNode[];
19
+ static preview_controller: NodePreviewController;
20
+ static properties: Record<string, Property<any>>;
21
+ static behavior: Record<string, any>;
22
+ constructor(uuid: UUID);
23
+ /**
24
+ * Initializes the node. This should always be called when creating nodes that will be used in the outliner.
25
+ */
26
+ init(): this;
27
+ extend?(data: any): void;
28
+ select(event?: Event, outliner_click?: boolean): false | this;
29
+ unselect(unselect_parent?: boolean): void;
30
+ clickSelect(event: MouseEvent, outliner_click?: boolean): void;
31
+ getTypeBehavior(flag: string): boolean | string | any;
32
+ sortInBefore(element?: OutlinerNode, index_modifier?: number): this;
33
+ addTo(target?: OutlinerNode | 'root', index?: number): this;
34
+ removeFromParent(): this;
35
+ getParentArray(): OutlinerNode[];
36
+ showContextMenu(event: any): this;
37
+ /**
38
+ * Unfolds the outliner and scrolls up or down if necessary to show the group or element.
39
+ */
40
+ showInOutliner(): void;
41
+ /**
42
+ * Updates the Vue node of the element. This is only necessary in some rare situations
43
+ */
44
+ updateElement(): this;
45
+ get mesh(): import("three").Object3D;
46
+ get scene_object(): THREE.Object3D;
47
+ getDepth(): number;
48
+ duplicate(): OutlinerNode;
49
+ /**
50
+ * Removes the node.
51
+ */
52
+ remove(remove_children?: boolean): void;
53
+ /**
54
+ * Marks the name of the group or element in the outliner for renaming.
55
+ */
56
+ rename(): this;
57
+ /**
58
+ * Saves the changed name of the element by creating an undo point and making the name unique if necessary.
59
+ */
60
+ saveName(save?: boolean): this;
61
+ sanitizeName(): string;
62
+ /**
63
+ * Create a unique name for the group or element by adding a number at the end or increasing it.
64
+ */
65
+ createUniqueName(others?: OutlinerNode[]): string | false;
66
+ isIconEnabled(toggle: any): any;
67
+ matchesFilter(search_term_lowercase: any): any;
68
+ /**
69
+ * Checks of the group or element is a child of `group`.
70
+ * @param max_levels The maximum number of generations that can be between the element and the group
71
+ */
72
+ isChildOf(node: OutlinerNode, max_levels: number): boolean;
73
+ get preview_controller(): NodePreviewController;
74
+ /**
75
+ * Mark the element as selected
76
+ */
77
+ markAsSelected(descendants?: boolean): void;
78
+ /**
79
+ * Displays the context menu of the element
80
+ * @param event Mouse event, determines where the context menu spawns.
81
+ */
82
+ showContexMenu(event: Event | HTMLElement): this;
83
+ getSaveCopy?(...args: any[]): Record<string, any>;
84
+ static addBehaviorOverride(override_options: {
85
+ condition: ConditionResolvable;
86
+ priority?: number;
87
+ behavior: Record<string, any>;
88
+ }): Deletable;
89
+ static behavior_overrides: any[];
90
+ static uuids: {
91
+ [uuid: UUID]: OutlinerNode;
92
+ };
93
+ }
94
+ }
95
+
96
+ export {};
@@ -74,5 +74,4 @@ declare global {
74
74
  buttons: OutlinerToggle[];
75
75
  }
76
76
  }
77
-
78
77
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Property } from "../util/property";
2
- import { OutlinerNode } from "./outliner";
3
2
  import { Menu } from "../interface/menu";
3
+ import { OutlinerNode } from "./abstract/outliner_node";
4
4
  declare global {
5
5
  interface CollectionOptions {
6
6
  children?: string[];
@@ -81,5 +81,10 @@ declare global {
81
81
  static menu: Menu;
82
82
  }
83
83
  }
84
-
84
+ declare const global: {
85
+ Collection: typeof import("./collections").Collection;
86
+ };
87
+ declare global {
88
+ const Collection: typeof global.Collection;
89
+ }
85
90
  export {};
@@ -215,5 +215,4 @@ declare global {
215
215
  buttons: OutlinerToggle[];
216
216
  }
217
217
  }
218
-
219
218
  export {};
@@ -0,0 +1,59 @@
1
+ import { OutlinerElement } from "../abstract/outliner_element";
2
+ import { OutlinerNode } from "../abstract/outliner_node";
3
+ import { ArmatureBone } from "./armature_bone";
4
+ declare global {
5
+ interface ArmatureOptions {
6
+ name?: string;
7
+ export?: boolean;
8
+ locked?: boolean;
9
+ visibility?: boolean;
10
+ }
11
+ class Armature extends OutlinerElement {
12
+ children: (ArmatureBone | Mesh | NullObject)[];
13
+ isOpen: boolean;
14
+ visibility: boolean;
15
+ origin: ArrayVector3;
16
+ static preview_controller: NodePreviewController;
17
+ constructor(data?: ArmatureOptions, uuid?: UUID);
18
+ extend(object: ArmatureOptions): this;
19
+ getMesh(): import("three").Object3D;
20
+ init(): this;
21
+ markAsSelected(descendants?: boolean): this;
22
+ matchesSelection(): boolean;
23
+ openUp(): this;
24
+ getSaveCopy(): {
25
+ isOpen: boolean;
26
+ uuid: string;
27
+ type: string;
28
+ name: string;
29
+ children: string[];
30
+ };
31
+ getUndoCopy(): any;
32
+ getChildlessCopy(keep_uuid?: boolean): Armature;
33
+ forEachChild(cb: ((element: OutlinerElement) => void), type?: typeof OutlinerNode, forSelf?: boolean): void;
34
+ getAllBones(): ArmatureBone[];
35
+ calculateVertexDeformation(mesh: Mesh): Record<string, ArrayVector3>;
36
+ static behavior: {
37
+ unique_name: boolean;
38
+ movable: boolean;
39
+ rotatable: boolean;
40
+ parent: boolean;
41
+ child_types: string[];
42
+ };
43
+ title: string;
44
+ type: string;
45
+ icon: string;
46
+ name_regex: () => false | "a-zA-Z0-9_";
47
+ buttons: OutlinerToggle[];
48
+ menu: Menu;
49
+ static all: Armature[];
50
+ static selected: Armature[];
51
+ }
52
+ }
53
+ declare const global: {
54
+ Armature: typeof import("./armature").Armature;
55
+ };
56
+ declare global {
57
+ const Armature: typeof global.Armature;
58
+ }
59
+ export {};
@@ -0,0 +1,90 @@
1
+ import { Armature } from "./armature";
2
+ import { OutlinerElement } from "../abstract/outliner_element";
3
+ declare global {
4
+ interface ArmatureBoneOptions {
5
+ name?: string;
6
+ export?: boolean;
7
+ locked?: boolean;
8
+ visibility?: boolean;
9
+ origin?: ArrayVector3;
10
+ rotation?: ArrayVector3;
11
+ vertex_weights?: Record<string, number>;
12
+ length?: number;
13
+ width?: number;
14
+ connected?: boolean;
15
+ color?: number;
16
+ }
17
+ class ArmatureBone extends OutlinerElement {
18
+ children: ArmatureBone[];
19
+ isOpen: boolean;
20
+ visibility: boolean;
21
+ origin: ArrayVector3;
22
+ rotation: ArrayVector3;
23
+ vertex_weights: Record<string, number>;
24
+ length: number;
25
+ width: number;
26
+ connected: boolean;
27
+ color: number;
28
+ old_size?: number | ArrayVector3;
29
+ static preview_controller: NodePreviewController;
30
+ constructor(data?: ArmatureBoneOptions, uuid?: UUID);
31
+ get position(): ArrayVector3;
32
+ extend(object: ArmatureBoneOptions): this;
33
+ getArmature(): Armature;
34
+ getVertexWeight(mesh: Mesh, vkey: string): number;
35
+ setVertexWeight(mesh: Mesh, vkey: string, weight?: number): void;
36
+ init(): this;
37
+ select(event?: Event, isOutlinerClick?: boolean): false | this;
38
+ markAsSelected(descendants: boolean): this;
39
+ matchesSelection(): boolean;
40
+ openUp(): this;
41
+ transferOrigin(origin: ArrayVector3): this;
42
+ getWorldCenter(): THREE.Vector3;
43
+ flip(axis: number, center: number): this;
44
+ size(): ArrayVector3;
45
+ size(axis: axisLetter): number;
46
+ getSize(axis: any): number;
47
+ resize(move_value: number | ((input: number) => number), axis_number?: axisNumber, invert?: boolean): void;
48
+ setColor(index: any): this;
49
+ getSaveCopy(): {
50
+ isOpen: boolean;
51
+ uuid: string;
52
+ type: string;
53
+ name: string;
54
+ children: string[];
55
+ };
56
+ getUndoCopy(): any;
57
+ getChildlessCopy(keep_uuid?: boolean): ArmatureBone;
58
+ forEachChild(cb: ((element: ArmatureBone) => void), type?: any, forSelf?: boolean): void;
59
+ static behavior: {
60
+ unique_name: boolean;
61
+ parent: boolean;
62
+ movable: boolean;
63
+ rotatable: boolean;
64
+ resizable: boolean;
65
+ child_types: string[];
66
+ parent_types: string[];
67
+ select_children: string;
68
+ hide_in_screenshot: boolean;
69
+ marker_color: boolean;
70
+ };
71
+ static all: ArmatureBone[];
72
+ static selected: ArmatureBone[];
73
+ title: string;
74
+ type: string;
75
+ icon: string;
76
+ name_regex: () => false | "a-zA-Z0-9_";
77
+ buttons: OutlinerToggle[];
78
+ menu: Menu;
79
+ }
80
+ function getAllArmatureBones(): any[];
81
+ }
82
+ declare const global: {
83
+ ArmatureBone: typeof import("./armature_bone").ArmatureBone;
84
+ getAllArmatureBones: typeof import("./armature_bone").getAllArmatureBones;
85
+ };
86
+ declare global {
87
+ const ArmatureBone: typeof global.ArmatureBone;
88
+ const getAllArmatureBones: typeof global.getAllArmatureBones;
89
+ }
90
+ export {};