@types/three 0.165.0 → 0.166.0
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.
- three/README.md +1 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +6 -0
- three/examples/jsm/geometries/TeapotGeometry.d.ts +24 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +8 -6
- three/examples/jsm/lines/LineMaterial.d.ts +2 -4
- three/examples/jsm/loaders/DDSLoader.d.ts +8 -2
- three/examples/jsm/loaders/GLTFLoader.d.ts +3 -1
- three/examples/jsm/loaders/KTXLoader.d.ts +8 -2
- three/examples/jsm/loaders/PVRLoader.d.ts +2 -2
- three/examples/jsm/nodes/Nodes.d.ts +10 -3
- three/examples/jsm/nodes/accessors/BufferAttributeNode.d.ts +1 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/StorageTextureNode.d.ts +40 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +4 -5
- three/examples/jsm/nodes/core/LightingModel.d.ts +11 -0
- three/examples/jsm/nodes/core/Node.d.ts +3 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +7 -3
- three/examples/jsm/nodes/core/NodeCache.d.ts +12 -4
- three/examples/jsm/nodes/core/NodeFunction.d.ts +2 -2
- three/examples/jsm/nodes/core/NodeUniform.d.ts +1 -1
- three/examples/jsm/nodes/core/UniformNode.d.ts +2 -0
- three/examples/jsm/nodes/core/VarNode.d.ts +2 -0
- three/examples/jsm/nodes/display/DepthOfFieldNode.d.ts +30 -0
- three/examples/jsm/nodes/display/DotScreenNode.d.ts +32 -0
- three/examples/jsm/nodes/display/PassNode.d.ts +1 -1
- three/examples/jsm/nodes/display/RGBShiftNode.d.ts +24 -0
- three/examples/jsm/nodes/display/SobelOperatorNode.d.ts +17 -0
- three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +4 -6
- three/examples/jsm/nodes/functions/BSDF/LTC.d.ts +9 -0
- three/examples/jsm/nodes/lighting/RectAreaLightNode.d.ts +10 -0
- three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +2 -3
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +17 -18
- three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +6 -7
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +3 -4
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +32 -33
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +2 -3
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +1 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +230 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/DiscardNode.d.ts +1 -0
- three/examples/jsm/renderers/common/BindGroup.d.ts +9 -0
- three/examples/jsm/renderers/common/Bindings.d.ts +11 -14
- three/examples/jsm/renderers/common/Geometries.d.ts +3 -3
- three/examples/jsm/renderers/common/Info.d.ts +6 -1
- three/examples/jsm/renderers/common/PostProcessing.d.ts +2 -0
- three/examples/jsm/renderers/common/RenderObject.d.ts +3 -3
- three/examples/jsm/renderers/common/Renderer.d.ts +11 -0
- three/examples/jsm/renderers/common/SampledTexture.d.ts +27 -0
- three/examples/jsm/renderers/common/Sampler.d.ts +11 -0
- three/examples/jsm/renderers/common/Uniform.d.ts +3 -3
- three/examples/jsm/renderers/common/UniformsGroup.d.ts +4 -2
- three/examples/jsm/renderers/common/nodes/NodeBuilderState.d.ts +8 -4
- three/examples/jsm/renderers/common/nodes/NodeSampledTexture.d.ts +29 -0
- three/examples/jsm/renderers/common/nodes/NodeSampler.d.ts +12 -0
- three/examples/jsm/renderers/common/nodes/NodeUniform.d.ts +4 -4
- three/examples/jsm/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -1
- three/examples/jsm/renderers/common/nodes/Nodes.d.ts +1 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +123 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +6 -0
- three/examples/jsm/renderers/webgpu/nodes/WGSLNodeParser.d.ts +6 -0
- three/examples/jsm/renderers/webgpu/utils/WebGPUConstants.d.ts +328 -0
- three/package.json +4 -4
- three/src/Three.d.ts +1 -0
- three/src/constants.d.ts +6 -0
- three/src/extras/ShapeUtils.d.ts +5 -8
- three/src/extras/TextureUtils.d.ts +42 -0
- three/src/lights/LightShadow.d.ts +5 -0
- three/src/materials/Material.d.ts +21 -12
- three/src/math/Vector4.d.ts +6 -0
- three/src/objects/BatchedMesh.d.ts +58 -54
- three/src/renderers/shaders/UniformsLib.d.ts +3 -0
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +2 -0
- three/src/renderers/webxr/WebXRManager.d.ts +33 -23
- three/src/textures/CompressedArrayTexture.d.ts +4 -4
- three/src/textures/CompressedTexture.d.ts +16 -8
- three/src/textures/Texture.d.ts +3 -1
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +0 -17
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +0 -37
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +0 -3
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
export enum GPUPrimitiveTopology {
|
|
2
|
+
PointList = "point-list",
|
|
3
|
+
LineList = "line-list",
|
|
4
|
+
LineStrip = "line-strip",
|
|
5
|
+
TriangleList = "triangle-list",
|
|
6
|
+
TriangleStrip = "triangle-strip",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum GPUCompareFunction {
|
|
10
|
+
Never = "never",
|
|
11
|
+
Less = "less",
|
|
12
|
+
Equal = "equal",
|
|
13
|
+
LessEqual = "less-equal",
|
|
14
|
+
Greater = "greater",
|
|
15
|
+
NotEqual = "not-equal",
|
|
16
|
+
GreaterEqual = "greater-equal",
|
|
17
|
+
Always = "always",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum GPUStoreOp {
|
|
21
|
+
Store = "store",
|
|
22
|
+
Discard = "discard",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum GPULoadOp {
|
|
26
|
+
Load = "load",
|
|
27
|
+
Clear = "clear",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum GPUFrontFace {
|
|
31
|
+
CCW = "ccw",
|
|
32
|
+
CW = "cw",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum GPUCullMode {
|
|
36
|
+
None = "none",
|
|
37
|
+
Front = "front",
|
|
38
|
+
Back = "back",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum GPUIndexFormat {
|
|
42
|
+
Uint16 = "uint16",
|
|
43
|
+
Uint32 = "uint32",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum GPUVertexFormat {
|
|
47
|
+
Uint8x2 = "uint8x2",
|
|
48
|
+
Uint8x4 = "uint8x4",
|
|
49
|
+
Sint8x2 = "sint8x2",
|
|
50
|
+
Sint8x4 = "sint8x4",
|
|
51
|
+
Unorm8x2 = "unorm8x2",
|
|
52
|
+
Unorm8x4 = "unorm8x4",
|
|
53
|
+
Snorm8x2 = "snorm8x2",
|
|
54
|
+
Snorm8x4 = "snorm8x4",
|
|
55
|
+
Uint16x2 = "uint16x2",
|
|
56
|
+
Uint16x4 = "uint16x4",
|
|
57
|
+
Sint16x2 = "sint16x2",
|
|
58
|
+
Sint16x4 = "sint16x4",
|
|
59
|
+
Unorm16x2 = "unorm16x2",
|
|
60
|
+
Unorm16x4 = "unorm16x4",
|
|
61
|
+
Snorm16x2 = "snorm16x2",
|
|
62
|
+
Snorm16x4 = "snorm16x4",
|
|
63
|
+
Float16x2 = "float16x2",
|
|
64
|
+
Float16x4 = "float16x4",
|
|
65
|
+
Float32 = "float32",
|
|
66
|
+
Float32x2 = "float32x2",
|
|
67
|
+
Float32x3 = "float32x3",
|
|
68
|
+
Float32x4 = "float32x4",
|
|
69
|
+
Uint32 = "uint32",
|
|
70
|
+
Uint32x2 = "uint32x2",
|
|
71
|
+
Uint32x3 = "uint32x3",
|
|
72
|
+
Uint32x4 = "uint32x4",
|
|
73
|
+
Sint32 = "sint32",
|
|
74
|
+
Sint32x2 = "sint32x2",
|
|
75
|
+
Sint32x3 = "sint32x3",
|
|
76
|
+
Sint32x4 = "sint32x4",
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export enum GPUTextureFormat {
|
|
80
|
+
// 8-bit formats
|
|
81
|
+
|
|
82
|
+
R8Unorm = "r8unorm",
|
|
83
|
+
R8Snorm = "r8snorm",
|
|
84
|
+
R8Uint = "r8uint",
|
|
85
|
+
R8Sint = "r8sint",
|
|
86
|
+
|
|
87
|
+
// 16-bit formats
|
|
88
|
+
|
|
89
|
+
R16Uint = "r16uint",
|
|
90
|
+
R16Sint = "r16sint",
|
|
91
|
+
R16Float = "r16float",
|
|
92
|
+
RG8Unorm = "rg8unorm",
|
|
93
|
+
RG8Snorm = "rg8snorm",
|
|
94
|
+
RG8Uint = "rg8uint",
|
|
95
|
+
RG8Sint = "rg8sint",
|
|
96
|
+
|
|
97
|
+
// 32-bit formats
|
|
98
|
+
|
|
99
|
+
R32Uint = "r32uint",
|
|
100
|
+
R32Sint = "r32sint",
|
|
101
|
+
R32Float = "r32float",
|
|
102
|
+
RG16Uint = "rg16uint",
|
|
103
|
+
RG16Sint = "rg16sint",
|
|
104
|
+
RG16Float = "rg16float",
|
|
105
|
+
RGBA8Unorm = "rgba8unorm",
|
|
106
|
+
RGBA8UnormSRGB = "rgba8unorm-srgb",
|
|
107
|
+
RGBA8Snorm = "rgba8snorm",
|
|
108
|
+
RGBA8Uint = "rgba8uint",
|
|
109
|
+
RGBA8Sint = "rgba8sint",
|
|
110
|
+
BGRA8Unorm = "bgra8unorm",
|
|
111
|
+
BGRA8UnormSRGB = "bgra8unorm-srgb",
|
|
112
|
+
// Packed 32-bit formats
|
|
113
|
+
RGB9E5UFloat = "rgb9e5ufloat",
|
|
114
|
+
RGB10A2Unorm = "rgb10a2unorm",
|
|
115
|
+
RG11B10uFloat = "rgb10a2unorm",
|
|
116
|
+
|
|
117
|
+
// 64-bit formats
|
|
118
|
+
|
|
119
|
+
RG32Uint = "rg32uint",
|
|
120
|
+
RG32Sint = "rg32sint",
|
|
121
|
+
RG32Float = "rg32float",
|
|
122
|
+
RGBA16Uint = "rgba16uint",
|
|
123
|
+
RGBA16Sint = "rgba16sint",
|
|
124
|
+
RGBA16Float = "rgba16float",
|
|
125
|
+
|
|
126
|
+
// 128-bit formats
|
|
127
|
+
|
|
128
|
+
RGBA32Uint = "rgba32uint",
|
|
129
|
+
RGBA32Sint = "rgba32sint",
|
|
130
|
+
RGBA32Float = "rgba32float",
|
|
131
|
+
|
|
132
|
+
// Depth and stencil formats
|
|
133
|
+
|
|
134
|
+
Stencil8 = "stencil8",
|
|
135
|
+
Depth16Unorm = "depth16unorm",
|
|
136
|
+
Depth24Plus = "depth24plus",
|
|
137
|
+
Depth24PlusStencil8 = "depth24plus-stencil8",
|
|
138
|
+
Depth32Float = "depth32float",
|
|
139
|
+
|
|
140
|
+
// 'depth32float-stencil8' extension
|
|
141
|
+
|
|
142
|
+
Depth32FloatStencil8 = "depth32float-stencil8",
|
|
143
|
+
|
|
144
|
+
// BC compressed formats usable if 'texture-compression-bc' is both
|
|
145
|
+
// supported by the device/user agent and enabled in requestDevice.
|
|
146
|
+
|
|
147
|
+
BC1RGBAUnorm = "bc1-rgba-unorm",
|
|
148
|
+
BC1RGBAUnormSRGB = "bc1-rgba-unorm-srgb",
|
|
149
|
+
BC2RGBAUnorm = "bc2-rgba-unorm",
|
|
150
|
+
BC2RGBAUnormSRGB = "bc2-rgba-unorm-srgb",
|
|
151
|
+
BC3RGBAUnorm = "bc3-rgba-unorm",
|
|
152
|
+
BC3RGBAUnormSRGB = "bc3-rgba-unorm-srgb",
|
|
153
|
+
BC4RUnorm = "bc4-r-unorm",
|
|
154
|
+
BC4RSnorm = "bc4-r-snorm",
|
|
155
|
+
BC5RGUnorm = "bc5-rg-unorm",
|
|
156
|
+
BC5RGSnorm = "bc5-rg-snorm",
|
|
157
|
+
BC6HRGBUFloat = "bc6h-rgb-ufloat",
|
|
158
|
+
BC6HRGBFloat = "bc6h-rgb-float",
|
|
159
|
+
BC7RGBAUnorm = "bc7-rgba-unorm",
|
|
160
|
+
BC7RGBAUnormSRGB = "bc7-rgba-srgb",
|
|
161
|
+
|
|
162
|
+
// ETC2 compressed formats usable if 'texture-compression-etc2' is both
|
|
163
|
+
// supported by the device/user agent and enabled in requestDevice.
|
|
164
|
+
|
|
165
|
+
ETC2RGB8Unorm = "etc2-rgb8unorm",
|
|
166
|
+
ETC2RGB8UnormSRGB = "etc2-rgb8unorm-srgb",
|
|
167
|
+
ETC2RGB8A1Unorm = "etc2-rgb8a1unorm",
|
|
168
|
+
ETC2RGB8A1UnormSRGB = "etc2-rgb8a1unorm-srgb",
|
|
169
|
+
ETC2RGBA8Unorm = "etc2-rgba8unorm",
|
|
170
|
+
ETC2RGBA8UnormSRGB = "etc2-rgba8unorm-srgb",
|
|
171
|
+
EACR11Unorm = "eac-r11unorm",
|
|
172
|
+
EACR11Snorm = "eac-r11snorm",
|
|
173
|
+
EACRG11Unorm = "eac-rg11unorm",
|
|
174
|
+
EACRG11Snorm = "eac-rg11snorm",
|
|
175
|
+
|
|
176
|
+
// ASTC compressed formats usable if 'texture-compression-astc' is both
|
|
177
|
+
// supported by the device/user agent and enabled in requestDevice.
|
|
178
|
+
|
|
179
|
+
ASTC4x4Unorm = "astc-4x4-unorm",
|
|
180
|
+
ASTC4x4UnormSRGB = "astc-4x4-unorm-srgb",
|
|
181
|
+
ASTC5x4Unorm = "astc-5x4-unorm",
|
|
182
|
+
ASTC5x4UnormSRGB = "astc-5x4-unorm-srgb",
|
|
183
|
+
ASTC5x5Unorm = "astc-5x5-unorm",
|
|
184
|
+
ASTC5x5UnormSRGB = "astc-5x5-unorm-srgb",
|
|
185
|
+
ASTC6x5Unorm = "astc-6x5-unorm",
|
|
186
|
+
ASTC6x5UnormSRGB = "astc-6x5-unorm-srgb",
|
|
187
|
+
ASTC6x6Unorm = "astc-6x6-unorm",
|
|
188
|
+
ASTC6x6UnormSRGB = "astc-6x6-unorm-srgb",
|
|
189
|
+
ASTC8x5Unorm = "astc-8x5-unorm",
|
|
190
|
+
ASTC8x5UnormSRGB = "astc-8x5-unorm-srgb",
|
|
191
|
+
ASTC8x6Unorm = "astc-8x6-unorm",
|
|
192
|
+
ASTC8x6UnormSRGB = "astc-8x6-unorm-srgb",
|
|
193
|
+
ASTC8x8Unorm = "astc-8x8-unorm",
|
|
194
|
+
ASTC8x8UnormSRGB = "astc-8x8-unorm-srgb",
|
|
195
|
+
ASTC10x5Unorm = "astc-10x5-unorm",
|
|
196
|
+
ASTC10x5UnormSRGB = "astc-10x5-unorm-srgb",
|
|
197
|
+
ASTC10x6Unorm = "astc-10x6-unorm",
|
|
198
|
+
ASTC10x6UnormSRGB = "astc-10x6-unorm-srgb",
|
|
199
|
+
ASTC10x8Unorm = "astc-10x8-unorm",
|
|
200
|
+
ASTC10x8UnormSRGB = "astc-10x8-unorm-srgb",
|
|
201
|
+
ASTC10x10Unorm = "astc-10x10-unorm",
|
|
202
|
+
ASTC10x10UnormSRGB = "astc-10x10-unorm-srgb",
|
|
203
|
+
ASTC12x10Unorm = "astc-12x10-unorm",
|
|
204
|
+
ASTC12x10UnormSRGB = "astc-12x10-unorm-srgb",
|
|
205
|
+
ASTC12x12Unorm = "astc-12x12-unorm",
|
|
206
|
+
ASTC12x12UnormSRGB = "astc-12x12-unorm-srgb",
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export enum GPUAddressMode {
|
|
210
|
+
ClampToEdge = "clamp-to-edge",
|
|
211
|
+
Repeat = "repeat",
|
|
212
|
+
MirrorRepeat = "mirror-repeat",
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export enum GPUFilterMode {
|
|
216
|
+
Linear = "linear",
|
|
217
|
+
Nearest = "nearest",
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export enum GPUBlendFactor {
|
|
221
|
+
Zero = "zero",
|
|
222
|
+
One = "one",
|
|
223
|
+
Src = "src",
|
|
224
|
+
OneMinusSrc = "one-minus-src",
|
|
225
|
+
SrcAlpha = "src-alpha",
|
|
226
|
+
OneMinusSrcAlpha = "one-minus-src-alpha",
|
|
227
|
+
Dst = "dst",
|
|
228
|
+
OneMinusDstColor = "one-minus-dst",
|
|
229
|
+
DstAlpha = "dst-alpha",
|
|
230
|
+
OneMinusDstAlpha = "one-minus-dst-alpha",
|
|
231
|
+
SrcAlphaSaturated = "src-alpha-saturated",
|
|
232
|
+
Constant = "constant",
|
|
233
|
+
OneMinusConstant = "one-minus-constant",
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export enum GPUBlendOperation {
|
|
237
|
+
Add = "add",
|
|
238
|
+
Subtract = "subtract",
|
|
239
|
+
ReverseSubtract = "reverse-subtract",
|
|
240
|
+
Min = "min",
|
|
241
|
+
Max = "max",
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export enum GPUColorWriteFlags {
|
|
245
|
+
None = 0,
|
|
246
|
+
Red = 0x1,
|
|
247
|
+
Green = 0x2,
|
|
248
|
+
Blue = 0x4,
|
|
249
|
+
Alpha = 0x8,
|
|
250
|
+
All = 0xF,
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export enum GPUStencilOperation {
|
|
254
|
+
Keep = "keep",
|
|
255
|
+
Zero = "zero",
|
|
256
|
+
Replace = "replace",
|
|
257
|
+
Invert = "invert",
|
|
258
|
+
IncrementClamp = "increment-clamp",
|
|
259
|
+
DecrementClamp = "decrement-clamp",
|
|
260
|
+
IncrementWrap = "increment-wrap",
|
|
261
|
+
DecrementWrap = "decrement-wrap",
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export enum GPUBufferBindingType {
|
|
265
|
+
Uniform = "uniform",
|
|
266
|
+
Storage = "storage",
|
|
267
|
+
ReadOnlyStorage = "read-only-storage",
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export enum GPUStorageTextureAccess {
|
|
271
|
+
WriteOnly = "write-only",
|
|
272
|
+
ReadOnly = "read-only",
|
|
273
|
+
ReadWrite = "read-write",
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export enum GPUSamplerBindingType {
|
|
277
|
+
Filtering = "filtering",
|
|
278
|
+
NonFiltering = "non-filtering",
|
|
279
|
+
Comparison = "comparison",
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export enum GPUTextureSampleType {
|
|
283
|
+
Float = "float",
|
|
284
|
+
UnfilterableFloat = "unfilterable-float",
|
|
285
|
+
Depth = "depth",
|
|
286
|
+
SInt = "sint",
|
|
287
|
+
UInt = "uint",
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export enum GPUTextureDimension {
|
|
291
|
+
OneD = "1d",
|
|
292
|
+
TwoD = "2d",
|
|
293
|
+
ThreeD = "3d",
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export enum GPUTextureViewDimension {
|
|
297
|
+
OneD = "1d",
|
|
298
|
+
TwoD = "2d",
|
|
299
|
+
TwoDArray = "2d-array",
|
|
300
|
+
Cube = "cube",
|
|
301
|
+
CubeArray = "cube-array",
|
|
302
|
+
ThreeD = "3d",
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export enum GPUTextureAspect {
|
|
306
|
+
All = "all",
|
|
307
|
+
StencilOnly = "stencil-only",
|
|
308
|
+
DepthOnly = "depth-only",
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export enum GPUInputStepMode {
|
|
312
|
+
Vertex = "vertex",
|
|
313
|
+
Instance = "instance",
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export enum GPUFeatureName {
|
|
317
|
+
DepthClipControl = "depth-clip-control",
|
|
318
|
+
Depth32FloatStencil8 = "depth32float-stencil8",
|
|
319
|
+
TextureCompressionBC = "texture-compression-bc",
|
|
320
|
+
TextureCompressionETC2 = "texture-compression-etc2",
|
|
321
|
+
TextureCompressionASTC = "texture-compression-astc",
|
|
322
|
+
TimestampQuery = "timestamp-query",
|
|
323
|
+
IndirectFirstInstance = "indirect-first-instance",
|
|
324
|
+
ShaderF16 = "shader-f16",
|
|
325
|
+
RG11B10UFloat = "rg11b10ufloat-renderable",
|
|
326
|
+
BGRA8UNormStorage = "bgra8unorm-storage",
|
|
327
|
+
Float32Filterable = "float32-filterable",
|
|
328
|
+
}
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.166.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
},
|
|
40
40
|
"scripts": {},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@tweenjs/tween.js": "~23.1.
|
|
42
|
+
"@tweenjs/tween.js": "~23.1.2",
|
|
43
43
|
"@types/stats.js": "*",
|
|
44
44
|
"@types/webxr": "*",
|
|
45
45
|
"fflate": "~0.8.2",
|
|
46
46
|
"meshoptimizer": "~0.18.1"
|
|
47
47
|
},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
49
|
-
"typeScriptVersion": "4.
|
|
48
|
+
"typesPublisherContentHash": "edfaedac592c09ce630dbeba7c12eaa206916e9761f49db67f6e41ba87970203",
|
|
49
|
+
"typeScriptVersion": "4.8"
|
|
50
50
|
}
|
three/src/Three.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export * as DataUtils from "./extras/DataUtils.js";
|
|
|
71
71
|
export * from "./extras/ImageUtils.js";
|
|
72
72
|
export * from "./extras/PMREMGenerator.js";
|
|
73
73
|
export * from "./extras/ShapeUtils.js";
|
|
74
|
+
export { TextureUtils } from "./extras/TextureUtils.js";
|
|
74
75
|
/**
|
|
75
76
|
* Geometries
|
|
76
77
|
*/
|
three/src/constants.d.ts
CHANGED
|
@@ -419,6 +419,11 @@ export const RGFormat: 1030;
|
|
|
419
419
|
*/
|
|
420
420
|
export const RGIntegerFormat: 1031;
|
|
421
421
|
|
|
422
|
+
/**
|
|
423
|
+
* {@link RGBIntegerFormat} discrads the alpha components and reads the red, green, and blue components.
|
|
424
|
+
*/
|
|
425
|
+
export const RGBIntegerFormat: 1032;
|
|
426
|
+
|
|
422
427
|
/**
|
|
423
428
|
* {@link RGBAIntegerFormat} reads the red, green, blue and alpha component
|
|
424
429
|
* @remarks This is the default for {@link THREE.Texture}.
|
|
@@ -443,6 +448,7 @@ export type PixelFormat =
|
|
|
443
448
|
| typeof RedIntegerFormat
|
|
444
449
|
| typeof RGFormat
|
|
445
450
|
| typeof RGIntegerFormat
|
|
451
|
+
| typeof RGBIntegerFormat
|
|
446
452
|
| typeof RGBAIntegerFormat;
|
|
447
453
|
|
|
448
454
|
/**
|
three/src/extras/ShapeUtils.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
1
|
+
import { Vector2Like } from "../math/Vector2.js";
|
|
5
2
|
|
|
6
3
|
/**
|
|
7
4
|
* A class containing utility functions for shapes.
|
|
@@ -9,20 +6,20 @@ export interface Vec2 {
|
|
|
9
6
|
* @see {@link https://threejs.org/docs/index.html#api/en/extras/ShapeUtils | Official Documentation}
|
|
10
7
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/ShapeUtils.js | Source}
|
|
11
8
|
*/
|
|
12
|
-
export
|
|
9
|
+
export class ShapeUtils {
|
|
13
10
|
/**
|
|
14
11
|
* Calculate area of a ( 2D ) contour polygon.
|
|
15
12
|
*/
|
|
16
|
-
|
|
13
|
+
static area(contour: readonly Vector2Like[]): number;
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* Note that this is a linear function so it is necessary to calculate separately for x, y components of a polygon.
|
|
20
17
|
* @remarks Used internally by {@link THREE.Path | Path}, {@link THREE.ExtrudeGeometry | ExtrudeGeometry} and {@link THREE.ShapeGeometry | ShapeGeometry}.
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
static isClockWise(pts: readonly Vector2Like[]): boolean;
|
|
23
20
|
|
|
24
21
|
/**
|
|
25
22
|
* Used internally by {@link THREE.ExtrudeGeometry | ExtrudeGeometry} and {@link THREE.ShapeGeometry | ShapeGeometry} to calculate faces in shapes with holes.
|
|
26
23
|
*/
|
|
27
|
-
|
|
24
|
+
static triangulateShape(contour: Vector2Like[], holes: Vector2Like[][]): number[][];
|
|
28
25
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CompressedPixelFormat, PixelFormat, TextureDataType } from "../constants.js";
|
|
2
|
+
import { Texture } from "../textures/Texture.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Scales the texture as large as possible within its surface without cropping or stretching the texture. The method
|
|
6
|
+
* preserves the original aspect ratio of the texture. Akin to CSS `object-fit: contain`.
|
|
7
|
+
*/
|
|
8
|
+
declare function contain(texture: Texture, aspect: number): Texture;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Scales the texture to the smallest possible size to fill the surface, leaving no empty space. The method preserves
|
|
12
|
+
* the original aspect ratio of the texture. Akin to CSS `object-fit: cover`.
|
|
13
|
+
*/
|
|
14
|
+
declare function cover(texture: Texture, aspect: number): Texture;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Configures the texture to the default transformation. Akin to CSS `object-fit: fill`.
|
|
18
|
+
*/
|
|
19
|
+
declare function fill(texture: Texture): Texture;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Given the width, height, format, and type of a texture. Determines how many bytes must be used to represent the
|
|
23
|
+
* texture.
|
|
24
|
+
*/
|
|
25
|
+
declare function getByteLength(
|
|
26
|
+
width: number,
|
|
27
|
+
height: number,
|
|
28
|
+
format: PixelFormat | CompressedPixelFormat,
|
|
29
|
+
type: TextureDataType,
|
|
30
|
+
): number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A class containing utility functions for textures.
|
|
34
|
+
*/
|
|
35
|
+
declare const TextureUtils: {
|
|
36
|
+
contain: typeof contain;
|
|
37
|
+
cover: typeof cover;
|
|
38
|
+
fill: typeof fill;
|
|
39
|
+
getByteLength: typeof getByteLength;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { contain, cover, fill, getByteLength, TextureUtils };
|
|
@@ -24,6 +24,11 @@ export class LightShadow<TCamera extends Camera = Camera> {
|
|
|
24
24
|
*/
|
|
25
25
|
camera: TCamera;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* The intensity of the shadow. The default is `1`. Valid values are in the range `[0, 1]`.
|
|
29
|
+
*/
|
|
30
|
+
intensity: number;
|
|
31
|
+
|
|
27
32
|
/**
|
|
28
33
|
* Shadow map bias, how much to add or subtract from the normalized depth when deciding whether a surface is in shadow.
|
|
29
34
|
* @remark The Very tiny adjustments here (in the order of 0.0001) may help reduce artifacts in shadows.
|
|
@@ -394,17 +394,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
394
394
|
*/
|
|
395
395
|
set alphaTest(value: number);
|
|
396
396
|
|
|
397
|
-
onBuild(object: Object3D, parameters: WebGLProgramParametersWithUniforms, renderer: WebGLRenderer): void;
|
|
398
|
-
|
|
399
|
-
onBeforeRender(
|
|
400
|
-
renderer: WebGLRenderer,
|
|
401
|
-
scene: Scene,
|
|
402
|
-
camera: Camera,
|
|
403
|
-
geometry: BufferGeometry,
|
|
404
|
-
object: Object3D,
|
|
405
|
-
group: Group,
|
|
406
|
-
): void;
|
|
407
|
-
|
|
408
397
|
/**
|
|
409
398
|
* An optional callback that is executed immediately before the shader program is compiled.
|
|
410
399
|
* This function is called with the associated WebGL program parameters and renderer.
|
|
@@ -443,7 +432,10 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
443
432
|
copy(material: Material): this;
|
|
444
433
|
|
|
445
434
|
/**
|
|
446
|
-
*
|
|
435
|
+
* Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer
|
|
436
|
+
* used in your app.
|
|
437
|
+
*
|
|
438
|
+
* Material textures must be disposed of by the dispose() method of {@link Texture}.
|
|
447
439
|
*/
|
|
448
440
|
dispose(): void;
|
|
449
441
|
|
|
@@ -453,4 +445,21 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
453
445
|
* @default false
|
|
454
446
|
*/
|
|
455
447
|
set needsUpdate(value: boolean);
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @deprecated onBuild() has been removed.
|
|
451
|
+
*/
|
|
452
|
+
onBuild(object: Object3D, parameters: WebGLProgramParametersWithUniforms, renderer: WebGLRenderer): void;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @deprecated onBeforeRender() has been removed.
|
|
456
|
+
*/
|
|
457
|
+
onBeforeRender(
|
|
458
|
+
renderer: WebGLRenderer,
|
|
459
|
+
scene: Scene,
|
|
460
|
+
camera: Camera,
|
|
461
|
+
geometry: BufferGeometry,
|
|
462
|
+
object: Object3D,
|
|
463
|
+
group: Group,
|
|
464
|
+
): void;
|
|
456
465
|
}
|
three/src/math/Vector4.d.ts
CHANGED
|
@@ -137,6 +137,12 @@ export class Vector4 {
|
|
|
137
137
|
*/
|
|
138
138
|
setAxisAngleFromRotationMatrix(m: Matrix4): this;
|
|
139
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Sets this vector to the position elements of the
|
|
142
|
+
* [transformation matrix]{@link https://en.wikipedia.org/wiki/Transformation_matrix} m.
|
|
143
|
+
*/
|
|
144
|
+
setFromMatrixPosition(m: Matrix4): this;
|
|
145
|
+
|
|
140
146
|
min(v: Vector4Like): this;
|
|
141
147
|
max(v: Vector4Like): this;
|
|
142
148
|
clamp(min: Vector4Like, max: Vector4Like): this;
|