blockbench-types 5.2.0-beta.0-next.1 → 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.
- package/custom/animation.d.ts +4 -2
- package/custom/blockbench.d.ts +5 -4
- package/custom/canvas.d.ts +20 -3
- package/custom/codec.d.ts +2 -2
- package/custom/cube.d.ts +1 -1
- package/custom/desktop.d.ts +15 -4
- package/custom/display_mode.d.ts +6 -1
- package/custom/global.d.ts +1 -2
- package/custom/group.d.ts +1 -1
- package/custom/interface.d.ts +5 -0
- package/custom/{toolbars.d.ts → keybind.d.ts} +4 -76
- package/custom/keyframe.d.ts +2 -0
- package/custom/menu_bar.d.ts +66 -0
- package/custom/misc.d.ts +73 -66
- package/custom/painter.d.ts +35 -1
- package/custom/screencam.d.ts +1 -1
- package/custom/spline_mesh.d.ts +5 -4
- package/custom/textures.d.ts +2 -0
- package/generated/animations/timeline_animators.d.ts +1 -1
- package/generated/api.d.ts +5 -26
- package/generated/desktop.d.ts +48 -0
- package/generated/file_system.d.ts +1 -0
- package/generated/find_replace.d.ts +6 -0
- package/generated/interface/actions.d.ts +14 -9
- package/generated/interface/dialog.d.ts +2 -2
- package/generated/interface/main_tools.d.ts +23 -0
- package/generated/interface/menu.d.ts +144 -0
- package/generated/interface/menu_bar.d.ts +2 -3
- package/generated/interface/shared_actions.d.ts +13 -0
- package/generated/interface/toast_notification.d.ts +45 -0
- package/generated/interface/toolbars.d.ts +146 -46
- package/generated/io/format.d.ts +1 -0
- package/generated/io/project.d.ts +1 -1
- package/generated/lib/CSS3DRenderer.d.ts +129 -0
- package/generated/main.d.ts +3 -0
- package/generated/modeling/mesh/add_mesh.d.ts +6 -0
- package/generated/modeling/mesh/knife_tool.d.ts +1 -1
- package/generated/modeling/mesh/loop_cut.d.ts +2 -0
- package/generated/modeling/mesh/util.d.ts +8 -2
- package/generated/modeling/mirror_modeling.d.ts +1 -1
- package/generated/modeling/transform/transform_modules.d.ts +6 -6
- package/generated/modeling/transform.d.ts +1 -1
- package/generated/modeling/weight_paint.d.ts +0 -1
- package/generated/modes.d.ts +2 -2
- package/generated/native_apis.d.ts +3 -0
- package/generated/outliner/abstract/outliner_element.d.ts +1 -0
- package/generated/outliner/abstract/outliner_node.d.ts +1 -0
- package/generated/outliner/types/armature.d.ts +1 -1
- package/generated/outliner/types/armature_bone.d.ts +1 -1
- package/generated/outliner/types/billboard.d.ts +1 -1
- package/generated/outliner/types/bounding_box.d.ts +1 -1
- package/generated/outliner/types/cube.d.ts +1 -1
- package/generated/outliner/types/group.d.ts +1 -1
- package/generated/outliner/types/locator.d.ts +1 -1
- package/generated/outliner/types/mesh.d.ts +3 -3
- package/generated/outliner/types/null_object.d.ts +1 -1
- package/generated/outliner/types/spline_mesh.d.ts +1 -2
- package/generated/outliner/types/texture_mesh.d.ts +1 -1
- package/generated/plugin_loader.d.ts +6 -4
- package/generated/preview/preview.d.ts +286 -0
- package/generated/preview/preview_scenes.d.ts +197 -0
- package/generated/preview/reference_images.d.ts +141 -89
- package/generated/texturing/layers.d.ts +0 -1
- package/generated/util/gif.d.ts +12 -3
- package/generated/util/state_memory.d.ts +2 -10
- package/generated/uv/uv_size.d.ts +19 -7
- package/package.json +1 -1
- package/type_config.json +0 -4
- package/custom/menu.d.ts +0 -137
- package/custom/preview.d.ts +0 -147
- package/custom/preview_scene.d.ts +0 -120
package/custom/animation.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare class _Animation extends AnimationItem {
|
|
|
64
64
|
save(): this | undefined
|
|
65
65
|
select(): this | undefined
|
|
66
66
|
setLength(length?: number): void
|
|
67
|
-
createUniqueName(references
|
|
67
|
+
createUniqueName(references?: _Animation[]): any
|
|
68
68
|
setScopeFromAnimators(): number | undefined
|
|
69
69
|
rename(): this
|
|
70
70
|
togglePlayingState(state: any): any
|
|
@@ -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
|
|
@@ -254,3 +255,4 @@ declare class TimelineMarker {
|
|
|
254
255
|
color: number
|
|
255
256
|
time: number
|
|
256
257
|
}
|
|
258
|
+
declare const WinterskyScene: Wintersky.Scene
|
package/custom/blockbench.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/// <reference types="wintersky" />
|
|
6
6
|
|
|
7
7
|
/// <reference types="./texture_group" />
|
|
8
|
-
/// <reference types="./
|
|
8
|
+
/// <reference types="./keybind" />
|
|
9
9
|
/// <reference types="./animation" />
|
|
10
10
|
/// <reference types="./animation_controller" />
|
|
11
11
|
/// <reference types="./canvas_frame" />
|
|
@@ -18,15 +18,13 @@
|
|
|
18
18
|
/// <reference types="./group" />
|
|
19
19
|
/// <reference types="./interface" />
|
|
20
20
|
/// <reference types="./keyframe" />
|
|
21
|
-
/// <reference types="./
|
|
21
|
+
/// <reference types="./menu_bar" />
|
|
22
22
|
/// <reference types="./mesh" />
|
|
23
23
|
/// <reference types="./spline_mesh" />
|
|
24
24
|
/// <reference types="./misc" />
|
|
25
25
|
/// <reference types="./molang" />
|
|
26
26
|
/// <reference types="./outliner" />
|
|
27
27
|
/// <reference types="./painter" />
|
|
28
|
-
/// <reference types="./preview" />
|
|
29
|
-
/// <reference types="./preview_scene" />
|
|
30
28
|
/// <reference types="./edit_session" />
|
|
31
29
|
/// <reference types="./screencam" />
|
|
32
30
|
/// <reference types="./textures" />
|
|
@@ -69,3 +67,6 @@ declare module "*.bbtheme" {
|
|
|
69
67
|
const value: string | any;
|
|
70
68
|
export default value;
|
|
71
69
|
}
|
|
70
|
+
declare module "*.png"
|
|
71
|
+
declare module "*.webp"
|
|
72
|
+
declare module "*.jpeg"
|
package/custom/canvas.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ declare namespace Canvas {
|
|
|
74
74
|
const bones: {
|
|
75
75
|
[uuid: UUID]: THREE.Object3D
|
|
76
76
|
}
|
|
77
|
+
let outlines: THREE.Object3D
|
|
77
78
|
/**
|
|
78
79
|
* Main scene, shared across all tabs
|
|
79
80
|
*/
|
|
@@ -108,13 +109,17 @@ declare namespace Canvas {
|
|
|
108
109
|
const ground_plane: THREE.Mesh
|
|
109
110
|
const brush_outline: THREE.Mesh
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
let show_gizmos: boolean
|
|
113
|
+
let ground_animation: boolean
|
|
112
114
|
|
|
113
115
|
const global_light_color: THREE.Color
|
|
114
|
-
|
|
116
|
+
let global_light_side: number
|
|
115
117
|
|
|
116
118
|
const face_order: ['east', 'west', 'up', 'down', 'south', 'north']
|
|
117
119
|
|
|
120
|
+
const hover_helper_line: THREE.LineSegments
|
|
121
|
+
const hover_helper_vertex: THREE.Points
|
|
122
|
+
|
|
118
123
|
/**
|
|
119
124
|
* Raycast on the currently selected preview
|
|
120
125
|
*/
|
|
@@ -129,6 +134,8 @@ declare namespace Canvas {
|
|
|
129
134
|
function clear(): void
|
|
130
135
|
function buildGrid(): void
|
|
131
136
|
function updateShading(): void
|
|
137
|
+
function updateViewMode(): void
|
|
138
|
+
function updateCubeHighlights(hover_cube: OutlinerElement, force_off?: boolean): void
|
|
132
139
|
/**
|
|
133
140
|
* Updates selected aspects of the preview
|
|
134
141
|
* @param options
|
|
@@ -188,7 +195,7 @@ declare namespace Canvas {
|
|
|
188
195
|
/**
|
|
189
196
|
* Update the position of the origin / pivot point gizmo
|
|
190
197
|
*/
|
|
191
|
-
function
|
|
198
|
+
function updatePivotMarker(): boolean
|
|
192
199
|
/**
|
|
193
200
|
* Update the position and shape of the specified cube
|
|
194
201
|
* @param cube Cube to update
|
|
@@ -229,12 +236,14 @@ declare namespace Canvas {
|
|
|
229
236
|
* Calculate the size of the model, in the currently displayed shape. Returns [width, height] in blockbench units
|
|
230
237
|
*/
|
|
231
238
|
function getModelSize(): [number, number]
|
|
239
|
+
function getSelectionBounds(): THREE.Box3
|
|
232
240
|
}
|
|
233
241
|
|
|
234
242
|
/**
|
|
235
243
|
* Marks a specific aspect of the interface to be updated in the next tick. Useful to avoid an update function getting called multiple times in the same task.
|
|
236
244
|
*/
|
|
237
245
|
declare namespace TickUpdates {
|
|
246
|
+
private function Run(): void
|
|
238
247
|
let interface: undefined | true
|
|
239
248
|
let outliner: undefined | true
|
|
240
249
|
let selection: undefined | true
|
|
@@ -269,6 +278,13 @@ interface NodePreviewControllerOptions {
|
|
|
269
278
|
updateHighlight?(element: OutlinerNode, ...args: any[]): void
|
|
270
279
|
[key: string]: any
|
|
271
280
|
}
|
|
281
|
+
interface ViewportRectangleOverlapContext {
|
|
282
|
+
projectPoint: (vector: THREE.Vector3) => ArrayVector2
|
|
283
|
+
extend_selection: boolean
|
|
284
|
+
rect_start: ArrayVector2
|
|
285
|
+
rect_end: ArrayVector2
|
|
286
|
+
preview: Preview
|
|
287
|
+
}
|
|
272
288
|
declare class NodePreviewController {
|
|
273
289
|
constructor(
|
|
274
290
|
type: typeof OutlinerElement | typeof OutlinerNode,
|
|
@@ -304,4 +320,5 @@ declare class NodePreviewController {
|
|
|
304
320
|
updateFaces(instance: OutlinerNode): void
|
|
305
321
|
updatePaintingGrid(instance: OutlinerNode): void
|
|
306
322
|
updateHighlight(instance: OutlinerNode, ...args: any[]): void
|
|
323
|
+
viewportRectangleOverlap(element: OutlinerNode, context: ViewportRectangleOverlapContext)
|
|
307
324
|
}
|
package/custom/codec.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ interface CodecOptions {
|
|
|
36
36
|
support_partial_export?: boolean
|
|
37
37
|
support_offset?: boolean
|
|
38
38
|
load_filter?: {
|
|
39
|
-
extensions: string[]
|
|
40
|
-
type: 'json' | 'text'
|
|
39
|
+
extensions: string[] | (() => string[])
|
|
40
|
+
type: 'json' | 'text' | 'image'
|
|
41
41
|
condition?: ConditionResolvable
|
|
42
42
|
}
|
|
43
43
|
/**
|
package/custom/cube.d.ts
CHANGED
package/custom/desktop.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
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
|
-
"
|
|
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;
|
package/custom/display_mode.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ declare const DisplayMode: {
|
|
|
8
8
|
display_slot: string
|
|
9
9
|
display_area: any
|
|
10
10
|
display_base: any
|
|
11
|
+
animate_preview: Preview
|
|
12
|
+
groundAnimation(): void
|
|
13
|
+
updateDisplaySkin(): void
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
declare type DisplaySlotName =
|
|
@@ -99,7 +102,7 @@ declare const displayReferenceObjects: {
|
|
|
99
102
|
inventory_full: refModel<'inventory_full'>
|
|
100
103
|
hud: refModel<'hud'>
|
|
101
104
|
}
|
|
102
|
-
active: refModel<keyof typeof displayReferenceObjects.refmodels>
|
|
105
|
+
active: refModel<keyof typeof displayReferenceObjects.refmodels>
|
|
103
106
|
/* Clears the active display model */
|
|
104
107
|
clear(): void
|
|
105
108
|
bar(buttons: any): void
|
|
@@ -135,3 +138,5 @@ declare class refModel<ID extends string> {
|
|
|
135
138
|
buildFrameTopInvisible(): void
|
|
136
139
|
updateBasePosition(): void
|
|
137
140
|
}
|
|
141
|
+
|
|
142
|
+
declare function changeDisplaySkin(): void
|
package/custom/global.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ declare global {
|
|
|
25
25
|
* @deprecated Use {@link Outliner.selected} instead
|
|
26
26
|
*/
|
|
27
27
|
let selected: OutlinerElement[]
|
|
28
|
-
const Toolbars: Record<string, Toolbar>
|
|
29
28
|
|
|
30
29
|
function rotateOnAxis(modify: OutlinerNode, axis: number, slider?: boolean): void
|
|
31
30
|
function afterRotateOnAxis(): void
|
|
@@ -71,7 +70,7 @@ declare global {
|
|
|
71
70
|
/**
|
|
72
71
|
* Checks if the absolute difference between a and b is smaller than epsilon
|
|
73
72
|
*/
|
|
74
|
-
epsilon(a: number, b: number, epsilon
|
|
73
|
+
epsilon(a: number, b: number, epsilon?: number): boolean
|
|
75
74
|
/**
|
|
76
75
|
* Take a rotation value in degrees, and trim it to a value between -180 and 180, while keeping the same angle
|
|
77
76
|
*/
|
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[]
|
package/custom/interface.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/// <reference types="./blockbench"/>
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Update the size of everything in the UI after the window has been resized or other UI size changes have happeped
|
|
5
|
+
* @param event
|
|
6
|
+
*/
|
|
7
|
+
declare function resizeWindow(event?: Event): void
|
|
3
8
|
|
|
4
9
|
declare namespace Interface {
|
|
5
10
|
function createElement(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Keybindings and action control
|
|
3
3
|
*/
|
|
4
4
|
/// <reference types="./blockbench"/>
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
/**
|
|
9
9
|
* Main key, can be a numeric keycode or a lower case character
|
|
10
10
|
*/
|
|
11
|
-
key
|
|
11
|
+
key?: number | string
|
|
12
12
|
ctrl?: boolean
|
|
13
13
|
shift?: boolean
|
|
14
14
|
alt?: boolean
|
|
@@ -42,6 +42,7 @@ declare global {
|
|
|
42
42
|
ctrl?: boolean
|
|
43
43
|
shift?: boolean
|
|
44
44
|
alt?: boolean
|
|
45
|
+
meta?: boolean
|
|
45
46
|
variations?: {
|
|
46
47
|
[key: string]: ModifierKey
|
|
47
48
|
}
|
|
@@ -115,75 +116,6 @@ declare global {
|
|
|
115
116
|
static no_overlap(k1: KeybindItem, k2: KeybindItem): boolean
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
class MenuSeparator {
|
|
120
|
-
constructor(id?: string, label?: string)
|
|
121
|
-
id: string
|
|
122
|
-
menu_node: HTMLLIElement
|
|
123
|
-
label?: string
|
|
124
|
-
menu_node?: HTMLElement
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface ToolbarOptions {
|
|
128
|
-
id?: string
|
|
129
|
-
name?: string
|
|
130
|
-
/**
|
|
131
|
-
* If true, the toolbar will display a label abovee
|
|
132
|
-
*/
|
|
133
|
-
label?: boolean
|
|
134
|
-
condition?: ConditionResolvable
|
|
135
|
-
/**
|
|
136
|
-
* If true, the toolbar will only take as much width as needed
|
|
137
|
-
*/
|
|
138
|
-
narrow?: boolean
|
|
139
|
-
vertical?: boolean
|
|
140
|
-
/**
|
|
141
|
-
* Default content of the toolbar. Separators are available, where _ = separator, + = spaces, # = line break
|
|
142
|
-
*/
|
|
143
|
-
children: ('_' | '+' | '#' | string | BarItem)[]
|
|
144
|
-
}
|
|
145
|
-
export class Toolbar {
|
|
146
|
-
id: string
|
|
147
|
-
name: string
|
|
148
|
-
label: boolean
|
|
149
|
-
label_node: HTMLElement
|
|
150
|
-
condition: ConditionResolvable
|
|
151
|
-
children: (BarItem | string)[]
|
|
152
|
-
no_wrap: boolean
|
|
153
|
-
narrow: boolean
|
|
154
|
-
vertical: boolean
|
|
155
|
-
default_children: (BarItem | string)[]
|
|
156
|
-
/*private*/ positionLookup: any
|
|
157
|
-
/*private*/ condition_cache: any
|
|
158
|
-
/*private*/ previously_enabled: any
|
|
159
|
-
/*private*/ postload: any
|
|
160
|
-
/*private*/ menu: any
|
|
161
|
-
node: HTMLElement
|
|
162
|
-
constructor(id: string, data: ToolbarOptions)
|
|
163
|
-
constructor(data: ToolbarOptions)
|
|
164
|
-
build(data: any, force: any): this
|
|
165
|
-
contextmenu(event: Event): void
|
|
166
|
-
editMenu(): this
|
|
167
|
-
add(action: any, position?: number): this
|
|
168
|
-
remove(action: BarItem, update: boolean = false): this
|
|
169
|
-
update(): this
|
|
170
|
-
toPlace(place: any): this
|
|
171
|
-
save(): this
|
|
172
|
-
reset(): this
|
|
173
|
-
condition(): boolean
|
|
174
|
-
}
|
|
175
|
-
export namespace BARS {
|
|
176
|
-
const stored: {}
|
|
177
|
-
const editing_bar: undefined | Toolbar
|
|
178
|
-
const action_definers: (() => void)[]
|
|
179
|
-
const condition: any
|
|
180
|
-
function defineActions(definer: any): void
|
|
181
|
-
function setupActions(): void
|
|
182
|
-
function setupToolbars(): void
|
|
183
|
-
function setupVue(): void
|
|
184
|
-
function updateConditions(): void
|
|
185
|
-
function updateToolToolbar(): void
|
|
186
|
-
}
|
|
187
119
|
/**
|
|
188
120
|
* A dialog-based interface to search and trigger actions and other things
|
|
189
121
|
*/
|
|
@@ -212,11 +144,7 @@ declare global {
|
|
|
212
144
|
function reset(): void
|
|
213
145
|
function loadKeymap(id: string, from_start_screen: boolean = false): true | void
|
|
214
146
|
}
|
|
215
|
-
|
|
216
|
-
selected: Tool
|
|
217
|
-
original: any
|
|
218
|
-
}
|
|
219
|
-
const Toolbox: _ToolToolbar
|
|
147
|
+
const Vertexsnap: any
|
|
220
148
|
}
|
|
221
149
|
|
|
222
150
|
export {}
|
package/custom/keyframe.d.ts
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/// <reference types="./blockbench"/>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare interface BarMenuOptions {
|
|
5
|
+
name?: string
|
|
6
|
+
icon?: IconString
|
|
7
|
+
condition?: ConditionResolvable
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new menu in the menu bar
|
|
12
|
+
*/
|
|
13
|
+
declare class BarMenu extends Menu {
|
|
14
|
+
constructor(id: string, structure: MenuItem[], options?: BarMenuOptions)
|
|
15
|
+
type: 'bar_menu'
|
|
16
|
+
id: string
|
|
17
|
+
condition?: ConditionResolvable
|
|
18
|
+
name: string
|
|
19
|
+
label: HTMLElement
|
|
20
|
+
structure: MenuItem[]
|
|
21
|
+
/**
|
|
22
|
+
* Visually highlights an action within the menu, until the user opens the menu
|
|
23
|
+
*/
|
|
24
|
+
highlight(action: Action): void
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare namespace MenuBar {
|
|
28
|
+
const mode_switcher_button: null | HTMLDivElement
|
|
29
|
+
const menus: {
|
|
30
|
+
file: Menu
|
|
31
|
+
edit: Menu
|
|
32
|
+
transform: Menu
|
|
33
|
+
uv: Menu
|
|
34
|
+
texture: Menu
|
|
35
|
+
animation: Menu
|
|
36
|
+
keyframe: Menu
|
|
37
|
+
display: Menu
|
|
38
|
+
tools: Menu
|
|
39
|
+
view: Menu
|
|
40
|
+
help: Menu
|
|
41
|
+
[id: string]: Menu
|
|
42
|
+
}
|
|
43
|
+
const keys: string[]
|
|
44
|
+
let open: Menu | null
|
|
45
|
+
/**
|
|
46
|
+
* Add a new menu to the menu bar
|
|
47
|
+
* @param menu The BarMenu to add
|
|
48
|
+
* @param position Specify the position in the menu list where to add insert the menu. Can either be an index in the list of all menus, or the ID of the menu to insert right from.
|
|
49
|
+
*/
|
|
50
|
+
function addMenu(menu: BarMenu, position?: number | string): void
|
|
51
|
+
/**
|
|
52
|
+
* Adds an action to the menu structure
|
|
53
|
+
* @param action Action to add
|
|
54
|
+
* @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, separated by a point. For example, `file.export.0` places the action at the top position of the Export submenu in the File menu.
|
|
55
|
+
*/
|
|
56
|
+
function addAction(action: Action, path?: string): void
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, or item ID, separated by a point. For example, `export.export_special_format` removes the action "Export Special Format" from the Export submenu.
|
|
60
|
+
*/
|
|
61
|
+
function removeAction(path: string): void
|
|
62
|
+
/**
|
|
63
|
+
* Update the menu bar
|
|
64
|
+
*/
|
|
65
|
+
function update(): void
|
|
66
|
+
}
|
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:
|
|
28
|
-
create_session:
|
|
29
|
-
join_session:
|
|
30
|
-
quit_session:
|
|
31
|
-
send_session_data: any
|
|
32
|
-
receive_session_data: any
|
|
33
|
-
user_joins_session:
|
|
34
|
-
user_leaves_session:
|
|
35
|
-
process_chat_message:
|
|
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:
|
|
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:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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:
|
|
70
|
-
|
|
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,11 +83,12 @@ 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:
|
|
86
|
+
change_color: {color: string, secondary?: boolean}
|
|
85
87
|
select_mode: { mode: Mode }
|
|
86
88
|
unselect_mode: { mode: Mode }
|
|
87
|
-
change_active_panel:
|
|
89
|
+
change_active_panel: {last_panel: Panel, panel: Panel}
|
|
88
90
|
resize_window: {event?: Event}
|
|
91
|
+
change_view_mode: {view_mode: string, previous_view_mode: string}
|
|
89
92
|
press_key: {input_in_focus?: HTMLElement, event: KeyboardEvent, capture: () => void}
|
|
90
93
|
select_format: {format: ModelFormat, project: ModelProject}
|
|
91
94
|
convert_format: {format: ModelFormat, old_format: ModelFormat}
|
|
@@ -93,21 +96,21 @@ interface BlockbenchEventMap {
|
|
|
93
96
|
delete_format: {format: ModelFormat}
|
|
94
97
|
select_project: { project: ModelProject }
|
|
95
98
|
unselect_project: { project: ModelProject }
|
|
96
|
-
setup_project:
|
|
97
|
-
update_project_resolution:
|
|
98
|
-
merge_project: any
|
|
99
|
-
display_model_stats:
|
|
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}[]}
|
|
100
103
|
update_view: UpdateViewOptions
|
|
101
104
|
update_camera_position: {preview: Preview}
|
|
102
|
-
render_frame:
|
|
103
|
-
construct_model_loader:
|
|
104
|
-
delete_model_loader:
|
|
105
|
-
update_recent_project_data:
|
|
106
|
-
update_recent_project_thumbnail:
|
|
107
|
-
load_from_recent_project_data:
|
|
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}
|
|
108
111
|
edit_animation_properties: {animation: _Animation}
|
|
109
|
-
select_preview_scene:
|
|
110
|
-
unselect_preview_scene:
|
|
112
|
+
select_preview_scene: {scene: PreviewScene}
|
|
113
|
+
unselect_preview_scene: {scene: PreviewScene}
|
|
111
114
|
select_animation: {animation: _Animation}
|
|
112
115
|
remove_animation: {animations: _Animation[]}
|
|
113
116
|
compile_bedrock_animation_controller_state: {state: AnimationControllerState, json: any}
|
|
@@ -119,29 +122,29 @@ interface BlockbenchEventMap {
|
|
|
119
122
|
compile_bedrock_animation_controller: {state: AnimationController, json: any}
|
|
120
123
|
add_animation_controller: {state: AnimationController}
|
|
121
124
|
edit_animation_controller_properties: {state: AnimationController}
|
|
122
|
-
timeline_play:
|
|
123
|
-
timeline_pause:
|
|
124
|
-
unselect_interface:
|
|
125
|
-
reset_layout:
|
|
125
|
+
timeline_play: {}
|
|
126
|
+
timeline_pause: {}
|
|
127
|
+
unselect_interface: {event: Event}
|
|
128
|
+
reset_layout: {}
|
|
126
129
|
update_pressed_modifier_keys: {
|
|
127
130
|
before: {shift: boolean, alt: boolean, ctrl: boolean}
|
|
128
131
|
now: {shift: boolean, alt: boolean, ctrl: boolean}
|
|
129
132
|
event: KeyboardEvent
|
|
130
133
|
}
|
|
131
134
|
open_bar_menu: {menu: BarMenu}
|
|
132
|
-
unselect_all:
|
|
135
|
+
unselect_all: {}
|
|
133
136
|
get_face_texture: {face: Face, element: OutlinerElement}
|
|
134
|
-
quick_save_model:
|
|
135
|
-
save_editor_state:
|
|
136
|
-
load_editor_state:
|
|
137
|
-
select_no_project:
|
|
138
|
-
flip_node_name:
|
|
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}
|
|
139
142
|
update_scene_shading: any
|
|
140
143
|
edit_layer_properties: {layer: TextureLayer}
|
|
141
144
|
select_texture: {texture: Texture, event: Event}
|
|
142
145
|
compile_texture_mcmeta: {mcmeta: any}
|
|
143
|
-
register_element_type: any
|
|
144
|
-
edit_collection_properties:
|
|
146
|
+
register_element_type: {id: string, constructor: any}
|
|
147
|
+
edit_collection_properties: {collection: Collection}
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
type BlockbenchEventName = keyof BlockbenchEventMap
|
|
@@ -155,13 +158,14 @@ declare function updateSelection(): void
|
|
|
155
158
|
declare var LZUTF8: any
|
|
156
159
|
|
|
157
160
|
declare function unselectAllElements(exceptions?: OutlinerNode[]): void
|
|
158
|
-
declare function updateCubeHighlights(hover_cube: Cube, force_off: boolean): void
|
|
159
161
|
declare function getRescalingFactor(angle: number): number
|
|
160
162
|
/**
|
|
161
163
|
* Get the world-space center of the selection
|
|
162
164
|
* @param all If true, calculate the center of all elements instead of just selected
|
|
163
165
|
*/
|
|
164
166
|
declare function getSelectionCenter(all: boolean = false): ArrayVector3
|
|
167
|
+
declare function getSpatialInterval(event?: Event): number;
|
|
168
|
+
declare function getRotationInterval(event?: Event): number;
|
|
165
169
|
|
|
166
170
|
declare const Pressing: {
|
|
167
171
|
shift: boolean
|
|
@@ -175,14 +179,17 @@ declare const Pressing: {
|
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
declare const Prop = {
|
|
178
|
-
active_panel: string
|
|
182
|
+
active_panel: string,
|
|
183
|
+
fps: number,
|
|
184
|
+
show_left_bar: boolean,
|
|
185
|
+
show_right_bar: boolean,
|
|
179
186
|
}
|
|
180
187
|
declare const Project: ModelProject
|
|
181
188
|
|
|
182
|
-
declare function updateCubeHighlights(hover_cube: Cube, force_off: boolean): void
|
|
183
|
-
declare function getRescalingFactor(angle: number): number
|
|
184
|
-
|
|
185
189
|
declare function isStringNumber(value: any): boolean
|
|
186
190
|
|
|
187
191
|
declare function marked(text: string): string
|
|
188
192
|
declare function pureMarked(text: string): string
|
|
193
|
+
|
|
194
|
+
declare type SplineMesh = typeof OutlinerElement & Record<string, any>
|
|
195
|
+
declare const SplineMesh: typeof OutlinerElement
|