blockbench-types 5.1.0 → 5.2.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 (72) hide show
  1. package/README.md +30 -30
  2. package/custom/animation.d.ts +256 -256
  3. package/custom/animation_controller.d.ts +124 -124
  4. package/custom/blockbench.d.ts +71 -73
  5. package/custom/canvas.d.ts +307 -307
  6. package/custom/codec.d.ts +182 -182
  7. package/custom/copy_paste.d.ts +43 -42
  8. package/custom/cube.d.ts +151 -151
  9. package/custom/desktop.d.ts +61 -73
  10. package/custom/display_mode.d.ts +137 -137
  11. package/custom/edit_session.d.ts +38 -37
  12. package/custom/global.d.ts +182 -168
  13. package/custom/group.d.ts +113 -113
  14. package/custom/interface.d.ts +83 -78
  15. package/custom/io.d.ts +12 -12
  16. package/custom/keyframe.d.ts +94 -94
  17. package/custom/libs.d.ts +13 -13
  18. package/custom/menu.d.ts +137 -136
  19. package/custom/mesh.d.ts +196 -196
  20. package/custom/misc.d.ts +188 -199
  21. package/custom/molang.d.ts +159 -159
  22. package/custom/outliner.d.ts +158 -158
  23. package/custom/painter.d.ts +70 -69
  24. package/custom/preview.d.ts +147 -137
  25. package/custom/preview_scene.d.ts +120 -120
  26. package/custom/screencam.d.ts +71 -71
  27. package/custom/spline_mesh.d.ts +189 -189
  28. package/custom/texture_group.d.ts +68 -68
  29. package/custom/textures.d.ts +524 -515
  30. package/custom/timeline.d.ts +66 -66
  31. package/custom/toolbars.d.ts +222 -221
  32. package/custom/undo.d.ts +209 -208
  33. package/custom/util/version_util.d.ts +32 -32
  34. package/custom/util.d.ts +235 -235
  35. package/custom/uveditor.d.ts +3 -3
  36. package/custom/validator.d.ts +99 -99
  37. package/documentation.md +12 -12
  38. package/generated/animations/mirror_animating.d.ts +7 -0
  39. package/generated/api.d.ts +6 -0
  40. package/generated/file_system.d.ts +1 -1
  41. package/generated/formats/standards/obj.d.ts +9 -11
  42. package/generated/interface/actions.d.ts +6 -3
  43. package/generated/interface/form.d.ts +2 -1
  44. package/generated/interface/resize_lines.d.ts +2 -0
  45. package/generated/interface/settings.d.ts +6 -2
  46. package/generated/interface/start_screen.d.ts +62 -42
  47. package/generated/io/project.d.ts +9 -1
  48. package/generated/lib/CanvasFrame.d.ts +1 -0
  49. package/generated/main.d.ts +1 -1
  50. package/generated/modeling/mesh/proportional_edit.d.ts +15 -13
  51. package/generated/modeling/mirror_modeling.d.ts +4 -0
  52. package/generated/modeling/weight_paint.d.ts +11 -0
  53. package/generated/texturing/layers.d.ts +140 -0
  54. package/generated/util/state_memory.d.ts +1 -1
  55. package/index.d.ts +2 -2
  56. package/package.json +39 -39
  57. package/tsconfig.json +19 -19
  58. package/type_config.json +45 -46
  59. package/custom/start_screen.d.ts +0 -15
  60. package/custom/texture_layers.d.ts +0 -117
  61. package/generated/global_types.d.ts +0 -47
  62. package/generated/io/formats/bedrock.d.ts +0 -4
  63. package/generated/io/formats/bedrock_old.d.ts +0 -4
  64. package/generated/io/formats/collada.d.ts +0 -4
  65. package/generated/io/formats/fbx.d.ts +0 -17
  66. package/generated/io/formats/gltf.d.ts +0 -6
  67. package/generated/io/formats/java_block.d.ts +0 -4
  68. package/generated/io/formats/modded_entity.d.ts +0 -139
  69. package/generated/io/formats/obj.d.ts +0 -12
  70. package/generated/io/formats/optifine_jem.d.ts +0 -3
  71. package/generated/io/formats/optifine_jpm.d.ts +0 -3
  72. package/generated/io/formats/skin.d.ts +0 -22
@@ -1,124 +1,124 @@
1
- /// <reference types="./blockbench"/>
2
-
3
- type StateAnimationInput =
4
- | string
5
- | {
6
- [key: string]: string
7
- }
8
- | {
9
- uuid: string
10
- key?: string
11
- animation?: string
12
- blend_value?: number
13
- }
14
- type StateAnimation = {
15
- uuid: string
16
- key: string
17
- animation: string
18
- blend_value: number
19
- }
20
-
21
- interface AnimationControllerStateOptions {
22
- name?: string
23
- animations?: StateAnimationInput[]
24
- transitions?: any[]
25
- sounds?: any[]
26
- particles?: any[]
27
- on_entry?: string
28
- on_exit?: string
29
- blend_transition?: number
30
- blend_via_shortest_path?: boolean
31
- }
32
-
33
- declare class AnimationControllerState {
34
- constructor(controller: AnimationController, options?: AnimationControllerStateOptions)
35
- controller: AnimationController
36
- uuid: string
37
- name: string
38
- fold: {
39
- animations: boolean
40
- particles: boolean
41
- sounds: boolean
42
- on_entry: boolean
43
- on_exit: boolean
44
- transitions: boolean
45
- }
46
- muted: {
47
- sound: boolean
48
- particle: boolean
49
- }
50
- playing_sounds: HTMLAudioElement[]
51
- animations: StateAnimation[]
52
- transitions: any[]
53
- sounds: any[]
54
- particles: any[]
55
- on_entry: string
56
- on_exit: string
57
- blend_transition: number
58
- blend_via_shortest_path: boolean
59
-
60
- extend(data: AnimationControllerStateOptions): void
61
- getUndoCopy(): any
62
- compileForBedrock(): any
63
- select(force?: boolean): void
64
- unselect(): void
65
- playEffects(): void
66
- scrollTo(): void
67
- rename(): void
68
- remove(undo?: boolean): void
69
- createUniqueName(): void
70
-
71
- addAnimation(animation?: _Animation): void
72
- addTransition(target_uuid?: string): void
73
- addParticle(options?: { effect: string }): void
74
- addSound(options?: { effect: string; file: string }): void
75
- openMenu(event: Event): void
76
- /**
77
- * Returns the current animation time of the state in seconds
78
- */
79
- getStateTime(): number
80
- }
81
-
82
- interface AnimationControllerOptions {
83
- name?: string
84
- uuid?: string
85
- path?: string
86
- initial_state?: string
87
- }
88
-
89
- /**
90
- * Animation Controllers are state machines used for Minecraft: Bedrock Edition models to control and blend between animations.
91
- */
92
- declare class AnimationController extends AnimationItem {
93
- constructor(data?: AnimationControllerOptions)
94
- name: string
95
- path: string
96
- uuid: string
97
- playing: boolean
98
- saved: boolean
99
- selected: boolean
100
- saved_name: string
101
- states: AnimationControllerState[]
102
- initial_state: string
103
- selected_state: null | AnimationControllerState
104
- extend(data: AnimationControllerOptions): this
105
- getUndoCopy(): any
106
- compileForBedrock(): any
107
- save(): this | undefined
108
- select(): this | undefined
109
- createUniqueName(references: AnimationController[]): string | boolean
110
- rename(): this
111
- /**
112
- * Adds the animation controller to the current project and to the interface
113
- * @param undo If true, the addition of the animation controller will be registered as an edit
114
- */
115
- add(undo?: boolean): this
116
- remove(undo?: boolean, remove_from_file?: boolean): this
117
- propertiesDialog(): void
118
- /**
119
- * Updates the preview of the controller, including updating the animations and switching states if preview mode is set to play
120
- */
121
- updatePreview(): void
122
- togglePlayingState(state?: boolean): boolean
123
- showContextMenu(event: Event | HTMLElement): void
124
- }
1
+ /// <reference types="./blockbench"/>
2
+
3
+ type StateAnimationInput =
4
+ | string
5
+ | {
6
+ [key: string]: string
7
+ }
8
+ | {
9
+ uuid: string
10
+ key?: string
11
+ animation?: string
12
+ blend_value?: number
13
+ }
14
+ type StateAnimation = {
15
+ uuid: string
16
+ key: string
17
+ animation: string
18
+ blend_value: number
19
+ }
20
+
21
+ interface AnimationControllerStateOptions {
22
+ name?: string
23
+ animations?: StateAnimationInput[]
24
+ transitions?: any[]
25
+ sounds?: any[]
26
+ particles?: any[]
27
+ on_entry?: string
28
+ on_exit?: string
29
+ blend_transition?: number
30
+ blend_via_shortest_path?: boolean
31
+ }
32
+
33
+ declare class AnimationControllerState {
34
+ constructor(controller: AnimationController, options?: AnimationControllerStateOptions)
35
+ controller: AnimationController
36
+ uuid: string
37
+ name: string
38
+ fold: {
39
+ animations: boolean
40
+ particles: boolean
41
+ sounds: boolean
42
+ on_entry: boolean
43
+ on_exit: boolean
44
+ transitions: boolean
45
+ }
46
+ muted: {
47
+ sound: boolean
48
+ particle: boolean
49
+ }
50
+ playing_sounds: HTMLAudioElement[]
51
+ animations: StateAnimation[]
52
+ transitions: any[]
53
+ sounds: any[]
54
+ particles: any[]
55
+ on_entry: string
56
+ on_exit: string
57
+ blend_transition: number
58
+ blend_via_shortest_path: boolean
59
+
60
+ extend(data: AnimationControllerStateOptions): void
61
+ getUndoCopy(): any
62
+ compileForBedrock(): any
63
+ select(force?: boolean): void
64
+ unselect(): void
65
+ playEffects(): void
66
+ scrollTo(): void
67
+ rename(): void
68
+ remove(undo?: boolean): void
69
+ createUniqueName(): void
70
+
71
+ addAnimation(animation?: _Animation): void
72
+ addTransition(target_uuid?: string): void
73
+ addParticle(options?: { effect: string }): void
74
+ addSound(options?: { effect: string; file: string }): void
75
+ openMenu(event: Event): void
76
+ /**
77
+ * Returns the current animation time of the state in seconds
78
+ */
79
+ getStateTime(): number
80
+ }
81
+
82
+ interface AnimationControllerOptions {
83
+ name?: string
84
+ uuid?: string
85
+ path?: string
86
+ initial_state?: string
87
+ }
88
+
89
+ /**
90
+ * Animation Controllers are state machines used for Minecraft: Bedrock Edition models to control and blend between animations.
91
+ */
92
+ declare class AnimationController extends AnimationItem {
93
+ constructor(data?: AnimationControllerOptions)
94
+ name: string
95
+ path: string
96
+ uuid: string
97
+ playing: boolean
98
+ saved: boolean
99
+ selected: boolean
100
+ saved_name: string
101
+ states: AnimationControllerState[]
102
+ initial_state: string
103
+ selected_state: null | AnimationControllerState
104
+ extend(data: AnimationControllerOptions): this
105
+ getUndoCopy(): any
106
+ compileForBedrock(): any
107
+ save(): this | undefined
108
+ select(): this | undefined
109
+ createUniqueName(references: AnimationController[]): string | boolean
110
+ rename(): this
111
+ /**
112
+ * Adds the animation controller to the current project and to the interface
113
+ * @param undo If true, the addition of the animation controller will be registered as an edit
114
+ */
115
+ add(undo?: boolean): this
116
+ remove(undo?: boolean, remove_from_file?: boolean): this
117
+ propertiesDialog(): void
118
+ /**
119
+ * Updates the preview of the controller, including updating the animations and switching states if preview mode is set to play
120
+ */
121
+ updatePreview(): void
122
+ togglePlayingState(state?: boolean): boolean
123
+ showContextMenu(event: Event | HTMLElement): void
124
+ }
@@ -1,73 +1,71 @@
1
- /// <reference types="vue" />
2
- /// <reference types="./libs" />
3
- /// <reference types="@types/prismjs" />
4
- /// <reference types="@types/jquery" />
5
- /// <reference types="wintersky" />
6
-
7
- /// <reference types="./texture_layers" />
8
- /// <reference types="./texture_group" />
9
- /// <reference types="./toolbars" />
10
- /// <reference types="./animation" />
11
- /// <reference types="./animation_controller" />
12
- /// <reference types="./canvas_frame" />
13
- /// <reference types="./canvas" />
14
- /// <reference types="./codec" />
15
- /// <reference types="./cube" />
16
- /// <reference types="./desktop" />
17
- /// <reference types="./display_mode" />
18
- /// <reference types="./global" />
19
- /// <reference types="./group" />
20
- /// <reference types="./interface" />
21
- /// <reference types="./keyframe" />
22
- /// <reference types="./menu" />
23
- /// <reference types="./mesh" />
24
- /// <reference types="./spline_mesh" />
25
- /// <reference types="./misc" />
26
- /// <reference types="./molang" />
27
- /// <reference types="./outliner" />
28
- /// <reference types="./painter" />
29
- /// <reference types="./preview" />
30
- /// <reference types="./preview_scene" />
31
- /// <reference types="./edit_session" />
32
- /// <reference types="./screencam" />
33
- /// <reference types="./textures" />
34
- /// <reference types="./timeline" />
35
- /// <reference types="./undo" />
36
- /// <reference types="./util" />
37
- /// <reference types="./io" />
38
- /// <reference types="./uveditor" />
39
- /// <reference types="./validator" />
40
- /// <reference types="./display_mode" />
41
- /// <reference types="./misc" />
42
- /// <reference types="./util" />
43
- /// <reference types="./math_util" />
44
- /// <reference types="./canvas_frame" />
45
- /// <reference types="./io" />
46
- /// <reference types="./native_apis" />
47
- /// <reference types="./util/VersionUtil" />
48
- /// <reference types="./start_screen" />
49
-
50
- /**
51
- * Provides access to global Javascript/DOM variables that are overwritten by Blockbench's own variables
52
- */
53
- declare const NativeGlobals: {
54
- Animation: {
55
- new (
56
- effect?: AnimationEffect | null | undefined,
57
- timeline?: AnimationTimeline | null | undefined
58
- ): Animation
59
- prototype: Animation
60
- }
61
- }
62
-
63
- /**
64
- * Shader support
65
- */
66
- declare module "*.glsl" {
67
- const value: string;
68
- export default value;
69
- }
70
- declare module "*.bbtheme" {
71
- const value: string | any;
72
- export default value;
73
- }
1
+ /// <reference types="vue" />
2
+ /// <reference types="./libs" />
3
+ /// <reference types="@types/prismjs" />
4
+ /// <reference types="@types/jquery" />
5
+ /// <reference types="wintersky" />
6
+
7
+ /// <reference types="./texture_group" />
8
+ /// <reference types="./toolbars" />
9
+ /// <reference types="./animation" />
10
+ /// <reference types="./animation_controller" />
11
+ /// <reference types="./canvas_frame" />
12
+ /// <reference types="./canvas" />
13
+ /// <reference types="./codec" />
14
+ /// <reference types="./cube" />
15
+ /// <reference types="./desktop" />
16
+ /// <reference types="./display_mode" />
17
+ /// <reference types="./global" />
18
+ /// <reference types="./group" />
19
+ /// <reference types="./interface" />
20
+ /// <reference types="./keyframe" />
21
+ /// <reference types="./menu" />
22
+ /// <reference types="./mesh" />
23
+ /// <reference types="./spline_mesh" />
24
+ /// <reference types="./misc" />
25
+ /// <reference types="./molang" />
26
+ /// <reference types="./outliner" />
27
+ /// <reference types="./painter" />
28
+ /// <reference types="./preview" />
29
+ /// <reference types="./preview_scene" />
30
+ /// <reference types="./edit_session" />
31
+ /// <reference types="./screencam" />
32
+ /// <reference types="./textures" />
33
+ /// <reference types="./timeline" />
34
+ /// <reference types="./undo" />
35
+ /// <reference types="./util" />
36
+ /// <reference types="./io" />
37
+ /// <reference types="./uveditor" />
38
+ /// <reference types="./validator" />
39
+ /// <reference types="./display_mode" />
40
+ /// <reference types="./misc" />
41
+ /// <reference types="./util" />
42
+ /// <reference types="./math_util" />
43
+ /// <reference types="./canvas_frame" />
44
+ /// <reference types="./io" />
45
+ /// <reference types="./native_apis" />
46
+ /// <reference types="./util/VersionUtil" />
47
+
48
+ /**
49
+ * Provides access to global Javascript/DOM variables that are overwritten by Blockbench's own variables
50
+ */
51
+ declare const NativeGlobals: {
52
+ Animation: {
53
+ new (
54
+ effect?: AnimationEffect | null | undefined,
55
+ timeline?: AnimationTimeline | null | undefined
56
+ ): Animation
57
+ prototype: Animation
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Shader support
63
+ */
64
+ declare module "*.glsl" {
65
+ const value: string;
66
+ export default value;
67
+ }
68
+ declare module "*.bbtheme" {
69
+ const value: string | any;
70
+ export default value;
71
+ }