@3driseai/3drise-viewer 0.1.35 → 0.1.38

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.
@@ -19,7 +19,7 @@ export type { SkyLiveHandle } from './useSkyLive';
19
19
  export { SKY_LIVE_KEY, useSkyLive } from './useSkyLive';
20
20
  export { useOceanMaterial } from './useOceanMaterial';
21
21
  export type { ConfigLiveHandle, ConfigLiveValue, ConfigLiveFamily } from './useConfigLive';
22
- export { CONFIG_LIVE_KEY, useConfigLive, useConfigLiveHandle } from './useConfigLive';
22
+ export { CONFIG_LIVE_KEY, findConfigHandles, useConfigLive, useConfigLiveHandle } from './useConfigLive';
23
23
  export type { ConfigDriverOptions } from './useConfigDriver';
24
24
  export { useConfigDriver } from './useConfigDriver';
25
25
  export type { UseOceanMaterialOptions, OceanMaterialHandle } from './useOceanMaterial';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,g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CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -13,7 +13,7 @@ export { useClipmap } from './useClipmap.js';
13
13
  export { OCEAN_LIVE_KEY, useOceanLive } from './useOceanLive.js';
14
14
  export { SKY_LIVE_KEY, useSkyLive } from './useSkyLive.js';
15
15
  export { useOceanMaterial } from './useOceanMaterial.js';
16
- export { CONFIG_LIVE_KEY, useConfigLive, useConfigLiveHandle } from './useConfigLive.js';
16
+ export { CONFIG_LIVE_KEY, findConfigHandles, useConfigLive, useConfigLiveHandle } from './useConfigLive.js';
17
17
  export { useConfigDriver } from './useConfigDriver.js';
18
18
  export { useContinuousEffects } from './useContinuousEffects.js';
19
19
  export { useCubeCamera } from './useCubeCamera.js';
@@ -38,6 +38,12 @@ export interface ConfigLiveHandle {
38
38
  alive: boolean;
39
39
  set(key: string, value: ConfigLiveValue): void;
40
40
  }
41
+ /**
42
+ * Every live handle of the object with this id. An object in a layout renders one copy per
43
+ * slot, each registering its own handle under the same id — a live value goes to all of them,
44
+ * so the whole layout follows (the committed config already reaches every slot).
45
+ */
46
+ export declare function findConfigHandles(id: string): ConfigLiveHandle[];
41
47
  /** Client side: a stable `set(key, value)` for the generative object with this id. */
42
48
  export declare function useConfigLive(id?: string | null): {
43
49
  set(key: string, value: ConfigLiveValue): void;
@@ -1 +1 @@
1
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C,EACnC,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,KAAK,IAAI,GAC5D,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CA8BnD;AAED,eAAe,aAAa,CAAC"}
@@ -29,31 +29,35 @@ import { SceneStore } from '@3driseai/3drise-core';
29
29
  export const CONFIG_LIVE_KEY = '__configLive';
30
30
  /** Keys that never go through the live path, whatever the family. */
31
31
  const ALWAYS_COMMIT = ['trailMode', 'trailShare', 'enabled', 'type'];
32
- function findHandle(id) {
32
+ /**
33
+ * Every live handle of the object with this id. An object in a layout renders one copy per
34
+ * slot, each registering its own handle under the same id — a live value goes to all of them,
35
+ * so the whole layout follows (the committed config already reaches every slot).
36
+ */
37
+ export function findConfigHandles(id) {
33
38
  if (!id || !SceneStore.scene)
34
- return undefined;
35
- let found;
39
+ return [];
40
+ const found = [];
36
41
  SceneStore.scene.traverse((o) => {
37
- if (found)
38
- return;
39
42
  const h = o.userData?.[CONFIG_LIVE_KEY];
40
- if (h && h.id === id)
41
- found = h;
43
+ if (h && h.alive && h.id === id)
44
+ found.push(h);
42
45
  });
43
46
  return found;
44
47
  }
45
48
  /** Client side: a stable `set(key, value)` for the generative object with this id. */
46
49
  export function useConfigLive(id) {
47
50
  return useMemo(() => {
48
- let cached;
51
+ let cached = [];
49
52
  return {
50
53
  set: (key, value) => {
51
54
  if (!id)
52
55
  return;
53
- // one scene traversal per drag, not per pointer-move
54
- if (!cached || !cached.alive || cached.id !== id)
55
- cached = findHandle(id);
56
- cached?.set(key, value);
56
+ // one scene traversal per drag, not per pointer-move (again when a copy went away)
57
+ if (!cached.length || cached.some(h => !h.alive))
58
+ cached = findConfigHandles(id);
59
+ for (const h of cached)
60
+ h.set(key, value);
57
61
  },
58
62
  };
59
63
  }, [id]);
@@ -0,0 +1,22 @@
1
+ import type { Object3D } from 'three';
2
+ /** The look knobs, as the shell's config carries them (same meaning as the operation's params). */
3
+ export interface InShellLook {
4
+ look: 'film' | 'ghost';
5
+ bands: number;
6
+ seam: number;
7
+ warp: number;
8
+ core: number;
9
+ }
10
+ /**
11
+ * A shell found this object crossing it: give it the layer now (no data on the object, nothing
12
+ * saved) and keep it until `shellRelease`. An object that already carries the effect itself
13
+ * (its Effects tab, an action; `ownOn`, from the runtime) is left to that.
14
+ */
15
+ export declare function shellAttach(target: Object3D, look: InShellLook, ownOn?: boolean): boolean;
16
+ /** The object left the shell: take the layer off (only one the shell attached). */
17
+ export declare function shellRelease(target: Object3D): void;
18
+ /** Whether the shell put the effect on this object (as opposed to the object's own effects). */
19
+ export declare const shellAttached: (target: Object3D) => boolean;
20
+ declare const _default: import("..").OperationDefinition;
21
+ export default _default;
22
+ //# sourceMappingURL=inShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inShell.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/inShell.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAgJtC,mGAAmG;AACnG,MAAM,WAAW,WAAW;IAAG,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AA4BhH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,UAAQ,GAAG,OAAO,CAevF;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,QAQ5C;AAED,gGAAgG;AAChG,eAAO,MAAM,aAAa,GAAI,QAAQ,QAAQ,KAAG,OAA8D,CAAC;;AAEhH,wBA+BG"}
@@ -0,0 +1,245 @@
1
+ // In shell — the object shows the Harmonic Shell it is in. Per pixel its material
2
+ // evaluates the shell's own field (the shell's harmonics, bound and colours, or
3
+ // its morph target), so the part inside the shell takes the shell's thin-film
4
+ // look with slow scan bands, the crossing gets a seam in the rim colour, and the
5
+ // part outside stays as it is. Per vertex the inside follows the membrane like
6
+ // the contents of a bubble (`warp`). Nothing is baked per object: the shell and
7
+ // the object may both move, the look follows. A state: in → hold → out.
8
+ //
9
+ // The shell is found, not picked: the nearest Harmonic Shell in the scene (by
10
+ // centre), re-checked every tick. An object the shell is wrapping (its morph
11
+ // target) is left alone — it IS the shell's surface, not something inside it.
12
+ import { Matrix4, Vector3 } from 'three';
13
+ import gsap from 'gsap';
14
+ import { defineOperation } from '../types.js';
15
+ import { addLayer, forEachMeshMaterial, removeLayer } from './shaderLayers.js';
16
+ import { createFieldState, fieldUniforms, runProgress } from './transitionField.js';
17
+ import { HSH_FIELD_FUNCS, copyShellUniforms, createShellUniforms, nearestShellField } from '../../components/effects/harmonicShellField.js';
18
+ const P = 'Ins';
19
+ const KEY = 'inShell';
20
+ const STATE = '__opInShell';
21
+ function layerFor(st) {
22
+ return {
23
+ uniforms: {
24
+ ...fieldUniforms(P, st.field),
25
+ ...st.shell,
26
+ uInsShellInv: st.u.shellInv, uInsShellMat: st.u.shellMat, uInsHas: st.u.has, uInsSelf: st.u.self,
27
+ uInsLook: st.u.look, uInsBands: st.u.bands, uInsSeam: st.u.seam, uInsWarp: st.u.warp, uInsCore: st.u.core,
28
+ },
29
+ common: /* glsl */ `
30
+ varying vec3 vInsWorld;
31
+ varying vec3 vInsView;
32
+ ${HSH_FIELD_FUNCS}
33
+ // how much this effect is on right now: its progress, only with a shell, never on the shell's own target
34
+ float insOn(){ return u${P}Progress * uInsHas * (1.0 - uInsSelf); }`,
35
+ vertexPars: /* glsl */ `
36
+ // The bubble's contents follow its membrane: a point inside, at direction n from the
37
+ // shell's centre, is scaled by the membrane's local radius R(n)/R0 — fully at the
38
+ // membrane, fading to the centre (uInsCore) — and blended out across the boundary so
39
+ // the part outside stays rigid. Off while the shell is morphing into a target.
40
+ vec3 insWarp(vec3 pObj){
41
+ float on = insOn() * uInsWarp * (1.0 - uHshMorph * step(0.5, uHshMode));
42
+ if (on <= 0.0) return pObj;
43
+ vec3 pl = (uInsShellInv * modelMatrix * vec4(pObj, 1.0)).xyz;
44
+ float r = length(pl); if (r < 1e-4) return pObj;
45
+ vec3 n = pl / r; float f; float R = hshRadius(n, f); float R0 = uHshBound * uHshSize;
46
+ if (r >= R * 0.98) return pObj; // outside, or at the membrane: untouched
47
+ // zero AT the membrane (the crossing never moves, nothing shows outside), growing inward;
48
+ // the centre stays put too (uInsCore)
49
+ float depth = 1.0 - smoothstep(R * 0.55, R * 0.98, r);
50
+ float k = pow(clamp(r / R0, 0.0, 1.0), mix(0.4, 3.0, uInsCore));
51
+ float w = on * depth * k;
52
+ float rNew = min(r * mix(1.0, R / R0, w), R * 0.985); // never past the membrane
53
+ vec3 plNew = n * rNew;
54
+ return (inverse(modelMatrix) * uInsShellMat * vec4(plNew, 1.0)).xyz;
55
+ }`,
56
+ normal: /* glsl */ `
57
+ if (uInsWarp > 0.0 && insOn() > 0.0) {
58
+ // the warped normal, from two warped neighbours in the tangent plane
59
+ vec3 insUp = abs(objectNormal.y) > 0.99 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);
60
+ vec3 insT1 = normalize(cross(objectNormal, insUp)); vec3 insT2 = cross(objectNormal, insT1);
61
+ float insE = 0.02 * uHshBound;
62
+ vec3 insP0 = insWarp(position);
63
+ vec3 insD = insP0 - position;
64
+ vec3 insP1 = insWarp(position + insT1 * insE), insP2 = insWarp(position + insT2 * insE);
65
+ vec3 insN = cross(insP1 - insP0, insP2 - insP0);
66
+ // only where the vertex itself moved: outside the shell the normal stays the object's own
67
+ if (dot(insD, insD) > 1e-12 && dot(insN, insN) > 1e-14) { insN = normalize(insN); if (dot(insN, objectNormal) < 0.0) insN = -insN; objectNormal = insN; }
68
+ }`,
69
+ vertex: /* glsl */ `
70
+ transformed = insWarp(transformed);
71
+ vInsWorld = (modelMatrix * vec4(transformed, 1.0)).xyz;
72
+ vInsView = (modelViewMatrix * vec4(transformed, 1.0)).xyz;`,
73
+ fragmentPars: /* glsl */ `
74
+ float insInside = 0.0; float insSeam = 0.0; vec3 insFilm = vec3(0.0); float insBands = 0.5;`,
75
+ diffuse: /* glsl */ `
76
+ {
77
+ float on = insOn();
78
+ if (on > 0.0) {
79
+ float field;
80
+ float d = hshDist((uInsShellInv * vec4(vInsWorld, 1.0)).xyz, field);
81
+ float w = max(fwidth(d) * 1.5, 0.003 * uHshBound);
82
+ insInside = (1.0 - smoothstep(-w, w, d)) * on;
83
+ // the membrane over the crossing: a thin bright line, a soft halo fading into the inside
84
+ // one-sided: the glow lives on the inside of the membrane (d < 0); outside only a hair, for anti-aliasing
85
+ float ws = uHshBound * mix(0.012, 0.07, uInsSeam);
86
+ float inSide = d < 0.0 ? 1.0 : exp(-d / max(w, 1e-4));
87
+ float line = exp(-abs(d) / ws) * inSide;
88
+ float halo = (d < 0.0 ? exp(d / (ws * 4.0)) : 0.0) * 0.5;
89
+ insSeam = (line + halo) * step(0.001, uInsSeam) * on;
90
+ // the shell's film at this pixel, seen from the camera; scan bands drift with the shell's clock
91
+ vec3 nv = normalize(cross(dFdx(vInsView), dFdy(vInsView)));
92
+ float ndv = abs(dot(nv, normalize(-vInsView)));
93
+ insFilm = hshFilm(ndv, field);
94
+ insBands = 0.5 + 0.5 * sin((vInsWorld.y / uHshBound - uHshTime * 0.35) * 20.0 + d * 14.0);
95
+ float bands = mix(0.5, insBands, uInsBands);
96
+ vec3 lookFilm = mix(uHshColor * 0.35, insFilm, 0.55 + 0.45 * bands);
97
+ vec3 lookGhost = mix(diffuseColor.rgb, uHshColor, 0.75) * (0.8 + 0.5 * bands);
98
+ diffuseColor.rgb = mix(diffuseColor.rgb, mix(lookFilm, lookGhost, uInsLook), insInside);
99
+ }
100
+ }`,
101
+ // the glow goes on top of the lit result, so unlit materials get it too
102
+ fragment: /* glsl */ `
103
+ outgoingLight += uHshRim * insSeam * 1.4;
104
+ outgoingLight += insFilm * insInside * 0.16 * (0.6 + 0.4 * insBands) * (1.0 - uInsLook);`,
105
+ };
106
+ }
107
+ // ---------------------------------------------------------------- following the shell
108
+ /** States that are on → their root. One ticker copies the nearest shell's values into each. */
109
+ const live = new Map();
110
+ let tick = null;
111
+ const _pos = new Vector3();
112
+ function sync(root, st) {
113
+ _pos.setFromMatrixPosition(root.matrixWorld);
114
+ const shell = nearestShellField(_pos);
115
+ if (!shell) {
116
+ st.u.has.value = 0;
117
+ return;
118
+ }
119
+ copyShellUniforms(shell.uniforms, st.shell);
120
+ // Both matrices from the same world matrix, read now: the shader maps the vertex into shell space
121
+ // with the inverse and back out with the matrix, so they must be exact mutual inverses of one moment.
122
+ // (shell.inv is the shell's own copy from its useFrame, a frame behind a moving shell - using it here
123
+ // displaced a moving object's inside by the frame's motion, mirrored, and jittered the warp.)
124
+ shell.root.updateWorldMatrix(true, false);
125
+ st.u.shellMat.value.copy(shell.root.matrixWorld);
126
+ st.u.shellInv.value.copy(st.u.shellMat.value).invert();
127
+ st.u.has.value = 1;
128
+ st.u.self.value = shell.target === root ? 1 : 0;
129
+ }
130
+ function follow(root, st) {
131
+ live.set(st, root);
132
+ sync(root, st);
133
+ if (tick)
134
+ return;
135
+ tick = () => live.forEach((r, s) => sync(r, s));
136
+ gsap.ticker.add(tick);
137
+ }
138
+ function unfollow(st) {
139
+ if (!live.delete(st) || live.size || !tick)
140
+ return;
141
+ gsap.ticker.remove(tick);
142
+ tick = null;
143
+ }
144
+ function build(target) {
145
+ const st = {
146
+ field: createFieldState(target),
147
+ shell: createShellUniforms(),
148
+ u: { shellInv: { value: new Matrix4() }, shellMat: { value: new Matrix4() }, has: { value: 0 }, self: { value: 0 }, look: { value: 0 }, bands: { value: 1 }, seam: { value: 1 }, warp: { value: 0.6 }, core: { value: 0.5 } },
149
+ mats: new Set(),
150
+ };
151
+ const layer = layerFor(st);
152
+ forEachMeshMaterial(target, (mat, mesh) => {
153
+ if (mesh.userData?.__opFxHelper)
154
+ return;
155
+ if (addLayer(mat, KEY, layer))
156
+ st.mats.add(mat);
157
+ });
158
+ target.userData[STATE] = st;
159
+ return st;
160
+ }
161
+ function setLook(st, p) {
162
+ if (p.look !== undefined)
163
+ st.u.look.value = p.look === 'ghost' ? 1 : 0;
164
+ if (p.bands !== undefined)
165
+ st.u.bands.value = Number(p.bands);
166
+ if (p.seam !== undefined)
167
+ st.u.seam.value = Number(p.seam);
168
+ if (p.warp !== undefined)
169
+ st.u.warp.value = Number(p.warp);
170
+ if (p.core !== undefined)
171
+ st.u.core.value = Number(p.core);
172
+ }
173
+ const AUTO = '__opInShellAuto';
174
+ /**
175
+ * A shell found this object crossing it: give it the layer now (no data on the object, nothing
176
+ * saved) and keep it until `shellRelease`. An object that already carries the effect itself
177
+ * (its Effects tab, an action; `ownOn`, from the runtime) is left to that.
178
+ */
179
+ export function shellAttach(target, look, ownOn = false) {
180
+ let st = target.userData[STATE];
181
+ if (st) {
182
+ if (target.userData[AUTO]) {
183
+ setLook(st, look);
184
+ return true;
185
+ }
186
+ // the object's own effect is on: it decides (false = the shell tries again later).
187
+ // A state that is neither auto nor on is a pre-warm passing through: wait for it.
188
+ return false;
189
+ }
190
+ if (ownOn)
191
+ return false;
192
+ st = build(target);
193
+ target.userData[AUTO] = true;
194
+ setLook(st, look);
195
+ follow(target, st);
196
+ void runProgress(target, st.field, 1, { duration: 0.25, ease: 'power1.out', hold: true });
197
+ return true;
198
+ }
199
+ /** The object left the shell: take the layer off (only one the shell attached). */
200
+ export function shellRelease(target) {
201
+ const st = target.userData[STATE];
202
+ if (!st || !target.userData[AUTO])
203
+ return;
204
+ delete target.userData[AUTO];
205
+ void runProgress(target, st.field, 0, {
206
+ duration: 0.25, ease: 'power1.in',
207
+ onComplete: () => { if (target.userData[STATE] !== st)
208
+ return; unfollow(st); st.mats.forEach(m => removeLayer(m, KEY)); delete target.userData[STATE]; },
209
+ });
210
+ }
211
+ /** Whether the shell put the effect on this object (as opposed to the object's own effects). */
212
+ export const shellAttached = (target) => !!target.userData[AUTO] && !!target.userData[STATE];
213
+ export default defineOperation({
214
+ value: 'inShell',
215
+ label: 'In shell',
216
+ description: 'The object shows the Harmonic Shell it is in: the part inside takes the shell\'s film, the crossing glows, and the inside sways with the membrane — reverting puts the plain object back',
217
+ channel: 'visual',
218
+ multi: true,
219
+ toggles: true,
220
+ usableIn: ['interaction', 'action', 'object'],
221
+ params: {
222
+ look: { type: 'select', label: 'Inside look', default: 'film', options: [{ value: 'film', label: 'Soap film' }, { value: 'ghost', label: 'Ghost tint' }], hint: 'Soap film: the shell\'s thin-film colours. Ghost: the object tinted with the shell colour' },
223
+ bands: { type: 'number', label: 'Scan bands', default: 1, min: 0, max: 1, step: 0.01, hint: 'Bands drifting through the inside with the shell\'s clock' },
224
+ seam: { type: 'number', label: 'Seam', default: 1, min: 0, max: 1, step: 0.01, hint: 'Glow where the object crosses the shell' },
225
+ warp: { type: 'number', label: 'Warp', default: 0.6, min: 0, max: 1.5, step: 0.01, hint: 'How much the inside follows the membrane (needs a mesh with enough vertices to bend)' },
226
+ core: { type: 'number', label: 'Core hold', default: 0.5, min: 0, max: 1, step: 0.01, hint: 'How stiff the centre is: high = only near the membrane moves' },
227
+ duration: { type: 'number', label: 'Duration', default: 1.2, min: 0, max: 8, step: 0.1, unit: 's' },
228
+ },
229
+ apply(target, p) {
230
+ delete target.userData[AUTO]; // the object's own effect takes over from a shell-attached one
231
+ const s = target.userData[STATE] ?? build(target);
232
+ setLook(s, { look: p.look, bands: Number(p.bands), seam: Number(p.seam), warp: Number(p.warp), core: Number(p.core) });
233
+ follow(target, s);
234
+ return runProgress(target, s.field, 1, { duration: Number(p.duration), ease: 'power1.out', hold: true });
235
+ },
236
+ revert(target, p) {
237
+ const s = target.userData[STATE];
238
+ if (!s)
239
+ return;
240
+ return runProgress(target, s.field, 0, {
241
+ duration: Number(p.duration) * Math.max(0.05, s.field.progress.value), ease: 'power1.in',
242
+ onComplete: () => { unfollow(s); s.mats.forEach(m => removeLayer(m, KEY)); delete target.userData[STATE]; },
243
+ });
244
+ },
245
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"shaderLayers.d.ts","sourceRoot":"","sources":["../../../src/operations/catalogue/shaderLayers.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,MAAM,WAAW,WAAW;IACxB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7C,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAmCD,+FAA+F;AAC/F,eAAO,MAAM,QAAQ,GAAI,KAAK,QAAQ,KAAG,OAEmE,CAAC;AAO7G;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAOhH;AA6BD;;;;;GAKG;AACH,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,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,QAMzF;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,CAYxD;AAED,iDAAiD;AACjD,eAAO,MAAM,UAAU,4rBAWtB,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,4XAUpB,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,WAAW,4rBAoBvB,CAAC"}
@@ -263,14 +263,17 @@ export function forEachMeshMaterial(root, fn) {
263
263
  }
264
264
  /** `uniform <type> <name>;` from a uniform's current value. */
265
265
  export function uniformDecl(name, v) {
266
+ if (v instanceof Float32Array)
267
+ return `uniform float ${name}[${v.length}];`;
266
268
  const type = typeof v === 'number' ? 'float'
267
- : v?.isColor ? 'vec3'
268
- : v?.isVector3 ? 'vec3'
269
- : v?.isVector2 ? 'vec2'
270
- : v?.isVector4 ? 'vec4'
271
- : v?.isMatrix4 ? 'mat4'
272
- : v?.isTexture ? 'sampler2D'
273
- : 'float';
269
+ : v?.isData3DTexture ? 'sampler3D'
270
+ : v?.isColor ? 'vec3'
271
+ : v?.isVector3 ? 'vec3'
272
+ : v?.isVector2 ? 'vec2'
273
+ : v?.isVector4 ? 'vec4'
274
+ : v?.isMatrix4 ? 'mat4'
275
+ : v?.isTexture ? 'sampler2D'
276
+ : 'float';
274
277
  return `uniform ${type} ${name};`;
275
278
  }
276
279
  /** Calm 3D value noise + 3-octave fBm (GLSL). */
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/operations/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA+DrF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C,EAAE,gBAAgB,CAAA;CAAE,KAAG,gBAC/B,CAAC;AAE1E,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,GAAG,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,eAAe,GAAG,eAAe,CAOpG"}
@@ -45,6 +45,7 @@ import orbit from './catalogue/orbit.js';
45
45
  import kintsugi from './catalogue/kintsugi.js';
46
46
  import rainBeads from './catalogue/rainBeads.js';
47
47
  import ivy from './catalogue/ivy.js';
48
+ import inShell from './catalogue/inShell.js';
48
49
  import curlSmoke from './catalogue/curlSmoke.js';
49
50
  import lidarScan from './catalogue/lidarScan.js';
50
51
  import print3d from './catalogue/print3d.js';
@@ -63,7 +64,7 @@ export const OPERATIONS = [
63
64
  jelly, flip, spin, swirl, blastOff, vortexDrain, leafFall, pop, driftUp, slingshot, warp, knockAway, turnAway, flyBy, whoosh, slam, moveToFront,
64
65
  float, sway, bounce, wobble, pulse, shake, rotate, grow,
65
66
  glow, rimLight, dissolve, emberAsh, particleSwarm, hologram, shatter,
66
- sandErosion, teleport, inkBloom, flock, liquidMetal, metalize, frost, heatCracks, petrify, kintsugi, rainBeads, ivy,
67
+ sandErosion, teleport, inkBloom, flock, liquidMetal, metalize, frost, heatCracks, petrify, kintsugi, rainBeads, ivy, inShell,
67
68
  portal, voxelize, unweave, petalPeel, curlSmoke, lidarScan, print3d, silkDrape, ...TRAILS,
68
69
  fade, visibility, displayImage,
69
70
  zoom, frame, focus, orbit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3driseai/3drise-viewer",
3
- "version": "0.1.35",
3
+ "version": "0.1.38",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@3driseai/3drise-common": "^1.0.1",
42
- "@3driseai/3drise-core": "^1.0.27"
42
+ "@3driseai/3drise-core": "^1.0.28",
43
+ "three-mesh-bvh": "^0.8.3"
43
44
  }
44
45
  }