blockbench-types 5.2.0-beta.0-next.2 → 5.2.0-beta.0-next.3
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 +2 -1
- package/custom/blockbench.d.ts +0 -1
- package/custom/desktop.d.ts +15 -4
- package/custom/display_mode.d.ts +1 -0
- package/custom/group.d.ts +1 -1
- package/custom/keyframe.d.ts +2 -0
- package/custom/misc.d.ts +63 -64
- package/custom/painter.d.ts +2 -0
- package/generated/api.d.ts +3 -25
- package/generated/desktop.d.ts +48 -0
- package/generated/interface/actions.d.ts +4 -0
- package/generated/interface/dialog.d.ts +2 -2
- package/generated/interface/menu.d.ts +4 -1
- package/generated/interface/shared_actions.d.ts +8 -0
- package/generated/interface/toast_notification.d.ts +45 -0
- package/generated/lib/CSS3DRenderer.d.ts +129 -0
- package/generated/modeling/mesh/knife_tool.d.ts +1 -1
- package/generated/modeling/mesh/loop_cut.d.ts +2 -0
- package/generated/modeling/mirror_modeling.d.ts +1 -1
- package/generated/modeling/transform/transform_modules.d.ts +6 -6
- package/generated/modeling/transform.d.ts +1 -1
- package/generated/modeling/weight_paint.d.ts +0 -1
- package/generated/outliner/types/mesh.d.ts +2 -2
- package/generated/plugin_loader.d.ts +5 -3
- package/generated/preview/preview.d.ts +7 -1
- package/generated/preview/preview_scenes.d.ts +197 -0
- package/generated/preview/reference_images.d.ts +141 -89
- package/generated/texturing/layers.d.ts +0 -1
- package/generated/uv/uv_size.d.ts +19 -7
- package/package.json +1 -1
- package/type_config.json +0 -2
- package/custom/preview_scene.d.ts +0 -120
|
@@ -19,14 +19,14 @@ interface TransformContextEnd extends TransformContext {
|
|
|
19
19
|
interface TransformerModuleOptions {
|
|
20
20
|
priority: number;
|
|
21
21
|
condition: ConditionResolvable;
|
|
22
|
-
use_condition
|
|
22
|
+
use_condition?: ConditionResolvable;
|
|
23
23
|
updateGizmo: (this: TransformerModule) => void;
|
|
24
|
-
onPointerDown
|
|
24
|
+
onPointerDown?: (this: TransformerModule, context: TransformContext) => void;
|
|
25
25
|
calculateOffset: (this: TransformerModule, context: TransformContextMove) => number;
|
|
26
|
-
onStart
|
|
27
|
-
onMove
|
|
28
|
-
onEnd
|
|
29
|
-
onCancel
|
|
26
|
+
onStart?: (this: TransformerModule, context: TransformContextMove) => void;
|
|
27
|
+
onMove?: (this: TransformerModule, context: TransformContextMove) => void;
|
|
28
|
+
onEnd?: (this: TransformerModule, context: TransformContextEnd) => void;
|
|
29
|
+
onCancel?: (this: TransformerModule, context: TransformContextEnd) => void;
|
|
30
30
|
}
|
|
31
31
|
export interface TransformerModule extends TransformerModuleOptions {
|
|
32
32
|
}
|
|
@@ -7,7 +7,7 @@ declare global {
|
|
|
7
7
|
function flipNameOnAxis(node: any, axis: any, check: any, original_name: any): any;
|
|
8
8
|
function mirrorSelected(axis: any): void;
|
|
9
9
|
function centerElements(axis: any, update: any): void;
|
|
10
|
-
function moveElementsInSpace(difference: any, axis: any): void;
|
|
10
|
+
function moveElementsInSpace(difference: any, axis: any, space?: number | Group | (number & import("../outliner/abstract/outliner_node").OutlinerNode)): void;
|
|
11
11
|
function getSelectedMovingElements(): import("../outliner/abstract/outliner_element").OutlinerElement[];
|
|
12
12
|
function getSpatialInterval(event?: number): any;
|
|
13
13
|
function getRotationInterval(event: any): 1 | 0.25 | 2.5 | 22.5;
|
|
@@ -29,9 +29,9 @@ declare global {
|
|
|
29
29
|
getSortedVertices(): any;
|
|
30
30
|
isConcave(): any;
|
|
31
31
|
getEdges(): any;
|
|
32
|
-
getAdjacentFace(side_index
|
|
32
|
+
getAdjacentFace(side_index: number, vkey_fkey_map: any): {
|
|
33
33
|
face: any;
|
|
34
|
-
key:
|
|
34
|
+
key: any;
|
|
35
35
|
index: any;
|
|
36
36
|
edge: any[];
|
|
37
37
|
};
|
|
@@ -11,7 +11,7 @@ export declare const Plugins: {
|
|
|
11
11
|
*/
|
|
12
12
|
installed: PluginInstallation[];
|
|
13
13
|
json: any;
|
|
14
|
-
download_stats:
|
|
14
|
+
download_stats: Record<string, number>;
|
|
15
15
|
/**
|
|
16
16
|
* All loaded plugins, including plugins from the store that are not installed
|
|
17
17
|
*/
|
|
@@ -169,7 +169,7 @@ export declare class Plugin {
|
|
|
169
169
|
repository: string;
|
|
170
170
|
bug_tracker: string;
|
|
171
171
|
source: PluginSource;
|
|
172
|
-
creation_date:
|
|
172
|
+
creation_date: number;
|
|
173
173
|
/**
|
|
174
174
|
* Can be used to specify which features a plugin adds. This allows Blockbench to be aware of and suggest even plugins that are not installed.
|
|
175
175
|
*/
|
|
@@ -182,6 +182,7 @@ export declare class Plugin {
|
|
|
182
182
|
changelog: null | PluginChangelog;
|
|
183
183
|
about_fetched: boolean;
|
|
184
184
|
changelog_fetched: boolean;
|
|
185
|
+
update_available: false | string;
|
|
185
186
|
disabled: boolean;
|
|
186
187
|
new_repository_format: boolean;
|
|
187
188
|
cache_version: number;
|
|
@@ -205,6 +206,7 @@ export declare class Plugin {
|
|
|
205
206
|
uninstall(): this;
|
|
206
207
|
unload(): this;
|
|
207
208
|
reload(): this;
|
|
209
|
+
installUpdate(): this;
|
|
208
210
|
toggleDisabled(): void;
|
|
209
211
|
showContextMenu(event: MouseEvent): void;
|
|
210
212
|
isReloadable(): boolean;
|
|
@@ -233,7 +235,7 @@ declare const global: {
|
|
|
233
235
|
*/
|
|
234
236
|
installed: PluginInstallation[];
|
|
235
237
|
json: any;
|
|
236
|
-
download_stats:
|
|
238
|
+
download_stats: Record<string, number>;
|
|
237
239
|
/**
|
|
238
240
|
* All loaded plugins, including plugins from the store that are not installed
|
|
239
241
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConfigDialog } from '../interface/dialog';
|
|
2
|
+
import { CSS3DRenderer } from '../lib/CSS3DRenderer';
|
|
2
3
|
interface AnglePreset {
|
|
3
4
|
name?: string;
|
|
4
5
|
id?: string;
|
|
@@ -84,6 +85,7 @@ export declare class Preview {
|
|
|
84
85
|
annotations: Record<string, PreviewAnnotation>;
|
|
85
86
|
offscreen?: boolean;
|
|
86
87
|
renderer: THREE.WebGLRenderer;
|
|
88
|
+
css_renderer?: CSS3DRenderer;
|
|
87
89
|
background: {
|
|
88
90
|
name: string;
|
|
89
91
|
image: any;
|
|
@@ -168,7 +170,7 @@ export declare class Preview {
|
|
|
168
170
|
/**
|
|
169
171
|
* The last used preview
|
|
170
172
|
*/
|
|
171
|
-
static selected:
|
|
173
|
+
static selected: Preview;
|
|
172
174
|
/**
|
|
173
175
|
* List of all previews
|
|
174
176
|
*/
|
|
@@ -276,5 +278,9 @@ declare global {
|
|
|
276
278
|
camera_east: Action;
|
|
277
279
|
camera_west: Action;
|
|
278
280
|
}
|
|
281
|
+
interface BlockbenchEventMap {
|
|
282
|
+
canvas_select: RaycastResult;
|
|
283
|
+
canvas_click: RaycastResult;
|
|
284
|
+
}
|
|
279
285
|
}
|
|
280
286
|
export {};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
export interface PreviewSceneOptions {
|
|
2
|
+
name?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
category?: string;
|
|
5
|
+
web_config?: string;
|
|
6
|
+
require_minecraft_eula?: boolean;
|
|
7
|
+
light_color?: {
|
|
8
|
+
r: number;
|
|
9
|
+
g: number;
|
|
10
|
+
b: number;
|
|
11
|
+
};
|
|
12
|
+
light_side?: number;
|
|
13
|
+
condition?: ConditionResolvable;
|
|
14
|
+
cubemap?: string[];
|
|
15
|
+
fog?: {
|
|
16
|
+
type: 'linear' | 'exponential';
|
|
17
|
+
color: any;
|
|
18
|
+
near?: number;
|
|
19
|
+
far?: number;
|
|
20
|
+
density?: number;
|
|
21
|
+
};
|
|
22
|
+
fov?: number;
|
|
23
|
+
preview_models?: (string | PreviewModel | PreviewModelOptions)[];
|
|
24
|
+
}
|
|
25
|
+
export declare class PreviewScene {
|
|
26
|
+
id: string;
|
|
27
|
+
loaded: boolean;
|
|
28
|
+
require_minecraft_eula: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
category: string;
|
|
32
|
+
light_color: {
|
|
33
|
+
r: number;
|
|
34
|
+
g: number;
|
|
35
|
+
b: number;
|
|
36
|
+
};
|
|
37
|
+
light_side: number;
|
|
38
|
+
condition: ConditionResolvable;
|
|
39
|
+
fov: number;
|
|
40
|
+
web_config_path?: string;
|
|
41
|
+
fog?: THREE.Fog | THREE.FogExp2;
|
|
42
|
+
cubemap?: THREE.CubeTexture;
|
|
43
|
+
preview_models: any[];
|
|
44
|
+
constructor(id: string, data?: PreviewSceneOptions);
|
|
45
|
+
extend(data: PreviewSceneOptions): void;
|
|
46
|
+
lazyLoadFromWeb(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Selects this preview scene
|
|
49
|
+
*/
|
|
50
|
+
select(): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Unselects this preview scene
|
|
53
|
+
*/
|
|
54
|
+
unselect(): void;
|
|
55
|
+
delete(): void;
|
|
56
|
+
/**
|
|
57
|
+
* All preview scenes, listed by ID
|
|
58
|
+
*/
|
|
59
|
+
static scenes: Record<string, PreviewScene>;
|
|
60
|
+
/**
|
|
61
|
+
* The currently active scene
|
|
62
|
+
*/
|
|
63
|
+
static active: PreviewScene | null;
|
|
64
|
+
static select_options: {};
|
|
65
|
+
/**
|
|
66
|
+
* The URL to the source repository that scenes are pulled from
|
|
67
|
+
*/
|
|
68
|
+
static source_repository: string;
|
|
69
|
+
static menu_categories: {
|
|
70
|
+
[category_id: string]: {
|
|
71
|
+
[id: string]: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
interface PreviewModelCubeTemplate {
|
|
76
|
+
prefab?: string;
|
|
77
|
+
offset?: ArrayVector3;
|
|
78
|
+
offset_space?: 'block' | 'pixel';
|
|
79
|
+
position?: ArrayVector3;
|
|
80
|
+
size?: ArrayVector3;
|
|
81
|
+
origin?: ArrayVector3;
|
|
82
|
+
rotation?: ArrayVector3;
|
|
83
|
+
faces?: {
|
|
84
|
+
north?: {
|
|
85
|
+
uv: ArrayVector4;
|
|
86
|
+
};
|
|
87
|
+
east?: {
|
|
88
|
+
uv: ArrayVector4;
|
|
89
|
+
};
|
|
90
|
+
west?: {
|
|
91
|
+
uv: ArrayVector4;
|
|
92
|
+
};
|
|
93
|
+
south?: {
|
|
94
|
+
uv: ArrayVector4;
|
|
95
|
+
};
|
|
96
|
+
up?: {
|
|
97
|
+
uv: ArrayVector4;
|
|
98
|
+
};
|
|
99
|
+
down?: {
|
|
100
|
+
uv: ArrayVector4;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
type PrefabTemplate = PreviewModelCubeTemplate;
|
|
105
|
+
export interface PreviewModelOptions {
|
|
106
|
+
id?: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
condition?: ConditionResolvable;
|
|
109
|
+
cubes?: PreviewModelCubeTemplate[];
|
|
110
|
+
prefabs?: Record<string, PrefabTemplate>;
|
|
111
|
+
/**
|
|
112
|
+
* Source of the model's texture
|
|
113
|
+
*/
|
|
114
|
+
texture?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Model tint color
|
|
117
|
+
*/
|
|
118
|
+
color?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Enable shading on the material
|
|
121
|
+
*/
|
|
122
|
+
shading?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* THREE.JS material render side
|
|
125
|
+
*/
|
|
126
|
+
render_side?: number;
|
|
127
|
+
texture_size?: [number, number];
|
|
128
|
+
position?: ArrayVector3;
|
|
129
|
+
rotation?: ArrayVector3;
|
|
130
|
+
scale?: ArrayVector3;
|
|
131
|
+
onUpdate?(): void;
|
|
132
|
+
}
|
|
133
|
+
export declare class PreviewModel implements Deletable {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
condition: ConditionResolvable;
|
|
137
|
+
model_3d: THREE.Object3D;
|
|
138
|
+
onUpdate?: () => void;
|
|
139
|
+
enabled: boolean;
|
|
140
|
+
build_data: {
|
|
141
|
+
prefabs?: Record<string, PrefabTemplate>;
|
|
142
|
+
cubes?: PreviewModelCubeTemplate[];
|
|
143
|
+
texture?: string;
|
|
144
|
+
position?: ArrayVector3;
|
|
145
|
+
rotation?: ArrayVector3;
|
|
146
|
+
scale?: ArrayVector3;
|
|
147
|
+
};
|
|
148
|
+
color: string;
|
|
149
|
+
shading: boolean;
|
|
150
|
+
render_side: THREE.Side;
|
|
151
|
+
texture_size: ArrayVector2;
|
|
152
|
+
cubes: PreviewModelCubeTemplate[];
|
|
153
|
+
texture?: string;
|
|
154
|
+
[idkey: string]: any;
|
|
155
|
+
constructor(id: string, data: PreviewModelOptions);
|
|
156
|
+
/**
|
|
157
|
+
* Enables the model in the preview
|
|
158
|
+
*/
|
|
159
|
+
enable(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Disables the model in the preview
|
|
162
|
+
*/
|
|
163
|
+
disable(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Update the appearance and visibility of the model
|
|
166
|
+
*/
|
|
167
|
+
update(): void;
|
|
168
|
+
buildModel(): this;
|
|
169
|
+
delete(): void;
|
|
170
|
+
static generateModelFromProject(): string;
|
|
171
|
+
static models: Record<string, PreviewModel>;
|
|
172
|
+
static getActiveModels: () => PreviewModel[];
|
|
173
|
+
static transform_model: PreviewModel | null;
|
|
174
|
+
}
|
|
175
|
+
export declare const player_preview_model: PreviewModel;
|
|
176
|
+
export declare const MinecraftEULA: {
|
|
177
|
+
isAccepted(key: string): any;
|
|
178
|
+
promptUser(key: string): Promise<unknown>;
|
|
179
|
+
};
|
|
180
|
+
declare const global: {
|
|
181
|
+
PreviewScene: typeof import("./preview_scenes").PreviewScene;
|
|
182
|
+
PreviewModel: typeof import("./preview_scenes").PreviewModel;
|
|
183
|
+
MinecraftEULA: {
|
|
184
|
+
isAccepted(key: string): any;
|
|
185
|
+
promptUser(key: string): Promise<unknown>;
|
|
186
|
+
};
|
|
187
|
+
player_preview_model: import("./preview_scenes").PreviewModel;
|
|
188
|
+
};
|
|
189
|
+
declare global {
|
|
190
|
+
type PreviewScene = import('./preview_scenes').PreviewScene;
|
|
191
|
+
const PreviewScene: typeof global.PreviewScene;
|
|
192
|
+
type PreviewModel = import('./preview_scenes').PreviewModel;
|
|
193
|
+
const PreviewModel: typeof global.PreviewModel;
|
|
194
|
+
const MinecraftEULA: typeof global.MinecraftEULA;
|
|
195
|
+
const player_preview_model: PreviewModel;
|
|
196
|
+
}
|
|
197
|
+
export {};
|
|
@@ -1,93 +1,145 @@
|
|
|
1
|
+
import { Filesystem } from "../file_system";
|
|
2
|
+
import { CSS3DObject } from "../lib/CSS3DRenderer";
|
|
3
|
+
export type ReferenceImageViewMode = 'flat_image' | 'billboard';
|
|
4
|
+
export type ReferenceImageLayer = 'background' | 'viewport' | 'float' | 'blueprint';
|
|
5
|
+
export type ReferenceImageScope = 'project' | 'global' | 'built_in';
|
|
6
|
+
interface ReferenceImageOptions {
|
|
7
|
+
name?: string;
|
|
8
|
+
layer?: ReferenceImageLayer;
|
|
9
|
+
scope?: string;
|
|
10
|
+
is_blueprint?: boolean;
|
|
11
|
+
view_mode?: ReferenceImageViewMode;
|
|
12
|
+
condition?: ConditionResolvable;
|
|
13
|
+
position?: ArrayVector2;
|
|
14
|
+
size?: ArrayVector2;
|
|
15
|
+
billboard_position?: ArrayVector3;
|
|
16
|
+
billboard_rotation?: ArrayVector3;
|
|
17
|
+
flip_x?: boolean;
|
|
18
|
+
flip_y?: boolean;
|
|
19
|
+
rotation?: number;
|
|
20
|
+
opacity?: number;
|
|
21
|
+
visibility?: boolean;
|
|
22
|
+
sync_to_timeline?: boolean;
|
|
23
|
+
cull_backface?: boolean;
|
|
24
|
+
clear_mode?: boolean;
|
|
25
|
+
attached_side?: string;
|
|
26
|
+
source?: string;
|
|
27
|
+
modes?: string[];
|
|
28
|
+
}
|
|
29
|
+
export declare class ReferenceImage {
|
|
30
|
+
name: string;
|
|
31
|
+
layer: ReferenceImageLayer;
|
|
32
|
+
scope: ReferenceImageScope;
|
|
33
|
+
view_mode: ReferenceImageViewMode;
|
|
34
|
+
is_blueprint: boolean;
|
|
35
|
+
position: number[];
|
|
36
|
+
size: number[];
|
|
37
|
+
flip_x: boolean;
|
|
38
|
+
flip_y: boolean;
|
|
39
|
+
rotation: number;
|
|
40
|
+
billboard_position?: ArrayVector3;
|
|
41
|
+
billboard_rotation?: ArrayVector3;
|
|
42
|
+
opacity: number;
|
|
43
|
+
visibility: boolean;
|
|
44
|
+
sync_to_timeline: boolean;
|
|
45
|
+
cull_backface: boolean;
|
|
46
|
+
clear_mode: boolean;
|
|
47
|
+
attached_side: string;
|
|
48
|
+
source: string;
|
|
49
|
+
modes: string[];
|
|
50
|
+
uuid: string;
|
|
51
|
+
cache_version: number;
|
|
52
|
+
condition: ConditionResolvable;
|
|
53
|
+
toolbar: HTMLElement;
|
|
54
|
+
/**@private */
|
|
55
|
+
_edit_events_initialized?: boolean;
|
|
56
|
+
/**@private */
|
|
57
|
+
_modify_nodes: any[];
|
|
58
|
+
removed?: true;
|
|
59
|
+
defaults: {};
|
|
60
|
+
dark_background: boolean;
|
|
61
|
+
image_is_loaded: boolean;
|
|
62
|
+
auto_aspect_ratio: boolean;
|
|
63
|
+
is_video: boolean;
|
|
64
|
+
node: HTMLDivElement;
|
|
65
|
+
img: HTMLImageElement;
|
|
66
|
+
video: HTMLVideoElement & {
|
|
67
|
+
_loading?: boolean;
|
|
68
|
+
ref_source?: any;
|
|
69
|
+
};
|
|
70
|
+
scene_object: CSS3DObject;
|
|
71
|
+
menu: Menu;
|
|
72
|
+
constructor(data?: ReferenceImageOptions);
|
|
73
|
+
get aspect_ratio(): number;
|
|
74
|
+
get source_width(): number;
|
|
75
|
+
get source_height(): number;
|
|
76
|
+
extend(data: ReferenceImageOptions): void;
|
|
77
|
+
getSaveCopy(): ReferenceImageOptions;
|
|
78
|
+
resolveCondition(): boolean;
|
|
79
|
+
addAsReference(save?: boolean): this;
|
|
80
|
+
addAsGlobalReference(save?: boolean): this;
|
|
81
|
+
addAsBuiltIn(save?: boolean): this;
|
|
82
|
+
select(force?: boolean): this;
|
|
83
|
+
unselect(): this;
|
|
84
|
+
get selected(): boolean;
|
|
85
|
+
save(): this;
|
|
86
|
+
update(): this;
|
|
87
|
+
getZoomLevel(): number;
|
|
88
|
+
updateTransform(): this;
|
|
89
|
+
getClampedPosition(): number[];
|
|
90
|
+
updateClearMode(): void;
|
|
91
|
+
detach(): void;
|
|
92
|
+
setupEditHandles(): this;
|
|
93
|
+
projectMouseCursor(x: number, y: number): boolean | ArrayVector2;
|
|
94
|
+
openContextMenu(event: MouseEvent): this;
|
|
95
|
+
reset(): this;
|
|
96
|
+
delete(force?: boolean): Promise<void>;
|
|
97
|
+
changeLayer(layer: ReferenceImageLayer): this;
|
|
98
|
+
changeScope(new_scope: ReferenceImageScope): this;
|
|
99
|
+
enableBlueprintMode(): this;
|
|
100
|
+
propertiesDialog(): this;
|
|
101
|
+
static properties: Record<string, Property>;
|
|
102
|
+
static supported_extensions: string[];
|
|
103
|
+
static image_extensions: string[];
|
|
104
|
+
static video_extensions: string[];
|
|
105
|
+
static all: ReferenceImage[];
|
|
106
|
+
static active: ReferenceImage[];
|
|
107
|
+
static current_project: ReferenceImage[];
|
|
108
|
+
static selected: ReferenceImage | null;
|
|
109
|
+
static built_in: ReferenceImage[];
|
|
110
|
+
static global: ReferenceImage[];
|
|
111
|
+
static updateAll(): void;
|
|
112
|
+
}
|
|
113
|
+
export declare function initReferenceImages(): Promise<void>;
|
|
114
|
+
export declare const ReferenceImageMode: {
|
|
115
|
+
active: boolean;
|
|
116
|
+
toolbar: Toolbar;
|
|
117
|
+
activate(): void;
|
|
118
|
+
deactivate(): void;
|
|
119
|
+
importReferences(files: Filesystem.FileResult[]): Promise<void>;
|
|
120
|
+
saveGlobalReferences(): void;
|
|
121
|
+
};
|
|
122
|
+
declare const global: {
|
|
123
|
+
ReferenceImage: typeof import("./reference_images").ReferenceImage;
|
|
124
|
+
ReferenceImageMode: {
|
|
125
|
+
active: boolean;
|
|
126
|
+
toolbar: Toolbar;
|
|
127
|
+
activate(): void;
|
|
128
|
+
deactivate(): void;
|
|
129
|
+
importReferences(files: Filesystem.FileResult[]): Promise<void>;
|
|
130
|
+
saveGlobalReferences(): void;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
1
133
|
declare global {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
is_blueprint: boolean;
|
|
12
|
-
position: number[];
|
|
13
|
-
size: number[];
|
|
14
|
-
flip_x: boolean;
|
|
15
|
-
flip_y: boolean;
|
|
16
|
-
rotation: number;
|
|
17
|
-
opacity: number;
|
|
18
|
-
visibility: boolean;
|
|
19
|
-
sync_to_timeline: boolean;
|
|
20
|
-
clear_mode: boolean;
|
|
21
|
-
attached_side: number;
|
|
22
|
-
source: string;
|
|
23
|
-
modes: any[];
|
|
24
|
-
uuid: string;
|
|
25
|
-
cache_version: number;
|
|
26
|
-
condition: any;
|
|
27
|
-
_modify_nodes: any[];
|
|
28
|
-
defaults: {};
|
|
29
|
-
dark_background: boolean;
|
|
30
|
-
image_is_loaded: boolean;
|
|
31
|
-
auto_aspect_ratio: boolean;
|
|
32
|
-
is_video: boolean;
|
|
33
|
-
node: HTMLElement;
|
|
34
|
-
img: HTMLImageElement;
|
|
35
|
-
video: HTMLElement;
|
|
36
|
-
get aspect_ratio(): number;
|
|
37
|
-
get source_width(): any;
|
|
38
|
-
get source_height(): any;
|
|
39
|
-
extend(data: any): void;
|
|
40
|
-
getSaveCopy(): {
|
|
41
|
-
source: string;
|
|
42
|
-
modes: any[];
|
|
43
|
-
};
|
|
44
|
-
resolveCondition(): boolean;
|
|
45
|
-
addAsReference(save: any): this;
|
|
46
|
-
addAsGlobalReference(save: any): this;
|
|
47
|
-
addAsBuiltIn(save: any): this;
|
|
48
|
-
select(force: any): this;
|
|
49
|
-
unselect(): this;
|
|
50
|
-
get selected(): boolean;
|
|
51
|
-
save(): this;
|
|
52
|
-
update(): this;
|
|
53
|
-
getZoomLevel(): number;
|
|
54
|
-
updateTransform(): this;
|
|
55
|
-
getClampedPosition(): number[];
|
|
56
|
-
updateClearMode(): void;
|
|
57
|
-
detach(): void;
|
|
58
|
-
setupEditHandles(): this;
|
|
59
|
-
toolbar: HTMLElement;
|
|
60
|
-
opacity_slider: void;
|
|
61
|
-
_edit_events_initialized: boolean;
|
|
62
|
-
projectMouseCursor(x: any, y: any): false | number[];
|
|
63
|
-
openContextMenu(event: any): this;
|
|
64
|
-
reset(): this;
|
|
65
|
-
delete(force: any): Promise<void>;
|
|
66
|
-
removed: boolean;
|
|
67
|
-
changeLayer(layer: any): this;
|
|
68
|
-
changeScope(new_scope: any): this;
|
|
69
|
-
enableBlueprintMode(): void;
|
|
70
|
-
propertiesDialog(): this;
|
|
71
|
-
menu: import("../interface/menu").Menu;
|
|
72
|
-
}
|
|
73
|
-
namespace ReferenceImage {
|
|
74
|
-
let selected: any;
|
|
75
|
-
let built_in: any[];
|
|
76
|
-
let global: any[];
|
|
77
|
-
const current_project: any;
|
|
78
|
-
const all: any[];
|
|
79
|
-
const active: any[];
|
|
80
|
-
function updateAll(): void;
|
|
81
|
-
}
|
|
82
|
-
namespace ReferenceImageMode {
|
|
83
|
-
let active_1: boolean;
|
|
84
|
-
export { active_1 as active };
|
|
85
|
-
export let toolbar: any;
|
|
86
|
-
export function activate(): void;
|
|
87
|
-
export function deactivate(): void;
|
|
88
|
-
export function importReferences(files: any): Promise<void>;
|
|
89
|
-
export function saveGlobalReferences(): void;
|
|
134
|
+
const ReferenceImage: typeof global.ReferenceImage;
|
|
135
|
+
type ReferenceImage = import('./reference_images').ReferenceImage;
|
|
136
|
+
const ReferenceImageMode: typeof global.ReferenceImageMode;
|
|
137
|
+
interface BarItemRegistry {
|
|
138
|
+
edit_reference_images: Action;
|
|
139
|
+
add_reference_image: Action;
|
|
140
|
+
reference_image_from_clipboard: Action;
|
|
141
|
+
toggle_all_reference_images: Action;
|
|
142
|
+
reference_image_list: Action;
|
|
90
143
|
}
|
|
91
144
|
}
|
|
92
|
-
|
|
93
145
|
export {};
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
declare function adjustProjectResolution(width: number, height: number, modify_uv?: boolean): void;
|
|
2
|
+
declare function adjustElementUVToResolution(multiplier: ArrayVector2, elements?: import("../outliner/abstract/outliner_element").OutlinerElement[], textures?: Texture[]): void;
|
|
3
|
+
export declare function editUVSizeDialog(options: {
|
|
4
|
+
texture?: Texture;
|
|
5
|
+
project?: boolean;
|
|
6
|
+
}): void;
|
|
7
|
+
export declare const UVSizeUtil: {
|
|
8
|
+
adjustProjectResolution: typeof adjustProjectResolution;
|
|
9
|
+
adjustElementUVToResolution: typeof adjustElementUVToResolution;
|
|
10
|
+
editUVSizeDialog: typeof editUVSizeDialog;
|
|
11
|
+
};
|
|
12
|
+
declare const global: {
|
|
13
|
+
UVSizeUtil: {
|
|
14
|
+
adjustProjectResolution: typeof adjustProjectResolution;
|
|
15
|
+
adjustElementUVToResolution: typeof adjustElementUVToResolution;
|
|
16
|
+
editUVSizeDialog: typeof editUVSizeDialog;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
1
19
|
declare global {
|
|
2
|
-
|
|
3
|
-
function adjustElementUVToResolution(multiplier: ArrayVector2, elements?: import("../outliner/abstract/outliner_element").OutlinerElement[], textures?: Texture[]): void;
|
|
4
|
-
function editUVSizeDialog(options: {
|
|
5
|
-
texture?: Texture;
|
|
6
|
-
project?: boolean;
|
|
7
|
-
}): void;
|
|
20
|
+
const UVSizeUtil: typeof global.UVSizeUtil;
|
|
8
21
|
}
|
|
9
|
-
|
|
10
22
|
export {};
|
package/package.json
CHANGED
package/type_config.json
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"animations/molang",
|
|
8
8
|
"animations/timeline",
|
|
9
9
|
"interface/setup_settings",
|
|
10
|
-
"desktop",
|
|
11
10
|
"util/math_util",
|
|
12
11
|
"display_mode/display_references",
|
|
13
12
|
"display_mode/display_mode",
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
"outliner/null_object",
|
|
20
19
|
"outliner/outliner",
|
|
21
20
|
"outliner/texture_mesh",
|
|
22
|
-
"preview/preview_scenes",
|
|
23
21
|
"preview/canvas",
|
|
24
22
|
"io/codec",
|
|
25
23
|
"io/io",
|