blockbench-types 5.0.5 → 5.0.6

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.
@@ -224,6 +224,7 @@ declare class NullObjectAnimator extends GeneralAnimator {
224
224
  displayFrame(): void
225
225
  }
226
226
  declare class EffectAnimator extends GeneralAnimator {
227
+ constructor(animation: _Animation)
227
228
  name: string
228
229
  uuid: string
229
230
  rotations: _Keyframe[]
@@ -0,0 +1,42 @@
1
+ declare global {
2
+ namespace Clipbench {
3
+ let elements: any[];
4
+ enum types {
5
+ text = 'text',
6
+ display_slot = 'display_slot',
7
+ keyframe = 'keyframe',
8
+ animation = 'animation',
9
+ face = 'face',
10
+ mesh_selection = 'mesh_selection',
11
+ texture = 'texture',
12
+ layer = 'layer',
13
+ outliner = 'outliner',
14
+ texture_selection = 'texture_selection',
15
+ image = 'image',
16
+ }
17
+ let image: undefined | {
18
+ x: number,
19
+ y: number,
20
+ frame?: number
21
+ data: string
22
+ }
23
+ namespace type_icons {
24
+ let face = 'aspect_ratio';
25
+ let mesh_selection = 'fa-gem';
26
+ let outliner = 'fas.fa-cube';
27
+ }
28
+ function getCopyType(mode: any, check: any): Clipbench.types;
29
+ function getPasteType(): Promise<Clipbench.types>;
30
+ function copy(event: Event, cut: any): void;
31
+ function paste(event: Event): Promise<void>;
32
+ function setGroups(groups: Group[]): void;
33
+ function setElements(arr: OutlinerElement[]): void;
34
+ function setText(text: string): void;
35
+ function setMeshSelection(mesh: Mesh): void;
36
+ function pasteMeshSelection(): void;
37
+ function pasteOutliner(event: Event): void;
38
+ function pasteImage(): void;
39
+ }
40
+ }
41
+
42
+ export {};
package/custom/misc.d.ts CHANGED
@@ -24,6 +24,7 @@ declare const VuePrismEditor: Vue.Component
24
24
  type EventName =
25
25
  | 'remove_animation'
26
26
  | 'display_animation_frame'
27
+ | 'display_default_pose'
27
28
  | 'interpolate_keyframes'
28
29
  | 'before_closing'
29
30
  | 'create_session'
@@ -80,7 +80,7 @@ declare class OutlinerNode {
80
80
 
81
81
  getTypeBehavior(flag: string): boolean | string | any
82
82
 
83
- static addBehaviorOverride(override_options: {condition: ConditionResolvable, behavior: Record<string, any>}): Deletable
83
+ static addBehaviorOverride(override_options: {condition: ConditionResolvable, priority?: number, behavior: Record<string, any>}): Deletable
84
84
  static behavior_overrides = [];
85
85
 
86
86
  static uuids: {
@@ -110,6 +110,8 @@ declare global {
110
110
  render_sides: 'auto' | 'front' | 'double' | string
111
111
  pbr_channel: 'color' | 'normal' | 'height' | 'mer'
112
112
  use_as_default: boolean
113
+ /** UUID of the TextureGroup that this texture is in, if set */
114
+ group: string
113
115
 
114
116
  /** Texture animation frame time */
115
117
  frame_time: number
@@ -279,6 +281,10 @@ declare global {
279
281
  * Enables 'particle' on this texture if it is not enabled on any other texture
280
282
  */
281
283
  fillParticle(): this
284
+ /**
285
+ * Select this as the default texture in supported formats
286
+ */
287
+ setAsDefaultTexture()
282
288
  /**
283
289
  * Applies the texture to the selected elements
284
290
  * @param all If true, the texture is applied to all faces of the elements. If 'blank', the texture is only applied to blank faces
@@ -368,6 +374,10 @@ declare global {
368
374
  syncToOtherProject(): this
369
375
 
370
376
  getUndoCopy(): Texture
377
+ /**
378
+ * Return the texture group that the texture is attached to
379
+ */
380
+ getGroup(): TextureGroup | undefined
371
381
 
372
382
  static all: Texture[]
373
383
  static getDefault(): Texture
@@ -133,6 +133,7 @@ declare global {
133
133
  resetCustomLayout(): this;
134
134
  addToolbar(toolbar: Toolbar, position?: number): void;
135
135
  fold(state?: boolean): this;
136
+ resize(e1: MouseEvent | TouchEvent): void;
136
137
  setupFloatHandles(): this;
137
138
  moveToFront(): this;
138
139
  moveTo(slot: PanelSlot, ref_panel?: Panel, before?: boolean): this;
@@ -147,6 +148,7 @@ declare global {
147
148
  }
148
149
  const Panels: Record<string, Panel>;
149
150
  function setupPanels(): void;
151
+ function makeSidebarFilled(target: Panel[] | 'left_bar' | 'right_bar', exclude_panel?: Panel): void;
150
152
  function updateInterfacePanels(): void;
151
153
  function updateSidebarOrder(): void;
152
154
  function updatePanelSelector(): void;
@@ -30,6 +30,7 @@ declare global {
30
30
  nl: string;
31
31
  pl: string;
32
32
  pt: string;
33
+ pt_br: string;
33
34
  ru: string;
34
35
  sv: string;
35
36
  tr: string;
@@ -3,6 +3,7 @@ declare global {
3
3
  function mergeVerticesOverlaps(meshes: any, overlaps: any): number[];
4
4
  function autoFixMeshEdit(affected_vertices: any): Promise<void>;
5
5
  function cleanupOverlappingMeshFaces(mesh: any): void;
6
+ function uncorruptMesh(): void;
6
7
  class KnifeToolContext {
7
8
  static current: any;
8
9
  /**
@@ -0,0 +1,11 @@
1
+ declare global {
2
+ class Dynamic2DMap<Type> {
3
+ map: Record<number, Record<number, Type>>;
4
+ constructor();
5
+ get(x: number, y: number): Type | undefined;
6
+ set(x: number, y: number, value: Type): void;
7
+ clear(): void;
8
+ }
9
+ }
10
+
11
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockbench-types",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "description": "Blockbench typescript types",
5
5
  "main": "",
6
6
  "types": "./index.d.ts",
package/type_config.json CHANGED
@@ -34,6 +34,7 @@
34
34
  "texturing/layers",
35
35
  "undo",
36
36
  "web",
37
+ "copy_paste",
37
38
  "texturing/uv",
38
39
  "validator",
39
40
  "native_apis_web",
@@ -1,39 +0,0 @@
1
- declare global {
2
- namespace Clipbench {
3
- let elements: any[];
4
- namespace types {
5
- let text: string;
6
- let display_slot: string;
7
- let keyframe: string;
8
- let animation: string;
9
- let face: string;
10
- let mesh_selection: string;
11
- let texture: string;
12
- let layer: string;
13
- let outliner: string;
14
- let texture_selection: string;
15
- let image: string;
16
- }
17
- namespace type_icons {
18
- let face_1: string;
19
- export { face_1 as face };
20
- let mesh_selection_1: string;
21
- export { mesh_selection_1 as mesh_selection };
22
- let outliner_1: string;
23
- export { outliner_1 as outliner };
24
- }
25
- function getCopyType(mode: any, check: any): string;
26
- function getPasteType(): Promise<any>;
27
- function copy(event: any, cut: any): void;
28
- function paste(event: any): Promise<void>;
29
- function setGroups(groups: any): void;
30
- function setElements(arr: any): void;
31
- function setText(text: any): void;
32
- function setMeshSelection(mesh: any): void;
33
- function pasteMeshSelection(): void;
34
- function pasteOutliner(event: any): void;
35
- function pasteImage(): void;
36
- }
37
- }
38
-
39
- export {};