blockbench-types 5.1.0 → 5.2.0-beta.0-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.
- package/README.md +30 -30
- package/custom/animation.d.ts +257 -256
- package/custom/animation_controller.d.ts +124 -124
- package/custom/blockbench.d.ts +73 -73
- package/custom/canvas.d.ts +324 -307
- package/custom/codec.d.ts +182 -182
- package/custom/copy_paste.d.ts +43 -42
- package/custom/cube.d.ts +151 -151
- package/custom/desktop.d.ts +61 -73
- package/custom/display_mode.d.ts +141 -137
- package/custom/edit_session.d.ts +38 -37
- package/custom/global.d.ts +181 -168
- package/custom/group.d.ts +113 -113
- package/custom/interface.d.ts +88 -78
- package/custom/io.d.ts +12 -12
- package/custom/{toolbars.d.ts → keybind.d.ts} +150 -221
- package/custom/keyframe.d.ts +94 -94
- package/custom/libs.d.ts +13 -13
- package/custom/menu_bar.d.ts +66 -0
- package/custom/mesh.d.ts +196 -196
- package/custom/misc.d.ts +196 -199
- package/custom/molang.d.ts +159 -159
- package/custom/outliner.d.ts +158 -158
- package/custom/painter.d.ts +102 -69
- package/custom/preview_scene.d.ts +120 -120
- package/custom/screencam.d.ts +71 -71
- package/custom/spline_mesh.d.ts +190 -189
- package/custom/texture_group.d.ts +68 -68
- package/custom/textures.d.ts +526 -515
- package/custom/timeline.d.ts +66 -66
- package/custom/undo.d.ts +209 -208
- package/custom/util/version_util.d.ts +32 -32
- package/custom/util.d.ts +235 -235
- package/custom/uveditor.d.ts +3 -3
- package/custom/validator.d.ts +99 -99
- package/documentation.md +12 -12
- package/generated/animations/mirror_animating.d.ts +7 -0
- package/generated/animations/timeline_animators.d.ts +1 -1
- package/generated/api.d.ts +8 -1
- package/generated/file_system.d.ts +2 -1
- package/generated/find_replace.d.ts +6 -0
- package/generated/formats/standards/obj.d.ts +9 -11
- package/generated/interface/actions.d.ts +16 -12
- package/generated/interface/form.d.ts +2 -1
- package/generated/interface/main_tools.d.ts +23 -0
- package/generated/interface/menu.d.ts +141 -0
- package/generated/interface/menu_bar.d.ts +2 -3
- package/generated/interface/resize_lines.d.ts +2 -0
- package/generated/interface/settings.d.ts +6 -2
- package/generated/interface/shared_actions.d.ts +5 -0
- package/generated/interface/start_screen.d.ts +62 -42
- package/generated/interface/toolbars.d.ts +146 -46
- package/generated/io/format.d.ts +1 -0
- package/generated/io/project.d.ts +10 -2
- package/generated/lib/CanvasFrame.d.ts +1 -0
- package/generated/main.d.ts +4 -1
- package/generated/modeling/mesh/add_mesh.d.ts +6 -0
- package/generated/modeling/mesh/proportional_edit.d.ts +15 -13
- package/generated/modeling/mesh/util.d.ts +8 -2
- package/generated/modeling/mirror_modeling.d.ts +4 -0
- package/generated/modeling/weight_paint.d.ts +11 -0
- package/generated/modes.d.ts +2 -2
- package/generated/native_apis.d.ts +3 -0
- package/generated/outliner/abstract/outliner_element.d.ts +1 -0
- package/generated/outliner/abstract/outliner_node.d.ts +1 -0
- package/generated/outliner/types/armature.d.ts +1 -1
- package/generated/outliner/types/armature_bone.d.ts +1 -1
- package/generated/outliner/types/billboard.d.ts +1 -1
- package/generated/outliner/types/bounding_box.d.ts +1 -1
- package/generated/outliner/types/cube.d.ts +1 -1
- package/generated/outliner/types/group.d.ts +1 -1
- package/generated/outliner/types/locator.d.ts +1 -1
- package/generated/outliner/types/mesh.d.ts +1 -1
- package/generated/outliner/types/null_object.d.ts +1 -1
- package/generated/outliner/types/spline_mesh.d.ts +1 -2
- package/generated/outliner/types/texture_mesh.d.ts +1 -1
- package/generated/plugin_loader.d.ts +1 -1
- package/generated/preview/preview.d.ts +280 -0
- package/generated/preview/reference_images.d.ts +1 -1
- package/generated/texturing/layers.d.ts +140 -0
- package/generated/util/gif.d.ts +12 -3
- package/generated/util/state_memory.d.ts +3 -11
- package/index.d.ts +2 -2
- package/package.json +39 -39
- package/tsconfig.json +19 -19
- package/type_config.json +43 -46
- package/custom/menu.d.ts +0 -136
- package/custom/preview.d.ts +0 -137
- package/custom/start_screen.d.ts +0 -15
- package/custom/texture_layers.d.ts +0 -117
- package/generated/global_types.d.ts +0 -47
- package/generated/io/formats/bedrock.d.ts +0 -4
- package/generated/io/formats/bedrock_old.d.ts +0 -4
- package/generated/io/formats/collada.d.ts +0 -4
- package/generated/io/formats/fbx.d.ts +0 -17
- package/generated/io/formats/gltf.d.ts +0 -6
- package/generated/io/formats/java_block.d.ts +0 -4
- package/generated/io/formats/modded_entity.d.ts +0 -139
- package/generated/io/formats/obj.d.ts +0 -12
- package/generated/io/formats/optifine_jem.d.ts +0 -3
- package/generated/io/formats/optifine_jpm.d.ts +0 -3
- package/generated/io/formats/skin.d.ts +0 -22
package/custom/molang.d.ts
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
import MolangParser from "molangjs"
|
|
2
|
-
|
|
3
|
-
type MolangParserClass = typeof MolangParser
|
|
4
|
-
declare global {
|
|
5
|
-
const MolangParser: MolangParserClass
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare interface MolangExpression {
|
|
9
|
-
animation: _Animation
|
|
10
|
-
animator: BoneAnimator
|
|
11
|
-
channel: string
|
|
12
|
-
key: string
|
|
13
|
-
kf: _Keyframe
|
|
14
|
-
type: string
|
|
15
|
-
value: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare function getAllMolangExpressions(): MolangExpression[]
|
|
19
|
-
|
|
20
|
-
declare namespace MolangAutocomplete {
|
|
21
|
-
/** Represents the result of a Molang autocomplete operation. */
|
|
22
|
-
interface MolangAutocompleteResult {
|
|
23
|
-
/** The text to insert. */
|
|
24
|
-
text: string
|
|
25
|
-
/** The label to display in the autocomplete menu. */
|
|
26
|
-
label?: string
|
|
27
|
-
/** The number of characters to overlap with the incomplete string. */
|
|
28
|
-
overlap: number
|
|
29
|
-
/** The suggestion priority. A higher number means it will be suggested first. */
|
|
30
|
-
priority?: number
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** Represents a root token. */
|
|
34
|
-
interface RootToken {
|
|
35
|
-
/** The ID of the new root token. */
|
|
36
|
-
id: string
|
|
37
|
-
/** The arguments of the root token. */
|
|
38
|
-
arguments?: string[]
|
|
39
|
-
/** The suggestion priority of the root token. A higher number means it will be suggested first. */
|
|
40
|
-
priority?: number
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** Represents a query. */
|
|
44
|
-
interface Query {
|
|
45
|
-
/** The ID of the new query. */
|
|
46
|
-
id: string
|
|
47
|
-
/** The arguments of the query. */
|
|
48
|
-
arguments?: string[]
|
|
49
|
-
/** The suggestion priority of the query. A higher number means it will be suggested first. */
|
|
50
|
-
priority?: number
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** Represents the options for a namespace. */
|
|
54
|
-
interface NamespaceOptions {
|
|
55
|
-
/** The ID of the new namespace. */
|
|
56
|
-
id: string
|
|
57
|
-
/** The shorthand of the new namespace. Eg. `q` for `query`. */
|
|
58
|
-
shorthand?: string
|
|
59
|
-
/** The suggestion priority of the namespace. A higher number means it will be suggested first. */
|
|
60
|
-
priority?: number
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/** Represents the options for a namespace union. */
|
|
64
|
-
interface NamespaceUnionOptions {
|
|
65
|
-
/** The ID of the new namespace. */
|
|
66
|
-
id: string
|
|
67
|
-
/** The shorthand of the new namespace. Eg. `q` for `query`. */
|
|
68
|
-
shorthand?: string
|
|
69
|
-
/** The suggestion priority of the namespace. A higher number means it will be suggested first. */
|
|
70
|
-
priority?: number
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
class Namespace {
|
|
74
|
-
/** The ID of the namespace. */
|
|
75
|
-
id: string
|
|
76
|
-
/** The shorthand of the namespace. */
|
|
77
|
-
shorthand: string
|
|
78
|
-
/** The queries in the namespace. */
|
|
79
|
-
queries: Map<string, Query>
|
|
80
|
-
/** The query getters in the namespace. */
|
|
81
|
-
queryGetters: Map<string, () => Query[]>
|
|
82
|
-
/** Creates a new namespace. */
|
|
83
|
-
constructor(options: NamespaceOptions)
|
|
84
|
-
/** Adds a new query to the namespace. */
|
|
85
|
-
addQuery(query: Query): Namespace
|
|
86
|
-
/** Checks if the namespace has a query. */
|
|
87
|
-
hasQuery(queryID: string): boolean
|
|
88
|
-
/** Removes a query from the namespace. */
|
|
89
|
-
removeQuery(queryID: string): boolean
|
|
90
|
-
/** Adds a getter function that returns dynamically generated queries. */
|
|
91
|
-
addQueryGetter(id: string, getter: (incomplete: string) => Query[]): Namespace
|
|
92
|
-
/** Removes a query getter function. */
|
|
93
|
-
removeQueryGetter(id: string): void
|
|
94
|
-
/** Creates a new namespace that is a union of this namespace and another. */
|
|
95
|
-
createUnion(other: Namespace, options?: NamespaceUnionOptions): Namespace
|
|
96
|
-
/** Returns any queries in this namespace who's ID starts with `incomplete`. */
|
|
97
|
-
getPossibleQueries(expression: string, incomplete: string, recursive?: boolean): Query[]
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** Represents the options for a context. */
|
|
101
|
-
interface MolangAutocompleteContextOptions {
|
|
102
|
-
/** The ID of the new context. */
|
|
103
|
-
id: string
|
|
104
|
-
/** The root tokens in the new context. */
|
|
105
|
-
rootTokens?: RootToken[]
|
|
106
|
-
/** The inherited context. */
|
|
107
|
-
inheritedContext?: Context
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
class Context {
|
|
111
|
-
/** All contexts. */
|
|
112
|
-
static all: Context[]
|
|
113
|
-
/** The ID of the context. */
|
|
114
|
-
id: string
|
|
115
|
-
/** The root tokens in the context. */
|
|
116
|
-
rootTokens: Map<string, RootToken>
|
|
117
|
-
/** The namespaces in the context. */
|
|
118
|
-
namespaces: Map<string, Namespace>
|
|
119
|
-
/** The inherited context. */
|
|
120
|
-
inheritedContext: Context
|
|
121
|
-
/** Creates a new context. */
|
|
122
|
-
constructor(options: MolangAutocompleteContextOptions)
|
|
123
|
-
/** Adds a new root token to the context. */
|
|
124
|
-
addRootToken(token: RootToken): Context
|
|
125
|
-
/** Gets a root token. */
|
|
126
|
-
getRootToken(tokenID: string): RootToken
|
|
127
|
-
/** Removes a root token from the context. */
|
|
128
|
-
removeRootToken(tokenID: string): boolean
|
|
129
|
-
/** Checks if the context has a namespace. */
|
|
130
|
-
hasNamespace(namespaceID: string, recursive?: boolean): boolean
|
|
131
|
-
/** Adds a new namespace to the context. */
|
|
132
|
-
addNamespace(namespace: Namespace, createUnion?: boolean): Context
|
|
133
|
-
/** Gets a namespace. */
|
|
134
|
-
getNamespace(namespaceID: string, recursive?: boolean): Namespace
|
|
135
|
-
/** Removes a namespace from the context. */
|
|
136
|
-
removeNamespace(namespaceID: string): boolean
|
|
137
|
-
/** Returns any namespaces in this context who's ID starts with `incomplete`. */
|
|
138
|
-
getPossibleNamespaces(incomplete: string, recursive?: boolean): Namespace[]
|
|
139
|
-
/** Returns any root tokens in this context who's ID starts with `incomplete`. */
|
|
140
|
-
getPossibleRootTokens(incomplete: string, recursive?: boolean): RootToken[]
|
|
141
|
-
/** Attempts to autocomplete the given text from the given position in the text. */
|
|
142
|
-
autocomplete(text: string, position: number): MolangAutocompleteResult[]
|
|
143
|
-
/** Removes the context from the list of all contexts. */
|
|
144
|
-
delete(): void
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/** The default context. */
|
|
148
|
-
const DefaultContext: Context
|
|
149
|
-
/** Keyframe Molang Auto-complete Context */
|
|
150
|
-
const KeyframeContext: Context
|
|
151
|
-
/** Animation Controller Molang Auto-complete Context */
|
|
152
|
-
const AnimationControllerContext: Context
|
|
153
|
-
/** Animation Molang Auto-complete Context */
|
|
154
|
-
const AnimationContext: Context
|
|
155
|
-
/** Variable Placeholders Molang Auto-complete Context */
|
|
156
|
-
const VariablePlaceholdersContext: Context
|
|
157
|
-
/** Bedrock Binding Molang Auto-complete Context */
|
|
158
|
-
const BedrockBindingContext: Context
|
|
159
|
-
}
|
|
1
|
+
import MolangParser from "molangjs"
|
|
2
|
+
|
|
3
|
+
type MolangParserClass = typeof MolangParser
|
|
4
|
+
declare global {
|
|
5
|
+
const MolangParser: MolangParserClass
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare interface MolangExpression {
|
|
9
|
+
animation: _Animation
|
|
10
|
+
animator: BoneAnimator
|
|
11
|
+
channel: string
|
|
12
|
+
key: string
|
|
13
|
+
kf: _Keyframe
|
|
14
|
+
type: string
|
|
15
|
+
value: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare function getAllMolangExpressions(): MolangExpression[]
|
|
19
|
+
|
|
20
|
+
declare namespace MolangAutocomplete {
|
|
21
|
+
/** Represents the result of a Molang autocomplete operation. */
|
|
22
|
+
interface MolangAutocompleteResult {
|
|
23
|
+
/** The text to insert. */
|
|
24
|
+
text: string
|
|
25
|
+
/** The label to display in the autocomplete menu. */
|
|
26
|
+
label?: string
|
|
27
|
+
/** The number of characters to overlap with the incomplete string. */
|
|
28
|
+
overlap: number
|
|
29
|
+
/** The suggestion priority. A higher number means it will be suggested first. */
|
|
30
|
+
priority?: number
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Represents a root token. */
|
|
34
|
+
interface RootToken {
|
|
35
|
+
/** The ID of the new root token. */
|
|
36
|
+
id: string
|
|
37
|
+
/** The arguments of the root token. */
|
|
38
|
+
arguments?: string[]
|
|
39
|
+
/** The suggestion priority of the root token. A higher number means it will be suggested first. */
|
|
40
|
+
priority?: number
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Represents a query. */
|
|
44
|
+
interface Query {
|
|
45
|
+
/** The ID of the new query. */
|
|
46
|
+
id: string
|
|
47
|
+
/** The arguments of the query. */
|
|
48
|
+
arguments?: string[]
|
|
49
|
+
/** The suggestion priority of the query. A higher number means it will be suggested first. */
|
|
50
|
+
priority?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Represents the options for a namespace. */
|
|
54
|
+
interface NamespaceOptions {
|
|
55
|
+
/** The ID of the new namespace. */
|
|
56
|
+
id: string
|
|
57
|
+
/** The shorthand of the new namespace. Eg. `q` for `query`. */
|
|
58
|
+
shorthand?: string
|
|
59
|
+
/** The suggestion priority of the namespace. A higher number means it will be suggested first. */
|
|
60
|
+
priority?: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Represents the options for a namespace union. */
|
|
64
|
+
interface NamespaceUnionOptions {
|
|
65
|
+
/** The ID of the new namespace. */
|
|
66
|
+
id: string
|
|
67
|
+
/** The shorthand of the new namespace. Eg. `q` for `query`. */
|
|
68
|
+
shorthand?: string
|
|
69
|
+
/** The suggestion priority of the namespace. A higher number means it will be suggested first. */
|
|
70
|
+
priority?: number
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class Namespace {
|
|
74
|
+
/** The ID of the namespace. */
|
|
75
|
+
id: string
|
|
76
|
+
/** The shorthand of the namespace. */
|
|
77
|
+
shorthand: string
|
|
78
|
+
/** The queries in the namespace. */
|
|
79
|
+
queries: Map<string, Query>
|
|
80
|
+
/** The query getters in the namespace. */
|
|
81
|
+
queryGetters: Map<string, () => Query[]>
|
|
82
|
+
/** Creates a new namespace. */
|
|
83
|
+
constructor(options: NamespaceOptions)
|
|
84
|
+
/** Adds a new query to the namespace. */
|
|
85
|
+
addQuery(query: Query): Namespace
|
|
86
|
+
/** Checks if the namespace has a query. */
|
|
87
|
+
hasQuery(queryID: string): boolean
|
|
88
|
+
/** Removes a query from the namespace. */
|
|
89
|
+
removeQuery(queryID: string): boolean
|
|
90
|
+
/** Adds a getter function that returns dynamically generated queries. */
|
|
91
|
+
addQueryGetter(id: string, getter: (incomplete: string) => Query[]): Namespace
|
|
92
|
+
/** Removes a query getter function. */
|
|
93
|
+
removeQueryGetter(id: string): void
|
|
94
|
+
/** Creates a new namespace that is a union of this namespace and another. */
|
|
95
|
+
createUnion(other: Namespace, options?: NamespaceUnionOptions): Namespace
|
|
96
|
+
/** Returns any queries in this namespace who's ID starts with `incomplete`. */
|
|
97
|
+
getPossibleQueries(expression: string, incomplete: string, recursive?: boolean): Query[]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Represents the options for a context. */
|
|
101
|
+
interface MolangAutocompleteContextOptions {
|
|
102
|
+
/** The ID of the new context. */
|
|
103
|
+
id: string
|
|
104
|
+
/** The root tokens in the new context. */
|
|
105
|
+
rootTokens?: RootToken[]
|
|
106
|
+
/** The inherited context. */
|
|
107
|
+
inheritedContext?: Context
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
class Context {
|
|
111
|
+
/** All contexts. */
|
|
112
|
+
static all: Context[]
|
|
113
|
+
/** The ID of the context. */
|
|
114
|
+
id: string
|
|
115
|
+
/** The root tokens in the context. */
|
|
116
|
+
rootTokens: Map<string, RootToken>
|
|
117
|
+
/** The namespaces in the context. */
|
|
118
|
+
namespaces: Map<string, Namespace>
|
|
119
|
+
/** The inherited context. */
|
|
120
|
+
inheritedContext: Context
|
|
121
|
+
/** Creates a new context. */
|
|
122
|
+
constructor(options: MolangAutocompleteContextOptions)
|
|
123
|
+
/** Adds a new root token to the context. */
|
|
124
|
+
addRootToken(token: RootToken): Context
|
|
125
|
+
/** Gets a root token. */
|
|
126
|
+
getRootToken(tokenID: string): RootToken
|
|
127
|
+
/** Removes a root token from the context. */
|
|
128
|
+
removeRootToken(tokenID: string): boolean
|
|
129
|
+
/** Checks if the context has a namespace. */
|
|
130
|
+
hasNamespace(namespaceID: string, recursive?: boolean): boolean
|
|
131
|
+
/** Adds a new namespace to the context. */
|
|
132
|
+
addNamespace(namespace: Namespace, createUnion?: boolean): Context
|
|
133
|
+
/** Gets a namespace. */
|
|
134
|
+
getNamespace(namespaceID: string, recursive?: boolean): Namespace
|
|
135
|
+
/** Removes a namespace from the context. */
|
|
136
|
+
removeNamespace(namespaceID: string): boolean
|
|
137
|
+
/** Returns any namespaces in this context who's ID starts with `incomplete`. */
|
|
138
|
+
getPossibleNamespaces(incomplete: string, recursive?: boolean): Namespace[]
|
|
139
|
+
/** Returns any root tokens in this context who's ID starts with `incomplete`. */
|
|
140
|
+
getPossibleRootTokens(incomplete: string, recursive?: boolean): RootToken[]
|
|
141
|
+
/** Attempts to autocomplete the given text from the given position in the text. */
|
|
142
|
+
autocomplete(text: string, position: number): MolangAutocompleteResult[]
|
|
143
|
+
/** Removes the context from the list of all contexts. */
|
|
144
|
+
delete(): void
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** The default context. */
|
|
148
|
+
const DefaultContext: Context
|
|
149
|
+
/** Keyframe Molang Auto-complete Context */
|
|
150
|
+
const KeyframeContext: Context
|
|
151
|
+
/** Animation Controller Molang Auto-complete Context */
|
|
152
|
+
const AnimationControllerContext: Context
|
|
153
|
+
/** Animation Molang Auto-complete Context */
|
|
154
|
+
const AnimationContext: Context
|
|
155
|
+
/** Variable Placeholders Molang Auto-complete Context */
|
|
156
|
+
const VariablePlaceholdersContext: Context
|
|
157
|
+
/** Bedrock Binding Molang Auto-complete Context */
|
|
158
|
+
const BedrockBindingContext: Context
|
|
159
|
+
}
|
package/custom/outliner.d.ts
CHANGED
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
/// <reference types="./blockbench"/>
|
|
2
|
-
type ArrayVector4 = [number, number, number, number]
|
|
3
|
-
type ArrayVector3 = [number, number, number]
|
|
4
|
-
type ArrayVector2 = [number, number]
|
|
5
|
-
declare interface OutlinerNodeParentTraits {
|
|
6
|
-
children: OutlinerNode[]
|
|
7
|
-
openUp(): void
|
|
8
|
-
isOpen: boolean
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use {@link Outliner.elements} instead
|
|
13
|
-
*/
|
|
14
|
-
declare const elements: OutlinerNode[]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
type ElementTypeConstructor = {
|
|
21
|
-
new (...args: any[]): OutlinerElement;
|
|
22
|
-
init?(): void;
|
|
23
|
-
behavior: any;
|
|
24
|
-
properties: Record<string, Property<any>>
|
|
25
|
-
selected: OutlinerElement[]
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
interface LocatorOptions {
|
|
30
|
-
name: string
|
|
31
|
-
from: ArrayVector3
|
|
32
|
-
}
|
|
33
|
-
declare class Locator extends OutlinerElement {
|
|
34
|
-
constructor(options: Partial<LocatorOptions>, uuid?: string)
|
|
35
|
-
name: string
|
|
36
|
-
|
|
37
|
-
extend(options: Partial<LocatorOptions>): void
|
|
38
|
-
flip(axis: number, center: number): this
|
|
39
|
-
getWorldCenter(): THREE.Vector3
|
|
40
|
-
|
|
41
|
-
static all: Locator[]
|
|
42
|
-
static selected: Locator[]
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
interface NullObjectOptions {
|
|
46
|
-
name?: string
|
|
47
|
-
position?: ArrayVector3
|
|
48
|
-
ik_target?: string
|
|
49
|
-
lock_ik_target_rotation?: boolean
|
|
50
|
-
}
|
|
51
|
-
declare class NullObject extends OutlinerElement {
|
|
52
|
-
constructor(options: Partial<NullObjectOptions>, uuid?: string)
|
|
53
|
-
position: ArrayVector3
|
|
54
|
-
ik_target: string
|
|
55
|
-
lock_ik_target_rotation: boolean
|
|
56
|
-
|
|
57
|
-
extend(options: Partial<NullObjectOptions>): void
|
|
58
|
-
flip(axis: number, center: number): this
|
|
59
|
-
getWorldCenter(): THREE.Vector3
|
|
60
|
-
|
|
61
|
-
static all: NullObject[]
|
|
62
|
-
static selected: NullObject[]
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface TextureMeshOptions {
|
|
66
|
-
name?: string
|
|
67
|
-
texture_name?: string
|
|
68
|
-
origin?: ArrayVector3
|
|
69
|
-
local_pivot?: ArrayVector3
|
|
70
|
-
rotation?: ArrayVector3
|
|
71
|
-
scale?: ArrayVector3
|
|
72
|
-
}
|
|
73
|
-
declare class TextureMesh extends OutlinerElement {
|
|
74
|
-
constructor(options: Partial<TextureMeshOptions>, uuid?: string)
|
|
75
|
-
texture_name: string
|
|
76
|
-
local_pivot: ArrayVector3
|
|
77
|
-
scale: ArrayVector3
|
|
78
|
-
|
|
79
|
-
extend(options: Partial<TextureMeshOptions>): void
|
|
80
|
-
flip(axis: number, center: number): this
|
|
81
|
-
getWorldCenter(): THREE.Vector3
|
|
82
|
-
moveVector(offset: ArrayVector3 | THREE.Vector3, axis: number, update?: boolean): void
|
|
83
|
-
|
|
84
|
-
static all: TextureMesh[]
|
|
85
|
-
static selected: TextureMesh[]
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Toggle in the outliner
|
|
90
|
-
*/
|
|
91
|
-
interface OutlinerToggle {
|
|
92
|
-
id: string
|
|
93
|
-
title: string
|
|
94
|
-
icon: IconString
|
|
95
|
-
icon_off?: IconString
|
|
96
|
-
icon_alt?: IconString
|
|
97
|
-
condition?: ConditionResolvable
|
|
98
|
-
/**
|
|
99
|
-
* If true, the toggle will only be visible when "Toggle More Options" is enabled
|
|
100
|
-
*/
|
|
101
|
-
advanced_option?: boolean
|
|
102
|
-
/**
|
|
103
|
-
* Override the visibility and still show the toggle under certain conditions, even if more options are disabled
|
|
104
|
-
*/
|
|
105
|
-
visibilityException?: (node: OutlinerNode) => boolean
|
|
106
|
-
/**
|
|
107
|
-
* It's complicated, check the source code
|
|
108
|
-
*/
|
|
109
|
-
getState?: (node: OutlinerNode) => boolean | 'alt'
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
declare namespace Outliner {
|
|
113
|
-
let root: OutlinerNode[]
|
|
114
|
-
const ROOT: 'root'
|
|
115
|
-
const elements: OutlinerElement[]
|
|
116
|
-
const selected: OutlinerElement[]
|
|
117
|
-
const nodes: OutlinerNode[]
|
|
118
|
-
let control_menu_group: MenuItem[]
|
|
119
|
-
const buttons: {
|
|
120
|
-
autouv: OutlinerToggle
|
|
121
|
-
export: OutlinerToggle
|
|
122
|
-
locked: OutlinerToggle
|
|
123
|
-
mirror_uv: OutlinerToggle
|
|
124
|
-
shade: OutlinerToggle
|
|
125
|
-
visibility: OutlinerToggle
|
|
126
|
-
[id: string]: OutlinerToggle
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
interface OutlinerDisplayRule {
|
|
130
|
-
/**
|
|
131
|
-
* ID of the rule
|
|
132
|
-
*/
|
|
133
|
-
id: string
|
|
134
|
-
/**
|
|
135
|
-
* A test function to determine if the node should be hidden by the rule
|
|
136
|
-
* @param node Outliner node (or element) to test
|
|
137
|
-
*/
|
|
138
|
-
test: (node: OutlinerNode) => boolean
|
|
139
|
-
}
|
|
140
|
-
function isNodeDisplayed(node: OutlinerNode): boolean
|
|
141
|
-
/**
|
|
142
|
-
* A list of rules regarding which nodes are displayed in the outliner. If any rule returns false, the node is not displayed
|
|
143
|
-
*/
|
|
144
|
-
const node_display_rules: OutlinerDisplayRule[]
|
|
145
|
-
/**
|
|
146
|
-
* Update which nodes are displayed in the outliner
|
|
147
|
-
*/
|
|
148
|
-
function updateNodeDisplayRules(): void
|
|
149
|
-
|
|
150
|
-
function toJSON(): []
|
|
151
|
-
function loadJSON(array: [], add_to_project?: boolean): void;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
declare function compileGroups(undo: boolean, lut?: { [index: number]: number }): any[]
|
|
157
|
-
|
|
158
|
-
declare function parseGroups(array: any[], import_reference?: Group, startIndex?: number): void
|
|
1
|
+
/// <reference types="./blockbench"/>
|
|
2
|
+
type ArrayVector4 = [number, number, number, number]
|
|
3
|
+
type ArrayVector3 = [number, number, number]
|
|
4
|
+
type ArrayVector2 = [number, number]
|
|
5
|
+
declare interface OutlinerNodeParentTraits {
|
|
6
|
+
children: OutlinerNode[]
|
|
7
|
+
openUp(): void
|
|
8
|
+
isOpen: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use {@link Outliner.elements} instead
|
|
13
|
+
*/
|
|
14
|
+
declare const elements: OutlinerNode[]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
type ElementTypeConstructor = {
|
|
21
|
+
new (...args: any[]): OutlinerElement;
|
|
22
|
+
init?(): void;
|
|
23
|
+
behavior: any;
|
|
24
|
+
properties: Record<string, Property<any>>
|
|
25
|
+
selected: OutlinerElement[]
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
interface LocatorOptions {
|
|
30
|
+
name: string
|
|
31
|
+
from: ArrayVector3
|
|
32
|
+
}
|
|
33
|
+
declare class Locator extends OutlinerElement {
|
|
34
|
+
constructor(options: Partial<LocatorOptions>, uuid?: string)
|
|
35
|
+
name: string
|
|
36
|
+
|
|
37
|
+
extend(options: Partial<LocatorOptions>): void
|
|
38
|
+
flip(axis: number, center: number): this
|
|
39
|
+
getWorldCenter(): THREE.Vector3
|
|
40
|
+
|
|
41
|
+
static all: Locator[]
|
|
42
|
+
static selected: Locator[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface NullObjectOptions {
|
|
46
|
+
name?: string
|
|
47
|
+
position?: ArrayVector3
|
|
48
|
+
ik_target?: string
|
|
49
|
+
lock_ik_target_rotation?: boolean
|
|
50
|
+
}
|
|
51
|
+
declare class NullObject extends OutlinerElement {
|
|
52
|
+
constructor(options: Partial<NullObjectOptions>, uuid?: string)
|
|
53
|
+
position: ArrayVector3
|
|
54
|
+
ik_target: string
|
|
55
|
+
lock_ik_target_rotation: boolean
|
|
56
|
+
|
|
57
|
+
extend(options: Partial<NullObjectOptions>): void
|
|
58
|
+
flip(axis: number, center: number): this
|
|
59
|
+
getWorldCenter(): THREE.Vector3
|
|
60
|
+
|
|
61
|
+
static all: NullObject[]
|
|
62
|
+
static selected: NullObject[]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface TextureMeshOptions {
|
|
66
|
+
name?: string
|
|
67
|
+
texture_name?: string
|
|
68
|
+
origin?: ArrayVector3
|
|
69
|
+
local_pivot?: ArrayVector3
|
|
70
|
+
rotation?: ArrayVector3
|
|
71
|
+
scale?: ArrayVector3
|
|
72
|
+
}
|
|
73
|
+
declare class TextureMesh extends OutlinerElement {
|
|
74
|
+
constructor(options: Partial<TextureMeshOptions>, uuid?: string)
|
|
75
|
+
texture_name: string
|
|
76
|
+
local_pivot: ArrayVector3
|
|
77
|
+
scale: ArrayVector3
|
|
78
|
+
|
|
79
|
+
extend(options: Partial<TextureMeshOptions>): void
|
|
80
|
+
flip(axis: number, center: number): this
|
|
81
|
+
getWorldCenter(): THREE.Vector3
|
|
82
|
+
moveVector(offset: ArrayVector3 | THREE.Vector3, axis: number, update?: boolean): void
|
|
83
|
+
|
|
84
|
+
static all: TextureMesh[]
|
|
85
|
+
static selected: TextureMesh[]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Toggle in the outliner
|
|
90
|
+
*/
|
|
91
|
+
interface OutlinerToggle {
|
|
92
|
+
id: string
|
|
93
|
+
title: string
|
|
94
|
+
icon: IconString
|
|
95
|
+
icon_off?: IconString
|
|
96
|
+
icon_alt?: IconString
|
|
97
|
+
condition?: ConditionResolvable
|
|
98
|
+
/**
|
|
99
|
+
* If true, the toggle will only be visible when "Toggle More Options" is enabled
|
|
100
|
+
*/
|
|
101
|
+
advanced_option?: boolean
|
|
102
|
+
/**
|
|
103
|
+
* Override the visibility and still show the toggle under certain conditions, even if more options are disabled
|
|
104
|
+
*/
|
|
105
|
+
visibilityException?: (node: OutlinerNode) => boolean
|
|
106
|
+
/**
|
|
107
|
+
* It's complicated, check the source code
|
|
108
|
+
*/
|
|
109
|
+
getState?: (node: OutlinerNode) => boolean | 'alt'
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare namespace Outliner {
|
|
113
|
+
let root: OutlinerNode[]
|
|
114
|
+
const ROOT: 'root'
|
|
115
|
+
const elements: OutlinerElement[]
|
|
116
|
+
const selected: OutlinerElement[]
|
|
117
|
+
const nodes: OutlinerNode[]
|
|
118
|
+
let control_menu_group: MenuItem[]
|
|
119
|
+
const buttons: {
|
|
120
|
+
autouv: OutlinerToggle
|
|
121
|
+
export: OutlinerToggle
|
|
122
|
+
locked: OutlinerToggle
|
|
123
|
+
mirror_uv: OutlinerToggle
|
|
124
|
+
shade: OutlinerToggle
|
|
125
|
+
visibility: OutlinerToggle
|
|
126
|
+
[id: string]: OutlinerToggle
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
interface OutlinerDisplayRule {
|
|
130
|
+
/**
|
|
131
|
+
* ID of the rule
|
|
132
|
+
*/
|
|
133
|
+
id: string
|
|
134
|
+
/**
|
|
135
|
+
* A test function to determine if the node should be hidden by the rule
|
|
136
|
+
* @param node Outliner node (or element) to test
|
|
137
|
+
*/
|
|
138
|
+
test: (node: OutlinerNode) => boolean
|
|
139
|
+
}
|
|
140
|
+
function isNodeDisplayed(node: OutlinerNode): boolean
|
|
141
|
+
/**
|
|
142
|
+
* A list of rules regarding which nodes are displayed in the outliner. If any rule returns false, the node is not displayed
|
|
143
|
+
*/
|
|
144
|
+
const node_display_rules: OutlinerDisplayRule[]
|
|
145
|
+
/**
|
|
146
|
+
* Update which nodes are displayed in the outliner
|
|
147
|
+
*/
|
|
148
|
+
function updateNodeDisplayRules(): void
|
|
149
|
+
|
|
150
|
+
function toJSON(): []
|
|
151
|
+
function loadJSON(array: [], add_to_project?: boolean): void;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
declare function compileGroups(undo: boolean, lut?: { [index: number]: number }): any[]
|
|
157
|
+
|
|
158
|
+
declare function parseGroups(array: any[], import_reference?: Group, startIndex?: number): void
|