@3driseai/3drise-viewer 0.1.40 → 0.1.41
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/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +9 -5
- package/dist/animationsV2/clipUtils.d.ts +9 -0
- package/dist/animationsV2/clipUtils.d.ts.map +1 -1
- package/dist/animationsV2/clipUtils.js +11 -2
- package/dist/animationsV2/normalize.d.ts.map +1 -1
- package/dist/animationsV2/normalize.js +2 -0
- package/dist/animationsV2/types.d.ts +4 -0
- package/dist/animationsV2/types.d.ts.map +1 -1
- package/dist/api/sceneHandle.d.ts +40 -3
- package/dist/api/sceneHandle.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +40 -0
- package/dist/components/GalleryObject.d.ts +13 -0
- package/dist/components/GalleryObject.d.ts.map +1 -0
- package/dist/components/GalleryObject.js +46 -0
- package/dist/components/ImageObject.d.ts +9 -0
- package/dist/components/ImageObject.d.ts.map +1 -0
- package/dist/components/ImageObject.js +26 -0
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +11 -5
- package/dist/components/ProjectLoader.d.ts +2 -0
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +2 -2
- package/dist/components/SceneBuilder.d.ts +10 -0
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +3 -2
- package/dist/components/gallery/BasicCarouselGallery.d.ts +18 -0
- package/dist/components/gallery/BasicCarouselGallery.d.ts.map +1 -0
- package/dist/components/gallery/BasicCarouselGallery.js +9 -0
- package/dist/components/gallery/ContourLinesGallery.d.ts +18 -0
- package/dist/components/gallery/ContourLinesGallery.d.ts.map +1 -0
- package/dist/components/gallery/ContourLinesGallery.js +9 -0
- package/dist/components/gallery/DepthLayersGallery.d.ts +18 -0
- package/dist/components/gallery/DepthLayersGallery.d.ts.map +1 -0
- package/dist/components/gallery/DepthLayersGallery.js +9 -0
- package/dist/components/gallery/EngravingGallery.d.ts +18 -0
- package/dist/components/gallery/EngravingGallery.d.ts.map +1 -0
- package/dist/components/gallery/EngravingGallery.js +9 -0
- package/dist/components/gallery/FlowLinesGallery.d.ts +18 -0
- package/dist/components/gallery/FlowLinesGallery.d.ts.map +1 -0
- package/dist/components/gallery/FlowLinesGallery.js +9 -0
- package/dist/components/gallery/FoldGallery.d.ts +18 -0
- package/dist/components/gallery/FoldGallery.d.ts.map +1 -0
- package/dist/components/gallery/FoldGallery.js +9 -0
- package/dist/components/gallery/GlassPanesGallery.d.ts +18 -0
- package/dist/components/gallery/GlassPanesGallery.d.ts.map +1 -0
- package/dist/components/gallery/GlassPanesGallery.js +9 -0
- package/dist/components/gallery/HaloGallery.d.ts +18 -0
- package/dist/components/gallery/HaloGallery.d.ts.map +1 -0
- package/dist/components/gallery/HaloGallery.js +9 -0
- package/dist/components/gallery/LightThreadsGallery.d.ts +18 -0
- package/dist/components/gallery/LightThreadsGallery.d.ts.map +1 -0
- package/dist/components/gallery/LightThreadsGallery.js +9 -0
- package/dist/components/gallery/LoomGallery.d.ts +18 -0
- package/dist/components/gallery/LoomGallery.d.ts.map +1 -0
- package/dist/components/gallery/LoomGallery.js +9 -0
- package/dist/components/gallery/PaperLanternsGallery.d.ts +18 -0
- package/dist/components/gallery/PaperLanternsGallery.d.ts.map +1 -0
- package/dist/components/gallery/PaperLanternsGallery.js +9 -0
- package/dist/components/gallery/ParticleShiftGallery.d.ts +18 -0
- package/dist/components/gallery/ParticleShiftGallery.d.ts.map +1 -0
- package/dist/components/gallery/ParticleShiftGallery.js +9 -0
- package/dist/components/gallery/PinscreenGallery.d.ts +18 -0
- package/dist/components/gallery/PinscreenGallery.d.ts.map +1 -0
- package/dist/components/gallery/PinscreenGallery.js +9 -0
- package/dist/components/gallery/PopUpGallery.d.ts +18 -0
- package/dist/components/gallery/PopUpGallery.d.ts.map +1 -0
- package/dist/components/gallery/PopUpGallery.js +9 -0
- package/dist/components/gallery/PrismSplitGallery.d.ts +18 -0
- package/dist/components/gallery/PrismSplitGallery.d.ts.map +1 -0
- package/dist/components/gallery/PrismSplitGallery.js +9 -0
- package/dist/components/gallery/RidgelinesGallery.d.ts +18 -0
- package/dist/components/gallery/RidgelinesGallery.d.ts.map +1 -0
- package/dist/components/gallery/RidgelinesGallery.js +9 -0
- package/dist/components/gallery/ShadowBoxGallery.d.ts +18 -0
- package/dist/components/gallery/ShadowBoxGallery.d.ts.map +1 -0
- package/dist/components/gallery/ShadowBoxGallery.js +9 -0
- package/dist/components/gallery/SilkGallery.d.ts +18 -0
- package/dist/components/gallery/SilkGallery.d.ts.map +1 -0
- package/dist/components/gallery/SilkGallery.js +9 -0
- package/dist/components/gallery/SlatsGallery.d.ts +18 -0
- package/dist/components/gallery/SlatsGallery.d.ts.map +1 -0
- package/dist/components/gallery/SlatsGallery.js +9 -0
- package/dist/components/gallery/StrataGallery.d.ts +18 -0
- package/dist/components/gallery/StrataGallery.d.ts.map +1 -0
- package/dist/components/gallery/StrataGallery.js +9 -0
- package/dist/components/gallery/TerracesGallery.d.ts +18 -0
- package/dist/components/gallery/TerracesGallery.d.ts.map +1 -0
- package/dist/components/gallery/TerracesGallery.js +9 -0
- package/dist/components/gallery/WireReliefGallery.d.ts +18 -0
- package/dist/components/gallery/WireReliefGallery.d.ts.map +1 -0
- package/dist/components/gallery/WireReliefGallery.js +9 -0
- package/dist/components/gallery/index.d.ts +46 -0
- package/dist/components/gallery/index.d.ts.map +1 -0
- package/dist/components/gallery/index.js +22 -0
- package/dist/components/gallery/kit/GalleryVariant.d.ts +68 -0
- package/dist/components/gallery/kit/GalleryVariant.d.ts.map +1 -0
- package/dist/components/gallery/kit/GalleryVariant.js +231 -0
- package/dist/components/gallery/kit/feeds.d.ts +7 -0
- package/dist/components/gallery/kit/feeds.d.ts.map +1 -0
- package/dist/components/gallery/kit/feeds.js +83 -0
- package/dist/components/gallery/kit/galleryKit.d.ts +118 -0
- package/dist/components/gallery/kit/galleryKit.d.ts.map +1 -0
- package/dist/components/gallery/kit/galleryKit.js +298 -0
- package/dist/components/gallery/kit/lookBase.d.ts +157 -0
- package/dist/components/gallery/kit/lookBase.d.ts.map +1 -0
- package/dist/components/gallery/kit/lookBase.js +211 -0
- package/dist/components/gallery/kit/pictures.d.ts +14 -0
- package/dist/components/gallery/kit/pictures.d.ts.map +1 -0
- package/dist/components/gallery/kit/pictures.js +81 -0
- package/dist/components/gallery/looks/basicCarousel.d.ts +177 -0
- package/dist/components/gallery/looks/basicCarousel.d.ts.map +1 -0
- package/dist/components/gallery/looks/basicCarousel.js +315 -0
- package/dist/components/gallery/looks/contourLines.d.ts +153 -0
- package/dist/components/gallery/looks/contourLines.d.ts.map +1 -0
- package/dist/components/gallery/looks/contourLines.js +91 -0
- package/dist/components/gallery/looks/depthLayers.d.ts +155 -0
- package/dist/components/gallery/looks/depthLayers.d.ts.map +1 -0
- package/dist/components/gallery/looks/depthLayers.js +87 -0
- package/dist/components/gallery/looks/engraving.d.ts +162 -0
- package/dist/components/gallery/looks/engraving.d.ts.map +1 -0
- package/dist/components/gallery/looks/engraving.js +96 -0
- package/dist/components/gallery/looks/flowLines.d.ts +180 -0
- package/dist/components/gallery/looks/flowLines.d.ts.map +1 -0
- package/dist/components/gallery/looks/flowLines.js +113 -0
- package/dist/components/gallery/looks/fold.d.ts +209 -0
- package/dist/components/gallery/looks/fold.d.ts.map +1 -0
- package/dist/components/gallery/looks/fold.js +155 -0
- package/dist/components/gallery/looks/glassPanes.d.ts +133 -0
- package/dist/components/gallery/looks/glassPanes.d.ts.map +1 -0
- package/dist/components/gallery/looks/glassPanes.js +208 -0
- package/dist/components/gallery/looks/halo.d.ts +100 -0
- package/dist/components/gallery/looks/halo.d.ts.map +1 -0
- package/dist/components/gallery/looks/halo.js +119 -0
- package/dist/components/gallery/looks/lightThreads.d.ts +199 -0
- package/dist/components/gallery/looks/lightThreads.d.ts.map +1 -0
- package/dist/components/gallery/looks/lightThreads.js +246 -0
- package/dist/components/gallery/looks/loom.d.ts +238 -0
- package/dist/components/gallery/looks/loom.d.ts.map +1 -0
- package/dist/components/gallery/looks/loom.js +256 -0
- package/dist/components/gallery/looks/paperLanterns.d.ts +181 -0
- package/dist/components/gallery/looks/paperLanterns.d.ts.map +1 -0
- package/dist/components/gallery/looks/paperLanterns.js +399 -0
- package/dist/components/gallery/looks/particleShift.d.ts +193 -0
- package/dist/components/gallery/looks/particleShift.d.ts.map +1 -0
- package/dist/components/gallery/looks/particleShift.js +282 -0
- package/dist/components/gallery/looks/pinscreen.d.ts +175 -0
- package/dist/components/gallery/looks/pinscreen.d.ts.map +1 -0
- package/dist/components/gallery/looks/pinscreen.js +96 -0
- package/dist/components/gallery/looks/popUp.d.ts +206 -0
- package/dist/components/gallery/looks/popUp.d.ts.map +1 -0
- package/dist/components/gallery/looks/popUp.js +132 -0
- package/dist/components/gallery/looks/prismSplit.d.ts +151 -0
- package/dist/components/gallery/looks/prismSplit.d.ts.map +1 -0
- package/dist/components/gallery/looks/prismSplit.js +84 -0
- package/dist/components/gallery/looks/ridgelines.d.ts +179 -0
- package/dist/components/gallery/looks/ridgelines.d.ts.map +1 -0
- package/dist/components/gallery/looks/ridgelines.js +111 -0
- package/dist/components/gallery/looks/shadowBox.d.ts +152 -0
- package/dist/components/gallery/looks/shadowBox.d.ts.map +1 -0
- package/dist/components/gallery/looks/shadowBox.js +82 -0
- package/dist/components/gallery/looks/silk.d.ts +140 -0
- package/dist/components/gallery/looks/silk.d.ts.map +1 -0
- package/dist/components/gallery/looks/silk.js +346 -0
- package/dist/components/gallery/looks/slats.d.ts +176 -0
- package/dist/components/gallery/looks/slats.d.ts.map +1 -0
- package/dist/components/gallery/looks/slats.js +93 -0
- package/dist/components/gallery/looks/strata.d.ts +172 -0
- package/dist/components/gallery/looks/strata.d.ts.map +1 -0
- package/dist/components/gallery/looks/strata.js +88 -0
- package/dist/components/gallery/looks/terraces.d.ts +168 -0
- package/dist/components/gallery/looks/terraces.d.ts.map +1 -0
- package/dist/components/gallery/looks/terraces.js +91 -0
- package/dist/components/gallery/looks/wireRelief.d.ts +153 -0
- package/dist/components/gallery/looks/wireRelief.d.ts.map +1 -0
- package/dist/components/gallery/looks/wireRelief.js +128 -0
- package/dist/components/image/ContourImage.d.ts +7 -0
- package/dist/components/image/ContourImage.d.ts.map +1 -0
- package/dist/components/image/ContourImage.js +6 -0
- package/dist/components/image/EngravingImage.d.ts +7 -0
- package/dist/components/image/EngravingImage.d.ts.map +1 -0
- package/dist/components/image/EngravingImage.js +6 -0
- package/dist/components/image/FrostImage.d.ts +7 -0
- package/dist/components/image/FrostImage.d.ts.map +1 -0
- package/dist/components/image/FrostImage.js +6 -0
- package/dist/components/image/LenticularImage.d.ts +7 -0
- package/dist/components/image/LenticularImage.d.ts.map +1 -0
- package/dist/components/image/LenticularImage.js +6 -0
- package/dist/components/image/PinscreenImage.d.ts +7 -0
- package/dist/components/image/PinscreenImage.d.ts.map +1 -0
- package/dist/components/image/PinscreenImage.js +6 -0
- package/dist/components/image/PrismImage.d.ts +7 -0
- package/dist/components/image/PrismImage.d.ts.map +1 -0
- package/dist/components/image/PrismImage.js +6 -0
- package/dist/components/image/ProjectorImage.d.ts +7 -0
- package/dist/components/image/ProjectorImage.d.ts.map +1 -0
- package/dist/components/image/ProjectorImage.js +6 -0
- package/dist/components/image/ReliefImage.d.ts +7 -0
- package/dist/components/image/ReliefImage.d.ts.map +1 -0
- package/dist/components/image/ReliefImage.js +6 -0
- package/dist/components/image/RollImage.d.ts +7 -0
- package/dist/components/image/RollImage.d.ts.map +1 -0
- package/dist/components/image/RollImage.js +6 -0
- package/dist/components/image/ShardsImage.d.ts +126 -0
- package/dist/components/image/ShardsImage.d.ts.map +1 -0
- package/dist/components/image/ShardsImage.js +470 -0
- package/dist/components/image/core/contour.d.ts +126 -0
- package/dist/components/image/core/contour.d.ts.map +1 -0
- package/dist/components/image/core/contour.js +123 -0
- package/dist/components/image/core/engraving.d.ts +135 -0
- package/dist/components/image/core/engraving.d.ts.map +1 -0
- package/dist/components/image/core/engraving.js +163 -0
- package/dist/components/image/core/frost.d.ts +126 -0
- package/dist/components/image/core/frost.d.ts.map +1 -0
- package/dist/components/image/core/frost.js +156 -0
- package/dist/components/image/core/imageCore.d.ts +110 -0
- package/dist/components/image/core/imageCore.d.ts.map +1 -0
- package/dist/components/image/core/imageCore.js +269 -0
- package/dist/components/image/core/lenticular.d.ts +129 -0
- package/dist/components/image/core/lenticular.d.ts.map +1 -0
- package/dist/components/image/core/lenticular.js +132 -0
- package/dist/components/image/core/pinscreen.d.ts +126 -0
- package/dist/components/image/core/pinscreen.d.ts.map +1 -0
- package/dist/components/image/core/pinscreen.js +147 -0
- package/dist/components/image/core/prism.d.ts +120 -0
- package/dist/components/image/core/prism.d.ts.map +1 -0
- package/dist/components/image/core/prism.js +164 -0
- package/dist/components/image/core/projector.d.ts +135 -0
- package/dist/components/image/core/projector.d.ts.map +1 -0
- package/dist/components/image/core/projector.js +225 -0
- package/dist/components/image/core/relief.d.ts +111 -0
- package/dist/components/image/core/relief.d.ts.map +1 -0
- package/dist/components/image/core/relief.js +94 -0
- package/dist/components/image/core/roll.d.ts +114 -0
- package/dist/components/image/core/roll.d.ts.map +1 -0
- package/dist/components/image/core/roll.js +116 -0
- package/dist/components/image/imageVariant.d.ts +46 -0
- package/dist/components/image/imageVariant.d.ts.map +1 -0
- package/dist/components/image/imageVariant.js +128 -0
- package/dist/components/image/index.d.ts +22 -0
- package/dist/components/image/index.d.ts.map +1 -0
- package/dist/components/image/index.js +10 -0
- package/dist/components/image/pictureCycle.d.ts +15 -0
- package/dist/components/image/pictureCycle.d.ts.map +1 -0
- package/dist/components/image/pictureCycle.js +82 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +9 -7
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.js +39 -27
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/galleryRuntime.d.ts +57 -0
- package/dist/galleryRuntime.d.ts.map +1 -0
- package/dist/galleryRuntime.js +105 -0
- package/dist/hooks/useConfigLive.d.ts +1 -1
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/keyPad/KeyPadControls.d.ts +16 -0
- package/dist/keyPad/KeyPadControls.d.ts.map +1 -0
- package/dist/keyPad/KeyPadControls.js +176 -0
- package/dist/keyPad/index.d.ts +16 -0
- package/dist/keyPad/index.d.ts.map +1 -0
- package/dist/keyPad/index.js +8 -0
- package/dist/keyPad/keyBindings.d.ts +43 -0
- package/dist/keyPad/keyBindings.d.ts.map +1 -0
- package/dist/keyPad/keyBindings.js +92 -0
- package/dist/keyPad/keyPadAnimation.d.ts +28 -0
- package/dist/keyPad/keyPadAnimation.d.ts.map +1 -0
- package/dist/keyPad/keyPadAnimation.js +131 -0
- package/dist/keyPad/keyPadMotion.d.ts +68 -0
- package/dist/keyPad/keyPadMotion.d.ts.map +1 -0
- package/dist/keyPad/keyPadMotion.js +283 -0
- package/dist/keyPad/keyPadStore.d.ts +25 -0
- package/dist/keyPad/keyPadStore.d.ts.map +1 -0
- package/dist/keyPad/keyPadStore.js +63 -0
- package/dist/keyPad/types.d.ts +23 -0
- package/dist/keyPad/types.d.ts.map +1 -0
- package/dist/keyPad/types.js +9 -0
- package/dist/operations/catalogue/visibility.d.ts.map +1 -1
- package/dist/operations/catalogue/visibility.js +23 -1
- package/dist/shaders/clouds/CloudResolveMaterial.d.ts +2 -1
- package/dist/shaders/clouds/CloudResolveMaterial.d.ts.map +1 -1
- package/dist/shaders/clouds/CloudResolveMaterial.js +37 -12
- package/dist/shaders/clouds/CloudVolumeMaterial.d.ts +4 -0
- package/dist/shaders/clouds/CloudVolumeMaterial.d.ts.map +1 -1
- package/dist/shaders/clouds/CloudVolumeMaterial.js +15 -3
- package/dist/triggers/kinds/gallery.d.ts +2 -0
- package/dist/triggers/kinds/gallery.d.ts.map +1 -0
- package/dist/triggers/kinds/gallery.js +39 -0
- package/dist/triggers/kinds/index.d.ts +1 -0
- package/dist/triggers/kinds/index.d.ts.map +1 -1
- package/dist/triggers/kinds/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// GENERATED from the lab (Claude outputs/gallery-lab/image/lenticular.mjs) by emit_image.mjs — change the lab and re-emit.
|
|
2
|
+
// lenticular — an image variant (type 'image', config.type 'lenticular'). Material: MeshPhysicalMaterial (clearcoat;
|
|
3
|
+
// lit by the scene; object effects attach).
|
|
4
|
+
//
|
|
5
|
+
// A lenticular print: a sheet of fine cylindrical lenses over an interleaved print — under every lens a strip of
|
|
6
|
+
// the outgoing picture and a strip of the incoming one. Which strip a lens shows depends on the angle it is seen
|
|
7
|
+
// from: q = 1/4 + (view . lens axis normal) * thickness + flip / 2, B when q falls in the second half (smoothed by the
|
|
8
|
+
// lens blur, with a faint chromatic split at the boundary, as real prints ghost). A change sweeps `flip` across
|
|
9
|
+
// the sheet; because the view angle is part of it, the boundary sits differently for every camera and moves when
|
|
10
|
+
// the camera orbits or the object is turned — the change is seen *through* the lenses, not painted on. The lens ridges
|
|
11
|
+
// are a normal perturbation on the clearcoat, so the scene's light draws fine vertical highlights that slide as
|
|
12
|
+
// you move. At rest both strips carry the same picture: no artefact, only the ribbed gloss. Idle: a slow, very
|
|
13
|
+
// low bow of the sheet rolls the highlights. Cursor: `peek` — the lenses near the cursor flip back to the
|
|
14
|
+
// previous picture; `bend` — the sheet bows toward the cursor, so the ridge highlights roll (and, mid-change,
|
|
15
|
+
// the flip line bends with it).
|
|
16
|
+
import * as THREE from 'three';
|
|
17
|
+
import { baseUniforms, applyBase, setU, createPicture, stepPointer, patchMaterial, aspectOf, fit } from './imageCore.js';
|
|
18
|
+
export const POINTER_MODES = ['peek', 'bend'];
|
|
19
|
+
export const STRUCTURAL = ['imageUrls'];
|
|
20
|
+
export function createUniforms() {
|
|
21
|
+
return { ...baseUniforms(), uLenses: { value: 110 }, uThick: { value: 1.1 }, uSharp: { value: 0.55 }, uGhost: { value: 0.35 }, uRidge: { value: 0.5 }, uSelf: { value: 0.1 },
|
|
22
|
+
uTexP: { value: null }, uFitP: { value: new THREE.Vector2(1, 1) }, uHasP: { value: 0 } };
|
|
23
|
+
}
|
|
24
|
+
export function applyConfig(u, c) {
|
|
25
|
+
applyBase(u, c, POINTER_MODES);
|
|
26
|
+
setU(u, 'uLenses', c.lenses);
|
|
27
|
+
setU(u, 'uThick', c.thickness);
|
|
28
|
+
setU(u, 'uSharp', c.sharpness);
|
|
29
|
+
setU(u, 'uGhost', c.ghost);
|
|
30
|
+
setU(u, 'uRidge', c.ridge);
|
|
31
|
+
setU(u, 'uSelf', c.selfLight);
|
|
32
|
+
}
|
|
33
|
+
const pars = /* glsl */ `
|
|
34
|
+
uniform float uLenses, uThick, uSharp, uGhost, uRidge, uSelf, uHasP; uniform sampler2D uTexP; uniform vec2 uFitP;
|
|
35
|
+
varying vec2 vPic; varying vec3 vTanX; varying float vL;
|
|
36
|
+
float bowAt(vec2 xy){
|
|
37
|
+
float z = uBreathe * 0.01 * sin(xy.x * 1.1 + uTime * 0.31) * cos(xy.y * 0.9 - uTime * 0.23);
|
|
38
|
+
if (uPointerMode > 0.5) z += 0.07 * pointerBump(xy);
|
|
39
|
+
return z;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const vertex = /* glsl */ `
|
|
43
|
+
vec2 uv0 = position.xy + 0.5;
|
|
44
|
+
vec2 xy = position.xy * uSize;
|
|
45
|
+
float e = 0.01;
|
|
46
|
+
float z0 = bowAt(xy), zx = bowAt(xy + vec2(e, 0.0)), zy = bowAt(xy + vec2(0.0, e));
|
|
47
|
+
vec3 tx = normalize(vec3(e, 0.0, zx - z0)), ty = normalize(vec3(0.0, e, zy - z0));
|
|
48
|
+
fxP = vec3(xy, z0);
|
|
49
|
+
fxN = normalize(cross(tx, ty));
|
|
50
|
+
vTanX = normalize((modelViewMatrix * vec4(tx, 0.0)).xyz);
|
|
51
|
+
vPic = uv0; vL = localP(uv0);
|
|
52
|
+
`;
|
|
53
|
+
// what a lens shows: B weight from the strip position q seen through it (cyclic), one channel offset for the ghost
|
|
54
|
+
const diffuse = /* glsl */ `
|
|
55
|
+
vec3 V = normalize(vViewPosition);
|
|
56
|
+
float vx = dot(V, normalize(vTanX));
|
|
57
|
+
float flip = sstep(vL);
|
|
58
|
+
float k = mix(0.45, 0.04, uSharp);
|
|
59
|
+
float q = 0.25 + vx * uThick * 0.5 + 0.5 * flip;
|
|
60
|
+
float g = uGhost * 0.035;
|
|
61
|
+
vec3 wB = vec3(smoothstep(-k, k, sin(6.2831853 * (q - g - 0.5))), smoothstep(-k, k, sin(6.2831853 * (q - 0.5))), smoothstep(-k, k, sin(6.2831853 * (q + g - 0.5))));
|
|
62
|
+
vec3 pic = mix(picA(vPic), picB(vPic), wB);
|
|
63
|
+
if (uPointerMode > -0.5 && uPointerMode < 0.5 && uHasP > 0.5) { // peek: lenses near the cursor flip to the previous picture
|
|
64
|
+
float pk = smoothstep(0.15, 0.85, pointerBump((vPic - 0.5) * uSize));
|
|
65
|
+
float qp = 0.25 + vx * uThick * 0.5 + 0.5 * pk;
|
|
66
|
+
float wp = smoothstep(-k, k, sin(6.2831853 * (qp - 0.5)));
|
|
67
|
+
vec3 prev = texture(uTexP, 0.5 + (vPic - 0.5) * uFitP).rgb;
|
|
68
|
+
pic = mix(pic, prev, wp * smoothstep(0.0, 0.35, pk)); // only where the cursor flips the lenses
|
|
69
|
+
}
|
|
70
|
+
// the lens boundaries: a hairline of shade where two lenses meet (faded out when lenses get smaller than a pixel)
|
|
71
|
+
float ph = vPic.x * uLenses;
|
|
72
|
+
float aa = 1.0 - smoothstep(0.2, 0.55, fwidth(ph));
|
|
73
|
+
float cell = fract(ph);
|
|
74
|
+
pic *= 1.0 - 0.1 * aa * pow(abs(cell - 0.5) * 2.0, 8.0);
|
|
75
|
+
diffuseColor.rgb = pic * uIntensity;
|
|
76
|
+
diffuseColor.a *= uOpacity;
|
|
77
|
+
`;
|
|
78
|
+
const ridgeN = /* glsl */ `
|
|
79
|
+
{
|
|
80
|
+
float ph = vPic.x * uLenses;
|
|
81
|
+
float aa = 1.0 - smoothstep(0.2, 0.55, fwidth(ph));
|
|
82
|
+
float nx = (fract(ph) - 0.5) * 2.0; // across the cylinder: -1 .. 1
|
|
83
|
+
vec3 t = normalize(vTanX);
|
|
84
|
+
NAME = normalize(NAME + t * nx * 0.9 * uRidge * aa);
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
const emissive = /* glsl */ `
|
|
88
|
+
totalEmissiveRadiance += diffuseColor.rgb * uSelf;
|
|
89
|
+
`;
|
|
90
|
+
export function build(u, c) {
|
|
91
|
+
const object = new THREE.Group();
|
|
92
|
+
const geo = new THREE.PlaneGeometry(1, 1, 64, 40);
|
|
93
|
+
const P = { key: 'lenticular', uniforms: u, pars, vertex, diffuse, emissive,
|
|
94
|
+
normalFrag: ridgeN.replace(/NAME/g, 'normal').replace('nx * 0.9', 'nx * 0.35'), clearcoatNormal: ridgeN.replace(/NAME/g, 'clearcoatNormal') };
|
|
95
|
+
const mat = patchMaterial(new THREE.MeshPhysicalMaterial({ roughness: c.roughness, metalness: 0, clearcoat: 1, clearcoatRoughness: c.gloss, side: THREE.DoubleSide }), P);
|
|
96
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
97
|
+
mesh.castShadow = true;
|
|
98
|
+
mesh.receiveShadow = true;
|
|
99
|
+
mesh.frustumCulled = false;
|
|
100
|
+
object.add(mesh);
|
|
101
|
+
const cfg = { ...c };
|
|
102
|
+
const pic = createPicture(u, cfg);
|
|
103
|
+
const pst = {};
|
|
104
|
+
let shown = null;
|
|
105
|
+
const api = {
|
|
106
|
+
object, materials: [mat],
|
|
107
|
+
controls: { show: (t) => pic.show(t), get busy() { return pic.busy; }, pic },
|
|
108
|
+
apply(k) { Object.assign(cfg, k); applyConfig(u, k); if (k.roughness !== undefined)
|
|
109
|
+
mat.roughness = k.roughness; if (k.gloss !== undefined)
|
|
110
|
+
mat.clearcoatRoughness = k.gloss; if (k.opacity !== undefined)
|
|
111
|
+
mat.transparent = k.opacity < 1; },
|
|
112
|
+
update(dt, pointer) {
|
|
113
|
+
dt = Math.min(dt, 0.1);
|
|
114
|
+
u.uTime.value += dt;
|
|
115
|
+
pic.step(dt);
|
|
116
|
+
stepPointer(u, pointer, dt, pst);
|
|
117
|
+
// the previous picture (for peek): the one the last completed change left behind
|
|
118
|
+
const st = pic.st;
|
|
119
|
+
if (st.dir === 0 && st.B && st.B !== shown) {
|
|
120
|
+
if (shown) {
|
|
121
|
+
u.uTexP.value = shown;
|
|
122
|
+
u.uHasP.value = 1;
|
|
123
|
+
}
|
|
124
|
+
shown = st.B;
|
|
125
|
+
}
|
|
126
|
+
if (u.uTexP.value)
|
|
127
|
+
fit(aspectOf(u.uTexP.value), st.frame, u.uFitP.value);
|
|
128
|
+
},
|
|
129
|
+
dispose() { geo.dispose(); mat.dispose(); pic.dispose(); },
|
|
130
|
+
};
|
|
131
|
+
return api;
|
|
132
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const POINTER_MODES: string[];
|
|
3
|
+
export declare const STRUCTURAL: string[];
|
|
4
|
+
export declare function createUniforms(): {
|
|
5
|
+
uCols: {
|
|
6
|
+
value: THREE.Vector2;
|
|
7
|
+
};
|
|
8
|
+
uDepth: {
|
|
9
|
+
value: number;
|
|
10
|
+
};
|
|
11
|
+
uDip: {
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
uPinSize: {
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
uPinColor: {
|
|
18
|
+
value: THREE.Color;
|
|
19
|
+
};
|
|
20
|
+
uMetal: {
|
|
21
|
+
value: number;
|
|
22
|
+
};
|
|
23
|
+
uRough: {
|
|
24
|
+
value: number;
|
|
25
|
+
};
|
|
26
|
+
uSelf: {
|
|
27
|
+
value: number;
|
|
28
|
+
};
|
|
29
|
+
uTexA: {
|
|
30
|
+
value: any;
|
|
31
|
+
};
|
|
32
|
+
uTexB: {
|
|
33
|
+
value: any;
|
|
34
|
+
};
|
|
35
|
+
uFitA: {
|
|
36
|
+
value: THREE.Vector2;
|
|
37
|
+
};
|
|
38
|
+
uFitB: {
|
|
39
|
+
value: THREE.Vector2;
|
|
40
|
+
};
|
|
41
|
+
uP: {
|
|
42
|
+
value: number;
|
|
43
|
+
};
|
|
44
|
+
uHasA: {
|
|
45
|
+
value: number;
|
|
46
|
+
};
|
|
47
|
+
uSeq: {
|
|
48
|
+
value: number;
|
|
49
|
+
};
|
|
50
|
+
uSize: {
|
|
51
|
+
value: THREE.Vector2;
|
|
52
|
+
};
|
|
53
|
+
uTime: {
|
|
54
|
+
value: number;
|
|
55
|
+
};
|
|
56
|
+
uDir: {
|
|
57
|
+
value: THREE.Vector2;
|
|
58
|
+
};
|
|
59
|
+
uSpread: {
|
|
60
|
+
value: number;
|
|
61
|
+
};
|
|
62
|
+
uBlank: {
|
|
63
|
+
value: THREE.Color;
|
|
64
|
+
};
|
|
65
|
+
uIntensity: {
|
|
66
|
+
value: number;
|
|
67
|
+
};
|
|
68
|
+
uOpacity: {
|
|
69
|
+
value: number;
|
|
70
|
+
};
|
|
71
|
+
uBreathe: {
|
|
72
|
+
value: number;
|
|
73
|
+
};
|
|
74
|
+
uPointer: {
|
|
75
|
+
value: THREE.Vector3;
|
|
76
|
+
};
|
|
77
|
+
uPointerVel: {
|
|
78
|
+
value: THREE.Vector2;
|
|
79
|
+
};
|
|
80
|
+
uPointerActive: {
|
|
81
|
+
value: number;
|
|
82
|
+
};
|
|
83
|
+
uPointerMode: {
|
|
84
|
+
value: number;
|
|
85
|
+
};
|
|
86
|
+
uPointerStrength: {
|
|
87
|
+
value: number;
|
|
88
|
+
};
|
|
89
|
+
uPointerRadius: {
|
|
90
|
+
value: number;
|
|
91
|
+
};
|
|
92
|
+
uPointerColor: {
|
|
93
|
+
value: THREE.Color;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
97
|
+
export declare function build(u: any, c: any): {
|
|
98
|
+
object: THREE.Group<THREE.Object3DEventMap>;
|
|
99
|
+
materials: any[];
|
|
100
|
+
controls: {
|
|
101
|
+
show: (t: any) => void;
|
|
102
|
+
readonly busy: boolean;
|
|
103
|
+
pic: {
|
|
104
|
+
st: {
|
|
105
|
+
A: any;
|
|
106
|
+
B: any;
|
|
107
|
+
aspA: number;
|
|
108
|
+
aspB: number;
|
|
109
|
+
p: number;
|
|
110
|
+
dir: number;
|
|
111
|
+
pending: any;
|
|
112
|
+
seq: number;
|
|
113
|
+
frame: number;
|
|
114
|
+
};
|
|
115
|
+
show: (tex: any) => void;
|
|
116
|
+
jump: (tex: any) => void;
|
|
117
|
+
step: (dt: any) => void;
|
|
118
|
+
readonly busy: boolean;
|
|
119
|
+
dispose(): void;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
apply(k: any): void;
|
|
123
|
+
update(dt: any, pointer: any): void;
|
|
124
|
+
dispose(): void;
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=pinscreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinscreen.d.ts","sourceRoot":"","sources":["../../../../src/components/image/core/pinscreen.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,aAAa,UAAoB,CAAC;AAC/C,eAAO,MAAM,UAAU,UAAwB,CAAC;AAEhD,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAG/B;AAwDD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// GENERATED from the lab (Claude outputs/gallery-lab/image/pinscreen.mjs) by emit_image.mjs — change the lab and re-emit.
|
|
2
|
+
// pinscreen — an image variant (type 'image', config.type 'pinscreen'). Material: MeshStandardMaterial (lit by the
|
|
3
|
+
// scene; object effects attach).
|
|
4
|
+
//
|
|
5
|
+
// The picture is a pinscreen: thousands of fine metal pins through a dark plate, each standing out by the
|
|
6
|
+
// picture's brightness under it and capped with a domed head carrying the picture's colour. The relief is real
|
|
7
|
+
// geometry, so the scene's light rolls over the heads and the pins shadow each other; from the side it reads as a
|
|
8
|
+
// sculpted field, from the front as the picture. A change is a pressure wave across the plate: under the front
|
|
9
|
+
// the pins sink back almost flush, their heads change colour at the bottom of the stroke (where the change is
|
|
10
|
+
// hidden in the plate's shadow) and rise again to the new picture's relief. The first picture rises out of a
|
|
11
|
+
// flat plate. Idle: a slow, very low swell runs through the pins. One InstancedMesh (one draw call) + the plate.
|
|
12
|
+
// Cursor: `press` pushes the pins in under the cursor (a hand behind the screen, inverted), `lift` draws them out.
|
|
13
|
+
import * as THREE from 'three';
|
|
14
|
+
import { baseUniforms, applyBase, setU, createPicture, stepPointer, patchMaterial, depthTwin, mulberry32 } from './imageCore.js';
|
|
15
|
+
export const POINTER_MODES = ['press', 'lift'];
|
|
16
|
+
export const STRUCTURAL = ['imageUrls', 'cols'];
|
|
17
|
+
export function createUniforms() {
|
|
18
|
+
return { ...baseUniforms(), uCols: { value: new THREE.Vector2(110, 70) }, uDepth: { value: 1 }, uDip: { value: 0.85 }, uPinSize: { value: 0.86 },
|
|
19
|
+
uPinColor: { value: new THREE.Color('#9aa0a8') }, uMetal: { value: 0.6 }, uRough: { value: 0.32 }, uSelf: { value: 0.15 } };
|
|
20
|
+
}
|
|
21
|
+
export function applyConfig(u, c) {
|
|
22
|
+
applyBase(u, c, POINTER_MODES);
|
|
23
|
+
setU(u, 'uDepth', c.depth);
|
|
24
|
+
setU(u, 'uDip', c.dip);
|
|
25
|
+
setU(u, 'uPinSize', c.pinSize);
|
|
26
|
+
setU(u, 'uPinColor', c.pinColor);
|
|
27
|
+
setU(u, 'uMetal', c.metal);
|
|
28
|
+
setU(u, 'uRough', c.roughness);
|
|
29
|
+
setU(u, 'uSelf', c.selfLight);
|
|
30
|
+
}
|
|
31
|
+
const pars = /* glsl */ `
|
|
32
|
+
uniform vec2 uCols; uniform float uDepth, uDip, uPinSize, uMetal, uRough; uniform vec3 uPinColor;
|
|
33
|
+
attribute vec3 aCell; // pin centre uv, random
|
|
34
|
+
varying vec3 vHeadCol; varying float vHead;
|
|
35
|
+
`;
|
|
36
|
+
const fragPars = /* glsl */ `
|
|
37
|
+
uniform vec2 uCols; uniform float uDepth, uDip, uPinSize, uMetal, uRough, uSelf; uniform vec3 uPinColor;
|
|
38
|
+
varying vec3 vHeadCol; varying float vHead;
|
|
39
|
+
`;
|
|
40
|
+
const vertex = /* glsl */ `
|
|
41
|
+
vec2 c = aCell.xy;
|
|
42
|
+
vec2 pitch = uSize / uCols;
|
|
43
|
+
float r = 0.5 * uPinSize * min(pitch.x, pitch.y);
|
|
44
|
+
float l = localP(c); float s = sstep(l);
|
|
45
|
+
vec3 ca = picAL(c, 2.5), cb = picBL(c, 2.5);
|
|
46
|
+
float ext = 0.012 + mix(luma(ca), luma(cb), s) * uDepth * 0.12;
|
|
47
|
+
ext *= 1.0 - uDip * sin(PI * l); // the pressure wave
|
|
48
|
+
ext += uBreathe * 0.004 * (0.5 + 0.5 * sin(uTime * 0.55 + c.x * 7.0 + c.y * 4.0 + aCell.z * 0.6));
|
|
49
|
+
vec2 xy = (c - 0.5) * uSize;
|
|
50
|
+
float pb = pointerBump(xy);
|
|
51
|
+
if (uPointerMode > -0.5 && uPointerMode < 0.5) ext = mix(ext, 0.006, min(1.0, pb));
|
|
52
|
+
else if (uPointerMode > 0.5) ext += 0.08 * pb;
|
|
53
|
+
// profile: z < -0.1 is the shaft (length 0.3), above it the head dome (scaled by the head radius)
|
|
54
|
+
float pz = position.z;
|
|
55
|
+
float z = pz >= -0.1 ? pz * r * 1.4 : -0.1 * r * 1.4 + (pz + 0.1) * 0.33;
|
|
56
|
+
fxP = vec3(xy + position.xy * r, ext + z);
|
|
57
|
+
fxN = normal;
|
|
58
|
+
vHead = smoothstep(-0.12, -0.06, pz);
|
|
59
|
+
// the head swaps colour at the bottom of the stroke
|
|
60
|
+
vHeadCol = mix(ca, cb, smoothstep(0.38, 0.62, l));
|
|
61
|
+
`;
|
|
62
|
+
const diffuse = /* glsl */ `
|
|
63
|
+
diffuseColor.rgb = mix(uPinColor, vHeadCol * uIntensity, vHead);
|
|
64
|
+
diffuseColor.a *= uOpacity;
|
|
65
|
+
`;
|
|
66
|
+
const emissive = /* glsl */ `
|
|
67
|
+
totalEmissiveRadiance += vHeadCol * uIntensity * uSelf * vHead;
|
|
68
|
+
`;
|
|
69
|
+
const roughness = /* glsl */ `
|
|
70
|
+
roughnessFactor = mix(uRough, uRough + 0.15, vHead);
|
|
71
|
+
metalnessFactor = mix(uMetal, 0.05, vHead);
|
|
72
|
+
`;
|
|
73
|
+
function pinGeometry() {
|
|
74
|
+
// a lathe profile about y, then turned to stand along +z: shaft (radius 0.55) then a domed head (radius 1)
|
|
75
|
+
const pts = [];
|
|
76
|
+
pts.push(new THREE.Vector2(0.001, -1.0), new THREE.Vector2(0.55, -1.0), new THREE.Vector2(0.55, -0.12), new THREE.Vector2(0.98, -0.1));
|
|
77
|
+
for (let i = 0; i <= 4; i++) {
|
|
78
|
+
const a = (i / 4) * Math.PI / 2;
|
|
79
|
+
pts.push(new THREE.Vector2(Math.cos(a) * 1.0 + 0.0, -0.1 + Math.sin(a) * 0.1 + 0.0));
|
|
80
|
+
}
|
|
81
|
+
pts.push(new THREE.Vector2(0.001, 0.0));
|
|
82
|
+
const g = new THREE.LatheGeometry(pts, 8);
|
|
83
|
+
g.rotateX(Math.PI / 2); // y -> z
|
|
84
|
+
return g;
|
|
85
|
+
}
|
|
86
|
+
export function build(u, c) {
|
|
87
|
+
const object = new THREE.Group();
|
|
88
|
+
const cols = Math.max(8, c.cols | 0), rows = Math.round(cols * 0.65);
|
|
89
|
+
u.uCols.value.set(cols, rows);
|
|
90
|
+
const base = pinGeometry();
|
|
91
|
+
const geo = new THREE.InstancedBufferGeometry();
|
|
92
|
+
geo.index = base.index;
|
|
93
|
+
geo.setAttribute('position', base.attributes.position);
|
|
94
|
+
geo.setAttribute('normal', base.attributes.normal);
|
|
95
|
+
const n = cols * rows, cell = new Float32Array(n * 3), rnd = mulberry32(5);
|
|
96
|
+
for (let j = 0; j < rows; j++)
|
|
97
|
+
for (let i = 0; i < cols; i++) {
|
|
98
|
+
const k = j * cols + i;
|
|
99
|
+
cell[k * 3] = (i + 0.5) / cols;
|
|
100
|
+
cell[k * 3 + 1] = (j + 0.5) / rows;
|
|
101
|
+
cell[k * 3 + 2] = rnd() * 6.28;
|
|
102
|
+
}
|
|
103
|
+
geo.setAttribute('aCell', new THREE.InstancedBufferAttribute(cell, 3));
|
|
104
|
+
geo.instanceCount = n;
|
|
105
|
+
geo.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 1.4);
|
|
106
|
+
const P = { key: 'pinscreen', uniforms: u, pars, vertexPars: '', fragmentPars: '', vertex, diffuse, roughness, emissive };
|
|
107
|
+
P.pars = '';
|
|
108
|
+
P.vertexPars = pars;
|
|
109
|
+
P.fragmentPars = fragPars;
|
|
110
|
+
const mat = patchMaterial(new THREE.MeshStandardMaterial({ roughness: 0.4, metalness: 0.5 }), P);
|
|
111
|
+
const pins = new THREE.Mesh(geo, mat);
|
|
112
|
+
pins.castShadow = true;
|
|
113
|
+
pins.receiveShadow = true;
|
|
114
|
+
pins.frustumCulled = false;
|
|
115
|
+
pins.customDepthMaterial = depthTwin(P);
|
|
116
|
+
// the plate: a thin box the pins go through, sized to the frame each frame
|
|
117
|
+
const plateMat = new THREE.MeshStandardMaterial({ color: c.plateColor, roughness: 0.8, metalness: 0.2 });
|
|
118
|
+
const plate = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), plateMat);
|
|
119
|
+
plate.receiveShadow = true;
|
|
120
|
+
plate.castShadow = true;
|
|
121
|
+
object.add(plate, pins);
|
|
122
|
+
const cfg = { ...c };
|
|
123
|
+
const pic = createPicture(u, cfg);
|
|
124
|
+
const pst = {};
|
|
125
|
+
const api = {
|
|
126
|
+
object, materials: [mat, plateMat],
|
|
127
|
+
controls: { show: (t) => pic.show(t), get busy() { return pic.busy; }, pic },
|
|
128
|
+
apply(k) { Object.assign(cfg, k); applyConfig(u, k); if (k.plateColor !== undefined)
|
|
129
|
+
plateMat.color.set(k.plateColor); if (k.opacity !== undefined) {
|
|
130
|
+
for (const m of [mat, plateMat]) {
|
|
131
|
+
m.transparent = k.opacity < 1;
|
|
132
|
+
m.opacity = k.opacity;
|
|
133
|
+
}
|
|
134
|
+
} },
|
|
135
|
+
update(dt, pointer) {
|
|
136
|
+
dt = Math.min(dt, 0.1);
|
|
137
|
+
u.uTime.value += dt;
|
|
138
|
+
pic.step(dt);
|
|
139
|
+
stepPointer(u, pointer, dt, pst);
|
|
140
|
+
const s = u.uSize.value;
|
|
141
|
+
plate.scale.set(s.x + 0.04, s.y + 0.04, 0.03);
|
|
142
|
+
plate.position.z = -0.015;
|
|
143
|
+
},
|
|
144
|
+
dispose() { base.dispose(); geo.dispose(); mat.dispose(); plateMat.dispose(); plate.geometry.dispose(); pins.customDepthMaterial.dispose(); pic.dispose(); },
|
|
145
|
+
};
|
|
146
|
+
return api;
|
|
147
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const POINTER_MODES: string[];
|
|
3
|
+
export declare const STRUCTURAL: string[];
|
|
4
|
+
export declare function createUniforms(): {
|
|
5
|
+
uCount: {
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
8
|
+
uVert: {
|
|
9
|
+
value: number;
|
|
10
|
+
};
|
|
11
|
+
uSettle: {
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
uGap: {
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
uSlat: {
|
|
18
|
+
value: THREE.Color;
|
|
19
|
+
};
|
|
20
|
+
uSelf: {
|
|
21
|
+
value: number;
|
|
22
|
+
};
|
|
23
|
+
uTexA: {
|
|
24
|
+
value: any;
|
|
25
|
+
};
|
|
26
|
+
uTexB: {
|
|
27
|
+
value: any;
|
|
28
|
+
};
|
|
29
|
+
uFitA: {
|
|
30
|
+
value: THREE.Vector2;
|
|
31
|
+
};
|
|
32
|
+
uFitB: {
|
|
33
|
+
value: THREE.Vector2;
|
|
34
|
+
};
|
|
35
|
+
uP: {
|
|
36
|
+
value: number;
|
|
37
|
+
};
|
|
38
|
+
uHasA: {
|
|
39
|
+
value: number;
|
|
40
|
+
};
|
|
41
|
+
uSeq: {
|
|
42
|
+
value: number;
|
|
43
|
+
};
|
|
44
|
+
uSize: {
|
|
45
|
+
value: THREE.Vector2;
|
|
46
|
+
};
|
|
47
|
+
uTime: {
|
|
48
|
+
value: number;
|
|
49
|
+
};
|
|
50
|
+
uDir: {
|
|
51
|
+
value: THREE.Vector2;
|
|
52
|
+
};
|
|
53
|
+
uSpread: {
|
|
54
|
+
value: number;
|
|
55
|
+
};
|
|
56
|
+
uBlank: {
|
|
57
|
+
value: THREE.Color;
|
|
58
|
+
};
|
|
59
|
+
uIntensity: {
|
|
60
|
+
value: number;
|
|
61
|
+
};
|
|
62
|
+
uOpacity: {
|
|
63
|
+
value: number;
|
|
64
|
+
};
|
|
65
|
+
uBreathe: {
|
|
66
|
+
value: number;
|
|
67
|
+
};
|
|
68
|
+
uPointer: {
|
|
69
|
+
value: THREE.Vector3;
|
|
70
|
+
};
|
|
71
|
+
uPointerVel: {
|
|
72
|
+
value: THREE.Vector2;
|
|
73
|
+
};
|
|
74
|
+
uPointerActive: {
|
|
75
|
+
value: number;
|
|
76
|
+
};
|
|
77
|
+
uPointerMode: {
|
|
78
|
+
value: number;
|
|
79
|
+
};
|
|
80
|
+
uPointerStrength: {
|
|
81
|
+
value: number;
|
|
82
|
+
};
|
|
83
|
+
uPointerRadius: {
|
|
84
|
+
value: number;
|
|
85
|
+
};
|
|
86
|
+
uPointerColor: {
|
|
87
|
+
value: THREE.Color;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
91
|
+
export declare function build(u: any, c: any): {
|
|
92
|
+
object: THREE.Group<THREE.Object3DEventMap>;
|
|
93
|
+
materials: any[];
|
|
94
|
+
controls: {
|
|
95
|
+
show: (t: any) => void;
|
|
96
|
+
readonly busy: boolean;
|
|
97
|
+
pic: {
|
|
98
|
+
st: {
|
|
99
|
+
A: any;
|
|
100
|
+
B: any;
|
|
101
|
+
aspA: number;
|
|
102
|
+
aspB: number;
|
|
103
|
+
p: number;
|
|
104
|
+
dir: number;
|
|
105
|
+
pending: any;
|
|
106
|
+
seq: number;
|
|
107
|
+
frame: number;
|
|
108
|
+
};
|
|
109
|
+
show: (tex: any) => void;
|
|
110
|
+
jump: (tex: any) => void;
|
|
111
|
+
step: (dt: any) => void;
|
|
112
|
+
readonly busy: boolean;
|
|
113
|
+
dispose(): void;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
apply(k: any): void;
|
|
117
|
+
update(dt: any, pointer: any): void;
|
|
118
|
+
dispose(): void;
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=prism.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prism.d.ts","sourceRoot":"","sources":["../../../../src/components/image/core/prism.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,aAAa,UAAmB,CAAC;AAC9C,eAAO,MAAM,UAAU,UAAqC,CAAC;AAE7D,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7B;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAG/B;AAkFD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BzB"}
|