blockbench-types 5.1.0-beta.1-next.1 → 5.1.0-beta.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.
- package/custom/animation.d.ts +3 -1
- package/custom/misc.d.ts +1 -0
- package/custom/outliner.d.ts +1 -0
- package/custom/preview.d.ts +4 -0
- package/custom/textures.d.ts +2 -0
- package/generated/api.d.ts +6 -6
- package/generated/formats/bedrock/bedrock.d.ts +1 -0
- package/generated/interface/start_screen.d.ts +0 -26
- package/generated/io/model_loader.d.ts +46 -0
- package/generated/io/project.d.ts +3 -0
- package/generated/main.d.ts +2 -1
- package/generated/modeling/mesh/knife_tool.d.ts +2 -2
- package/generated/modeling/transform.d.ts +1 -1
- package/generated/multi_file_editing.d.ts +20 -0
- package/generated/outliner/abstract/outliner_node.d.ts +2 -1
- package/generated/outliner/collections.d.ts +4 -0
- package/generated/outliner/types/cube.d.ts +1 -1
- package/generated/preview/reference_images.d.ts +1 -0
- package/package.json +1 -1
package/custom/animation.d.ts
CHANGED
|
@@ -65,13 +65,15 @@ declare class _Animation extends AnimationItem {
|
|
|
65
65
|
select(): this | undefined
|
|
66
66
|
setLength(length?: number): void
|
|
67
67
|
createUniqueName(references: _Animation[]): any
|
|
68
|
+
setScopeFromAnimators(): number | undefined
|
|
68
69
|
rename(): this
|
|
69
70
|
togglePlayingState(state: any): any
|
|
70
71
|
showContextMenu(event: any): this
|
|
71
72
|
/**
|
|
72
73
|
* Returns (if necessary creates) the animator of a specific outliner node of this animation
|
|
74
|
+
* May returns null if the node may not be animated due to being in a different scope
|
|
73
75
|
*/
|
|
74
|
-
getBoneAnimator(node?: OutlinerNode): BoneAnimator
|
|
76
|
+
getBoneAnimator(node?: OutlinerNode): BoneAnimator | null
|
|
75
77
|
removeAnimator(id: string): void
|
|
76
78
|
/**
|
|
77
79
|
* Adds the animation to the current project and to the interface
|
package/custom/misc.d.ts
CHANGED
package/custom/outliner.d.ts
CHANGED
package/custom/preview.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ interface AnglePreset {
|
|
|
6
6
|
projection: 'unset' | 'orthographic' | 'perspective'
|
|
7
7
|
zoom?: number
|
|
8
8
|
focal_length?: number
|
|
9
|
+
fov?: number
|
|
10
|
+
aspect_ratio?: number
|
|
9
11
|
lockedAngle?: number
|
|
10
12
|
}
|
|
11
13
|
|
|
@@ -37,7 +39,9 @@ declare class Preview extends Deletable {
|
|
|
37
39
|
canvas: HTMLCanvasElement
|
|
38
40
|
height: number
|
|
39
41
|
width: number
|
|
42
|
+
aspect_ratio?: number
|
|
40
43
|
node: HTMLElement
|
|
44
|
+
label: HTMLLabelElement
|
|
41
45
|
/**
|
|
42
46
|
* True if the preview is in orthographic camera mode
|
|
43
47
|
*/
|
package/custom/textures.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare global {
|
|
|
30
30
|
* UUID of the texture group that the texture is in
|
|
31
31
|
*/
|
|
32
32
|
group?: string
|
|
33
|
+
scope?: number
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Texture animation frame time
|
|
@@ -114,6 +115,7 @@ declare global {
|
|
|
114
115
|
use_as_default: boolean
|
|
115
116
|
/** UUID of the TextureGroup that this texture is in, if set */
|
|
116
117
|
group: string
|
|
118
|
+
scope: number
|
|
117
119
|
|
|
118
120
|
/** Texture animation frame time */
|
|
119
121
|
frame_time: number
|
package/generated/api.d.ts
CHANGED
|
@@ -81,9 +81,9 @@ export declare const Blockbench: {
|
|
|
81
81
|
removeFlag(flag: string): void;
|
|
82
82
|
hasFlag(flag: string): boolean | undefined;
|
|
83
83
|
dispatchEvent<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, data: D): any[];
|
|
84
|
-
on<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
85
|
-
once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
86
|
-
addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
84
|
+
on<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
85
|
+
once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
86
|
+
addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
87
87
|
removeListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): void;
|
|
88
88
|
onUpdateTo(version: any, callback: any): void;
|
|
89
89
|
Format: (ModelFormat | number);
|
|
@@ -164,9 +164,9 @@ declare const global: {
|
|
|
164
164
|
removeFlag(flag: string): void;
|
|
165
165
|
hasFlag(flag: string): boolean | undefined;
|
|
166
166
|
dispatchEvent<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, data: D): any[];
|
|
167
|
-
on<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
168
|
-
once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
169
|
-
addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any):
|
|
167
|
+
on<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
168
|
+
once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
169
|
+
addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
|
|
170
170
|
removeListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): void;
|
|
171
171
|
onUpdateTo(version: any, callback: any): void;
|
|
172
172
|
Format: (ModelFormat | number);
|
|
@@ -42,32 +42,6 @@ declare global {
|
|
|
42
42
|
let loaders: {};
|
|
43
43
|
function open(): void;
|
|
44
44
|
}
|
|
45
|
-
class ModelLoader {
|
|
46
|
-
/**
|
|
47
|
-
* @param {string} id
|
|
48
|
-
* @param {ModelLoaderOptions} options
|
|
49
|
-
*/
|
|
50
|
-
constructor(id: string, options: ModelLoaderOptions);
|
|
51
|
-
id: string;
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
icon: string;
|
|
55
|
-
category: string;
|
|
56
|
-
target: string | string[];
|
|
57
|
-
show_on_start_screen: boolean;
|
|
58
|
-
confidential: boolean;
|
|
59
|
-
condition: ConditionResolvable<any>;
|
|
60
|
-
plugin: any;
|
|
61
|
-
format_page: FormatPage;
|
|
62
|
-
onFormatPage: () => void;
|
|
63
|
-
onStart: () => void;
|
|
64
|
-
"new"(): void;
|
|
65
|
-
delete(): void;
|
|
66
|
-
}
|
|
67
|
-
namespace ModelLoader {
|
|
68
|
-
let loaders_1: {};
|
|
69
|
-
export { loaders_1 as loaders };
|
|
70
|
-
}
|
|
71
45
|
}
|
|
72
46
|
|
|
73
47
|
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FormatPage } from "./format";
|
|
2
|
+
export interface ModelLoaderOptions {
|
|
3
|
+
icon: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
category?: string;
|
|
7
|
+
target?: string | string[];
|
|
8
|
+
show_on_start_screen?: boolean;
|
|
9
|
+
confidential?: boolean;
|
|
10
|
+
condition?: ConditionResolvable;
|
|
11
|
+
plugin?: string;
|
|
12
|
+
format_page?: FormatPage;
|
|
13
|
+
onFormatPage?: () => void;
|
|
14
|
+
onStart: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A model loader provides a way for users to create a new model that is loaded or created from code. Examples are Entity Wizard or CEM Template loader.
|
|
18
|
+
* Model loaders show up alongside formats on the start screen and in File > New.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ModelLoader implements Deletable {
|
|
21
|
+
id: any;
|
|
22
|
+
icon: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
category?: string;
|
|
26
|
+
target?: string | string[];
|
|
27
|
+
show_on_start_screen: boolean;
|
|
28
|
+
confidential: boolean;
|
|
29
|
+
condition: ConditionResolvable;
|
|
30
|
+
format_page: FormatPage;
|
|
31
|
+
plugin?: string;
|
|
32
|
+
onFormatPage: () => void;
|
|
33
|
+
onStart: () => void;
|
|
34
|
+
constructor(id: string, options: ModelLoaderOptions);
|
|
35
|
+
new(): void;
|
|
36
|
+
delete(): void;
|
|
37
|
+
static loaders: Record<string, ModelLoader>;
|
|
38
|
+
}
|
|
39
|
+
declare const global: {
|
|
40
|
+
ModelLoader: typeof import("./model_loader").ModelLoader;
|
|
41
|
+
};
|
|
42
|
+
declare global {
|
|
43
|
+
type ModelLoader = import('./model_loader').ModelLoader;
|
|
44
|
+
const ModelLoader: typeof global.ModelLoader;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MultiFileRuleset } from "../multi_file_editing";
|
|
1
2
|
import { Property } from "../util/property";
|
|
2
3
|
import { ModelFormat } from "./format";
|
|
3
4
|
interface ModelProjectOptions {
|
|
@@ -34,6 +35,7 @@ export declare class ModelProject {
|
|
|
34
35
|
mode: string;
|
|
35
36
|
view_mode: string;
|
|
36
37
|
display_uv: string;
|
|
38
|
+
multi_file_ruleset: string;
|
|
37
39
|
previews: {
|
|
38
40
|
[key: string]: any;
|
|
39
41
|
};
|
|
@@ -112,6 +114,7 @@ export declare class ModelProject {
|
|
|
112
114
|
getDisplayName(with_extension?: boolean): string;
|
|
113
115
|
getFileExtension(): string;
|
|
114
116
|
getProjectMemory(): RecentProjectData;
|
|
117
|
+
getMultiFileRuleset(): MultiFileRuleset | undefined;
|
|
115
118
|
getUVWidth(texture?: Texture): number;
|
|
116
119
|
getUVHeight(texture?: Texture): number;
|
|
117
120
|
openSettings(): void;
|
package/generated/main.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ import "./texturing/painter";
|
|
|
83
83
|
import "./texturing/texture_generator";
|
|
84
84
|
import "./texturing/edit_image";
|
|
85
85
|
import "./display_mode/display_mode";
|
|
86
|
-
import "./
|
|
86
|
+
import "./formats/bedrock/attachable_preview";
|
|
87
87
|
import "./animations/animation_mode";
|
|
88
88
|
import "./animations/animation";
|
|
89
89
|
import "./animations/molang";
|
|
@@ -118,6 +118,7 @@ import "./formats/optifine/optifine_jpm";
|
|
|
118
118
|
import "./formats/minecraft/skin";
|
|
119
119
|
import "./formats/image";
|
|
120
120
|
import "./formats/bedrock/bedrock_voxel_shape";
|
|
121
|
+
import "./formats/bedrock/bedrock_multi_file";
|
|
121
122
|
import "./boot_loader";
|
|
122
123
|
import "./globals";
|
|
123
124
|
export {};
|
|
@@ -26,7 +26,7 @@ declare global {
|
|
|
26
26
|
points_geo: import("three").BufferGeometry;
|
|
27
27
|
points_mesh: import("three").Points<import("three").BufferGeometry, import("three").PointsMaterial>;
|
|
28
28
|
lines_mesh: import("three").Line<import("three").BufferGeometry, import("three").LineBasicMaterial>;
|
|
29
|
-
unselect_listener:
|
|
29
|
+
unselect_listener: Deletable;
|
|
30
30
|
showToast(): void;
|
|
31
31
|
toast: any;
|
|
32
32
|
hover(data: any): void;
|
|
@@ -55,7 +55,7 @@ declare global {
|
|
|
55
55
|
offset: number;
|
|
56
56
|
preview_mesh: import("three").Mesh<import("three").BoxGeometry, import("three").MeshBasicMaterial>;
|
|
57
57
|
cross_mesh: import("three").Mesh<import("three").PlaneGeometry, import("three").MeshBasicMaterial>;
|
|
58
|
-
unselect_listener:
|
|
58
|
+
unselect_listener: Deletable;
|
|
59
59
|
get mesh_3d(): any;
|
|
60
60
|
get axis_letter(): string;
|
|
61
61
|
hover(data: any): void;
|
|
@@ -10,7 +10,7 @@ declare global {
|
|
|
10
10
|
function moveElementsInSpace(difference: any, axis: any): void;
|
|
11
11
|
function getSelectedMovingElements(): import("../outliner/abstract/outliner_element").OutlinerElement[];
|
|
12
12
|
function getSpatialInterval(event?: number): any;
|
|
13
|
-
function getRotationInterval(event: any): 1 |
|
|
13
|
+
function getRotationInterval(event: any): 1 | 0.25 | 2.5 | 22.5;
|
|
14
14
|
function getRotationObjects(): import("../outliner/abstract/outliner_element").OutlinerElement[] | Group[];
|
|
15
15
|
function getPivotObjects(): import("../outliner/abstract/outliner_element").OutlinerElement[] | Group[];
|
|
16
16
|
function rotateOnAxis(modify: any, axis: any, slider: any): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const ScopeColors: string[];
|
|
2
|
+
interface MultiFileRules {
|
|
3
|
+
scope_limited_animations: boolean;
|
|
4
|
+
collections_as_files: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface MultiFileRuleset extends MultiFileRules {
|
|
7
|
+
}
|
|
8
|
+
export declare class MultiFileRuleset {
|
|
9
|
+
id: string;
|
|
10
|
+
constructor(id: string, rules: MultiFileRules);
|
|
11
|
+
static rulesets: Record<string, MultiFileRuleset>;
|
|
12
|
+
}
|
|
13
|
+
declare const global: {
|
|
14
|
+
MultiFileRuleset: typeof import("./multi_file_editing").MultiFileRuleset;
|
|
15
|
+
};
|
|
16
|
+
declare global {
|
|
17
|
+
const MultiFileRuleset: typeof global.MultiFileRuleset;
|
|
18
|
+
type MultiFileRuleset = import('./multi_file_editing').MultiFileRuleset;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -4,6 +4,7 @@ export declare abstract class OutlinerNode {
|
|
|
4
4
|
uuid: UUID;
|
|
5
5
|
export: boolean;
|
|
6
6
|
locked: boolean;
|
|
7
|
+
scope: number;
|
|
7
8
|
parent: (OutlinerNode & OutlinerNodeParentTraits) | 'root';
|
|
8
9
|
selected: boolean;
|
|
9
10
|
readonly _static: {
|
|
@@ -65,7 +66,7 @@ export declare abstract class OutlinerNode {
|
|
|
65
66
|
/**
|
|
66
67
|
* Create a unique name for the group or element by adding a number at the end or increasing it.
|
|
67
68
|
*/
|
|
68
|
-
createUniqueName(
|
|
69
|
+
createUniqueName(additional?: OutlinerNode[]): string | false;
|
|
69
70
|
isIconEnabled(toggle: any): true;
|
|
70
71
|
matchesFilter(search_term_lowercase: string): boolean;
|
|
71
72
|
/**
|
|
@@ -6,7 +6,9 @@ export interface CollectionOptions {
|
|
|
6
6
|
name?: string;
|
|
7
7
|
export_codec?: string;
|
|
8
8
|
export_path?: string;
|
|
9
|
+
model_identifier?: string;
|
|
9
10
|
visibility?: boolean;
|
|
11
|
+
scope?: number;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Collections are "selection presets" for a set of groups and elements in your project, independent from outliner hierarchy
|
|
@@ -22,6 +24,8 @@ export declare class Collection {
|
|
|
22
24
|
export_path: string;
|
|
23
25
|
export_codec: string;
|
|
24
26
|
visibility: boolean;
|
|
27
|
+
scope: number;
|
|
28
|
+
saved: boolean;
|
|
25
29
|
static properties: Record<string, Property<any>>;
|
|
26
30
|
/**
|
|
27
31
|
* Get all collections
|
|
@@ -5,11 +5,11 @@ declare global {
|
|
|
5
5
|
texture: boolean;
|
|
6
6
|
direction: any;
|
|
7
7
|
cube: any;
|
|
8
|
+
get element(): any;
|
|
8
9
|
uv: any[];
|
|
9
10
|
rotation: number;
|
|
10
11
|
set uv_size(arr: number[]);
|
|
11
12
|
get uv_size(): number[];
|
|
12
|
-
get element(): any;
|
|
13
13
|
extend(data: any): this;
|
|
14
14
|
reset(): this;
|
|
15
15
|
getBoundingRect(): {
|