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,71 +1,71 @@
1
- /// <reference types="./blockbench"/>
2
- interface ScreenshotOptions {
3
- crop?: boolean
4
- width?: number
5
- height?: number
6
- }
7
- interface RecordGIFOptions {
8
- fps: number
9
- format?: 'gif' | 'apng' | 'png_sequence'
10
- length_mode?: 'seconds' | 'frames' | 'turntable' | 'animation'
11
- length?: number
12
- pixelate?: number
13
- quality?: number
14
- background: string
15
- background_image?: string
16
- turnspeed?: string
17
- /** Start playing the selected animation when the animation starts */
18
- play?: boolean
19
- repeat?: any
20
- /** Disable all UI feedback about GIF recording */
21
- silent?: boolean
22
- }
23
- interface RecordTimelapseOptions {
24
- /** Destination oath */
25
- destination: string
26
- source: 'preview' | 'locked' | 'interface'
27
- /** Interval between frames in seconds */
28
- interval: number
29
- }
30
- type ScreenshotReturn = (dataURL: string) => void
31
-
32
- /**
33
- * A global namespace handling screenshot and GIF recording utilities.
34
- */
35
- declare namespace Screencam {
36
- /**
37
- * Provided preview with anti aliasing disabled that can be used for screenshots
38
- */
39
- const NoAAPreview: Preview
40
- /**
41
- * Whether a timelapse is currently being recorded
42
- */
43
- const recording_timelapse: boolean
44
- const gif_options_dialog: Dialog
45
- const gif_crop: { top: number; left: number; right: number; bottom: number }
46
-
47
- function screenshotPreview(
48
- preview: Preview,
49
- options: ScreenshotOptions,
50
- cb: ScreenshotReturn
51
- ): void
52
-
53
- function fullScreen(options: ScreenshotOptions, cb: ScreenshotReturn): void
54
-
55
- function screenshot2DEditor(options: ScreenshotOptions, cb: ScreenshotReturn): void
56
-
57
- function returnScreenshot(dataUrl: any, cb: ScreenshotReturn, blob: any): void
58
-
59
- /**
60
- * Runs callback in a clean canvas, where only the model is visible and the control gizmos are hidden
61
- * @param options
62
- * @param cb
63
- */
64
- function cleanCanvas(options: any, cb: ScreenshotReturn): void
65
-
66
- function createGif(options: RecordGIFOptions, cb: ScreenshotReturn): void
67
-
68
- function recordTimelapse(options: RecordTimelapseOptions): void
69
-
70
- function stopTimelapse(): void
71
- }
1
+ /// <reference types="./blockbench"/>
2
+ interface ScreenshotOptions {
3
+ crop?: boolean
4
+ width?: number
5
+ height?: number
6
+ }
7
+ interface RecordGIFOptions {
8
+ fps: number
9
+ format?: 'gif' | 'apng' | 'png_sequence'
10
+ length_mode?: 'seconds' | 'frames' | 'turntable' | 'animation'
11
+ length?: number
12
+ pixelate?: number
13
+ quality?: number
14
+ background: string
15
+ background_image?: string
16
+ turnspeed?: string
17
+ /** Start playing the selected animation when the animation starts */
18
+ play?: boolean
19
+ repeat?: any
20
+ /** Disable all UI feedback about GIF recording */
21
+ silent?: boolean
22
+ }
23
+ interface RecordTimelapseOptions {
24
+ /** Destination oath */
25
+ destination: string
26
+ source: 'preview' | 'locked' | 'interface'
27
+ /** Interval between frames in seconds */
28
+ interval: number
29
+ }
30
+ type ScreenshotReturn = (dataURL: string) => void
31
+
32
+ /**
33
+ * A global namespace handling screenshot and GIF recording utilities.
34
+ */
35
+ declare namespace Screencam {
36
+ /**
37
+ * Provided preview with anti aliasing disabled that can be used for screenshots
38
+ */
39
+ const NoAAPreview: Preview
40
+ /**
41
+ * Whether a timelapse is currently being recorded
42
+ */
43
+ const recording_timelapse: boolean
44
+ const gif_options_dialog: Dialog
45
+ const gif_crop: { top: number; left: number; right: number; bottom: number }
46
+
47
+ function screenshotPreview(
48
+ preview: Preview,
49
+ options: ScreenshotOptions,
50
+ cb: ScreenshotReturn
51
+ ): void
52
+
53
+ function fullScreen(options: ScreenshotOptions, cb: ScreenshotReturn): void
54
+
55
+ function screenshot2DEditor(options: ScreenshotOptions, cb: ScreenshotReturn): void
56
+
57
+ function returnScreenshot(dataUrl: any, cb: ScreenshotReturn, blob: any): void
58
+
59
+ /**
60
+ * Runs callback in a clean canvas, where only the model is visible and the control gizmos are hidden
61
+ * @param options
62
+ * @param cb
63
+ */
64
+ function cleanCanvas(options: any, cb: ScreenshotReturn): void
65
+
66
+ function createGif(options: RecordGIFOptions, cb: ScreenshotReturn): void
67
+
68
+ function recordTimelapse(options: RecordTimelapseOptions): void
69
+
70
+ function stopTimelapse(): void
71
+ }
@@ -1,189 +1,189 @@
1
- /// <reference types="./blockbench"/>
2
-
3
-
4
- export declare class SplineTubeFace extends MeshFace {
5
- constructor(mesh: any, spline: any, data: any);
6
- get element(): SplineMesh;
7
- getTexture(): Texture;
8
- }
9
- interface SplineCurveOptions {
10
- start_handle: any
11
- end_handle: any
12
- start: any
13
- end: any
14
- start_ctrl: any
15
- end_ctrl: any
16
- }
17
- export declare class SplineCurve {
18
- constructor(spline: SplineMesh, data: SplineCurveOptions);
19
- get element(): SplineMesh;
20
- extend(data: SplineCurveOptions): this;
21
- getCurveKey(): string | undefined;
22
- isSelected(): boolean;
23
- getSaveCopy(): {
24
- start_handle: any;
25
- end_handle: any;
26
- start: any;
27
- start_ctrl: any;
28
- end_ctrl: any;
29
- end: any;
30
- };
31
- getUndoCopy(): any;
32
- /**
33
- * Splits a curve in two distinct paths using De Casteljau's algorithm.
34
- * The split happens at the corresponding T (time) on the initial curve.
35
- *
36
- * @param {float} time Point at which the split occurs (in % from 0 to 1)
37
- * @returns {array} Adjusted and new points for our two new curves, as two Objects, one per curve.
38
- */
39
- split(time: any): {
40
- start: any;
41
- start_ctrl: any;
42
- middle_ctrl1: any;
43
- middle: any;
44
- middle_ctrl2: any;
45
- end_ctrl: any;
46
- end: any;
47
- };
48
- }
49
- interface SplineHandle {
50
-
51
- }
52
- export declare class SplineHandle {
53
- constructor(spline: SplineMesh, data: SplineHandle);
54
- get element(): SplineMesh;
55
- extend(data: SplineHandle): this;
56
- getHandleKey(): string | undefined;
57
- isSelected(): boolean;
58
- getSaveCopy(): {
59
- control1: any;
60
- joint: any;
61
- control2: any;
62
- tilt: any;
63
- size: any;
64
- };
65
- getUndoCopy(): any;
66
- }
67
- interface SplineMeshOptions {
68
-
69
- }
70
- export declare class SplineMesh extends OutlinerElement {
71
- constructor(data: any, uuid: any);
72
- get vertices(): Record<string, ArrayVector3>;
73
- get handles(): Record<string, SplineHandle>;
74
- get curves(): Record<string, SplineCurve>;
75
- set vertices(v: Record<string, ArrayVector3>);
76
- set handles(v: Record<string, SplineHandle>);
77
- set curves(v: Record<string, SplineCurve>);
78
- get position(): ArrayVector3;
79
- get vertice_list(): any[];
80
- cyclic: boolean
81
- export: boolean
82
- display_space: boolean
83
- radial_resolution: number
84
- radius_multiplier: number
85
- tubular_resolution: number
86
- uv_mode: 'length_accurate' |'uniform' | 'per_segment'
87
- render_mode: 'mesh' | 'path'
88
- render_order: 'default' | 'behind' | 'in_front'
89
- shading: 'flat' | 'smooth'
90
-
91
- addVertices(...vectors: ArrayVector3[]): any[];
92
- addHandles(...handles: SplineHandle[]): any[];
93
- addCurves(...curves: SplineCurve[]): any[];
94
- extend(data: SplineMeshOptions): this;
95
- overwrite(data: SplineMeshOptions): this;
96
- getUndoCopy(aspects?: {}): {};
97
- getSaveCopy(): {};
98
- setColor(index: number): void;
99
- roll(axis: axisNumber, steps: number, origin_arg?: ArrayVector3): this;
100
- flip(axis: axisNumber, center?: number): this;
101
- /**
102
- * Refresh the dummy face object of this spline, allowing us to paint on it, or to convert it to a Mesh.
103
- */
104
- refreshTubeFaces(): void;
105
- getSelectedVertices(make: boolean = false): any;
106
- /**
107
- * Readonly list of selected handles, based on selected vertices.
108
- * @param {*} loose Tells the handle selection if it should count controls being selected without their joint.
109
- **/
110
- getSelectedHandles(loose?: boolean): string[];
111
- /**
112
- * Readonly list of selected curves, based on selected handles. See {@link getSelectedHandles()} for handle selection.
113
- * @param {*} loose Tells the handle selection if it should count controls being selected without their joint.
114
- **/
115
- getSelectedCurves(loose?: boolean): string[];
116
- getCurvesOfHandle(hKey: string): string[];
117
- getCurvesOfPoint(vKey: string): string[];
118
- getHandleOfPoint(vKey: string): string | undefined;
119
- getLastSelected(): SplineMesh | undefined;
120
- getLastHandle(): {
121
- data: SplineHandle;
122
- key: string;
123
- };
124
- getFirstHandle(): {
125
- data: SplineHandle;
126
- key: string;
127
- };
128
- getSize(axis?: axisNumber, selection_only?: any): number;
129
- /**
130
- * Gather control point transform data, primarily to orient the handleGizmos correctly, but also for normal transform space.
131
- * @param {*} hKey Key of the handle we want the transform of.
132
- * @param {*} euler re-orientation Euler in case we need to re-orient the result of this to match another direction.
133
- */
134
- getHandleEuler(hKey: string, euler?: THREE.Euler): {
135
- c1: any;
136
- c2: any;
137
- combined: any;
138
- };
139
- getWorldCenter(ignore_mesh_selection: any): THREE.Vector3;
140
- moveVector(arr: ArrayVector3, axis: axisNumber, update?: boolean): void;
141
- getCenter(global?: boolean): ArrayVector3;
142
- transferOrigin(origin: any, update?: boolean): this | undefined;
143
- /**
144
- * Applies the effects of Handle selection mode to the sibling vertex of this vKey. (Mirrored or Aligned)
145
- * @param {*} vkey The Key of the reference vertex, from which the result will be copied over to its sibling (if applicable).
146
- */
147
- applyHandleModeOnVertex(vkey: string): void;
148
- resize(val: any, axis: any, negative: any, allow_negative: any, bidirectional: any): void;
149
- getTubeMesh(removeDoubles?: boolean, mesh?: {
150
- faces: {};
151
- vertices: {};
152
- }): {
153
- faces: {};
154
- vertices: {};
155
- };
156
- getTubeGeo(shadeSmooth: any): {
157
- vertices: any[];
158
- normals: any[];
159
- indices: number[];
160
- uvs: number[];
161
- };
162
- getBézierPath(keepDoubles?: boolean): {
163
- tangents: any[];
164
- normals: any[];
165
- points: any[];
166
- sizes: any[];
167
- connections: boolean[];
168
- lengths: any[];
169
- accumulatedLengths: number[];
170
- pathLength: number;
171
- };
172
- getBézierNormal(tangent: any, up?: null): any;
173
- getBézierForCurve(time: any, key: string): {
174
- point: any;
175
- tangent: any;
176
- };
177
- getBézierForPoints(time: any, p1k: any, p2k: any, p3k: any, p4k: any): {
178
- point: any;
179
- tangent: any;
180
- };
181
- cubicBézier(time: any, point1: any, point2: any, point3: any, point4: any): {
182
- point: any;
183
- tangent: any;
184
- };
185
- getTexture(): Texture | undefined;
186
- applyTexture(texture: Texture): void;
187
- updateShading(shade_smooth: boolean): void;
188
- }
189
-
1
+ /// <reference types="./blockbench"/>
2
+
3
+
4
+ export declare class SplineTubeFace extends MeshFace {
5
+ constructor(mesh: any, spline: any, data: any);
6
+ get element(): SplineMesh;
7
+ getTexture(): Texture;
8
+ }
9
+ interface SplineCurveOptions {
10
+ start_handle: any
11
+ end_handle: any
12
+ start: any
13
+ end: any
14
+ start_ctrl: any
15
+ end_ctrl: any
16
+ }
17
+ export declare class SplineCurve {
18
+ constructor(spline: SplineMesh, data: SplineCurveOptions);
19
+ get element(): SplineMesh;
20
+ extend(data: SplineCurveOptions): this;
21
+ getCurveKey(): string | undefined;
22
+ isSelected(): boolean;
23
+ getSaveCopy(): {
24
+ start_handle: any;
25
+ end_handle: any;
26
+ start: any;
27
+ start_ctrl: any;
28
+ end_ctrl: any;
29
+ end: any;
30
+ };
31
+ getUndoCopy(): any;
32
+ /**
33
+ * Splits a curve in two distinct paths using De Casteljau's algorithm.
34
+ * The split happens at the corresponding T (time) on the initial curve.
35
+ *
36
+ * @param {float} time Point at which the split occurs (in % from 0 to 1)
37
+ * @returns {array} Adjusted and new points for our two new curves, as two Objects, one per curve.
38
+ */
39
+ split(time: any): {
40
+ start: any;
41
+ start_ctrl: any;
42
+ middle_ctrl1: any;
43
+ middle: any;
44
+ middle_ctrl2: any;
45
+ end_ctrl: any;
46
+ end: any;
47
+ };
48
+ }
49
+ interface SplineHandle {
50
+
51
+ }
52
+ export declare class SplineHandle {
53
+ constructor(spline: SplineMesh, data: SplineHandle);
54
+ get element(): SplineMesh;
55
+ extend(data: SplineHandle): this;
56
+ getHandleKey(): string | undefined;
57
+ isSelected(): boolean;
58
+ getSaveCopy(): {
59
+ control1: any;
60
+ joint: any;
61
+ control2: any;
62
+ tilt: any;
63
+ size: any;
64
+ };
65
+ getUndoCopy(): any;
66
+ }
67
+ interface SplineMeshOptions {
68
+
69
+ }
70
+ export declare class SplineMesh extends OutlinerElement {
71
+ constructor(data: any, uuid: any);
72
+ get vertices(): Record<string, ArrayVector3>;
73
+ get handles(): Record<string, SplineHandle>;
74
+ get curves(): Record<string, SplineCurve>;
75
+ set vertices(v: Record<string, ArrayVector3>);
76
+ set handles(v: Record<string, SplineHandle>);
77
+ set curves(v: Record<string, SplineCurve>);
78
+ get position(): ArrayVector3;
79
+ get vertice_list(): any[];
80
+ cyclic: boolean
81
+ export: boolean
82
+ display_space: boolean
83
+ radial_resolution: number
84
+ radius_multiplier: number
85
+ tubular_resolution: number
86
+ uv_mode: 'length_accurate' |'uniform' | 'per_segment'
87
+ render_mode: 'mesh' | 'path'
88
+ render_order: 'default' | 'behind' | 'in_front'
89
+ shading: 'flat' | 'smooth'
90
+
91
+ addVertices(...vectors: ArrayVector3[]): any[];
92
+ addHandles(...handles: SplineHandle[]): any[];
93
+ addCurves(...curves: SplineCurve[]): any[];
94
+ extend(data: SplineMeshOptions): this;
95
+ overwrite(data: SplineMeshOptions): this;
96
+ getUndoCopy(aspects?: {}): {};
97
+ getSaveCopy(): {};
98
+ setColor(index: number): void;
99
+ roll(axis: axisNumber, steps: number, origin_arg?: ArrayVector3): this;
100
+ flip(axis: axisNumber, center?: number): this;
101
+ /**
102
+ * Refresh the dummy face object of this spline, allowing us to paint on it, or to convert it to a Mesh.
103
+ */
104
+ refreshTubeFaces(): void;
105
+ getSelectedVertices(make: boolean = false): any;
106
+ /**
107
+ * Readonly list of selected handles, based on selected vertices.
108
+ * @param {*} loose Tells the handle selection if it should count controls being selected without their joint.
109
+ **/
110
+ getSelectedHandles(loose?: boolean): string[];
111
+ /**
112
+ * Readonly list of selected curves, based on selected handles. See {@link getSelectedHandles()} for handle selection.
113
+ * @param {*} loose Tells the handle selection if it should count controls being selected without their joint.
114
+ **/
115
+ getSelectedCurves(loose?: boolean): string[];
116
+ getCurvesOfHandle(hKey: string): string[];
117
+ getCurvesOfPoint(vKey: string): string[];
118
+ getHandleOfPoint(vKey: string): string | undefined;
119
+ getLastSelected(): SplineMesh | undefined;
120
+ getLastHandle(): {
121
+ data: SplineHandle;
122
+ key: string;
123
+ };
124
+ getFirstHandle(): {
125
+ data: SplineHandle;
126
+ key: string;
127
+ };
128
+ getSize(axis?: axisNumber, selection_only?: any): number;
129
+ /**
130
+ * Gather control point transform data, primarily to orient the handleGizmos correctly, but also for normal transform space.
131
+ * @param {*} hKey Key of the handle we want the transform of.
132
+ * @param {*} euler re-orientation Euler in case we need to re-orient the result of this to match another direction.
133
+ */
134
+ getHandleEuler(hKey: string, euler?: THREE.Euler): {
135
+ c1: any;
136
+ c2: any;
137
+ combined: any;
138
+ };
139
+ getWorldCenter(ignore_mesh_selection: any): THREE.Vector3;
140
+ moveVector(arr: ArrayVector3, axis: axisNumber, update?: boolean): void;
141
+ getCenter(global?: boolean): ArrayVector3;
142
+ transferOrigin(origin: any, update?: boolean): this | undefined;
143
+ /**
144
+ * Applies the effects of Handle selection mode to the sibling vertex of this vKey. (Mirrored or Aligned)
145
+ * @param {*} vkey The Key of the reference vertex, from which the result will be copied over to its sibling (if applicable).
146
+ */
147
+ applyHandleModeOnVertex(vkey: string): void;
148
+ resize(val: any, axis: any, negative: any, allow_negative: any, bidirectional: any): void;
149
+ getTubeMesh(removeDoubles?: boolean, mesh?: {
150
+ faces: {};
151
+ vertices: {};
152
+ }): {
153
+ faces: {};
154
+ vertices: {};
155
+ };
156
+ getTubeGeo(shadeSmooth: any): {
157
+ vertices: any[];
158
+ normals: any[];
159
+ indices: number[];
160
+ uvs: number[];
161
+ };
162
+ getBézierPath(keepDoubles?: boolean): {
163
+ tangents: any[];
164
+ normals: any[];
165
+ points: any[];
166
+ sizes: any[];
167
+ connections: boolean[];
168
+ lengths: any[];
169
+ accumulatedLengths: number[];
170
+ pathLength: number;
171
+ };
172
+ getBézierNormal(tangent: any, up?: null): any;
173
+ getBézierForCurve(time: any, key: string): {
174
+ point: any;
175
+ tangent: any;
176
+ };
177
+ getBézierForPoints(time: any, p1k: any, p2k: any, p3k: any, p4k: any): {
178
+ point: any;
179
+ tangent: any;
180
+ };
181
+ cubicBézier(time: any, point1: any, point2: any, point3: any, point4: any): {
182
+ point: any;
183
+ tangent: any;
184
+ };
185
+ getTexture(): Texture | undefined;
186
+ applyTexture(texture: Texture): void;
187
+ updateShading(shade_smooth: boolean): void;
188
+ }
189
+
@@ -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