@headless-three/renderer 0.1.7 → 0.1.9

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.
Files changed (58) hide show
  1. package/README.md +227 -52
  2. package/dist/attributes.d.ts +7 -5
  3. package/dist/attributes.d.ts.map +1 -1
  4. package/dist/attributes.js +112 -36
  5. package/dist/attributes.js.map +1 -1
  6. package/dist/camera.d.ts +1 -0
  7. package/dist/camera.d.ts.map +1 -1
  8. package/dist/camera.js +52 -13
  9. package/dist/camera.js.map +1 -1
  10. package/dist/clipping.d.ts +6 -0
  11. package/dist/clipping.d.ts.map +1 -0
  12. package/dist/clipping.js +84 -0
  13. package/dist/clipping.js.map +1 -0
  14. package/dist/color.d.ts +8 -3
  15. package/dist/color.d.ts.map +1 -1
  16. package/dist/color.js +136 -11
  17. package/dist/color.js.map +1 -1
  18. package/dist/index.d.ts +770 -5
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +6213 -46
  21. package/dist/index.js.map +1 -1
  22. package/dist/layers.d.ts +3 -0
  23. package/dist/layers.d.ts.map +1 -0
  24. package/dist/layers.js +33 -0
  25. package/dist/layers.js.map +1 -0
  26. package/dist/lights.d.ts +5 -4
  27. package/dist/lights.d.ts.map +1 -1
  28. package/dist/lights.js +473 -77
  29. package/dist/lights.js.map +1 -1
  30. package/dist/loaders.d.ts +92 -0
  31. package/dist/loaders.d.ts.map +1 -0
  32. package/dist/loaders.js +858 -0
  33. package/dist/loaders.js.map +1 -0
  34. package/dist/materials.d.ts +38 -6
  35. package/dist/materials.d.ts.map +1 -1
  36. package/dist/materials.js +4236 -162
  37. package/dist/materials.js.map +1 -1
  38. package/dist/math.js +2 -2
  39. package/dist/math.js.map +1 -1
  40. package/dist/morphs.d.ts.map +1 -1
  41. package/dist/morphs.js +50 -15
  42. package/dist/morphs.js.map +1 -1
  43. package/dist/objects.d.ts +4 -0
  44. package/dist/objects.d.ts.map +1 -0
  45. package/dist/objects.js +25 -0
  46. package/dist/objects.js.map +1 -0
  47. package/dist/scene.d.ts +279 -2
  48. package/dist/scene.d.ts.map +1 -1
  49. package/dist/scene.js +3818 -104
  50. package/dist/scene.js.map +1 -1
  51. package/dist/skinning.d.ts.map +1 -1
  52. package/dist/skinning.js +37 -18
  53. package/dist/skinning.js.map +1 -1
  54. package/dist/types.d.ts +1264 -12
  55. package/dist/types.d.ts.map +1 -1
  56. package/native.d.ts +767 -3
  57. package/native.js +54 -52
  58. package/package.json +20 -9
package/native.d.ts CHANGED
@@ -23,10 +23,22 @@ export interface Camera {
23
23
  far?: number
24
24
  /** Optional column-major 4x4 view-projection matrix in WebGPU clip space. */
25
25
  viewProjection?: Array<number>
26
+ /** Optional column-major 4x4 view matrix. */
27
+ viewMatrix?: Array<number>
26
28
  /** Camera world position `[x, y, z]` for PBR lighting. */
27
29
  cameraPosition?: Array<number>
28
30
  }
29
31
 
32
+ export interface DecodedImage {
33
+ data: Buffer
34
+ width: number
35
+ height: number
36
+ }
37
+
38
+ export declare function decodeImage(data: Buffer): DecodedImage
39
+
40
+ export declare function encodePng(data: Buffer, width: number, height: number): Buffer
41
+
30
42
  export declare function renderNative(scene: RenderScene, camera: Camera): Buffer
31
43
 
32
44
  export interface RenderScene {
@@ -36,8 +48,52 @@ export interface RenderScene {
36
48
  height?: number
37
49
  /** Clear color as `[r, g, b]` or `[r, g, b, a]`, with values in the 0..1 range. */
38
50
  background?: Array<number>
51
+ /** Background color/texture intensity multiplier. Defaults to 1. */
52
+ backgroundIntensity?: number
53
+ /** Optional output viewport `[x, y, width, height]` in top-left pixel coordinates. */
54
+ viewport?: Array<number>
55
+ /** Optional output scissor rectangle `[x, y, width, height]` in top-left pixel coordinates. */
56
+ scissor?: Array<number>
57
+ /** Optional scene background texture image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP). */
58
+ backgroundTexture?: Buffer
59
+ /** Background texture width in pixels (required when `background_texture` is raw RGBA8 bytes). */
60
+ backgroundTextureWidth?: number
61
+ /** Background texture height in pixels (required when `background_texture` is raw RGBA8 bytes). */
62
+ backgroundTextureHeight?: number
63
+ /** Background texture horizontal wrap mode: `"repeat"`, `"clamp"`, or `"mirror"`. Defaults to `"clamp"`. */
64
+ backgroundTextureWrapS?: string
65
+ /** Background texture vertical wrap mode: `"repeat"`, `"clamp"`, or `"mirror"`. Defaults to `"clamp"`. */
66
+ backgroundTextureWrapT?: string
67
+ /** Background texture magnification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
68
+ backgroundTextureMagFilter?: string
69
+ /** Background texture minification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
70
+ backgroundTextureMinFilter?: string
71
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
72
+ backgroundTextureAnisotropy?: number
73
+ /** Background texture UV transform `[a, c, tx, b, d, ty]`. */
74
+ backgroundTextureTransform?: Array<number>
75
+ /** Background texture color space. `"srgb"` is decoded to linear before output conversion. */
76
+ backgroundTextureColorSpace?: string
77
+ /** Background texture mapping: `"uv"` (default) or `"equirectangular"`. */
78
+ backgroundTextureMapping?: string
79
+ /** Background texture direction rotation matrix columns, flattened 3x3. */
80
+ backgroundTextureRotation?: Array<number>
81
+ /** Approximate 2D background texture blur amount in the 0..1 range. */
82
+ backgroundTextureBlurriness?: number
39
83
  /** Output format. Supported values are `"png"` (default) and `"rgba"`. */
40
84
  format?: string
85
+ /** Output color space. Supported values are `"srgb"` (default), `"srgb-linear"`, `"linear-srgb"`, `"linearsrgb"`, and `"linear"`. */
86
+ outputColorSpace?: string
87
+ /** Three.js tone-mapping mode. Supports No, Linear, Reinhard, Cineon, ACES Filmic, Custom, AgX, and Neutral. Defaults to ACES Filmic. */
88
+ toneMapping?: number
89
+ /** Material tone-mapping exposure multiplier. Defaults to 1. */
90
+ toneMappingExposure?: number
91
+ /** Scene-color texture resolution scale for physical transmission. Defaults to 1. */
92
+ transmissionResolutionScale?: number
93
+ /** MSAA sample count. Supports `4`; omitted, `0`, or `1` use the single-sample path. */
94
+ sampleCount?: number
95
+ /** Three.js shadow-map type. Supports Basic, PCF, PCFSoft, and VSM constants; defaults to PCF. */
96
+ shadowMapType?: number
41
97
  /** Triangle-list meshes generated by the JavaScript Three.js adapter. */
42
98
  meshes?: Array<SceneMesh>
43
99
  /** Scene lights. */
@@ -46,6 +102,8 @@ export interface RenderScene {
46
102
  ambientLight?: Array<number>
47
103
  /** Ambient light intensity. Defaults to 0. */
48
104
  ambientIntensity?: number
105
+ /** Flattened LightProbe spherical-harmonics coefficients: 9 RGB triplets. */
106
+ lightProbe?: Array<number>
49
107
  /** Optional environment map image data (equirectangular HDR/LDR, encoded or raw RGBA/Float). */
50
108
  environmentMap?: Buffer
51
109
  /** Environment map width in pixels (required when data is raw typed-array bytes). */
@@ -54,10 +112,36 @@ export interface RenderScene {
54
112
  environmentMapHeight?: number
55
113
  /** Environment map intensity multiplier. Defaults to 1. */
56
114
  environmentMapIntensity?: number
115
+ /** Environment map color space. `"srgb"` is decoded to linear; omitted defaults to sRGB for 8-bit inputs. */
116
+ environmentMapColorSpace?: string
117
+ /** Environment map direction rotation matrix columns, flattened 3x3. */
118
+ environmentMapRotation?: Array<number>
119
+ /** Scene fog mode: `"linear"` for THREE.Fog or `"exp2"` for THREE.FogExp2. */
120
+ fogType?: string
121
+ /** Fog color `[r, g, b]` in 0..1 range. */
122
+ fogColor?: Array<number>
123
+ /** Linear fog near distance. Defaults to 1. */
124
+ fogNear?: number
125
+ /** Linear fog far distance. Defaults to 1000. */
126
+ fogFar?: number
127
+ /** Exponential squared fog density. Defaults to 0.00025. */
128
+ fogDensity?: number
129
+ /** Post-processing exposure adjustment in stops. Defaults to 0. */
130
+ postExposure?: number
131
+ /** Post-processing contrast multiplier. Defaults to 1. */
132
+ postContrast?: number
133
+ /** Post-processing saturation multiplier. Defaults to 1. */
134
+ postSaturation?: number
135
+ /** Post-processing vignette amount 0..1. Defaults to 0. */
136
+ postVignette?: number
137
+ /** Post-processing grayscale blend 0..1. Defaults to 0. */
138
+ postGrayscale?: number
139
+ /** Post-processing inversion blend 0..1. Defaults to 0. */
140
+ postInvert?: number
57
141
  }
58
142
 
59
143
  export interface SceneLight {
60
- /** Light type: `"directional"`, `"point"`, `"spot"`, or `"hemisphere"`. */
144
+ /** Light type: `"directional"`, `"point"`, `"spot"`, `"rectArea"`, or `"hemisphere"`. */
61
145
  lightType: string
62
146
  /** Light color `[r, g, b]` in 0..1 range. */
63
147
  color?: Array<number>
@@ -75,16 +159,30 @@ export interface SceneLight {
75
159
  angle?: number
76
160
  /** Spotlight penumbra 0..1. Defaults to 0. */
77
161
  penumbra?: number
162
+ /** RectAreaLight width in world units. */
163
+ width?: number
164
+ /** RectAreaLight height in world units. */
165
+ height?: number
78
166
  /** Hemisphere light ground color `[r, g, b]` in 0..1 range. */
79
167
  groundColor?: Array<number>
80
- /** Whether this light casts shadows (directional lights only). */
168
+ /** Whether this light casts shadows (directional, spot, and point lights). */
81
169
  castShadow?: boolean
82
- /** Shadow map resolution (square, pixels). Defaults to 512. */
170
+ /** Legacy square shadow map resolution in pixels. Defaults to 512 when width/height are absent. */
83
171
  shadowMapSize?: number
172
+ /** Shadow map width in pixels. Defaults to `shadowMapSize` or 512. */
173
+ shadowMapWidth?: number
174
+ /** Shadow map height in pixels. Defaults to `shadowMapSize` or 512. */
175
+ shadowMapHeight?: number
84
176
  /** Depth bias in shadow-map NDC. */
85
177
  shadowBias?: number
86
178
  /** Normal-offset bias in world space at the receiver. */
87
179
  shadowNormalBias?: number
180
+ /** PCF shadow radius multiplier. Defaults to 1. */
181
+ shadowRadius?: number
182
+ /** Shadow darkness multiplier. Defaults to 1; 0 disables received shadow darkening. */
183
+ shadowIntensity?: number
184
+ /** VSM blur sample count. Defaults to Three.js' LightShadow default of 8. */
185
+ shadowBlurSamples?: number
88
186
  /** Orthographic shadow-camera frustum bounds. */
89
187
  shadowCameraLeft?: number
90
188
  shadowCameraRight?: number
@@ -92,9 +190,19 @@ export interface SceneLight {
92
190
  shadowCameraBottom?: number
93
191
  shadowCameraNear?: number
94
192
  shadowCameraFar?: number
193
+ /** Cascaded shadow split distances from the active camera. */
194
+ shadowCascadeSplits?: Array<number>
195
+ /** Flattened cascade bounds: `[left, right, top, bottom, near, far, ...]`. */
196
+ shadowCascadeBounds?: Array<number>
95
197
  }
96
198
 
97
199
  export interface SceneMesh {
200
+ /** Stable renderer-local key for reusing cached native mesh buffers. */
201
+ nativeMeshKey?: number
202
+ /** Vertex count for cached native mesh-buffer references. */
203
+ nativeVertexCount?: number
204
+ /** Index count for cached native mesh-buffer references. */
205
+ nativeIndexCount?: number
98
206
  /** Flat xyz positions: `[x0, y0, z0, x1, y1, z1, ...]`. */
99
207
  positions: Array<number>
100
208
  /** Optional uint32 triangle-list indices. */
@@ -109,6 +217,12 @@ export interface SceneMesh {
109
217
  transform?: Array<number>
110
218
  /** Optional per-vertex UV coordinates: `[u0, v0, u1, v1, ...]`. */
111
219
  uvs?: Array<number>
220
+ /** Optional secondary UV coordinates, used by AO/light-style maps. */
221
+ uvs2?: Array<number>
222
+ /** Use per-face normals for flat-shaded triangle materials. */
223
+ flatShading?: boolean
224
+ /** Whether this material is affected by scene fog. Defaults to true. */
225
+ fog?: boolean
112
226
  /** Optional texture image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP). */
113
227
  texture?: Buffer
114
228
  /** Texture width in pixels (required when `texture` is raw RGBA8 bytes). */
@@ -119,16 +233,372 @@ export interface SceneMesh {
119
233
  textureWrapS?: string
120
234
  /** Texture vertical wrap mode: `"repeat"`, `"clamp"`, or `"mirror"`. Defaults to `"clamp"`. */
121
235
  textureWrapT?: string
236
+ /** Texture magnification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
237
+ textureMagFilter?: string
238
+ /** Texture minification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
239
+ textureMinFilter?: string
240
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
241
+ textureAnisotropy?: number
242
+ /** Base-color map UV transform `[a, c, tx, b, d, ty]`. */
243
+ textureTransform?: Array<number>
244
+ /** Base-color texture color space. `"srgb"` is decoded to linear before shading. */
245
+ textureColorSpace?: string
246
+ /** Whether base-color map sampling uses the secondary UV stream. */
247
+ textureUsesUv2?: boolean
122
248
  /** Optional metallic-roughness texture (glTF convention: G=roughness, B=metallic). */
123
249
  metallicRoughnessTexture?: Buffer
124
250
  /** Metallic-roughness texture width (required when texture is raw RGBA8 bytes). */
125
251
  metallicRoughnessTextureWidth?: number
126
252
  /** Metallic-roughness texture height (required when texture is raw RGBA8 bytes). */
127
253
  metallicRoughnessTextureHeight?: number
254
+ /** Metallic-roughness texture horizontal wrap mode. */
255
+ metallicRoughnessTextureWrapS?: string
256
+ /** Metallic-roughness texture vertical wrap mode. */
257
+ metallicRoughnessTextureWrapT?: string
258
+ /** Metallic-roughness texture magnification filter. */
259
+ metallicRoughnessTextureMagFilter?: string
260
+ /** Metallic-roughness texture minification filter. */
261
+ metallicRoughnessTextureMinFilter?: string
262
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
263
+ metallicRoughnessTextureAnisotropy?: number
264
+ /** Metallic-roughness map UV transform `[a, c, tx, b, d, ty]`. */
265
+ metallicRoughnessTextureTransform?: Array<number>
266
+ /** Metallic-roughness texture color space. `"srgb"` is decoded to linear before shading. */
267
+ metallicRoughnessTextureColorSpace?: string
268
+ /** Whether metallic-roughness map sampling uses the secondary UV stream. */
269
+ metallicRoughnessTextureUsesUv2?: boolean
270
+ /** Optional specular strength map. Red channel multiplies MeshPhongMaterial specular. */
271
+ specularMap?: Buffer
272
+ /** Specular map width (required when map is raw RGBA8 bytes). */
273
+ specularMapWidth?: number
274
+ /** Specular map height (required when map is raw RGBA8 bytes). */
275
+ specularMapHeight?: number
276
+ /** Specular map horizontal wrap mode. */
277
+ specularMapWrapS?: string
278
+ /** Specular map vertical wrap mode. */
279
+ specularMapWrapT?: string
280
+ /** Specular map magnification filter. */
281
+ specularMapMagFilter?: string
282
+ /** Specular map minification filter. */
283
+ specularMapMinFilter?: string
284
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
285
+ specularMapAnisotropy?: number
286
+ /** Specular map UV transform `[a, c, tx, b, d, ty]`. */
287
+ specularMapTransform?: Array<number>
288
+ /** Specular map color space. `"srgb"` is decoded to linear before shading. */
289
+ specularMapColorSpace?: string
290
+ /** Whether specular map sampling uses the secondary UV stream. */
291
+ specularMapUsesUv2?: boolean
128
292
  /** Metallic factor (0..1). Defaults to 0. */
129
293
  metallic?: number
130
294
  /** Roughness factor (0..1). Defaults to 1. */
131
295
  roughness?: number
296
+ /** Clearcoat intensity (0..1) for MeshPhysicalMaterial. Defaults to 0. */
297
+ clearcoat?: number
298
+ /** Optional clearcoat intensity map. Red channel multiplies `clearcoat`. */
299
+ clearcoatMap?: Buffer
300
+ /** Clearcoat map width (required when map is raw RGBA8 bytes). */
301
+ clearcoatMapWidth?: number
302
+ /** Clearcoat map height (required when map is raw RGBA8 bytes). */
303
+ clearcoatMapHeight?: number
304
+ /** Clearcoat map horizontal wrap mode. */
305
+ clearcoatMapWrapS?: string
306
+ /** Clearcoat map vertical wrap mode. */
307
+ clearcoatMapWrapT?: string
308
+ /** Clearcoat map magnification filter. */
309
+ clearcoatMapMagFilter?: string
310
+ /** Clearcoat map minification filter. */
311
+ clearcoatMapMinFilter?: string
312
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
313
+ clearcoatMapAnisotropy?: number
314
+ /** Clearcoat map UV transform `[a, c, tx, b, d, ty]`. */
315
+ clearcoatMapTransform?: Array<number>
316
+ /** Clearcoat map color space. `"srgb"` is decoded to linear before shading. */
317
+ clearcoatMapColorSpace?: string
318
+ /** Whether clearcoat map sampling uses the secondary UV stream. */
319
+ clearcoatMapUsesUv2?: boolean
320
+ /** Clearcoat roughness (0..1). Defaults to 0. */
321
+ clearcoatRoughness?: number
322
+ /** Optional clearcoat roughness map. Green channel multiplies `clearcoatRoughness`. */
323
+ clearcoatRoughnessMap?: Buffer
324
+ /** Clearcoat roughness map width (required when map is raw RGBA8 bytes). */
325
+ clearcoatRoughnessMapWidth?: number
326
+ /** Clearcoat roughness map height (required when map is raw RGBA8 bytes). */
327
+ clearcoatRoughnessMapHeight?: number
328
+ /** Clearcoat roughness map horizontal wrap mode. */
329
+ clearcoatRoughnessMapWrapS?: string
330
+ /** Clearcoat roughness map vertical wrap mode. */
331
+ clearcoatRoughnessMapWrapT?: string
332
+ /** Clearcoat roughness map magnification filter. */
333
+ clearcoatRoughnessMapMagFilter?: string
334
+ /** Clearcoat roughness map minification filter. */
335
+ clearcoatRoughnessMapMinFilter?: string
336
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
337
+ clearcoatRoughnessMapAnisotropy?: number
338
+ /** Clearcoat roughness map UV transform `[a, c, tx, b, d, ty]`. */
339
+ clearcoatRoughnessMapTransform?: Array<number>
340
+ /** Clearcoat roughness map color space. `"srgb"` is decoded to linear before shading. */
341
+ clearcoatRoughnessMapColorSpace?: string
342
+ /** Whether clearcoat roughness map sampling uses the secondary UV stream. */
343
+ clearcoatRoughnessMapUsesUv2?: boolean
344
+ /** Optional clearcoat normal map. */
345
+ clearcoatNormalMap?: Buffer
346
+ /** Clearcoat normal map width (required when map is raw RGBA8 bytes). */
347
+ clearcoatNormalMapWidth?: number
348
+ /** Clearcoat normal map height (required when map is raw RGBA8 bytes). */
349
+ clearcoatNormalMapHeight?: number
350
+ /** Clearcoat normal map horizontal wrap mode. */
351
+ clearcoatNormalMapWrapS?: string
352
+ /** Clearcoat normal map vertical wrap mode. */
353
+ clearcoatNormalMapWrapT?: string
354
+ /** Clearcoat normal map magnification filter. */
355
+ clearcoatNormalMapMagFilter?: string
356
+ /** Clearcoat normal map minification filter. */
357
+ clearcoatNormalMapMinFilter?: string
358
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
359
+ clearcoatNormalMapAnisotropy?: number
360
+ /** Clearcoat normal map UV transform `[a, c, tx, b, d, ty]`. */
361
+ clearcoatNormalMapTransform?: Array<number>
362
+ /** Clearcoat normal map color space. `"srgb"` decodes RGB channels before normal sampling. */
363
+ clearcoatNormalMapColorSpace?: string
364
+ /** Whether clearcoat normal map sampling uses the secondary UV stream. */
365
+ clearcoatNormalMapUsesUv2?: boolean
366
+ /** Clearcoat normal map scale `[x, y]`. Defaults to `[1, 1]`. */
367
+ clearcoatNormalScale?: Array<number>
368
+ /** Sheen color/intensity `[r, g, b]` in 0..1 range. */
369
+ sheenColor?: Array<number>
370
+ /** Optional sheen color map. RGB channels multiply `sheenColor`. */
371
+ sheenColorMap?: Buffer
372
+ /** Sheen color map width (required when map is raw RGBA8 bytes). */
373
+ sheenColorMapWidth?: number
374
+ /** Sheen color map height (required when map is raw RGBA8 bytes). */
375
+ sheenColorMapHeight?: number
376
+ /** Sheen color map horizontal wrap mode. */
377
+ sheenColorMapWrapS?: string
378
+ /** Sheen color map vertical wrap mode. */
379
+ sheenColorMapWrapT?: string
380
+ /** Sheen color map magnification filter. */
381
+ sheenColorMapMagFilter?: string
382
+ /** Sheen color map minification filter. */
383
+ sheenColorMapMinFilter?: string
384
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
385
+ sheenColorMapAnisotropy?: number
386
+ /** Sheen color map UV transform `[a, c, tx, b, d, ty]`. */
387
+ sheenColorMapTransform?: Array<number>
388
+ /** Sheen color texture color space. `"srgb"` is decoded to linear before shading. */
389
+ sheenColorMapColorSpace?: string
390
+ /** Whether sheen color map sampling uses the secondary UV stream. */
391
+ sheenColorMapUsesUv2?: boolean
392
+ /** Sheen roughness (0..1). Defaults to 1 when sheen is present. */
393
+ sheenRoughness?: number
394
+ /** Optional sheen roughness map. Alpha channel multiplies `sheenRoughness`. */
395
+ sheenRoughnessMap?: Buffer
396
+ /** Sheen roughness map width (required when map is raw RGBA8 bytes). */
397
+ sheenRoughnessMapWidth?: number
398
+ /** Sheen roughness map height (required when map is raw RGBA8 bytes). */
399
+ sheenRoughnessMapHeight?: number
400
+ /** Sheen roughness map horizontal wrap mode. */
401
+ sheenRoughnessMapWrapS?: string
402
+ /** Sheen roughness map vertical wrap mode. */
403
+ sheenRoughnessMapWrapT?: string
404
+ /** Sheen roughness map magnification filter. */
405
+ sheenRoughnessMapMagFilter?: string
406
+ /** Sheen roughness map minification filter. */
407
+ sheenRoughnessMapMinFilter?: string
408
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
409
+ sheenRoughnessMapAnisotropy?: number
410
+ /** Sheen roughness map UV transform `[a, c, tx, b, d, ty]`. */
411
+ sheenRoughnessMapTransform?: Array<number>
412
+ /** Sheen roughness map color space metadata. Alpha roughness sampling is unchanged. */
413
+ sheenRoughnessMapColorSpace?: string
414
+ /** Whether sheen roughness map sampling uses the secondary UV stream. */
415
+ sheenRoughnessMapUsesUv2?: boolean
416
+ /** Anisotropy strength (0..1). Defaults to 0. */
417
+ anisotropy?: number
418
+ /** Anisotropy rotation in tangent space, radians. */
419
+ anisotropyRotation?: number
420
+ /** Optional anisotropy map. RG encode direction and B encodes strength. */
421
+ anisotropyMap?: Buffer
422
+ /** Anisotropy map width (required when map is raw RGBA8 bytes). */
423
+ anisotropyMapWidth?: number
424
+ /** Anisotropy map height (required when map is raw RGBA8 bytes). */
425
+ anisotropyMapHeight?: number
426
+ /** Anisotropy map horizontal wrap mode. */
427
+ anisotropyMapWrapS?: string
428
+ /** Anisotropy map vertical wrap mode. */
429
+ anisotropyMapWrapT?: string
430
+ /** Anisotropy map magnification filter. */
431
+ anisotropyMapMagFilter?: string
432
+ /** Anisotropy map minification filter. */
433
+ anisotropyMapMinFilter?: string
434
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
435
+ anisotropyMapAnisotropy?: number
436
+ /** Anisotropy map UV transform `[a, c, tx, b, d, ty]`. */
437
+ anisotropyMapTransform?: Array<number>
438
+ /** Anisotropy map color space. `"srgb"` is decoded to linear before shading. */
439
+ anisotropyMapColorSpace?: string
440
+ /** Whether anisotropy map sampling uses the secondary UV stream. */
441
+ anisotropyMapUsesUv2?: boolean
442
+ /** MeshPhysicalMaterial iridescence factor (0..1). Defaults to 0. */
443
+ iridescence?: number
444
+ /** Optional iridescence factor map. Red channel multiplies `iridescence`. */
445
+ iridescenceMap?: Buffer
446
+ /** Iridescence factor map width (required when map is raw RGBA8 bytes). */
447
+ iridescenceMapWidth?: number
448
+ /** Iridescence factor map height (required when map is raw RGBA8 bytes). */
449
+ iridescenceMapHeight?: number
450
+ /** Iridescence factor map horizontal wrap mode. */
451
+ iridescenceMapWrapS?: string
452
+ /** Iridescence factor map vertical wrap mode. */
453
+ iridescenceMapWrapT?: string
454
+ /** Iridescence factor map magnification filter. */
455
+ iridescenceMapMagFilter?: string
456
+ /** Iridescence factor map minification filter. */
457
+ iridescenceMapMinFilter?: string
458
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
459
+ iridescenceMapAnisotropy?: number
460
+ /** Iridescence factor map UV transform `[a, c, tx, b, d, ty]`. */
461
+ iridescenceMapTransform?: Array<number>
462
+ /** Iridescence factor map color space. `"srgb"` is decoded to linear before shading. */
463
+ iridescenceMapColorSpace?: string
464
+ /** Whether iridescence factor map sampling uses the secondary UV stream. */
465
+ iridescenceMapUsesUv2?: boolean
466
+ /** Iridescence film IOR. Defaults to 1.3. */
467
+ iridescenceIor?: number
468
+ /** Iridescence film thickness range minimum in nanometers. Defaults to 100. */
469
+ iridescenceThicknessMin?: number
470
+ /** Iridescence film thickness range maximum in nanometers. Defaults to 400. */
471
+ iridescenceThicknessMax?: number
472
+ /** Optional iridescence thickness map. Green channel interpolates the configured thickness range. */
473
+ iridescenceThicknessMap?: Buffer
474
+ /** Iridescence thickness map width (required when map is raw RGBA8 bytes). */
475
+ iridescenceThicknessMapWidth?: number
476
+ /** Iridescence thickness map height (required when map is raw RGBA8 bytes). */
477
+ iridescenceThicknessMapHeight?: number
478
+ /** Iridescence thickness map horizontal wrap mode. */
479
+ iridescenceThicknessMapWrapS?: string
480
+ /** Iridescence thickness map vertical wrap mode. */
481
+ iridescenceThicknessMapWrapT?: string
482
+ /** Iridescence thickness map magnification filter. */
483
+ iridescenceThicknessMapMagFilter?: string
484
+ /** Iridescence thickness map minification filter. */
485
+ iridescenceThicknessMapMinFilter?: string
486
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
487
+ iridescenceThicknessMapAnisotropy?: number
488
+ /** Iridescence thickness map UV transform `[a, c, tx, b, d, ty]`. */
489
+ iridescenceThicknessMapTransform?: Array<number>
490
+ /** Iridescence thickness map color space. `"srgb"` is decoded to linear before shading. */
491
+ iridescenceThicknessMapColorSpace?: string
492
+ /** Whether iridescence thickness map sampling uses the secondary UV stream. */
493
+ iridescenceThicknessMapUsesUv2?: boolean
494
+ /** Physical transmission factor (0..1). Defaults to 0. */
495
+ transmission?: number
496
+ /** Optional transmission map. Red channel multiplies `transmission`. */
497
+ transmissionMap?: Buffer
498
+ /** Transmission map width (required when map is raw RGBA8 bytes). */
499
+ transmissionMapWidth?: number
500
+ /** Transmission map height (required when map is raw RGBA8 bytes). */
501
+ transmissionMapHeight?: number
502
+ /** Transmission map horizontal wrap mode. */
503
+ transmissionMapWrapS?: string
504
+ /** Transmission map vertical wrap mode. */
505
+ transmissionMapWrapT?: string
506
+ /** Transmission map magnification filter. */
507
+ transmissionMapMagFilter?: string
508
+ /** Transmission map minification filter. */
509
+ transmissionMapMinFilter?: string
510
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
511
+ transmissionMapAnisotropy?: number
512
+ /** Transmission map UV transform `[a, c, tx, b, d, ty]`. */
513
+ transmissionMapTransform?: Array<number>
514
+ /** Transmission map color space. `"srgb"` is decoded to linear before shading. */
515
+ transmissionMapColorSpace?: string
516
+ /** Whether transmission map sampling uses the secondary UV stream. */
517
+ transmissionMapUsesUv2?: boolean
518
+ /** MeshPhysicalMaterial dispersion factor. Defaults to 0. */
519
+ dispersion?: number
520
+ /** Index of refraction for physical materials. Defaults to 1.5. */
521
+ ior?: number
522
+ /** Transmission volume thickness in model units. Defaults to 0. */
523
+ thickness?: number
524
+ /** Optional thickness map. Green channel multiplies `thickness`. */
525
+ thicknessMap?: Buffer
526
+ /** Thickness map width (required when map is raw RGBA8 bytes). */
527
+ thicknessMapWidth?: number
528
+ /** Thickness map height (required when map is raw RGBA8 bytes). */
529
+ thicknessMapHeight?: number
530
+ /** Thickness map horizontal wrap mode. */
531
+ thicknessMapWrapS?: string
532
+ /** Thickness map vertical wrap mode. */
533
+ thicknessMapWrapT?: string
534
+ /** Thickness map magnification filter. */
535
+ thicknessMapMagFilter?: string
536
+ /** Thickness map minification filter. */
537
+ thicknessMapMinFilter?: string
538
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
539
+ thicknessMapAnisotropy?: number
540
+ /** Thickness map UV transform `[a, c, tx, b, d, ty]`. */
541
+ thicknessMapTransform?: Array<number>
542
+ /** Thickness map color space. `"srgb"` is decoded to linear before shading. */
543
+ thicknessMapColorSpace?: string
544
+ /** Whether thickness map sampling uses the secondary UV stream. */
545
+ thicknessMapUsesUv2?: boolean
546
+ /** Transmission attenuation distance. Defaults to a very large distance. */
547
+ attenuationDistance?: number
548
+ /** Transmission attenuation color `[r, g, b]` in 0..1 range. */
549
+ attenuationColor?: Array<number>
550
+ /** MeshPhysicalMaterial specular color factor `[r, g, b]` in 0..1 range. */
551
+ physicalSpecularColor?: Array<number>
552
+ /** MeshPhysicalMaterial specular intensity factor (0..1). Defaults to 1. */
553
+ physicalSpecularIntensity?: number
554
+ /** Optional MeshPhysicalMaterial specular color map. RGB channels multiply `specularColor`. */
555
+ specularColorMap?: Buffer
556
+ /** Specular color map width (required when map is raw RGBA8 bytes). */
557
+ specularColorMapWidth?: number
558
+ /** Specular color map height (required when map is raw RGBA8 bytes). */
559
+ specularColorMapHeight?: number
560
+ /** Specular color map horizontal wrap mode. */
561
+ specularColorMapWrapS?: string
562
+ /** Specular color map vertical wrap mode. */
563
+ specularColorMapWrapT?: string
564
+ /** Specular color map magnification filter. */
565
+ specularColorMapMagFilter?: string
566
+ /** Specular color map minification filter. */
567
+ specularColorMapMinFilter?: string
568
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
569
+ specularColorMapAnisotropy?: number
570
+ /** Specular color map UV transform `[a, c, tx, b, d, ty]`. */
571
+ specularColorMapTransform?: Array<number>
572
+ /** Specular color texture color space. `"srgb"` is decoded to linear before shading. */
573
+ specularColorMapColorSpace?: string
574
+ /** Whether specular color map sampling uses the secondary UV stream. */
575
+ specularColorMapUsesUv2?: boolean
576
+ /** Optional MeshPhysicalMaterial specular intensity map. Alpha channel multiplies `specularIntensity`. */
577
+ specularIntensityMap?: Buffer
578
+ /** Specular intensity map width (required when map is raw RGBA8 bytes). */
579
+ specularIntensityMapWidth?: number
580
+ /** Specular intensity map height (required when map is raw RGBA8 bytes). */
581
+ specularIntensityMapHeight?: number
582
+ /** Specular intensity map horizontal wrap mode. */
583
+ specularIntensityMapWrapS?: string
584
+ /** Specular intensity map vertical wrap mode. */
585
+ specularIntensityMapWrapT?: string
586
+ /** Specular intensity map magnification filter. */
587
+ specularIntensityMapMagFilter?: string
588
+ /** Specular intensity map minification filter. */
589
+ specularIntensityMapMinFilter?: string
590
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
591
+ specularIntensityMapAnisotropy?: number
592
+ /** Specular intensity map UV transform `[a, c, tx, b, d, ty]`. */
593
+ specularIntensityMapTransform?: Array<number>
594
+ /** Specular intensity map color space metadata. Alpha intensity sampling is unchanged. */
595
+ specularIntensityMapColorSpace?: string
596
+ /** Whether specular intensity map sampling uses the secondary UV stream. */
597
+ specularIntensityMapUsesUv2?: boolean
598
+ /** MeshPhongMaterial specular color `[r, g, b]` in 0..1 range. */
599
+ specularColor?: Array<number>
600
+ /** MeshPhongMaterial shininess. Defaults to 30. */
601
+ shininess?: number
132
602
  /** Emissive color `[r, g, b]` in 0..1 range. */
133
603
  emissive?: Array<number>
134
604
  /** Emissive intensity multiplier. Defaults to 1. */
@@ -139,14 +609,149 @@ export interface SceneMesh {
139
609
  normalMapWidth?: number
140
610
  /** Normal map height in pixels (required when `normal_map` is raw RGBA8 bytes). */
141
611
  normalMapHeight?: number
612
+ /** Normal map horizontal wrap mode. */
613
+ normalMapWrapS?: string
614
+ /** Normal map vertical wrap mode. */
615
+ normalMapWrapT?: string
616
+ /** Normal map magnification filter. */
617
+ normalMapMagFilter?: string
618
+ /** Normal map minification filter. */
619
+ normalMapMinFilter?: string
620
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
621
+ normalMapAnisotropy?: number
622
+ /** Normal map UV transform `[a, c, tx, b, d, ty]`. */
623
+ normalMapTransform?: Array<number>
624
+ /** Normal map color space. `"srgb"` decodes RGB channels before normal sampling. */
625
+ normalMapColorSpace?: string
626
+ /** Whether normal map sampling uses the secondary UV stream. */
627
+ normalMapUsesUv2?: boolean
628
+ /** Normal map space: "tangent" (default) or "object". */
629
+ normalMapType?: string
142
630
  /** Normal map scale `[x, y]`. Defaults to `[1, 1]`. */
143
631
  normalScale?: Array<number>
632
+ /** Optional bump map image data. Red channel is used as height. */
633
+ bumpMap?: Buffer
634
+ /** Bump map width (required when `bump_map` is raw RGBA8 bytes). */
635
+ bumpMapWidth?: number
636
+ /** Bump map height (required when `bump_map` is raw RGBA8 bytes). */
637
+ bumpMapHeight?: number
638
+ /** Bump map horizontal wrap mode. */
639
+ bumpMapWrapS?: string
640
+ /** Bump map vertical wrap mode. */
641
+ bumpMapWrapT?: string
642
+ /** Bump map magnification filter. */
643
+ bumpMapMagFilter?: string
644
+ /** Bump map minification filter. */
645
+ bumpMapMinFilter?: string
646
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
647
+ bumpMapAnisotropy?: number
648
+ /** Bump map UV transform `[a, c, tx, b, d, ty]`. */
649
+ bumpMapTransform?: Array<number>
650
+ /** Bump map color space. `"srgb"` decodes RGB channels before bump sampling. */
651
+ bumpMapColorSpace?: string
652
+ /** Whether bump map sampling uses the secondary UV stream. */
653
+ bumpMapUsesUv2?: boolean
654
+ /** Bump map scale. Defaults to 1. */
655
+ bumpScale?: number
656
+ /** Optional MeshMatcapMaterial color map image data. */
657
+ matcapMap?: Buffer
658
+ /** Matcap color map width (required when `matcap_map` is raw RGBA8 bytes). */
659
+ matcapMapWidth?: number
660
+ /** Matcap color map height (required when `matcap_map` is raw RGBA8 bytes). */
661
+ matcapMapHeight?: number
662
+ /** Matcap color map horizontal wrap mode. */
663
+ matcapMapWrapS?: string
664
+ /** Matcap color map vertical wrap mode. */
665
+ matcapMapWrapT?: string
666
+ /** Matcap color map magnification filter. */
667
+ matcapMapMagFilter?: string
668
+ /** Matcap color map minification filter. */
669
+ matcapMapMinFilter?: string
670
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
671
+ matcapMapAnisotropy?: number
672
+ /** Matcap color map UV transform `[a, c, tx, b, d, ty]`. */
673
+ matcapMapTransform?: Array<number>
674
+ /** Matcap color map color space: `"srgb"` or `"linear"`. */
675
+ matcapMapColorSpace?: string
676
+ /** Whether matcap color map sampling uses the secondary UV stream. */
677
+ matcapMapUsesUv2?: boolean
678
+ /** MeshDepthMaterial packing mode. Uses Three.js constants: 3200 basic, 3201 RGBA, 3202 RGB, 3203 RG. */
679
+ depthPacking?: number
680
+ /** Optional MeshDistanceMaterial world-space reference position. Defaults to camera position. */
681
+ distanceReferencePosition?: Array<number>
682
+ /** Optional MeshDistanceMaterial near distance. Defaults to camera near plane. */
683
+ distanceNear?: number
684
+ /** Optional MeshDistanceMaterial far distance. Defaults to camera far plane. */
685
+ distanceFar?: number
686
+ /** Optional MeshToonMaterial gradient ramp map. Red channel controls diffuse ramp strength. */
687
+ gradientMap?: Buffer
688
+ /** Gradient map width (required when `gradient_map` is raw RGBA8 bytes). */
689
+ gradientMapWidth?: number
690
+ /** Gradient map height (required when `gradient_map` is raw RGBA8 bytes). */
691
+ gradientMapHeight?: number
692
+ /** Gradient map horizontal wrap mode. */
693
+ gradientMapWrapS?: string
694
+ /** Gradient map vertical wrap mode. */
695
+ gradientMapWrapT?: string
696
+ /** Gradient map magnification filter. */
697
+ gradientMapMagFilter?: string
698
+ /** Gradient map minification filter. */
699
+ gradientMapMinFilter?: string
700
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
701
+ gradientMapAnisotropy?: number
702
+ /** Gradient map color space: `"srgb"` or `"linear"`. */
703
+ gradientMapColorSpace?: string
704
+ /**
705
+ * Optional displacement map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
706
+ * Red channel displaces vertices along their object-space normals.
707
+ */
708
+ displacementMap?: Buffer
709
+ /** Displacement map width in pixels (required when `displacement_map` is raw RGBA8 bytes). */
710
+ displacementMapWidth?: number
711
+ /** Displacement map height in pixels (required when `displacement_map` is raw RGBA8 bytes). */
712
+ displacementMapHeight?: number
713
+ /** Displacement map horizontal wrap mode. */
714
+ displacementMapWrapS?: string
715
+ /** Displacement map vertical wrap mode. */
716
+ displacementMapWrapT?: string
717
+ /** Displacement map magnification filter. */
718
+ displacementMapMagFilter?: string
719
+ /** Displacement map minification filter. */
720
+ displacementMapMinFilter?: string
721
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
722
+ displacementMapAnisotropy?: number
723
+ /** Displacement map UV transform `[a, c, tx, b, d, ty]`. */
724
+ displacementMapTransform?: Array<number>
725
+ /** Displacement map color space. `"srgb"` decodes the red channel before displacement. */
726
+ displacementMapColorSpace?: string
727
+ /** Whether displacement map sampling uses the secondary UV stream. */
728
+ displacementMapUsesUv2?: boolean
729
+ /** Displacement scale multiplier. Defaults to 1. */
730
+ displacementScale?: number
731
+ /** Displacement bias added after map sampling. Defaults to 0. */
732
+ displacementBias?: number
144
733
  /** Optional emissive map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP). */
145
734
  emissiveMap?: Buffer
146
735
  /** Emissive map width in pixels (required when `emissive_map` is raw RGBA8 bytes). */
147
736
  emissiveMapWidth?: number
148
737
  /** Emissive map height in pixels (required when `emissive_map` is raw RGBA8 bytes). */
149
738
  emissiveMapHeight?: number
739
+ /** Emissive map horizontal wrap mode. */
740
+ emissiveMapWrapS?: string
741
+ /** Emissive map vertical wrap mode. */
742
+ emissiveMapWrapT?: string
743
+ /** Emissive map magnification filter. */
744
+ emissiveMapMagFilter?: string
745
+ /** Emissive map minification filter. */
746
+ emissiveMapMinFilter?: string
747
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
748
+ emissiveMapAnisotropy?: number
749
+ /** Emissive map UV transform `[a, c, tx, b, d, ty]`. */
750
+ emissiveMapTransform?: Array<number>
751
+ /** Emissive texture color space. `"srgb"` is decoded to linear before shading. */
752
+ emissiveMapColorSpace?: string
753
+ /** Whether emissive map sampling uses the secondary UV stream. */
754
+ emissiveMapUsesUv2?: boolean
150
755
  /**
151
756
  * Optional ambient occlusion map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
152
757
  * Red channel is used as the occlusion factor (Three.js / glTF convention).
@@ -156,23 +761,182 @@ export interface SceneMesh {
156
761
  aoMapWidth?: number
157
762
  /** AO map height in pixels (required when `ao_map` is raw RGBA8 bytes). */
158
763
  aoMapHeight?: number
764
+ /** AO map horizontal wrap mode. */
765
+ aoMapWrapS?: string
766
+ /** AO map vertical wrap mode. */
767
+ aoMapWrapT?: string
768
+ /** AO map magnification filter. */
769
+ aoMapMagFilter?: string
770
+ /** AO map minification filter. */
771
+ aoMapMinFilter?: string
772
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
773
+ aoMapAnisotropy?: number
774
+ /** AO map UV transform `[a, c, tx, b, d, ty]`. */
775
+ aoMapTransform?: Array<number>
776
+ /** AO map color space. `"srgb"` decodes the red channel to linear before shading. */
777
+ aoMapColorSpace?: string
778
+ /** Whether AO map sampling uses the secondary UV stream. */
779
+ aoMapUsesUv2?: boolean
159
780
  /** AO map intensity multiplier (0..1). Defaults to 1. */
160
781
  aoMapIntensity?: number
782
+ /**
783
+ * Optional light map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
784
+ * RGB channels add baked indirect diffuse lighting.
785
+ */
786
+ lightMap?: Buffer
787
+ /** Light map width in pixels (required when `light_map` is raw RGBA8 bytes). */
788
+ lightMapWidth?: number
789
+ /** Light map height in pixels (required when `light_map` is raw RGBA8 bytes). */
790
+ lightMapHeight?: number
791
+ /** Light map horizontal wrap mode. */
792
+ lightMapWrapS?: string
793
+ /** Light map vertical wrap mode. */
794
+ lightMapWrapT?: string
795
+ /** Light map magnification filter. */
796
+ lightMapMagFilter?: string
797
+ /** Light map minification filter. */
798
+ lightMapMinFilter?: string
799
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
800
+ lightMapAnisotropy?: number
801
+ /** Light map UV transform `[a, c, tx, b, d, ty]`. */
802
+ lightMapTransform?: Array<number>
803
+ /** Light-map texture color space. `"srgb"` is decoded to linear before shading. */
804
+ lightMapColorSpace?: string
805
+ /** Whether light-map sampling uses the secondary UV stream. */
806
+ lightMapUsesUv2?: boolean
807
+ /** Light map intensity multiplier. Defaults to 1. */
808
+ lightMapIntensity?: number
809
+ /**
810
+ * Optional alpha map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
811
+ * Green channel multiplies material opacity, matching Three.js.
812
+ */
813
+ alphaMap?: Buffer
814
+ /** Alpha map width in pixels (required when `alpha_map` is raw RGBA8 bytes). */
815
+ alphaMapWidth?: number
816
+ /** Alpha map height in pixels (required when `alpha_map` is raw RGBA8 bytes). */
817
+ alphaMapHeight?: number
818
+ /** Alpha map horizontal wrap mode. */
819
+ alphaMapWrapS?: string
820
+ /** Alpha map vertical wrap mode. */
821
+ alphaMapWrapT?: string
822
+ /** Alpha map magnification filter. */
823
+ alphaMapMagFilter?: string
824
+ /** Alpha map minification filter. */
825
+ alphaMapMinFilter?: string
826
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
827
+ alphaMapAnisotropy?: number
828
+ /** Alpha map UV transform `[a, c, tx, b, d, ty]`. */
829
+ alphaMapTransform?: Array<number>
830
+ /** Alpha map color space. `"srgb"` decodes the green channel to linear before opacity. */
831
+ alphaMapColorSpace?: string
832
+ /** Whether alpha map sampling uses the secondary UV stream. */
833
+ alphaMapUsesUv2?: boolean
161
834
  /** Alpha test cutoff threshold (0..1). Fragments with alpha below this are discarded. */
162
835
  alphaTest?: number
836
+ /** Whether to apply stochastic alpha hashing before depth/color writes. */
837
+ alphaHash?: boolean
838
+ /** Whether to enable MSAA alpha-to-coverage when the render sample count is greater than 1. */
839
+ alphaToCoverage?: boolean
840
+ /** Whether fragment RGB output is multiplied by output alpha before blending. */
841
+ premultipliedAlpha?: boolean
842
+ /** Whether material output is tone mapped before output color-space conversion. Defaults to true. */
843
+ toneMapped?: boolean
844
+ /**
845
+ * Flattened world-space clipping planes `[nx, ny, nz, constant, ...]`, up to 8 planes.
846
+ * Fragments with `dot(normal, worldPosition) + constant < 0` are clipped.
847
+ */
848
+ clippingPlanes?: Array<number>
849
+ /**
850
+ * Number of leading clipping planes evaluated as union planes. Remaining planes use
851
+ * intersection semantics. Defaults to all planes as union planes.
852
+ */
853
+ clippingUnionCount?: number
854
+ /** Whether clipping planes affect this mesh in the shadow pass. */
855
+ clipShadows?: boolean
163
856
  /** Whether the mesh is transparent (sorted back-to-front, no depth write). */
164
857
  transparent?: boolean
858
+ /** Material blending mode: `"none"`, `"normal"`, `"additive"`, `"subtractive"`, `"multiply"`, or `"custom"`. */
859
+ blending?: string
860
+ /** Custom blending equation constants when `blending` is `"custom"`. */
861
+ blendEquation?: number
862
+ blendSrc?: number
863
+ blendDst?: number
864
+ blendEquationAlpha?: number
865
+ blendSrcAlpha?: number
866
+ blendDstAlpha?: number
867
+ /** Custom blend constant color `[r, g, b]`. */
868
+ blendColor?: Array<number>
869
+ /** Custom blend constant alpha. */
870
+ blendAlpha?: number
871
+ /** Whether depth testing is enabled. Defaults to true. */
872
+ depthTest?: boolean
873
+ /** Depth comparison function. Defaults to `"less-equal"`. */
874
+ depthFunc?: string
875
+ /** Whether passing fragments write depth. Defaults to true for opaque meshes and false for transparent meshes. */
876
+ depthWrite?: boolean
877
+ /** Whether fragments write color. Defaults to true. */
878
+ colorWrite?: boolean
879
+ /** Whether to apply material polygon offset as depth bias in the main pass. */
880
+ polygonOffset?: boolean
881
+ /** Slope-scaled polygon offset factor. */
882
+ polygonOffsetFactor?: number
883
+ /** Constant polygon offset units. */
884
+ polygonOffsetUnits?: number
885
+ /** Whether stencil testing/writes are enabled for this material. */
886
+ stencilWrite?: boolean
887
+ /** Stencil write bit mask. Defaults to 0xff. */
888
+ stencilWriteMask?: number
889
+ /** Stencil comparison function constant. Defaults to AlwaysStencilFunc. */
890
+ stencilFunc?: number
891
+ /** Stencil reference value. Defaults to 0. */
892
+ stencilRef?: number
893
+ /** Stencil comparison bit mask. Defaults to 0xff. */
894
+ stencilFuncMask?: number
895
+ /** Operation when the stencil test fails. Defaults to KeepStencilOp. */
896
+ stencilFail?: number
897
+ /** Operation when the stencil test passes but depth fails. Defaults to KeepStencilOp. */
898
+ stencilZFail?: number
899
+ /** Operation when both stencil and depth pass. Defaults to KeepStencilOp. */
900
+ stencilZPass?: number
165
901
  /** Which faces to render: `"front"` (default), `"back"`, or `"double"`. */
166
902
  side?: string
903
+ /** Optional shadow-pass face filter: `"front"`, `"back"`, or `"double"`. Unset preserves no-cull shadow casters. */
904
+ shadowSide?: string
167
905
  /**
168
906
  * Shading model: `"standard"` (default PBR), `"basic"` (unlit / MeshBasicMaterial),
169
907
  * or `"lambert"` (diffuse-only / MeshLambertMaterial).
170
908
  */
171
909
  shadingModel?: string
910
+ /** Whether this mesh samples the scene/material environment map when one exists. */
911
+ useEnvironmentMap?: boolean
912
+ /** Per-mesh environment intensity. Defaults to the scene environment intensity. */
913
+ environmentMapIntensity?: number
914
+ /** Legacy environment blend operation: 0=multiply, 1=mix, 2=add. */
915
+ environmentMapCombine?: number
916
+ /** Legacy material environment reflectivity multiplier. */
917
+ environmentMapReflectivity?: number
918
+ /** Whether the material environment map uses refraction instead of reflection. */
919
+ environmentMapRefraction?: boolean
920
+ /** Legacy material environment refraction ratio. */
921
+ environmentMapRefractionRatio?: number
172
922
  /** Primitive topology: `"triangles"` (default), `"lines"` (LineList), or `"points"`. */
173
923
  topology?: string
924
+ /** WGSL fragment shader body for the custom material path. */
925
+ customFragmentShader?: string
174
926
  /** Whether this mesh casts shadows in the shadow pass. Defaults to false. */
175
927
  castShadow?: boolean
176
928
  /** Whether this mesh receives shadows in the main pass. Defaults to false. */
177
929
  receiveShadow?: boolean
930
+ /** Three.js groupOrder inherited from the nearest Group.renderOrder. Defaults to 0. */
931
+ groupOrder?: number
932
+ /** Explicit Three.js object renderOrder. Defaults to 0. */
933
+ renderOrder?: number
934
+ /** Projected camera-space sort key provided by the Three.js adapter. */
935
+ sortZ?: number
936
+ /** Stable object id / adapter insertion-order tie-breaker. */
937
+ sortIndex?: number
938
+ /** WebGLRenderer material variant sort key: skinned meshes add 1, instanced meshes add 2. */
939
+ materialVariant?: number
940
+ /** Material id sort key used for opaque draw ordering. */
941
+ materialSortKey?: number
178
942
  }