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

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.
@@ -37,7 +37,7 @@ declare namespace Painter {
37
37
  y: number,
38
38
  w: number,
39
39
  h: number,
40
- cb: () => void
40
+ cb: ((px: number, py: number, color: [r: number, g: number, b: number, a: number]) => [number, number, number, number] | void)
41
41
  ): void
42
42
  function getPixelColor(ctx: CanvasRenderingContext2D, x: number, y: number): void
43
43
  function modifyCanvasSection(
@@ -7,7 +7,7 @@ interface TextureLayerData {
7
7
  scale?: ArrayVector2
8
8
  opacity?: number
9
9
  visible?: boolean
10
- blend_mode?: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'screen' | 'difference'
10
+ blend_mode?: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
11
11
  image_data?: ImageData
12
12
  data_url?: string
13
13
  }
@@ -35,7 +35,7 @@ declare class TextureLayer {
35
35
  scale: ArrayVector2
36
36
  opacity: number
37
37
  visible: boolean
38
- blend_mode: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'screen' | 'difference'
38
+ blend_mode: 'default' | 'set_opacity' | 'color' | 'multiply' | 'add' | 'darken' | 'lighten' | 'screen' | 'overlay' | 'difference' | 'alpha_mask'
39
39
 
40
40
  extend(data: TextureLayerData): void
41
41
  /**
@@ -59,6 +59,10 @@ interface AnimationCodecMultiplePerFileOptions extends SharedOptions {
59
59
  * @returns
60
60
  */
61
61
  exportFile?: (path: string, save_as?: boolean) => void;
62
+ /**
63
+ * When deleting an animtion in Blockbench, after being prompted, delete the deleted animation from the file
64
+ */
65
+ deleteAnimationFromFile?: (animation: AnimationItem) => void;
62
66
  }
63
67
  export interface AnimationCodec extends SharedOptions {
64
68
  }
@@ -68,6 +72,11 @@ export interface AnimationCodec extends SharedOptions {
68
72
  */
69
73
  export declare class AnimationCodec implements SharedOptions {
70
74
  id: string;
75
+ multiple_per_file: boolean;
76
+ reloadFile?: AnimationCodecMultiplePerFileOptions['reloadFile'];
77
+ compileFile?: AnimationCodecMultiplePerFileOptions['compileFile'];
78
+ exportFile?: AnimationCodecMultiplePerFileOptions['exportFile'];
79
+ deleteAnimationFromFile?: AnimationCodecMultiplePerFileOptions['deleteAnimationFromFile'];
71
80
  constructor(id: string, options: AnimationCodecSingleFileOptions | AnimationCodecMultiplePerFileOptions);
72
81
  static codecs: Record<string, AnimationCodec>;
73
82
  static getCodec(animation?: AnimationItem): AnimationCodec;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockbench-types",
3
- "version": "5.1.0-beta.3-next.0",
3
+ "version": "5.1.0-beta.3-next.2",
4
4
  "description": "Blockbench typescript types",
5
5
  "main": "",
6
6
  "types": "./index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "@types/three": "^0.129.2",
26
26
  "@types/tinycolor2": "^1.4.6",
27
27
  "dompurify": "^3.0.1",
28
- "electron": "^33.3.1",
28
+ "electron": "^40.8.0",
29
29
  "prismjs": "^1.29.0",
30
30
  "tinycolor2": "^1.6.0",
31
31
  "typescript": "^5.8.3",