@selvajs/visualization 1.6.0-beta.8 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/gpu-dispose-D66GqIWS.cjs +514 -0
  2. package/dist/gpu-dispose-D66GqIWS.cjs.map +1 -0
  3. package/dist/gpu-dispose-Di_nxeXF.js +382 -0
  4. package/dist/gpu-dispose-Di_nxeXF.js.map +1 -0
  5. package/dist/gpu-ownership-ADRZBxxs.cjs +102 -0
  6. package/dist/gpu-ownership-ADRZBxxs.cjs.map +1 -0
  7. package/dist/gpu-ownership-Bs9l7hrU.js +40 -0
  8. package/dist/gpu-ownership-Bs9l7hrU.js.map +1 -0
  9. package/dist/index.js +1 -1
  10. package/dist/merged-draw-CO4rr2Co.js +129 -0
  11. package/dist/merged-draw-CO4rr2Co.js.map +1 -0
  12. package/dist/merged-draw-ma_2r4N8.cjs +171 -0
  13. package/dist/merged-draw-ma_2r4N8.cjs.map +1 -0
  14. package/dist/parse.cjs +3036 -11
  15. package/dist/parse.cjs.map +1 -1
  16. package/dist/parse.d.cts +22 -3
  17. package/dist/parse.d.ts +22 -3
  18. package/dist/parse.js +3027 -11
  19. package/dist/parse.js.map +1 -1
  20. package/dist/render.cjs +4333 -6
  21. package/dist/render.cjs.map +1 -1
  22. package/dist/render.d.cts +43 -9
  23. package/dist/render.d.ts +43 -9
  24. package/dist/render.js +4312 -6
  25. package/dist/render.js.map +1 -1
  26. package/dist/scene.cjs +343 -1
  27. package/dist/scene.cjs.map +1 -1
  28. package/dist/scene.js +336 -1
  29. package/dist/scene.js.map +1 -1
  30. package/dist/{types-P5PyfYYE.d.ts → types-DW_qU4-Y.d.cts} +22 -3
  31. package/dist/{types-P5PyfYYE.d.cts → types-DW_qU4-Y.d.ts} +22 -3
  32. package/package.json +14 -8
  33. package/dist/gpu-dispose-Cestx__L.cjs +0 -2
  34. package/dist/gpu-dispose-Cestx__L.cjs.map +0 -1
  35. package/dist/gpu-dispose-gTGxGTL4.js +0 -2
  36. package/dist/gpu-dispose-gTGxGTL4.js.map +0 -1
  37. package/dist/gpu-ownership-DcHWbATk.js +0 -2
  38. package/dist/gpu-ownership-DcHWbATk.js.map +0 -1
  39. package/dist/gpu-ownership-ilj3JEdn.cjs +0 -2
  40. package/dist/gpu-ownership-ilj3JEdn.cjs.map +0 -1
  41. package/dist/merged-draw-DXJK-rdo.js +0 -2
  42. package/dist/merged-draw-DXJK-rdo.js.map +0 -1
  43. package/dist/merged-draw-oKAKlXCQ.cjs +0 -2
  44. package/dist/merged-draw-oKAKlXCQ.cjs.map +0 -1
package/dist/parse.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as MaterialAppearanceOptions } from "./types-P5PyfYYE.cjs";
1
+ import { o as MaterialAppearanceOptions } from "./types-DW_qU4-Y.cjs";
2
2
  import * as THREE from "three";
3
3
  /** Structurally, not nominally, typed as `@selvajs/solve/client`'s `MeshPolicy<THREE.Object3D>` — avoids a dependency on solve. */
4
4
  export declare const meshPolicy: {
@@ -83,6 +83,12 @@ interface SerializableMaterial {
83
83
  normalMap?: string;
84
84
  /** Wins over the look's `envMapIntensity` (except in looks that override materials). */
85
85
  envMapIntensity?: number;
86
+ /** Hex colour the surface emits. Omitted: no emission. */
87
+ emissive?: string;
88
+ /** Omitted: 1. Above 1 it blooms in looks with bloom. */
89
+ emissiveIntensity?: number;
90
+ /** Light the surface casts in the night look, in candela-scaled units. Omitted: scaled to the model. */
91
+ emissiveLight?: number;
86
92
  /** Omitted: no coat. */
87
93
  clearcoat?: number;
88
94
  clearcoatRoughness?: number;
@@ -98,13 +104,26 @@ interface SerializableMaterial {
98
104
  * when the writer sent UVs in mm. Omitted: maps stretch once over the UVs.
99
105
  */
100
106
  mapSize?: number;
101
- /** Procedural scratch fibres along the grain, from UVs in mm. */
102
- finish?: 'brushed' | 'rolled';
107
+ /** A procedural surface drawn from UVs in mm: grain on metal, a whole material, or `molded` plastic grain. */
108
+ finish?: 'brushed' | 'rolled' | 'wood' | 'oak' | 'maple' | 'wenge' | 'walnut' | 'concrete' | 'plaster' | 'brick' | 'corten' | 'molded' | 'limestone' | 'travertine' | 'granite' | 'marble' | 'slate' | 'terrazzo' | 'paving' | 'setts' | 'gravel';
103
109
  /** Scales the finish's streaks; 0 draws none. Omitted: 1. */
104
110
  finishStrength?: number;
105
111
  /** Light passing through (glass); unlike `opacity` it keeps reflections. */
106
112
  transmission?: number;
107
113
  ior?: number;
114
+ /**
115
+ * Glass body depth, in model units. Above 0 the glass refracts and tints, at the cost of drawing
116
+ * the scene twice a frame. Omitted: a thin pane.
117
+ */
118
+ thickness?: number;
119
+ /** Hex colour light takes on after crossing `thickness` of glass. Omitted: clear. */
120
+ attenuationColor?: string;
121
+ /** 0 to 1. The soft glow at grazing angles of rubber, soft-touch plastic and cloth. Omitted: none. */
122
+ sheen?: number;
123
+ /** Hex colour of the sheen. Omitted: white. */
124
+ sheenColor?: string;
125
+ /** 0 to 1. Omitted: 0.5. */
126
+ sheenRoughness?: number;
108
127
  }
109
128
  /**
110
129
  * `vertexStart`/`vertexCount` and `indexStart`/`indexCount` are in **element units** of the
package/dist/parse.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as MaterialAppearanceOptions } from "./types-P5PyfYYE.js";
1
+ import { o as MaterialAppearanceOptions } from "./types-DW_qU4-Y.js";
2
2
  import * as THREE from "three";
3
3
  /** Structurally, not nominally, typed as `@selvajs/solve/client`'s `MeshPolicy<THREE.Object3D>` — avoids a dependency on solve. */
4
4
  export declare const meshPolicy: {
@@ -83,6 +83,12 @@ interface SerializableMaterial {
83
83
  normalMap?: string;
84
84
  /** Wins over the look's `envMapIntensity` (except in looks that override materials). */
85
85
  envMapIntensity?: number;
86
+ /** Hex colour the surface emits. Omitted: no emission. */
87
+ emissive?: string;
88
+ /** Omitted: 1. Above 1 it blooms in looks with bloom. */
89
+ emissiveIntensity?: number;
90
+ /** Light the surface casts in the night look, in candela-scaled units. Omitted: scaled to the model. */
91
+ emissiveLight?: number;
86
92
  /** Omitted: no coat. */
87
93
  clearcoat?: number;
88
94
  clearcoatRoughness?: number;
@@ -98,13 +104,26 @@ interface SerializableMaterial {
98
104
  * when the writer sent UVs in mm. Omitted: maps stretch once over the UVs.
99
105
  */
100
106
  mapSize?: number;
101
- /** Procedural scratch fibres along the grain, from UVs in mm. */
102
- finish?: 'brushed' | 'rolled';
107
+ /** A procedural surface drawn from UVs in mm: grain on metal, a whole material, or `molded` plastic grain. */
108
+ finish?: 'brushed' | 'rolled' | 'wood' | 'oak' | 'maple' | 'wenge' | 'walnut' | 'concrete' | 'plaster' | 'brick' | 'corten' | 'molded' | 'limestone' | 'travertine' | 'granite' | 'marble' | 'slate' | 'terrazzo' | 'paving' | 'setts' | 'gravel';
103
109
  /** Scales the finish's streaks; 0 draws none. Omitted: 1. */
104
110
  finishStrength?: number;
105
111
  /** Light passing through (glass); unlike `opacity` it keeps reflections. */
106
112
  transmission?: number;
107
113
  ior?: number;
114
+ /**
115
+ * Glass body depth, in model units. Above 0 the glass refracts and tints, at the cost of drawing
116
+ * the scene twice a frame. Omitted: a thin pane.
117
+ */
118
+ thickness?: number;
119
+ /** Hex colour light takes on after crossing `thickness` of glass. Omitted: clear. */
120
+ attenuationColor?: string;
121
+ /** 0 to 1. The soft glow at grazing angles of rubber, soft-touch plastic and cloth. Omitted: none. */
122
+ sheen?: number;
123
+ /** Hex colour of the sheen. Omitted: white. */
124
+ sheenColor?: string;
125
+ /** 0 to 1. Omitted: 0.5. */
126
+ sheenRoughness?: number;
108
127
  }
109
128
  /**
110
129
  * `vertexStart`/`vertexCount` and `indexStart`/`indexCount` are in **element units** of the