blockbench-types 5.1.0-beta.3-next.2 → 5.1.0

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 (55) 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 +73 -73
  5. package/custom/canvas.d.ts +307 -307
  6. package/custom/codec.d.ts +182 -182
  7. package/custom/copy_paste.d.ts +42 -42
  8. package/custom/cube.d.ts +151 -151
  9. package/custom/desktop.d.ts +73 -73
  10. package/custom/display_mode.d.ts +137 -137
  11. package/custom/edit_session.d.ts +37 -37
  12. package/custom/global.d.ts +168 -168
  13. package/custom/group.d.ts +113 -113
  14. package/custom/interface.d.ts +78 -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 +136 -136
  19. package/custom/mesh.d.ts +196 -196
  20. package/custom/misc.d.ts +199 -199
  21. package/custom/molang.d.ts +159 -159
  22. package/custom/outliner.d.ts +158 -158
  23. package/custom/painter.d.ts +69 -69
  24. package/custom/preview.d.ts +137 -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/start_screen.d.ts +14 -14
  29. package/custom/texture_group.d.ts +68 -68
  30. package/custom/texture_layers.d.ts +117 -117
  31. package/custom/textures.d.ts +515 -515
  32. package/custom/timeline.d.ts +66 -66
  33. package/custom/toolbars.d.ts +221 -221
  34. package/custom/undo.d.ts +208 -208
  35. package/custom/util/version_util.d.ts +32 -32
  36. package/custom/util.d.ts +235 -235
  37. package/custom/uveditor.d.ts +3 -3
  38. package/custom/validator.d.ts +99 -99
  39. package/documentation.md +12 -12
  40. package/generated/global_types.d.ts +47 -0
  41. package/generated/io/formats/bedrock.d.ts +4 -0
  42. package/generated/io/formats/bedrock_old.d.ts +4 -0
  43. package/generated/io/formats/collada.d.ts +4 -0
  44. package/generated/io/formats/fbx.d.ts +17 -0
  45. package/generated/io/formats/gltf.d.ts +6 -0
  46. package/generated/io/formats/java_block.d.ts +4 -0
  47. package/generated/io/formats/modded_entity.d.ts +139 -0
  48. package/generated/io/formats/obj.d.ts +12 -0
  49. package/generated/io/formats/optifine_jem.d.ts +3 -0
  50. package/generated/io/formats/optifine_jpm.d.ts +3 -0
  51. package/generated/io/formats/skin.d.ts +22 -0
  52. package/index.d.ts +2 -2
  53. package/package.json +39 -39
  54. package/tsconfig.json +19 -19
  55. package/type_config.json +46 -46
@@ -1,68 +1,68 @@
1
- /// <reference types="./blockbench"/>
2
-
3
- interface TextureGroupOptions {
4
- uuid?: string
5
- name?: string
6
- is_material?: boolean
7
- material_config?: TextureGroupMaterialConfigData
8
- }
9
-
10
- /**
11
- * A way to group textures. Texture groups can also be used to represent materials in enabled formats
12
- */
13
- declare class TextureGroup {
14
- static all: TextureGroup[]
15
-
16
- constructor(data?: Omit<TextureGroupOptions, 'uuid'>, uuid?: string)
17
- uuid: string
18
- name: string
19
- folded: boolean
20
- /**
21
- * If true, the texture group works as a material
22
- */
23
- is_material: boolean
24
- /**
25
- * Material configuration
26
- */
27
- material_config: TextureGroupMaterialConfig
28
- get material(): THREE.MeshStandardMaterial
29
- extend(data: TextureGroupOptions): this
30
- add(): this
31
- select(): this
32
- remove(): void
33
- showContextMenu(event: Event): void
34
- rename(): this
35
- getTextures(): Texture[]
36
- getUndoCopy(): Required<TextureGroupOptions>
37
- getSaveCopy(): Omit<TextureGroupOptions, 'is_material' | 'uuid'>
38
- updateMaterial(): void
39
- getMaterial(): THREE.MeshStandardMaterial
40
- }
41
-
42
- interface TextureGroupMaterialConfigData {
43
- color_value?: [number, number, number, number]
44
- mer_value?: [number, number, number]
45
- saved?: boolean
46
- }
47
- declare class TextureGroupMaterialConfig {
48
- constructor(texture_group: TextureGroup, data: TextureGroupMaterialConfigData)
49
- color_value: [number, number, number, number]
50
- mer_value: [number, number, number]
51
- saved: boolean
52
- menu: Menu
53
- texture_group: TextureGroup
54
-
55
- extend(data: TextureGroupMaterialConfigData): this
56
- getUndoCopy(): {}
57
- getSaveCopy(): {}
58
- compileForBedrock(): {
59
- format_version: string
60
- 'minecraft:texture_set': {}
61
- }
62
- getFilePath(): string
63
- getFileName(extension?: boolean): string
64
- save(): void
65
- showContextMenu(event: Event): void
66
- propertiesDialog(): void
67
- }
68
- declare function importTextureSet(file: any): void
1
+ /// <reference types="./blockbench"/>
2
+
3
+ interface TextureGroupOptions {
4
+ uuid?: string
5
+ name?: string
6
+ is_material?: boolean
7
+ material_config?: TextureGroupMaterialConfigData
8
+ }
9
+
10
+ /**
11
+ * A way to group textures. Texture groups can also be used to represent materials in enabled formats
12
+ */
13
+ declare class TextureGroup {
14
+ static all: TextureGroup[]
15
+
16
+ constructor(data?: Omit<TextureGroupOptions, 'uuid'>, uuid?: string)
17
+ uuid: string
18
+ name: string
19
+ folded: boolean
20
+ /**
21
+ * If true, the texture group works as a material
22
+ */
23
+ is_material: boolean
24
+ /**
25
+ * Material configuration
26
+ */
27
+ material_config: TextureGroupMaterialConfig
28
+ get material(): THREE.MeshStandardMaterial
29
+ extend(data: TextureGroupOptions): this
30
+ add(): this
31
+ select(): this
32
+ remove(): void
33
+ showContextMenu(event: Event): void
34
+ rename(): this
35
+ getTextures(): Texture[]
36
+ getUndoCopy(): Required<TextureGroupOptions>
37
+ getSaveCopy(): Omit<TextureGroupOptions, 'is_material' | 'uuid'>
38
+ updateMaterial(): void
39
+ getMaterial(): THREE.MeshStandardMaterial
40
+ }
41
+
42
+ interface TextureGroupMaterialConfigData {
43
+ color_value?: [number, number, number, number]
44
+ mer_value?: [number, number, number]
45
+ saved?: boolean
46
+ }
47
+ declare class TextureGroupMaterialConfig {
48
+ constructor(texture_group: TextureGroup, data: TextureGroupMaterialConfigData)
49
+ color_value: [number, number, number, number]
50
+ mer_value: [number, number, number]
51
+ saved: boolean
52
+ menu: Menu
53
+ texture_group: TextureGroup
54
+
55
+ extend(data: TextureGroupMaterialConfigData): this
56
+ getUndoCopy(): {}
57
+ getSaveCopy(): {}
58
+ compileForBedrock(): {
59
+ format_version: string
60
+ 'minecraft:texture_set': {}
61
+ }
62
+ getFilePath(): string
63
+ getFileName(extension?: boolean): string
64
+ save(): void
65
+ showContextMenu(event: Event): void
66
+ propertiesDialog(): void
67
+ }
68
+ declare function importTextureSet(file: any): void
@@ -1,117 +1,117 @@
1
- /// <reference types="three" />
2
-
3
- interface TextureLayerData {
4
- name?: string
5
- in_limbo?: boolean
6
- offset?: ArrayVector2
7
- scale?: ArrayVector2
8
- opacity?: number
9
- visible?: boolean
10
- blend_mode?: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
11
- image_data?: ImageData
12
- data_url?: string
13
- }
14
-
15
- /**
16
- * Texture layers always belong to a texture and represent the layers of the texture. Each layer has its own HTML canvas and canvas context
17
- */
18
- declare class TextureLayer {
19
- constructor(data: TextureLayerData, texture: Texture, uuid?: string)
20
-
21
- name: string
22
- uuid: UUID
23
- texture: Texture
24
- canvas: HTMLCanvasElement
25
- ctx: CanvasRenderingContext2D
26
- in_limbo: boolean
27
- img: HTMLImageElement
28
- /**
29
- * Layer offset from the top left corner of the texture to the top left corner of the layer
30
- */
31
- offset: ArrayVector2
32
- /**
33
- * Layer scale. This is only used by the layer transform tool and should be applied and reset to 1x1 before doing further changes
34
- */
35
- scale: ArrayVector2
36
- opacity: number
37
- visible: boolean
38
- blend_mode: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
39
-
40
- extend(data: TextureLayerData): void
41
- /**
42
- * Selects the layer
43
- */
44
- select(): void
45
- showContextMenu(event: Event): void
46
- /**
47
- * Remove the layer
48
- * @param undo Create an undo point and update the texture
49
- */
50
- remove(undo: boolean): void
51
- getUndoCopy(image_data: boolean): object
52
- getSaveCopy(): object
53
- /**
54
- * Set the layer into a limbo state, where clicking Place or clicking next to the layer will place it on the layer below
55
- */
56
- setLimbo(): void
57
- /**
58
- * Resolves the limbo state by turning the limbo layer into a full layer, or merging it into the layer below
59
- * @param keep_separate If true, the layer is kept as a separate layer
60
- */
61
- resolveLimbo(keep_separate: boolean): void
62
- /**
63
- * Set the layer size. This resizes the canvas, which discards the layer content
64
- */
65
- setSize(width: number, height: number): void
66
- /**
67
- * Toggle layer visibility. This creates an undo point
68
- */
69
- toggleVisibility(): void
70
- /**
71
- * Scroll the layer panel list to
72
- */
73
- scrollTo(): void
74
- /**
75
- * Add the layer to the associated texture above the previously selected layer, select this layer, and scroll the layer panel list to it
76
- */
77
- addForEditing(): void
78
- /**
79
- * Merge this texture onto the texture below
80
- * @param undo Create an undo entry
81
- */
82
- mergeDown(undo: boolean): void
83
- /**
84
- * Expand the layer to include the listed pixels
85
- * @param points
86
- */
87
- expandTo(...points: ArrayVector2): void
88
- /**
89
- * Flip the texture along an axis
90
- * @param axis Flip axis, where 0 is X and 1 is Y
91
- * @param undo Create an undo entry
92
- */
93
- flip(axis: number, undo: boolean): void
94
- /**
95
- * Rotate the layer around itself in 90 degree steps
96
- * @param angle Angle in degrees
97
- * @param undo Create an undo entry
98
- */
99
- rotate(angle: number, undo: boolean): void
100
- /**
101
- * Centers the layer on the texture
102
- */
103
- center(): void
104
- /**
105
- * Open the properties dialog
106
- */
107
- propertiesDialog(): void
108
-
109
- /**
110
- * Get all layers of the active texture
111
- */
112
- static all: TextureLayer[]
113
- /**
114
- * Get the selected layer
115
- */
116
- static selected: TextureLayer
117
- }
1
+ /// <reference types="three" />
2
+
3
+ interface TextureLayerData {
4
+ name?: string
5
+ in_limbo?: boolean
6
+ offset?: ArrayVector2
7
+ scale?: ArrayVector2
8
+ opacity?: number
9
+ visible?: boolean
10
+ blend_mode?: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
11
+ image_data?: ImageData
12
+ data_url?: string
13
+ }
14
+
15
+ /**
16
+ * Texture layers always belong to a texture and represent the layers of the texture. Each layer has its own HTML canvas and canvas context
17
+ */
18
+ declare class TextureLayer {
19
+ constructor(data: TextureLayerData, texture: Texture, uuid?: string)
20
+
21
+ name: string
22
+ uuid: UUID
23
+ texture: Texture
24
+ canvas: HTMLCanvasElement
25
+ ctx: CanvasRenderingContext2D
26
+ in_limbo: boolean
27
+ img: HTMLImageElement
28
+ /**
29
+ * Layer offset from the top left corner of the texture to the top left corner of the layer
30
+ */
31
+ offset: ArrayVector2
32
+ /**
33
+ * Layer scale. This is only used by the layer transform tool and should be applied and reset to 1x1 before doing further changes
34
+ */
35
+ scale: ArrayVector2
36
+ opacity: number
37
+ visible: boolean
38
+ blend_mode: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
39
+
40
+ extend(data: TextureLayerData): void
41
+ /**
42
+ * Selects the layer
43
+ */
44
+ select(): void
45
+ showContextMenu(event: Event): void
46
+ /**
47
+ * Remove the layer
48
+ * @param undo Create an undo point and update the texture
49
+ */
50
+ remove(undo: boolean): void
51
+ getUndoCopy(image_data: boolean): object
52
+ getSaveCopy(): object
53
+ /**
54
+ * Set the layer into a limbo state, where clicking Place or clicking next to the layer will place it on the layer below
55
+ */
56
+ setLimbo(): void
57
+ /**
58
+ * Resolves the limbo state by turning the limbo layer into a full layer, or merging it into the layer below
59
+ * @param keep_separate If true, the layer is kept as a separate layer
60
+ */
61
+ resolveLimbo(keep_separate: boolean): void
62
+ /**
63
+ * Set the layer size. This resizes the canvas, which discards the layer content
64
+ */
65
+ setSize(width: number, height: number): void
66
+ /**
67
+ * Toggle layer visibility. This creates an undo point
68
+ */
69
+ toggleVisibility(): void
70
+ /**
71
+ * Scroll the layer panel list to
72
+ */
73
+ scrollTo(): void
74
+ /**
75
+ * Add the layer to the associated texture above the previously selected layer, select this layer, and scroll the layer panel list to it
76
+ */
77
+ addForEditing(): void
78
+ /**
79
+ * Merge this texture onto the texture below
80
+ * @param undo Create an undo entry
81
+ */
82
+ mergeDown(undo: boolean): void
83
+ /**
84
+ * Expand the layer to include the listed pixels
85
+ * @param points
86
+ */
87
+ expandTo(...points: ArrayVector2): void
88
+ /**
89
+ * Flip the texture along an axis
90
+ * @param axis Flip axis, where 0 is X and 1 is Y
91
+ * @param undo Create an undo entry
92
+ */
93
+ flip(axis: number, undo: boolean): void
94
+ /**
95
+ * Rotate the layer around itself in 90 degree steps
96
+ * @param angle Angle in degrees
97
+ * @param undo Create an undo entry
98
+ */
99
+ rotate(angle: number, undo: boolean): void
100
+ /**
101
+ * Centers the layer on the texture
102
+ */
103
+ center(): void
104
+ /**
105
+ * Open the properties dialog
106
+ */
107
+ propertiesDialog(): void
108
+
109
+ /**
110
+ * Get all layers of the active texture
111
+ */
112
+ static all: TextureLayer[]
113
+ /**
114
+ * Get the selected layer
115
+ */
116
+ static selected: TextureLayer
117
+ }