@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.
- package/dist/gpu-dispose-D66GqIWS.cjs +514 -0
- package/dist/gpu-dispose-D66GqIWS.cjs.map +1 -0
- package/dist/gpu-dispose-Di_nxeXF.js +382 -0
- package/dist/gpu-dispose-Di_nxeXF.js.map +1 -0
- package/dist/gpu-ownership-ADRZBxxs.cjs +102 -0
- package/dist/gpu-ownership-ADRZBxxs.cjs.map +1 -0
- package/dist/gpu-ownership-Bs9l7hrU.js +40 -0
- package/dist/gpu-ownership-Bs9l7hrU.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/merged-draw-CO4rr2Co.js +129 -0
- package/dist/merged-draw-CO4rr2Co.js.map +1 -0
- package/dist/merged-draw-ma_2r4N8.cjs +171 -0
- package/dist/merged-draw-ma_2r4N8.cjs.map +1 -0
- package/dist/parse.cjs +3036 -11
- package/dist/parse.cjs.map +1 -1
- package/dist/parse.d.cts +22 -3
- package/dist/parse.d.ts +22 -3
- package/dist/parse.js +3027 -11
- package/dist/parse.js.map +1 -1
- package/dist/render.cjs +4333 -6
- package/dist/render.cjs.map +1 -1
- package/dist/render.d.cts +43 -9
- package/dist/render.d.ts +43 -9
- package/dist/render.js +4312 -6
- package/dist/render.js.map +1 -1
- package/dist/scene.cjs +343 -1
- package/dist/scene.cjs.map +1 -1
- package/dist/scene.js +336 -1
- package/dist/scene.js.map +1 -1
- package/dist/{types-P5PyfYYE.d.ts → types-DW_qU4-Y.d.cts} +22 -3
- package/dist/{types-P5PyfYYE.d.cts → types-DW_qU4-Y.d.ts} +22 -3
- package/package.json +14 -8
- package/dist/gpu-dispose-Cestx__L.cjs +0 -2
- package/dist/gpu-dispose-Cestx__L.cjs.map +0 -1
- package/dist/gpu-dispose-gTGxGTL4.js +0 -2
- package/dist/gpu-dispose-gTGxGTL4.js.map +0 -1
- package/dist/gpu-ownership-DcHWbATk.js +0 -2
- package/dist/gpu-ownership-DcHWbATk.js.map +0 -1
- package/dist/gpu-ownership-ilj3JEdn.cjs +0 -2
- package/dist/gpu-ownership-ilj3JEdn.cjs.map +0 -1
- package/dist/merged-draw-DXJK-rdo.js +0 -2
- package/dist/merged-draw-DXJK-rdo.js.map +0 -1
- package/dist/merged-draw-oKAKlXCQ.cjs +0 -2
- package/dist/merged-draw-oKAKlXCQ.cjs.map +0 -1
package/dist/parse.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
/**
|
|
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 {
|
|
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
|
-
/**
|
|
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
|