@headless-three/renderer 0.1.0 → 0.1.8

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 +6208 -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 +251 -2
  48. package/dist/scene.d.ts.map +1 -1
  49. package/dist/scene.js +3679 -105
  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 +1261 -12
  55. package/dist/types.d.ts.map +1 -1
  56. package/native.d.ts +761 -3
  57. package/native.js +54 -52
  58. package/package.json +21 -10
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,6 +190,10 @@ 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 {
@@ -109,6 +211,12 @@ export interface SceneMesh {
109
211
  transform?: Array<number>
110
212
  /** Optional per-vertex UV coordinates: `[u0, v0, u1, v1, ...]`. */
111
213
  uvs?: Array<number>
214
+ /** Optional secondary UV coordinates, used by AO/light-style maps. */
215
+ uvs2?: Array<number>
216
+ /** Use per-face normals for flat-shaded triangle materials. */
217
+ flatShading?: boolean
218
+ /** Whether this material is affected by scene fog. Defaults to true. */
219
+ fog?: boolean
112
220
  /** Optional texture image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP). */
113
221
  texture?: Buffer
114
222
  /** Texture width in pixels (required when `texture` is raw RGBA8 bytes). */
@@ -119,16 +227,372 @@ export interface SceneMesh {
119
227
  textureWrapS?: string
120
228
  /** Texture vertical wrap mode: `"repeat"`, `"clamp"`, or `"mirror"`. Defaults to `"clamp"`. */
121
229
  textureWrapT?: string
230
+ /** Texture magnification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
231
+ textureMagFilter?: string
232
+ /** Texture minification filter: `"nearest"` or `"linear"`. Defaults to `"linear"`. */
233
+ textureMinFilter?: string
234
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
235
+ textureAnisotropy?: number
236
+ /** Base-color map UV transform `[a, c, tx, b, d, ty]`. */
237
+ textureTransform?: Array<number>
238
+ /** Base-color texture color space. `"srgb"` is decoded to linear before shading. */
239
+ textureColorSpace?: string
240
+ /** Whether base-color map sampling uses the secondary UV stream. */
241
+ textureUsesUv2?: boolean
122
242
  /** Optional metallic-roughness texture (glTF convention: G=roughness, B=metallic). */
123
243
  metallicRoughnessTexture?: Buffer
124
244
  /** Metallic-roughness texture width (required when texture is raw RGBA8 bytes). */
125
245
  metallicRoughnessTextureWidth?: number
126
246
  /** Metallic-roughness texture height (required when texture is raw RGBA8 bytes). */
127
247
  metallicRoughnessTextureHeight?: number
248
+ /** Metallic-roughness texture horizontal wrap mode. */
249
+ metallicRoughnessTextureWrapS?: string
250
+ /** Metallic-roughness texture vertical wrap mode. */
251
+ metallicRoughnessTextureWrapT?: string
252
+ /** Metallic-roughness texture magnification filter. */
253
+ metallicRoughnessTextureMagFilter?: string
254
+ /** Metallic-roughness texture minification filter. */
255
+ metallicRoughnessTextureMinFilter?: string
256
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
257
+ metallicRoughnessTextureAnisotropy?: number
258
+ /** Metallic-roughness map UV transform `[a, c, tx, b, d, ty]`. */
259
+ metallicRoughnessTextureTransform?: Array<number>
260
+ /** Metallic-roughness texture color space. `"srgb"` is decoded to linear before shading. */
261
+ metallicRoughnessTextureColorSpace?: string
262
+ /** Whether metallic-roughness map sampling uses the secondary UV stream. */
263
+ metallicRoughnessTextureUsesUv2?: boolean
264
+ /** Optional specular strength map. Red channel multiplies MeshPhongMaterial specular. */
265
+ specularMap?: Buffer
266
+ /** Specular map width (required when map is raw RGBA8 bytes). */
267
+ specularMapWidth?: number
268
+ /** Specular map height (required when map is raw RGBA8 bytes). */
269
+ specularMapHeight?: number
270
+ /** Specular map horizontal wrap mode. */
271
+ specularMapWrapS?: string
272
+ /** Specular map vertical wrap mode. */
273
+ specularMapWrapT?: string
274
+ /** Specular map magnification filter. */
275
+ specularMapMagFilter?: string
276
+ /** Specular map minification filter. */
277
+ specularMapMinFilter?: string
278
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
279
+ specularMapAnisotropy?: number
280
+ /** Specular map UV transform `[a, c, tx, b, d, ty]`. */
281
+ specularMapTransform?: Array<number>
282
+ /** Specular map color space. `"srgb"` is decoded to linear before shading. */
283
+ specularMapColorSpace?: string
284
+ /** Whether specular map sampling uses the secondary UV stream. */
285
+ specularMapUsesUv2?: boolean
128
286
  /** Metallic factor (0..1). Defaults to 0. */
129
287
  metallic?: number
130
288
  /** Roughness factor (0..1). Defaults to 1. */
131
289
  roughness?: number
290
+ /** Clearcoat intensity (0..1) for MeshPhysicalMaterial. Defaults to 0. */
291
+ clearcoat?: number
292
+ /** Optional clearcoat intensity map. Red channel multiplies `clearcoat`. */
293
+ clearcoatMap?: Buffer
294
+ /** Clearcoat map width (required when map is raw RGBA8 bytes). */
295
+ clearcoatMapWidth?: number
296
+ /** Clearcoat map height (required when map is raw RGBA8 bytes). */
297
+ clearcoatMapHeight?: number
298
+ /** Clearcoat map horizontal wrap mode. */
299
+ clearcoatMapWrapS?: string
300
+ /** Clearcoat map vertical wrap mode. */
301
+ clearcoatMapWrapT?: string
302
+ /** Clearcoat map magnification filter. */
303
+ clearcoatMapMagFilter?: string
304
+ /** Clearcoat map minification filter. */
305
+ clearcoatMapMinFilter?: string
306
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
307
+ clearcoatMapAnisotropy?: number
308
+ /** Clearcoat map UV transform `[a, c, tx, b, d, ty]`. */
309
+ clearcoatMapTransform?: Array<number>
310
+ /** Clearcoat map color space. `"srgb"` is decoded to linear before shading. */
311
+ clearcoatMapColorSpace?: string
312
+ /** Whether clearcoat map sampling uses the secondary UV stream. */
313
+ clearcoatMapUsesUv2?: boolean
314
+ /** Clearcoat roughness (0..1). Defaults to 0. */
315
+ clearcoatRoughness?: number
316
+ /** Optional clearcoat roughness map. Green channel multiplies `clearcoatRoughness`. */
317
+ clearcoatRoughnessMap?: Buffer
318
+ /** Clearcoat roughness map width (required when map is raw RGBA8 bytes). */
319
+ clearcoatRoughnessMapWidth?: number
320
+ /** Clearcoat roughness map height (required when map is raw RGBA8 bytes). */
321
+ clearcoatRoughnessMapHeight?: number
322
+ /** Clearcoat roughness map horizontal wrap mode. */
323
+ clearcoatRoughnessMapWrapS?: string
324
+ /** Clearcoat roughness map vertical wrap mode. */
325
+ clearcoatRoughnessMapWrapT?: string
326
+ /** Clearcoat roughness map magnification filter. */
327
+ clearcoatRoughnessMapMagFilter?: string
328
+ /** Clearcoat roughness map minification filter. */
329
+ clearcoatRoughnessMapMinFilter?: string
330
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
331
+ clearcoatRoughnessMapAnisotropy?: number
332
+ /** Clearcoat roughness map UV transform `[a, c, tx, b, d, ty]`. */
333
+ clearcoatRoughnessMapTransform?: Array<number>
334
+ /** Clearcoat roughness map color space. `"srgb"` is decoded to linear before shading. */
335
+ clearcoatRoughnessMapColorSpace?: string
336
+ /** Whether clearcoat roughness map sampling uses the secondary UV stream. */
337
+ clearcoatRoughnessMapUsesUv2?: boolean
338
+ /** Optional clearcoat normal map. */
339
+ clearcoatNormalMap?: Buffer
340
+ /** Clearcoat normal map width (required when map is raw RGBA8 bytes). */
341
+ clearcoatNormalMapWidth?: number
342
+ /** Clearcoat normal map height (required when map is raw RGBA8 bytes). */
343
+ clearcoatNormalMapHeight?: number
344
+ /** Clearcoat normal map horizontal wrap mode. */
345
+ clearcoatNormalMapWrapS?: string
346
+ /** Clearcoat normal map vertical wrap mode. */
347
+ clearcoatNormalMapWrapT?: string
348
+ /** Clearcoat normal map magnification filter. */
349
+ clearcoatNormalMapMagFilter?: string
350
+ /** Clearcoat normal map minification filter. */
351
+ clearcoatNormalMapMinFilter?: string
352
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
353
+ clearcoatNormalMapAnisotropy?: number
354
+ /** Clearcoat normal map UV transform `[a, c, tx, b, d, ty]`. */
355
+ clearcoatNormalMapTransform?: Array<number>
356
+ /** Clearcoat normal map color space. `"srgb"` decodes RGB channels before normal sampling. */
357
+ clearcoatNormalMapColorSpace?: string
358
+ /** Whether clearcoat normal map sampling uses the secondary UV stream. */
359
+ clearcoatNormalMapUsesUv2?: boolean
360
+ /** Clearcoat normal map scale `[x, y]`. Defaults to `[1, 1]`. */
361
+ clearcoatNormalScale?: Array<number>
362
+ /** Sheen color/intensity `[r, g, b]` in 0..1 range. */
363
+ sheenColor?: Array<number>
364
+ /** Optional sheen color map. RGB channels multiply `sheenColor`. */
365
+ sheenColorMap?: Buffer
366
+ /** Sheen color map width (required when map is raw RGBA8 bytes). */
367
+ sheenColorMapWidth?: number
368
+ /** Sheen color map height (required when map is raw RGBA8 bytes). */
369
+ sheenColorMapHeight?: number
370
+ /** Sheen color map horizontal wrap mode. */
371
+ sheenColorMapWrapS?: string
372
+ /** Sheen color map vertical wrap mode. */
373
+ sheenColorMapWrapT?: string
374
+ /** Sheen color map magnification filter. */
375
+ sheenColorMapMagFilter?: string
376
+ /** Sheen color map minification filter. */
377
+ sheenColorMapMinFilter?: string
378
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
379
+ sheenColorMapAnisotropy?: number
380
+ /** Sheen color map UV transform `[a, c, tx, b, d, ty]`. */
381
+ sheenColorMapTransform?: Array<number>
382
+ /** Sheen color texture color space. `"srgb"` is decoded to linear before shading. */
383
+ sheenColorMapColorSpace?: string
384
+ /** Whether sheen color map sampling uses the secondary UV stream. */
385
+ sheenColorMapUsesUv2?: boolean
386
+ /** Sheen roughness (0..1). Defaults to 1 when sheen is present. */
387
+ sheenRoughness?: number
388
+ /** Optional sheen roughness map. Alpha channel multiplies `sheenRoughness`. */
389
+ sheenRoughnessMap?: Buffer
390
+ /** Sheen roughness map width (required when map is raw RGBA8 bytes). */
391
+ sheenRoughnessMapWidth?: number
392
+ /** Sheen roughness map height (required when map is raw RGBA8 bytes). */
393
+ sheenRoughnessMapHeight?: number
394
+ /** Sheen roughness map horizontal wrap mode. */
395
+ sheenRoughnessMapWrapS?: string
396
+ /** Sheen roughness map vertical wrap mode. */
397
+ sheenRoughnessMapWrapT?: string
398
+ /** Sheen roughness map magnification filter. */
399
+ sheenRoughnessMapMagFilter?: string
400
+ /** Sheen roughness map minification filter. */
401
+ sheenRoughnessMapMinFilter?: string
402
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
403
+ sheenRoughnessMapAnisotropy?: number
404
+ /** Sheen roughness map UV transform `[a, c, tx, b, d, ty]`. */
405
+ sheenRoughnessMapTransform?: Array<number>
406
+ /** Sheen roughness map color space metadata. Alpha roughness sampling is unchanged. */
407
+ sheenRoughnessMapColorSpace?: string
408
+ /** Whether sheen roughness map sampling uses the secondary UV stream. */
409
+ sheenRoughnessMapUsesUv2?: boolean
410
+ /** Anisotropy strength (0..1). Defaults to 0. */
411
+ anisotropy?: number
412
+ /** Anisotropy rotation in tangent space, radians. */
413
+ anisotropyRotation?: number
414
+ /** Optional anisotropy map. RG encode direction and B encodes strength. */
415
+ anisotropyMap?: Buffer
416
+ /** Anisotropy map width (required when map is raw RGBA8 bytes). */
417
+ anisotropyMapWidth?: number
418
+ /** Anisotropy map height (required when map is raw RGBA8 bytes). */
419
+ anisotropyMapHeight?: number
420
+ /** Anisotropy map horizontal wrap mode. */
421
+ anisotropyMapWrapS?: string
422
+ /** Anisotropy map vertical wrap mode. */
423
+ anisotropyMapWrapT?: string
424
+ /** Anisotropy map magnification filter. */
425
+ anisotropyMapMagFilter?: string
426
+ /** Anisotropy map minification filter. */
427
+ anisotropyMapMinFilter?: string
428
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
429
+ anisotropyMapAnisotropy?: number
430
+ /** Anisotropy map UV transform `[a, c, tx, b, d, ty]`. */
431
+ anisotropyMapTransform?: Array<number>
432
+ /** Anisotropy map color space. `"srgb"` is decoded to linear before shading. */
433
+ anisotropyMapColorSpace?: string
434
+ /** Whether anisotropy map sampling uses the secondary UV stream. */
435
+ anisotropyMapUsesUv2?: boolean
436
+ /** MeshPhysicalMaterial iridescence factor (0..1). Defaults to 0. */
437
+ iridescence?: number
438
+ /** Optional iridescence factor map. Red channel multiplies `iridescence`. */
439
+ iridescenceMap?: Buffer
440
+ /** Iridescence factor map width (required when map is raw RGBA8 bytes). */
441
+ iridescenceMapWidth?: number
442
+ /** Iridescence factor map height (required when map is raw RGBA8 bytes). */
443
+ iridescenceMapHeight?: number
444
+ /** Iridescence factor map horizontal wrap mode. */
445
+ iridescenceMapWrapS?: string
446
+ /** Iridescence factor map vertical wrap mode. */
447
+ iridescenceMapWrapT?: string
448
+ /** Iridescence factor map magnification filter. */
449
+ iridescenceMapMagFilter?: string
450
+ /** Iridescence factor map minification filter. */
451
+ iridescenceMapMinFilter?: string
452
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
453
+ iridescenceMapAnisotropy?: number
454
+ /** Iridescence factor map UV transform `[a, c, tx, b, d, ty]`. */
455
+ iridescenceMapTransform?: Array<number>
456
+ /** Iridescence factor map color space. `"srgb"` is decoded to linear before shading. */
457
+ iridescenceMapColorSpace?: string
458
+ /** Whether iridescence factor map sampling uses the secondary UV stream. */
459
+ iridescenceMapUsesUv2?: boolean
460
+ /** Iridescence film IOR. Defaults to 1.3. */
461
+ iridescenceIor?: number
462
+ /** Iridescence film thickness range minimum in nanometers. Defaults to 100. */
463
+ iridescenceThicknessMin?: number
464
+ /** Iridescence film thickness range maximum in nanometers. Defaults to 400. */
465
+ iridescenceThicknessMax?: number
466
+ /** Optional iridescence thickness map. Green channel interpolates the configured thickness range. */
467
+ iridescenceThicknessMap?: Buffer
468
+ /** Iridescence thickness map width (required when map is raw RGBA8 bytes). */
469
+ iridescenceThicknessMapWidth?: number
470
+ /** Iridescence thickness map height (required when map is raw RGBA8 bytes). */
471
+ iridescenceThicknessMapHeight?: number
472
+ /** Iridescence thickness map horizontal wrap mode. */
473
+ iridescenceThicknessMapWrapS?: string
474
+ /** Iridescence thickness map vertical wrap mode. */
475
+ iridescenceThicknessMapWrapT?: string
476
+ /** Iridescence thickness map magnification filter. */
477
+ iridescenceThicknessMapMagFilter?: string
478
+ /** Iridescence thickness map minification filter. */
479
+ iridescenceThicknessMapMinFilter?: string
480
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
481
+ iridescenceThicknessMapAnisotropy?: number
482
+ /** Iridescence thickness map UV transform `[a, c, tx, b, d, ty]`. */
483
+ iridescenceThicknessMapTransform?: Array<number>
484
+ /** Iridescence thickness map color space. `"srgb"` is decoded to linear before shading. */
485
+ iridescenceThicknessMapColorSpace?: string
486
+ /** Whether iridescence thickness map sampling uses the secondary UV stream. */
487
+ iridescenceThicknessMapUsesUv2?: boolean
488
+ /** Physical transmission factor (0..1). Defaults to 0. */
489
+ transmission?: number
490
+ /** Optional transmission map. Red channel multiplies `transmission`. */
491
+ transmissionMap?: Buffer
492
+ /** Transmission map width (required when map is raw RGBA8 bytes). */
493
+ transmissionMapWidth?: number
494
+ /** Transmission map height (required when map is raw RGBA8 bytes). */
495
+ transmissionMapHeight?: number
496
+ /** Transmission map horizontal wrap mode. */
497
+ transmissionMapWrapS?: string
498
+ /** Transmission map vertical wrap mode. */
499
+ transmissionMapWrapT?: string
500
+ /** Transmission map magnification filter. */
501
+ transmissionMapMagFilter?: string
502
+ /** Transmission map minification filter. */
503
+ transmissionMapMinFilter?: string
504
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
505
+ transmissionMapAnisotropy?: number
506
+ /** Transmission map UV transform `[a, c, tx, b, d, ty]`. */
507
+ transmissionMapTransform?: Array<number>
508
+ /** Transmission map color space. `"srgb"` is decoded to linear before shading. */
509
+ transmissionMapColorSpace?: string
510
+ /** Whether transmission map sampling uses the secondary UV stream. */
511
+ transmissionMapUsesUv2?: boolean
512
+ /** MeshPhysicalMaterial dispersion factor. Defaults to 0. */
513
+ dispersion?: number
514
+ /** Index of refraction for physical materials. Defaults to 1.5. */
515
+ ior?: number
516
+ /** Transmission volume thickness in model units. Defaults to 0. */
517
+ thickness?: number
518
+ /** Optional thickness map. Green channel multiplies `thickness`. */
519
+ thicknessMap?: Buffer
520
+ /** Thickness map width (required when map is raw RGBA8 bytes). */
521
+ thicknessMapWidth?: number
522
+ /** Thickness map height (required when map is raw RGBA8 bytes). */
523
+ thicknessMapHeight?: number
524
+ /** Thickness map horizontal wrap mode. */
525
+ thicknessMapWrapS?: string
526
+ /** Thickness map vertical wrap mode. */
527
+ thicknessMapWrapT?: string
528
+ /** Thickness map magnification filter. */
529
+ thicknessMapMagFilter?: string
530
+ /** Thickness map minification filter. */
531
+ thicknessMapMinFilter?: string
532
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
533
+ thicknessMapAnisotropy?: number
534
+ /** Thickness map UV transform `[a, c, tx, b, d, ty]`. */
535
+ thicknessMapTransform?: Array<number>
536
+ /** Thickness map color space. `"srgb"` is decoded to linear before shading. */
537
+ thicknessMapColorSpace?: string
538
+ /** Whether thickness map sampling uses the secondary UV stream. */
539
+ thicknessMapUsesUv2?: boolean
540
+ /** Transmission attenuation distance. Defaults to a very large distance. */
541
+ attenuationDistance?: number
542
+ /** Transmission attenuation color `[r, g, b]` in 0..1 range. */
543
+ attenuationColor?: Array<number>
544
+ /** MeshPhysicalMaterial specular color factor `[r, g, b]` in 0..1 range. */
545
+ physicalSpecularColor?: Array<number>
546
+ /** MeshPhysicalMaterial specular intensity factor (0..1). Defaults to 1. */
547
+ physicalSpecularIntensity?: number
548
+ /** Optional MeshPhysicalMaterial specular color map. RGB channels multiply `specularColor`. */
549
+ specularColorMap?: Buffer
550
+ /** Specular color map width (required when map is raw RGBA8 bytes). */
551
+ specularColorMapWidth?: number
552
+ /** Specular color map height (required when map is raw RGBA8 bytes). */
553
+ specularColorMapHeight?: number
554
+ /** Specular color map horizontal wrap mode. */
555
+ specularColorMapWrapS?: string
556
+ /** Specular color map vertical wrap mode. */
557
+ specularColorMapWrapT?: string
558
+ /** Specular color map magnification filter. */
559
+ specularColorMapMagFilter?: string
560
+ /** Specular color map minification filter. */
561
+ specularColorMapMinFilter?: string
562
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
563
+ specularColorMapAnisotropy?: number
564
+ /** Specular color map UV transform `[a, c, tx, b, d, ty]`. */
565
+ specularColorMapTransform?: Array<number>
566
+ /** Specular color texture color space. `"srgb"` is decoded to linear before shading. */
567
+ specularColorMapColorSpace?: string
568
+ /** Whether specular color map sampling uses the secondary UV stream. */
569
+ specularColorMapUsesUv2?: boolean
570
+ /** Optional MeshPhysicalMaterial specular intensity map. Alpha channel multiplies `specularIntensity`. */
571
+ specularIntensityMap?: Buffer
572
+ /** Specular intensity map width (required when map is raw RGBA8 bytes). */
573
+ specularIntensityMapWidth?: number
574
+ /** Specular intensity map height (required when map is raw RGBA8 bytes). */
575
+ specularIntensityMapHeight?: number
576
+ /** Specular intensity map horizontal wrap mode. */
577
+ specularIntensityMapWrapS?: string
578
+ /** Specular intensity map vertical wrap mode. */
579
+ specularIntensityMapWrapT?: string
580
+ /** Specular intensity map magnification filter. */
581
+ specularIntensityMapMagFilter?: string
582
+ /** Specular intensity map minification filter. */
583
+ specularIntensityMapMinFilter?: string
584
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
585
+ specularIntensityMapAnisotropy?: number
586
+ /** Specular intensity map UV transform `[a, c, tx, b, d, ty]`. */
587
+ specularIntensityMapTransform?: Array<number>
588
+ /** Specular intensity map color space metadata. Alpha intensity sampling is unchanged. */
589
+ specularIntensityMapColorSpace?: string
590
+ /** Whether specular intensity map sampling uses the secondary UV stream. */
591
+ specularIntensityMapUsesUv2?: boolean
592
+ /** MeshPhongMaterial specular color `[r, g, b]` in 0..1 range. */
593
+ specularColor?: Array<number>
594
+ /** MeshPhongMaterial shininess. Defaults to 30. */
595
+ shininess?: number
132
596
  /** Emissive color `[r, g, b]` in 0..1 range. */
133
597
  emissive?: Array<number>
134
598
  /** Emissive intensity multiplier. Defaults to 1. */
@@ -139,14 +603,149 @@ export interface SceneMesh {
139
603
  normalMapWidth?: number
140
604
  /** Normal map height in pixels (required when `normal_map` is raw RGBA8 bytes). */
141
605
  normalMapHeight?: number
606
+ /** Normal map horizontal wrap mode. */
607
+ normalMapWrapS?: string
608
+ /** Normal map vertical wrap mode. */
609
+ normalMapWrapT?: string
610
+ /** Normal map magnification filter. */
611
+ normalMapMagFilter?: string
612
+ /** Normal map minification filter. */
613
+ normalMapMinFilter?: string
614
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
615
+ normalMapAnisotropy?: number
616
+ /** Normal map UV transform `[a, c, tx, b, d, ty]`. */
617
+ normalMapTransform?: Array<number>
618
+ /** Normal map color space. `"srgb"` decodes RGB channels before normal sampling. */
619
+ normalMapColorSpace?: string
620
+ /** Whether normal map sampling uses the secondary UV stream. */
621
+ normalMapUsesUv2?: boolean
622
+ /** Normal map space: "tangent" (default) or "object". */
623
+ normalMapType?: string
142
624
  /** Normal map scale `[x, y]`. Defaults to `[1, 1]`. */
143
625
  normalScale?: Array<number>
626
+ /** Optional bump map image data. Red channel is used as height. */
627
+ bumpMap?: Buffer
628
+ /** Bump map width (required when `bump_map` is raw RGBA8 bytes). */
629
+ bumpMapWidth?: number
630
+ /** Bump map height (required when `bump_map` is raw RGBA8 bytes). */
631
+ bumpMapHeight?: number
632
+ /** Bump map horizontal wrap mode. */
633
+ bumpMapWrapS?: string
634
+ /** Bump map vertical wrap mode. */
635
+ bumpMapWrapT?: string
636
+ /** Bump map magnification filter. */
637
+ bumpMapMagFilter?: string
638
+ /** Bump map minification filter. */
639
+ bumpMapMinFilter?: string
640
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
641
+ bumpMapAnisotropy?: number
642
+ /** Bump map UV transform `[a, c, tx, b, d, ty]`. */
643
+ bumpMapTransform?: Array<number>
644
+ /** Bump map color space. `"srgb"` decodes RGB channels before bump sampling. */
645
+ bumpMapColorSpace?: string
646
+ /** Whether bump map sampling uses the secondary UV stream. */
647
+ bumpMapUsesUv2?: boolean
648
+ /** Bump map scale. Defaults to 1. */
649
+ bumpScale?: number
650
+ /** Optional MeshMatcapMaterial color map image data. */
651
+ matcapMap?: Buffer
652
+ /** Matcap color map width (required when `matcap_map` is raw RGBA8 bytes). */
653
+ matcapMapWidth?: number
654
+ /** Matcap color map height (required when `matcap_map` is raw RGBA8 bytes). */
655
+ matcapMapHeight?: number
656
+ /** Matcap color map horizontal wrap mode. */
657
+ matcapMapWrapS?: string
658
+ /** Matcap color map vertical wrap mode. */
659
+ matcapMapWrapT?: string
660
+ /** Matcap color map magnification filter. */
661
+ matcapMapMagFilter?: string
662
+ /** Matcap color map minification filter. */
663
+ matcapMapMinFilter?: string
664
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
665
+ matcapMapAnisotropy?: number
666
+ /** Matcap color map UV transform `[a, c, tx, b, d, ty]`. */
667
+ matcapMapTransform?: Array<number>
668
+ /** Matcap color map color space: `"srgb"` or `"linear"`. */
669
+ matcapMapColorSpace?: string
670
+ /** Whether matcap color map sampling uses the secondary UV stream. */
671
+ matcapMapUsesUv2?: boolean
672
+ /** MeshDepthMaterial packing mode. Uses Three.js constants: 3200 basic, 3201 RGBA, 3202 RGB, 3203 RG. */
673
+ depthPacking?: number
674
+ /** Optional MeshDistanceMaterial world-space reference position. Defaults to camera position. */
675
+ distanceReferencePosition?: Array<number>
676
+ /** Optional MeshDistanceMaterial near distance. Defaults to camera near plane. */
677
+ distanceNear?: number
678
+ /** Optional MeshDistanceMaterial far distance. Defaults to camera far plane. */
679
+ distanceFar?: number
680
+ /** Optional MeshToonMaterial gradient ramp map. Red channel controls diffuse ramp strength. */
681
+ gradientMap?: Buffer
682
+ /** Gradient map width (required when `gradient_map` is raw RGBA8 bytes). */
683
+ gradientMapWidth?: number
684
+ /** Gradient map height (required when `gradient_map` is raw RGBA8 bytes). */
685
+ gradientMapHeight?: number
686
+ /** Gradient map horizontal wrap mode. */
687
+ gradientMapWrapS?: string
688
+ /** Gradient map vertical wrap mode. */
689
+ gradientMapWrapT?: string
690
+ /** Gradient map magnification filter. */
691
+ gradientMapMagFilter?: string
692
+ /** Gradient map minification filter. */
693
+ gradientMapMinFilter?: string
694
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
695
+ gradientMapAnisotropy?: number
696
+ /** Gradient map color space: `"srgb"` or `"linear"`. */
697
+ gradientMapColorSpace?: string
698
+ /**
699
+ * Optional displacement map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
700
+ * Red channel displaces vertices along their object-space normals.
701
+ */
702
+ displacementMap?: Buffer
703
+ /** Displacement map width in pixels (required when `displacement_map` is raw RGBA8 bytes). */
704
+ displacementMapWidth?: number
705
+ /** Displacement map height in pixels (required when `displacement_map` is raw RGBA8 bytes). */
706
+ displacementMapHeight?: number
707
+ /** Displacement map horizontal wrap mode. */
708
+ displacementMapWrapS?: string
709
+ /** Displacement map vertical wrap mode. */
710
+ displacementMapWrapT?: string
711
+ /** Displacement map magnification filter. */
712
+ displacementMapMagFilter?: string
713
+ /** Displacement map minification filter. */
714
+ displacementMapMinFilter?: string
715
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
716
+ displacementMapAnisotropy?: number
717
+ /** Displacement map UV transform `[a, c, tx, b, d, ty]`. */
718
+ displacementMapTransform?: Array<number>
719
+ /** Displacement map color space. `"srgb"` decodes the red channel before displacement. */
720
+ displacementMapColorSpace?: string
721
+ /** Whether displacement map sampling uses the secondary UV stream. */
722
+ displacementMapUsesUv2?: boolean
723
+ /** Displacement scale multiplier. Defaults to 1. */
724
+ displacementScale?: number
725
+ /** Displacement bias added after map sampling. Defaults to 0. */
726
+ displacementBias?: number
144
727
  /** Optional emissive map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP). */
145
728
  emissiveMap?: Buffer
146
729
  /** Emissive map width in pixels (required when `emissive_map` is raw RGBA8 bytes). */
147
730
  emissiveMapWidth?: number
148
731
  /** Emissive map height in pixels (required when `emissive_map` is raw RGBA8 bytes). */
149
732
  emissiveMapHeight?: number
733
+ /** Emissive map horizontal wrap mode. */
734
+ emissiveMapWrapS?: string
735
+ /** Emissive map vertical wrap mode. */
736
+ emissiveMapWrapT?: string
737
+ /** Emissive map magnification filter. */
738
+ emissiveMapMagFilter?: string
739
+ /** Emissive map minification filter. */
740
+ emissiveMapMinFilter?: string
741
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
742
+ emissiveMapAnisotropy?: number
743
+ /** Emissive map UV transform `[a, c, tx, b, d, ty]`. */
744
+ emissiveMapTransform?: Array<number>
745
+ /** Emissive texture color space. `"srgb"` is decoded to linear before shading. */
746
+ emissiveMapColorSpace?: string
747
+ /** Whether emissive map sampling uses the secondary UV stream. */
748
+ emissiveMapUsesUv2?: boolean
150
749
  /**
151
750
  * Optional ambient occlusion map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
152
751
  * Red channel is used as the occlusion factor (Three.js / glTF convention).
@@ -156,23 +755,182 @@ export interface SceneMesh {
156
755
  aoMapWidth?: number
157
756
  /** AO map height in pixels (required when `ao_map` is raw RGBA8 bytes). */
158
757
  aoMapHeight?: number
758
+ /** AO map horizontal wrap mode. */
759
+ aoMapWrapS?: string
760
+ /** AO map vertical wrap mode. */
761
+ aoMapWrapT?: string
762
+ /** AO map magnification filter. */
763
+ aoMapMagFilter?: string
764
+ /** AO map minification filter. */
765
+ aoMapMinFilter?: string
766
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
767
+ aoMapAnisotropy?: number
768
+ /** AO map UV transform `[a, c, tx, b, d, ty]`. */
769
+ aoMapTransform?: Array<number>
770
+ /** AO map color space. `"srgb"` decodes the red channel to linear before shading. */
771
+ aoMapColorSpace?: string
772
+ /** Whether AO map sampling uses the secondary UV stream. */
773
+ aoMapUsesUv2?: boolean
159
774
  /** AO map intensity multiplier (0..1). Defaults to 1. */
160
775
  aoMapIntensity?: number
776
+ /**
777
+ * Optional light map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
778
+ * RGB channels add baked indirect diffuse lighting.
779
+ */
780
+ lightMap?: Buffer
781
+ /** Light map width in pixels (required when `light_map` is raw RGBA8 bytes). */
782
+ lightMapWidth?: number
783
+ /** Light map height in pixels (required when `light_map` is raw RGBA8 bytes). */
784
+ lightMapHeight?: number
785
+ /** Light map horizontal wrap mode. */
786
+ lightMapWrapS?: string
787
+ /** Light map vertical wrap mode. */
788
+ lightMapWrapT?: string
789
+ /** Light map magnification filter. */
790
+ lightMapMagFilter?: string
791
+ /** Light map minification filter. */
792
+ lightMapMinFilter?: string
793
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
794
+ lightMapAnisotropy?: number
795
+ /** Light map UV transform `[a, c, tx, b, d, ty]`. */
796
+ lightMapTransform?: Array<number>
797
+ /** Light-map texture color space. `"srgb"` is decoded to linear before shading. */
798
+ lightMapColorSpace?: string
799
+ /** Whether light-map sampling uses the secondary UV stream. */
800
+ lightMapUsesUv2?: boolean
801
+ /** Light map intensity multiplier. Defaults to 1. */
802
+ lightMapIntensity?: number
803
+ /**
804
+ * Optional alpha map image data (raw RGBA8 bytes or encoded PNG/JPEG/WebP).
805
+ * Green channel multiplies material opacity, matching Three.js.
806
+ */
807
+ alphaMap?: Buffer
808
+ /** Alpha map width in pixels (required when `alpha_map` is raw RGBA8 bytes). */
809
+ alphaMapWidth?: number
810
+ /** Alpha map height in pixels (required when `alpha_map` is raw RGBA8 bytes). */
811
+ alphaMapHeight?: number
812
+ /** Alpha map horizontal wrap mode. */
813
+ alphaMapWrapS?: string
814
+ /** Alpha map vertical wrap mode. */
815
+ alphaMapWrapT?: string
816
+ /** Alpha map magnification filter. */
817
+ alphaMapMagFilter?: string
818
+ /** Alpha map minification filter. */
819
+ alphaMapMinFilter?: string
820
+ /** Texture anisotropy clamp requested for this sampler. Defaults to 1. */
821
+ alphaMapAnisotropy?: number
822
+ /** Alpha map UV transform `[a, c, tx, b, d, ty]`. */
823
+ alphaMapTransform?: Array<number>
824
+ /** Alpha map color space. `"srgb"` decodes the green channel to linear before opacity. */
825
+ alphaMapColorSpace?: string
826
+ /** Whether alpha map sampling uses the secondary UV stream. */
827
+ alphaMapUsesUv2?: boolean
161
828
  /** Alpha test cutoff threshold (0..1). Fragments with alpha below this are discarded. */
162
829
  alphaTest?: number
830
+ /** Whether to apply stochastic alpha hashing before depth/color writes. */
831
+ alphaHash?: boolean
832
+ /** Whether to enable MSAA alpha-to-coverage when the render sample count is greater than 1. */
833
+ alphaToCoverage?: boolean
834
+ /** Whether fragment RGB output is multiplied by output alpha before blending. */
835
+ premultipliedAlpha?: boolean
836
+ /** Whether material output is tone mapped before output color-space conversion. Defaults to true. */
837
+ toneMapped?: boolean
838
+ /**
839
+ * Flattened world-space clipping planes `[nx, ny, nz, constant, ...]`, up to 8 planes.
840
+ * Fragments with `dot(normal, worldPosition) + constant < 0` are clipped.
841
+ */
842
+ clippingPlanes?: Array<number>
843
+ /**
844
+ * Number of leading clipping planes evaluated as union planes. Remaining planes use
845
+ * intersection semantics. Defaults to all planes as union planes.
846
+ */
847
+ clippingUnionCount?: number
848
+ /** Whether clipping planes affect this mesh in the shadow pass. */
849
+ clipShadows?: boolean
163
850
  /** Whether the mesh is transparent (sorted back-to-front, no depth write). */
164
851
  transparent?: boolean
852
+ /** Material blending mode: `"none"`, `"normal"`, `"additive"`, `"subtractive"`, `"multiply"`, or `"custom"`. */
853
+ blending?: string
854
+ /** Custom blending equation constants when `blending` is `"custom"`. */
855
+ blendEquation?: number
856
+ blendSrc?: number
857
+ blendDst?: number
858
+ blendEquationAlpha?: number
859
+ blendSrcAlpha?: number
860
+ blendDstAlpha?: number
861
+ /** Custom blend constant color `[r, g, b]`. */
862
+ blendColor?: Array<number>
863
+ /** Custom blend constant alpha. */
864
+ blendAlpha?: number
865
+ /** Whether depth testing is enabled. Defaults to true. */
866
+ depthTest?: boolean
867
+ /** Depth comparison function. Defaults to `"less-equal"`. */
868
+ depthFunc?: string
869
+ /** Whether passing fragments write depth. Defaults to true for opaque meshes and false for transparent meshes. */
870
+ depthWrite?: boolean
871
+ /** Whether fragments write color. Defaults to true. */
872
+ colorWrite?: boolean
873
+ /** Whether to apply material polygon offset as depth bias in the main pass. */
874
+ polygonOffset?: boolean
875
+ /** Slope-scaled polygon offset factor. */
876
+ polygonOffsetFactor?: number
877
+ /** Constant polygon offset units. */
878
+ polygonOffsetUnits?: number
879
+ /** Whether stencil testing/writes are enabled for this material. */
880
+ stencilWrite?: boolean
881
+ /** Stencil write bit mask. Defaults to 0xff. */
882
+ stencilWriteMask?: number
883
+ /** Stencil comparison function constant. Defaults to AlwaysStencilFunc. */
884
+ stencilFunc?: number
885
+ /** Stencil reference value. Defaults to 0. */
886
+ stencilRef?: number
887
+ /** Stencil comparison bit mask. Defaults to 0xff. */
888
+ stencilFuncMask?: number
889
+ /** Operation when the stencil test fails. Defaults to KeepStencilOp. */
890
+ stencilFail?: number
891
+ /** Operation when the stencil test passes but depth fails. Defaults to KeepStencilOp. */
892
+ stencilZFail?: number
893
+ /** Operation when both stencil and depth pass. Defaults to KeepStencilOp. */
894
+ stencilZPass?: number
165
895
  /** Which faces to render: `"front"` (default), `"back"`, or `"double"`. */
166
896
  side?: string
897
+ /** Optional shadow-pass face filter: `"front"`, `"back"`, or `"double"`. Unset preserves no-cull shadow casters. */
898
+ shadowSide?: string
167
899
  /**
168
900
  * Shading model: `"standard"` (default PBR), `"basic"` (unlit / MeshBasicMaterial),
169
901
  * or `"lambert"` (diffuse-only / MeshLambertMaterial).
170
902
  */
171
903
  shadingModel?: string
904
+ /** Whether this mesh samples the scene/material environment map when one exists. */
905
+ useEnvironmentMap?: boolean
906
+ /** Per-mesh environment intensity. Defaults to the scene environment intensity. */
907
+ environmentMapIntensity?: number
908
+ /** Legacy environment blend operation: 0=multiply, 1=mix, 2=add. */
909
+ environmentMapCombine?: number
910
+ /** Legacy material environment reflectivity multiplier. */
911
+ environmentMapReflectivity?: number
912
+ /** Whether the material environment map uses refraction instead of reflection. */
913
+ environmentMapRefraction?: boolean
914
+ /** Legacy material environment refraction ratio. */
915
+ environmentMapRefractionRatio?: number
172
916
  /** Primitive topology: `"triangles"` (default), `"lines"` (LineList), or `"points"`. */
173
917
  topology?: string
918
+ /** WGSL fragment shader body for the custom material path. */
919
+ customFragmentShader?: string
174
920
  /** Whether this mesh casts shadows in the shadow pass. Defaults to false. */
175
921
  castShadow?: boolean
176
922
  /** Whether this mesh receives shadows in the main pass. Defaults to false. */
177
923
  receiveShadow?: boolean
924
+ /** Three.js groupOrder inherited from the nearest Group.renderOrder. Defaults to 0. */
925
+ groupOrder?: number
926
+ /** Explicit Three.js object renderOrder. Defaults to 0. */
927
+ renderOrder?: number
928
+ /** Projected camera-space sort key provided by the Three.js adapter. */
929
+ sortZ?: number
930
+ /** Stable object id / adapter insertion-order tie-breaker. */
931
+ sortIndex?: number
932
+ /** WebGLRenderer material variant sort key: skinned meshes add 1, instanced meshes add 2. */
933
+ materialVariant?: number
934
+ /** Material id sort key used for opaque draw ordering. */
935
+ materialSortKey?: number
178
936
  }