@3driseai/3drise-viewer 0.1.40 → 0.1.42
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/dist/ui/UiLayers.d.ts +17 -1
- package/dist/ui/UiLayers.d.ts.map +1 -1
- package/dist/ui/UiLayers.js +76 -3
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// The approved lab module, verbatim but for its import paths and the lab's picture loader (Claude outputs/gallery-lab/
|
|
2
|
+
// wire.mjs). Plain JS-shaped code (the viewer compiles non-strict); typed at its one door, kit/GalleryVariant.tsx. Its own DEFAULTS only fill knobs the
|
|
3
|
+
// core defaults (DEFAULT_GALLERY_OBJECTS.wireRelief) do not carry; its own autoplay is never used.
|
|
4
|
+
// wire — "Wire Relief". Every picture is a fine wire mesh lifted by its own brightness (a height field on a
|
|
5
|
+
// regular grid), drawn as hairlines, with colour panels between the wires. An inactive picture is a flat grey wire
|
|
6
|
+
// grid, no panels. When it becomes the active one a soft wave crosses it: behind the wave the grid rises into the
|
|
7
|
+
// picture's relief and the panels fill in with the picture's colour, the wires fading back to a faint tracery over
|
|
8
|
+
// it. Near the cursor the panels lift away and only the wire shows. Self-coloured.
|
|
9
|
+
import * as THREE from 'three';
|
|
10
|
+
import { BASE_DEFAULTS, BASE_GUI_MOTION, BASE_GUI_TAIL, LAYOUT_GUI, baseUniforms, applyBase, baseGlsl, instanced, shaderMaterial, makeGallery, withLean, fragHead } from '../kit/lookBase.js';
|
|
11
|
+
export const catalog = { key: 'wireRelief', name: 'Wire Relief', camera: { position: [1.2, 0.55, 4.3], target: [0, 0, 0] },
|
|
12
|
+
description: 'Pictures as a fine wire mesh lifted by their own brightness: inactive ones are a flat grey wire grid, the active one rises into relief and fills with colour panels behind a soft wave; near the cursor the panels lift away to the wire. Use for tech, data, architecture and engineering showcases.',
|
|
13
|
+
tags: ['gallery', 'wireframe', 'relief', 'mesh', 'tech', 'interactive'] };
|
|
14
|
+
export const DEFAULTS = {
|
|
15
|
+
...BASE_DEFAULTS, type: 'wireRelief', aspect: 1.4, width: 2.2, cells: 56, // structural
|
|
16
|
+
relief: 0.22, wire: 0.55, wireColor: '#9fb3d9', changeTime: 2.0, dim: 0.5,
|
|
17
|
+
pointerMode: 'reveal', pointerRadius: 0.5, lift: 0.08,
|
|
18
|
+
};
|
|
19
|
+
export const STRUCTURAL = ['imageUrls', 'aspect', 'width', 'cells'];
|
|
20
|
+
export const POINTER_MODES = ['reveal'];
|
|
21
|
+
export const GUI = [
|
|
22
|
+
{ key: 'lean', min: 0, max: 3, step: 0.01, tip: 'The gallery turns toward the cursor' },
|
|
23
|
+
{ key: 'aspect', min: 0.6, max: 2.5, step: 0.01 }, { key: 'width', min: 1, max: 4, step: 0.01 }, { key: 'cells', min: 12, max: 120, step: 1, tip: 'Grid cells across a picture' },
|
|
24
|
+
...LAYOUT_GUI, ...BASE_GUI_MOTION,
|
|
25
|
+
{ key: 'relief', min: 0, max: 0.6, step: 0.005, tip: 'Height of the relief at the brightest point' }, { key: 'wire', min: 0, max: 1.5, step: 0.01, tip: 'Brightness of the wires' },
|
|
26
|
+
{ key: 'pointerMode', options: ['none', ...POINTER_MODES] }, ...BASE_GUI_TAIL, { key: 'lift', min: 0, max: 0.3, step: 0.005, tip: 'How far the panels lift away under the cursor' },
|
|
27
|
+
{ key: 'wireColor', color: true },
|
|
28
|
+
];
|
|
29
|
+
export const PRESETS = [
|
|
30
|
+
{ name: 'Wire', description: 'The default.', patch: {} },
|
|
31
|
+
{ name: 'Survey mesh', description: 'A dense fine grid, low relief.', patch: { cells: 100, relief: 0.12, wire: 0.4 } },
|
|
32
|
+
{ name: 'Terrain', description: 'Coarse grid, deep relief.', patch: { cells: 28, relief: 0.4, wire: 0.8 } },
|
|
33
|
+
];
|
|
34
|
+
export function createUniforms() { return { ...baseUniforms(), uRelief: { value: 0.22 }, uWire: { value: 0.55 }, uLift: { value: 0.08 }, uWireColor: { value: new THREE.Color('#9fb3d9') } }; }
|
|
35
|
+
export function applyConfig(u, c) { const set = applyBase(u, c, POINTER_MODES); set('uRelief', c.relief); set('uWire', c.wire); set('uLift', c.lift); set('uWireColor', c.wireColor); }
|
|
36
|
+
const common = /* glsl */ `
|
|
37
|
+
precision highp sampler2DArray;
|
|
38
|
+
uniform sampler2DArray uTex;
|
|
39
|
+
attribute vec4 aI;
|
|
40
|
+
${baseGlsl}
|
|
41
|
+
uniform float uRelief, uLift;
|
|
42
|
+
varying vec2 vUv; varying float vImg; varying float vS; varying float vM; varying float vAlpha;
|
|
43
|
+
vec3 surface(float img, vec2 g, float lift){
|
|
44
|
+
vec2 p = vec2((g.x - 0.5) * uW, (g.y - 0.5) * uH);
|
|
45
|
+
float L = lumOf(textureLod(uTex, vec3(g, img), 2.0).rgb);
|
|
46
|
+
float s = waveAt(actOf(img), g);
|
|
47
|
+
float m = maskAt(p);
|
|
48
|
+
vUv = g; vImg = img; vS = s; vM = m; vAlpha = fadeAt(img);
|
|
49
|
+
return placeAt(img, vec3(p, uRelief * L * s + lift * m * s));
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
const panelVert = /* glsl */ `
|
|
53
|
+
${common}
|
|
54
|
+
void main(){ gl_Position = projectionMatrix * modelViewMatrix * vec4(surface(aI.x, position.xy + 0.5, uLift), 1.0); }
|
|
55
|
+
`;
|
|
56
|
+
const wireVert = /* glsl */ `
|
|
57
|
+
${common}
|
|
58
|
+
void main(){ gl_Position = projectionMatrix * modelViewMatrix * vec4(surface(aI.x, position.xy + 0.5, 0.0) + vec3(0.0, 0.0, 0.0015), 1.0); }
|
|
59
|
+
`;
|
|
60
|
+
const panelFrag = /* glsl */ `
|
|
61
|
+
${fragHead}
|
|
62
|
+
precision highp sampler2DArray;
|
|
63
|
+
uniform sampler2DArray uTex;
|
|
64
|
+
${baseGlsl}
|
|
65
|
+
varying vec2 vUv; varying float vImg; varying float vS; varying float vM; varying float vAlpha;
|
|
66
|
+
void main(){
|
|
67
|
+
vec3 pic = texture(uTex, vec3(vUv, vImg)).rgb;
|
|
68
|
+
float a = smoothstep(0.25, 0.95, vS) * (1.0 - 0.95 * vM) * vAlpha * uOpacity;
|
|
69
|
+
if (a < 0.003) discard;
|
|
70
|
+
gl_FragColor = vec4(pic * uIntensity * a, a);
|
|
71
|
+
#include <tonemapping_fragment>
|
|
72
|
+
#include <colorspace_fragment>
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
const wireFrag = /* glsl */ `
|
|
76
|
+
${fragHead}
|
|
77
|
+
precision highp sampler2DArray;
|
|
78
|
+
uniform sampler2DArray uTex;
|
|
79
|
+
${baseGlsl}
|
|
80
|
+
uniform float uWire; uniform vec3 uWireColor;
|
|
81
|
+
varying vec2 vUv; varying float vImg; varying float vS; varying float vM; varying float vAlpha;
|
|
82
|
+
void main(){
|
|
83
|
+
vec3 pic = texture(uTex, vec3(vUv, vImg)).rgb;
|
|
84
|
+
// grey wire when inactive; over the panels a faint tracery tinted by the picture; full again under the cursor
|
|
85
|
+
vec3 c = mix(fadedOf(pic) * 1.8 + uWireColor * 0.08, mix(uWireColor, pic, 0.5) * 0.5, vS);
|
|
86
|
+
float a = uWire * mix(0.9, 0.14, vS * (1.0 - vM)) * vAlpha * uOpacity;
|
|
87
|
+
if (a < 0.003) discard;
|
|
88
|
+
gl_FragColor = vec4(c * uIntensity * a, a);
|
|
89
|
+
#include <tonemapping_fragment>
|
|
90
|
+
#include <colorspace_fragment>
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
/** The grid's wires as line segments over a unit plane (-0.5..0.5). */
|
|
94
|
+
function gridLines(cx, cy) {
|
|
95
|
+
const pos = [];
|
|
96
|
+
for (let j = 0; j <= cy; j++)
|
|
97
|
+
for (let i = 0; i < cx; i++) {
|
|
98
|
+
const y = j / cy - 0.5;
|
|
99
|
+
pos.push(i / cx - 0.5, y, 0, (i + 1) / cx - 0.5, y, 0);
|
|
100
|
+
}
|
|
101
|
+
for (let i = 0; i <= cx; i++)
|
|
102
|
+
for (let j = 0; j < cy; j++) {
|
|
103
|
+
const x = i / cx - 0.5;
|
|
104
|
+
pos.push(x, j / cy - 0.5, 0, x, (j + 1) / cy - 0.5, 0);
|
|
105
|
+
}
|
|
106
|
+
const g = new THREE.BufferGeometry();
|
|
107
|
+
g.setAttribute('position', new THREE.Float32BufferAttribute(pos, 3));
|
|
108
|
+
return g;
|
|
109
|
+
}
|
|
110
|
+
export function build(u, c) { return withLean(buildGallery(u, c), c); }
|
|
111
|
+
function buildGallery(u, c) {
|
|
112
|
+
const W = c.width, H = W / c.aspect, cx = Math.max(4, c.cells | 0), cy = Math.max(3, Math.round(cx / c.aspect));
|
|
113
|
+
const pgeo = instanced(new THREE.PlaneGeometry(1, 1, cx, cy), 1, () => [0, 0]);
|
|
114
|
+
const wgeo = instanced(gridLines(cx, cy), 1, () => [0, 0]);
|
|
115
|
+
const pmat = shaderMaterial(u, panelVert, panelFrag);
|
|
116
|
+
const wmat = shaderMaterial(u, wireVert, wireFrag, { depthWrite: false });
|
|
117
|
+
const panels = new THREE.Mesh(pgeo, pmat);
|
|
118
|
+
panels.frustumCulled = false;
|
|
119
|
+
panels.raycast = () => { };
|
|
120
|
+
const wires = new THREE.LineSegments(wgeo, wmat);
|
|
121
|
+
wires.frustumCulled = false;
|
|
122
|
+
wires.raycast = () => { };
|
|
123
|
+
wires.renderOrder = 1;
|
|
124
|
+
const g = makeGallery(u, c, { W, H, meshes: [panels, wires], setCount: (n) => { pgeo.instanceCount = n; wgeo.instanceCount = n; } });
|
|
125
|
+
const apply = g.apply;
|
|
126
|
+
g.apply = (k) => { apply(k); applyConfig(u, k); };
|
|
127
|
+
return g;
|
|
128
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContourImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type ContourImageProps = ImageVariantProps<ContourImageConfig>;
|
|
4
|
+
/** The picture as a topographic map of itself: a change opens it into hairline contour lines that lift into a floating stack in depth and flow continuously into the new picture's contours before it fills back in. Use for tech, data, science and architecture. */
|
|
5
|
+
declare const ContourImage: import("react").FC<ImageVariantProps<ContourImageConfig>>;
|
|
6
|
+
export default ContourImage;
|
|
7
|
+
//# sourceMappingURL=ContourImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContourImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/ContourImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAEtE,sQAAsQ;AACtQ,QAAA,MAAM,YAAY,2DAAuI,CAAC;AAC1J,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/contour.js';
|
|
4
|
+
/** The picture as a topographic map of itself: a change opens it into hairline contour lines that lift into a floating stack in depth and flow continuously into the new picture's contours before it fills back in. Use for tech, data, science and architecture. */
|
|
5
|
+
const ContourImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.contour, IMAGE_OBJECTS_ANIMATABLE.contour);
|
|
6
|
+
export default ContourImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EngravingImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type EngravingImageProps = ImageVariantProps<EngravingImageConfig>;
|
|
4
|
+
/** The picture as an ink engraving on paper, fine strokes laid along its own isophotes, dense where it is dark, at a depth set by brightness; a change lifts and turns every stroke to the new picture's flow like filings in a field. Use for luxury, editorial, banknote and art direction. */
|
|
5
|
+
declare const EngravingImage: import("react").FC<ImageVariantProps<EngravingImageConfig>>;
|
|
6
|
+
export default EngravingImage;
|
|
7
|
+
//# sourceMappingURL=EngravingImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngravingImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/EngravingImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAE1E,iSAAiS;AACjS,QAAA,MAAM,cAAc,6DAA+I,CAAC;AACpK,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/engraving.js';
|
|
4
|
+
/** The picture as an ink engraving on paper, fine strokes laid along its own isophotes, dense where it is dark, at a depth set by brightness; a change lifts and turns every stroke to the new picture's flow like filings in a field. Use for luxury, editorial, banknote and art direction. */
|
|
5
|
+
const EngravingImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.engraving, IMAGE_OBJECTS_ANIMATABLE.engraving);
|
|
6
|
+
export default EngravingImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FrostImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type FrostImageProps = ImageVariantProps<FrostImageConfig>;
|
|
4
|
+
/** A print behind a pane of real glass; a change is a breath of frost that feathers in from the edges, blurs the print through the glass, and clears from the centre to reveal the new picture; the cursor wipes the glass. Use for winter, luxury, beauty and calm editorial. */
|
|
5
|
+
declare const FrostImage: import("react").FC<ImageVariantProps<FrostImageConfig>>;
|
|
6
|
+
export default FrostImage;
|
|
7
|
+
//# sourceMappingURL=FrostImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrostImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/FrostImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAElE,kRAAkR;AAClR,QAAA,MAAM,UAAU,yDAA+H,CAAC;AAChJ,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/frost.js';
|
|
4
|
+
/** A print behind a pane of real glass; a change is a breath of frost that feathers in from the edges, blurs the print through the glass, and clears from the centre to reveal the new picture; the cursor wipes the glass. Use for winter, luxury, beauty and calm editorial. */
|
|
5
|
+
const FrostImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.frost, IMAGE_OBJECTS_ANIMATABLE.frost);
|
|
6
|
+
export default FrostImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LenticularImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type LenticularImageProps = ImageVariantProps<LenticularImageConfig>;
|
|
4
|
+
/** A lenticular print: fine lenses over interleaved strips of the old and new picture; a change sweeps the flip across the sheet and depends on the viewing angle, with ribbed clearcoat highlights from the scene light. Use for collectibles, posters, fashion and retail. */
|
|
5
|
+
declare const LenticularImage: import("react").FC<ImageVariantProps<LenticularImageConfig>>;
|
|
6
|
+
export default LenticularImage;
|
|
7
|
+
//# sourceMappingURL=LenticularImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LenticularImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/LenticularImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAE5E,gRAAgR;AAChR,QAAA,MAAM,eAAe,8DAAmJ,CAAC;AACzK,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/lenticular.js';
|
|
4
|
+
/** A lenticular print: fine lenses over interleaved strips of the old and new picture; a change sweeps the flip across the sheet and depends on the viewing angle, with ribbed clearcoat highlights from the scene light. Use for collectibles, posters, fashion and retail. */
|
|
5
|
+
const LenticularImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.lenticular, IMAGE_OBJECTS_ANIMATABLE.lenticular);
|
|
6
|
+
export default LenticularImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PinscreenImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type PinscreenImageProps = ImageVariantProps<PinscreenImageConfig>;
|
|
4
|
+
/** The picture as a pinscreen of fine metal pins, each standing out by the brightness under it with a domed head in the picture's colour; a change is a pressure wave that sinks the pins and raises the new relief. Use for tech, product and sculptural heroes. */
|
|
5
|
+
declare const PinscreenImage: import("react").FC<ImageVariantProps<PinscreenImageConfig>>;
|
|
6
|
+
export default PinscreenImage;
|
|
7
|
+
//# sourceMappingURL=PinscreenImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinscreenImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/PinscreenImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAE1E,qQAAqQ;AACrQ,QAAA,MAAM,cAAc,6DAA+I,CAAC;AACpK,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/pinscreen.js';
|
|
4
|
+
/** The picture as a pinscreen of fine metal pins, each standing out by the brightness under it with a domed head in the picture's colour; a change is a pressure wave that sinks the pins and raises the new relief. Use for tech, product and sculptural heroes. */
|
|
5
|
+
const PinscreenImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.pinscreen, IMAGE_OBJECTS_ANIMATABLE.pinscreen);
|
|
6
|
+
export default PinscreenImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PrismImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type PrismImageProps = ImageVariantProps<PrismImageConfig>;
|
|
4
|
+
/** The picture printed across a row of slim triangular prisms; a change turns each prism a third of a turn in a travelling wave, its faces passing through the scene light, to show the next picture. Use for signage, retail, product and campaign heroes. */
|
|
5
|
+
declare const PrismImage: import("react").FC<ImageVariantProps<PrismImageConfig>>;
|
|
6
|
+
export default PrismImage;
|
|
7
|
+
//# sourceMappingURL=PrismImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/PrismImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAElE,+PAA+P;AAC/P,QAAA,MAAM,UAAU,yDAA+H,CAAC;AAChJ,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/prism.js';
|
|
4
|
+
/** The picture printed across a row of slim triangular prisms; a change turns each prism a third of a turn in a travelling wave, its faces passing through the scene light, to show the next picture. Use for signage, retail, product and campaign heroes. */
|
|
5
|
+
const PrismImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.prism, IMAGE_OBJECTS_ANIMATABLE.prism);
|
|
6
|
+
export default PrismImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProjectorImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type ProjectorImageProps = ImageVariantProps<ProjectorImageConfig>;
|
|
4
|
+
/** The picture as projected light on a matte screen, thrown from a lens above, with a visible haze beam and dust lit by the image; a change racks focus and slides the next slide through the gate. Use for cinema, exhibitions, moody and nostalgic scenes. */
|
|
5
|
+
declare const ProjectorImage: import("react").FC<ImageVariantProps<ProjectorImageConfig>>;
|
|
6
|
+
export default ProjectorImage;
|
|
7
|
+
//# sourceMappingURL=ProjectorImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectorImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/ProjectorImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAE1E,gQAAgQ;AAChQ,QAAA,MAAM,cAAc,6DAA+I,CAAC;AACpK,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/projector.js';
|
|
4
|
+
/** The picture as projected light on a matte screen, thrown from a lens above, with a visible haze beam and dust lit by the image; a change racks focus and slides the next slide through the gate. Use for cinema, exhibitions, moody and nostalgic scenes. */
|
|
5
|
+
const ProjectorImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.projector, IMAGE_OBJECTS_ANIMATABLE.projector);
|
|
6
|
+
export default ProjectorImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReliefImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type ReliefImageProps = ImageVariantProps<ReliefImageConfig>;
|
|
4
|
+
/** The picture embossed into paper by its own local contrast and lit by the scene; a change is a soft press travelling across the sheet, flattening the old impression and raising the new one as its ink lays down. Use for editorial, print, craft and product heroes. */
|
|
5
|
+
declare const ReliefImage: import("react").FC<ImageVariantProps<ReliefImageConfig>>;
|
|
6
|
+
export default ReliefImage;
|
|
7
|
+
//# sourceMappingURL=ReliefImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReliefImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/ReliefImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEpE,4QAA4Q;AAC5Q,QAAA,MAAM,WAAW,0DAAmI,CAAC;AACrJ,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/relief.js';
|
|
4
|
+
/** The picture embossed into paper by its own local contrast and lit by the scene; a change is a soft press travelling across the sheet, flattening the old impression and raising the new one as its ink lays down. Use for editorial, print, craft and product heroes. */
|
|
5
|
+
const ReliefImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.relief, IMAGE_OBJECTS_ANIMATABLE.relief);
|
|
6
|
+
export default ReliefImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RollImageConfig } from '@3driseai/3drise-core';
|
|
2
|
+
import type { ImageVariantProps } from './imageVariant';
|
|
3
|
+
export type RollImageProps = ImageVariantProps<RollImageConfig>;
|
|
4
|
+
/** A print on paper; a change is a slim paper roll travelling across it, winding up the old print and laying down the new one, lit and shadowed by the scene. Use for editorial, stationery, packaging and calm product heroes. */
|
|
5
|
+
declare const RollImage: import("react").FC<ImageVariantProps<RollImageConfig>>;
|
|
6
|
+
export default RollImage;
|
|
7
|
+
//# sourceMappingURL=RollImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RollImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/RollImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;AAEhE,mOAAmO;AACnO,QAAA,MAAM,SAAS,wDAA2H,CAAC;AAC3I,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_IMAGE_OBJECTS, IMAGE_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
2
|
+
import { makeImageVariant } from './imageVariant.js';
|
|
3
|
+
import * as variant from './core/roll.js';
|
|
4
|
+
/** A print on paper; a change is a slim paper roll travelling across it, winding up the old print and laying down the new one, lit and shadowed by the scene. Use for editorial, stationery, packaging and calm product heroes. */
|
|
5
|
+
const RollImage = makeImageVariant(variant, DEFAULT_IMAGE_OBJECTS.roll, IMAGE_OBJECTS_ANIMATABLE.roll);
|
|
6
|
+
export default RollImage;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import type { AnimationOptions, MouseMoveDomain, ShardsImageConfig } from '@3driseai/3drise-core';
|
|
4
|
+
import type { ObjectReadyProps } from '../../types/objectReady';
|
|
5
|
+
export declare const POINTER_MODES: readonly ["tilt", "lift", "ripple"];
|
|
6
|
+
export declare const ORDERS: readonly ["sweep", "radial", "random"];
|
|
7
|
+
type Uniforms = ReturnType<typeof createUniforms>;
|
|
8
|
+
export declare function createUniforms(): {
|
|
9
|
+
uTexA: {
|
|
10
|
+
value: THREE.Texture | null;
|
|
11
|
+
};
|
|
12
|
+
uTexB: {
|
|
13
|
+
value: THREE.Texture | null;
|
|
14
|
+
};
|
|
15
|
+
/** cover-fit of each picture into the slab: scale.xy, offset.xy */
|
|
16
|
+
uFitA: {
|
|
17
|
+
value: THREE.Vector4;
|
|
18
|
+
};
|
|
19
|
+
uFitB: {
|
|
20
|
+
value: THREE.Vector4;
|
|
21
|
+
};
|
|
22
|
+
uPhase: {
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
uSweep: {
|
|
26
|
+
value: THREE.Vector2;
|
|
27
|
+
};
|
|
28
|
+
uOrder: {
|
|
29
|
+
value: number;
|
|
30
|
+
};
|
|
31
|
+
uSpread: {
|
|
32
|
+
value: number;
|
|
33
|
+
};
|
|
34
|
+
uJitter: {
|
|
35
|
+
value: number;
|
|
36
|
+
};
|
|
37
|
+
uLift: {
|
|
38
|
+
value: number;
|
|
39
|
+
};
|
|
40
|
+
uDrift: {
|
|
41
|
+
value: number;
|
|
42
|
+
};
|
|
43
|
+
uSpin: {
|
|
44
|
+
value: number;
|
|
45
|
+
};
|
|
46
|
+
uBreathe: {
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
uSeams: {
|
|
50
|
+
value: number;
|
|
51
|
+
};
|
|
52
|
+
uTime: {
|
|
53
|
+
value: number;
|
|
54
|
+
};
|
|
55
|
+
uHalfH: {
|
|
56
|
+
value: number;
|
|
57
|
+
};
|
|
58
|
+
uKbZoom: {
|
|
59
|
+
value: number;
|
|
60
|
+
};
|
|
61
|
+
uKbPan: {
|
|
62
|
+
value: THREE.Vector2;
|
|
63
|
+
};
|
|
64
|
+
uEdgeColor: {
|
|
65
|
+
value: THREE.Color;
|
|
66
|
+
};
|
|
67
|
+
uRimColor: {
|
|
68
|
+
value: THREE.Color;
|
|
69
|
+
};
|
|
70
|
+
uPointerColor: {
|
|
71
|
+
value: THREE.Color;
|
|
72
|
+
};
|
|
73
|
+
uRim: {
|
|
74
|
+
value: number;
|
|
75
|
+
};
|
|
76
|
+
uIntensity: {
|
|
77
|
+
value: number;
|
|
78
|
+
};
|
|
79
|
+
uOpacity: {
|
|
80
|
+
value: number;
|
|
81
|
+
};
|
|
82
|
+
uPointer: {
|
|
83
|
+
value: THREE.Vector3;
|
|
84
|
+
};
|
|
85
|
+
uPointerVel: {
|
|
86
|
+
value: THREE.Vector3;
|
|
87
|
+
};
|
|
88
|
+
uPointerActive: {
|
|
89
|
+
value: number;
|
|
90
|
+
};
|
|
91
|
+
uPointerMode: {
|
|
92
|
+
value: number;
|
|
93
|
+
};
|
|
94
|
+
uPointerStrength: {
|
|
95
|
+
value: number;
|
|
96
|
+
};
|
|
97
|
+
uPointerRadius: {
|
|
98
|
+
value: number;
|
|
99
|
+
};
|
|
100
|
+
uPointerT: {
|
|
101
|
+
value: number;
|
|
102
|
+
};
|
|
103
|
+
uBackColor: {
|
|
104
|
+
value: THREE.Color;
|
|
105
|
+
};
|
|
106
|
+
uFlight: {
|
|
107
|
+
value: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** Every non-structural knob reaches a uniform here — the single door; the animatable list is what it writes. */
|
|
111
|
+
export declare function applyConfig(u: Uniforms, c: Record<string, unknown>): void;
|
|
112
|
+
export interface ShardsImageProps extends ObjectReadyProps {
|
|
113
|
+
config: ShardsImageConfig;
|
|
114
|
+
/** Scene object id: the live-edit handle is found by it. */
|
|
115
|
+
id?: string;
|
|
116
|
+
/** Keyframes on the config knobs (animations.image.animations). */
|
|
117
|
+
keyframes?: AnimationOptions[];
|
|
118
|
+
/** Pointer bindings on the config knobs (mouseMove.image). */
|
|
119
|
+
mouseMove?: MouseMoveDomain;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A picture tessellated into shards that lift, flip edge-on and land as the next picture in a travelling wave whenever the image changes; the cursor tilts, lifts or ripples the shards. Use for hero images, portfolios and product reveals.
|
|
123
|
+
*/
|
|
124
|
+
declare const ShardsImage: React.FC<ShardsImageProps>;
|
|
125
|
+
export default ShardsImage;
|
|
126
|
+
//# sourceMappingURL=ShardsImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShardsImage.d.ts","sourceRoot":"","sources":["../../../src/components/image/ShardsImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmE,MAAM,OAAO,CAAC;AACxF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA0BhE,eAAO,MAAM,aAAa,qCAAsC,CAAC;AACjE,eAAO,MAAM,MAAM,wCAAyC,CAAC;AAE7D,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAqBlD,wBAAgB,cAAc;;eAEE,KAAK,CAAC,OAAO,GAAG,IAAI;;;eAA4B,KAAK,CAAC,OAAO,GAAG,IAAI;;IAC5F,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB1E;AAED,iHAAiH;AACjH,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAgBlE;AA4OD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACtD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4DAA4D;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED;;GAEG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkG3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|