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.
@@ -1,120 +0,0 @@
1
- /// <reference types="./blockbench"/>
2
- interface PreviewModelCubeTemplate {
3
- position: ArrayVector3
4
- size: ArrayVector3
5
- origin?: ArrayVector3
6
- rotation?: ArrayVector3
7
- faces: {
8
- north?: { uv: ArrayVector4 }
9
- east?: { uv: ArrayVector4 }
10
- west?: { uv: ArrayVector4 }
11
- south?: { uv: ArrayVector4 }
12
- up?: { uv: ArrayVector4 }
13
- down?: { uv: ArrayVector4 }
14
- }
15
- }
16
-
17
- interface PreviewModelOptions {
18
- condition?: ConditionResolvable
19
- cubes: PreviewModelCubeTemplate[]
20
- /**
21
- * Source of the model's texture
22
- */
23
- texture?: string
24
- /**
25
- * Model tint color
26
- */
27
- color?: string
28
- /**
29
- * Enable shading on the material
30
- */
31
- shading?: boolean
32
- /**
33
- * THREE.JS material render side
34
- */
35
- render_side?: number
36
- texture_size?: [number, number]
37
- onUpdate?(): void
38
- }
39
-
40
- declare class PreviewModel extends Deletable {
41
- constructor(id: string, options: PreviewModelOptions)
42
-
43
- static models: {
44
- [id: string]: PreviewModel
45
- }
46
- static getActiveModels(): PreviewModel[]
47
-
48
- id: string
49
- model_3d: THREE.Object3D
50
- cubes: PreviewModelCubeTemplate[]
51
- texture?: string
52
- color?: string
53
- shading: boolean
54
- render_side: number
55
- texture_size: [number, number]
56
- onUpdate?: () => void
57
- /**
58
- * Enables the model in the preview
59
- */
60
- enable(): void
61
- /**
62
- * Disables the model in the preview
63
- */
64
- disable(): boolean
65
- /**
66
- * Update the appearance and visibility of the model
67
- */
68
- update(): void
69
- buildModel(): void
70
- }
71
-
72
- interface PreviewSceneOptions {
73
- name?: string
74
- description?: string
75
- category?: string
76
- light_color?: string
77
- light_side?: number
78
- condition?: ConditionResolvable
79
- preview_models?: string[]
80
- }
81
-
82
- declare class PreviewScene extends Deletable {
83
- constructor(id: string, options: PreviewSceneOptions)
84
-
85
- /**
86
- * All preview scenes, listed by ID
87
- */
88
- static scenes: Record<string, PreviewScene>
89
- /**
90
- * The currently active scene
91
- */
92
- static active: PreviewScene | null
93
- /**
94
- * The URL to the source repository that scenes are pulled from
95
- */
96
- static source_repository: string
97
- static menu_categories: {
98
- [category_id: string]: {
99
- [id: string]: string
100
- }
101
- }
102
-
103
- id: string
104
- name: string
105
- description: string
106
- category?: string
107
- light_color: string
108
- light_side: number
109
- condition?: ConditionResolvable
110
- preview_models: string[]
111
-
112
- /**
113
- * Selects this preview scene
114
- */
115
- select(): void
116
- /**
117
- * Unselects this preview scene
118
- */
119
- unselect(): void
120
- }