@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,211 @@
|
|
|
1
|
+
// The gallery lab's shared base for the second batch of looks, verbatim but for its import paths
|
|
2
|
+
// (Claude outputs/gallery-lab/lookBase.mjs). Plain JS-shaped code; typed at its one door, GalleryVariant.tsx.
|
|
3
|
+
// lookBase — what the second batch of gallery looks share: the per-picture active value, the soft change wave,
|
|
4
|
+
// the cursor mask, the layout placement, the navigation and the picture texture. A look adds its own meshes
|
|
5
|
+
// (self-coloured ShaderMaterials, or scene-lit standard materials through litMaterial) and its own per-frame work.
|
|
6
|
+
//
|
|
7
|
+
// act per picture, 0 → 1 at a constant rate (changeTime) toward "this is the front picture": never jumps,
|
|
8
|
+
// reverses cleanly half-way.
|
|
9
|
+
// wave waveAt(act, uv): a soft front crossing the picture (slightly diagonal) — 1 behind it, 0 ahead.
|
|
10
|
+
// mask maskAt(p): the cursor's soft disc (pointerRadius) in the gallery's own frame.
|
|
11
|
+
// place placeAt(img, local) / fadeAt(img): the shared layouts (row, wave, ring, helix, tunnel, stack, fan,
|
|
12
|
+
// constellation), one matrix per picture.
|
|
13
|
+
import * as THREE from 'three';
|
|
14
|
+
import { fragHead, createScroll, focusAt, approach, withLean } from './galleryKit.js';
|
|
15
|
+
import { createLayout, layoutUniforms, fillLayout, layoutGlsl, LAYOUT_GUI } from './galleryKit.js';
|
|
16
|
+
export { fragHead, LAYOUT_GUI, withLean };
|
|
17
|
+
export const MAXI = 32;
|
|
18
|
+
export const BASE_DEFAULTS = {
|
|
19
|
+
enabled: true, lean: 1, imageUrls: [], autoplay: 0, intensity: 1, opacity: 1,
|
|
20
|
+
layout: 'row', spacing: 1.3, depth: 1.0, visible: 2.4, shape: 1,
|
|
21
|
+
stiffness: 26, damping: 8.5, throwing: 0.12,
|
|
22
|
+
changeTime: 1.8, wave: 0.35, slant: 0.3, dim: 0.3,
|
|
23
|
+
pointerStrength: 1, pointerRadius: 0.5,
|
|
24
|
+
};
|
|
25
|
+
export const BASE_GUI_MOTION = [
|
|
26
|
+
{ key: 'stiffness', min: 5, max: 120, step: 1 }, { key: 'damping', min: 2, max: 30, step: 0.1 },
|
|
27
|
+
{ key: 'changeTime', min: 0.4, max: 6, step: 0.1, tip: 'Seconds the change takes to cross a picture' },
|
|
28
|
+
{ key: 'wave', min: 0.05, max: 1, step: 0.01, tip: 'Width of the soft change wave' }, { key: 'slant', min: 0, max: 1, step: 0.01, tip: 'How diagonal the wave is' },
|
|
29
|
+
{ key: 'dim', min: 0, max: 1, step: 0.01, tip: 'Brightness of the inactive pictures' },
|
|
30
|
+
{ key: 'autoplay', min: 0, max: 20, step: 0.5 },
|
|
31
|
+
];
|
|
32
|
+
export const BASE_GUI_TAIL = [
|
|
33
|
+
{ key: 'pointerStrength', min: 0, max: 2, step: 0.01 }, { key: 'pointerRadius', min: 0.1, max: 2, step: 0.01 },
|
|
34
|
+
{ key: 'intensity', min: 0, max: 3, step: 0.01 }, { key: 'opacity', min: 0, max: 1, step: 0.01 },
|
|
35
|
+
];
|
|
36
|
+
export function baseUniforms() {
|
|
37
|
+
return {
|
|
38
|
+
...layoutUniforms(), uTex: { value: null }, uS: { value: 0 }, uCount: { value: 1 }, uTime: { value: 0 },
|
|
39
|
+
uAct: { value: new Float32Array(MAXI).fill(0) },
|
|
40
|
+
uW: { value: 2 }, uH: { value: 1.4 }, uWave: { value: 0.35 }, uSlant: { value: 0.3 }, uDim: { value: 0.3 },
|
|
41
|
+
uIntensity: { value: 1 }, uOpacity: { value: 1 },
|
|
42
|
+
uPointer: { value: new THREE.Vector3() }, uPointerActive: { value: 0 }, uPointerMode: { value: 0 }, uPointerStrength: { value: 1 }, uPointerRadius: { value: 0.5 },
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function applyBase(u, c, modes) {
|
|
46
|
+
const set = (k, v) => { if (v === undefined || !u[k])
|
|
47
|
+
return; if (u[k].value && u[k].value.isColor) {
|
|
48
|
+
if (v.isColor)
|
|
49
|
+
u[k].value.copy(v);
|
|
50
|
+
else
|
|
51
|
+
u[k].value.set(v);
|
|
52
|
+
}
|
|
53
|
+
else
|
|
54
|
+
u[k].value = v; };
|
|
55
|
+
set('uWave', c.wave);
|
|
56
|
+
set('uSlant', c.slant);
|
|
57
|
+
set('uDim', c.dim);
|
|
58
|
+
set('uIntensity', c.intensity);
|
|
59
|
+
set('uOpacity', c.opacity);
|
|
60
|
+
set('uPointerStrength', c.pointerStrength);
|
|
61
|
+
set('uPointerRadius', c.pointerRadius);
|
|
62
|
+
if (c.pointerMode !== undefined)
|
|
63
|
+
u.uPointerMode.value = modes.indexOf(c.pointerMode);
|
|
64
|
+
return set;
|
|
65
|
+
}
|
|
66
|
+
/** GLSL shared by every shader of the batch (vertex and fragment). */
|
|
67
|
+
export const baseGlsl = /* glsl */ `
|
|
68
|
+
uniform float uS, uCount, uTime, uW, uH, uWave, uSlant, uDim, uIntensity, uOpacity;
|
|
69
|
+
uniform float uAct[${MAXI}];
|
|
70
|
+
uniform vec3 uPointer; uniform float uPointerActive, uPointerMode, uPointerStrength, uPointerRadius;
|
|
71
|
+
${layoutGlsl}
|
|
72
|
+
float actOf(float img){ return uAct[int(img + 0.5)]; }
|
|
73
|
+
float waveAt(float act, vec2 g){
|
|
74
|
+
float pos = mix(g.x, 1.0 - g.y, uSlant * 0.5);
|
|
75
|
+
float front = act * (1.0 + uWave) - uWave * 0.5;
|
|
76
|
+
float w = smoothstep(front + uWave * 0.5, front - uWave * 0.5, pos);
|
|
77
|
+
return w * w * (3.0 - 2.0 * w);
|
|
78
|
+
}
|
|
79
|
+
float maskAt(vec2 p){ if (uPointerMode < -0.5) return 0.0; float d = length(p - uPointer.xy); return uPointerActive * uPointerStrength * (1.0 - smoothstep(uPointerRadius * 0.4, uPointerRadius, d)); }
|
|
80
|
+
float lumOf(vec3 c){ return dot(c, vec3(0.299, 0.587, 0.114)); }
|
|
81
|
+
// the inactive look: the picture's own luminance, grey and dim
|
|
82
|
+
vec3 fadedOf(vec3 pic){ return vec3(0.1 + 0.9 * lumOf(pic)) * uDim; }
|
|
83
|
+
`;
|
|
84
|
+
/** An instanced geometry: `base` repeated `per` times for each of the 32 pictures; aI = (picture, index, u, v). */
|
|
85
|
+
export function instanced(base, per, cell) {
|
|
86
|
+
const g = new THREE.InstancedBufferGeometry();
|
|
87
|
+
g.index = base.index;
|
|
88
|
+
for (const k of Object.keys(base.attributes))
|
|
89
|
+
g.setAttribute(k, base.attributes[k]);
|
|
90
|
+
const a = new Float32Array(MAXI * per * 4);
|
|
91
|
+
for (let i = 0; i < MAXI; i++)
|
|
92
|
+
for (let k = 0; k < per; k++) {
|
|
93
|
+
const [uu, vv] = cell(k);
|
|
94
|
+
a.set([i, k, uu, vv], (i * per + k) * 4);
|
|
95
|
+
}
|
|
96
|
+
g.setAttribute('aI', new THREE.InstancedBufferAttribute(a, 4));
|
|
97
|
+
g.instanceCount = 0;
|
|
98
|
+
g.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 40);
|
|
99
|
+
g.userData.per = per;
|
|
100
|
+
return g;
|
|
101
|
+
}
|
|
102
|
+
/** A self-coloured ShaderMaterial of the batch (premultiplied). */
|
|
103
|
+
export function shaderMaterial(u, vertexShader, fragmentShader, opts = {}) {
|
|
104
|
+
return new THREE.ShaderMaterial({ uniforms: u, vertexShader, fragmentShader, glslVersion: THREE.GLSL3, side: THREE.DoubleSide, transparent: true, depthWrite: true, premultipliedAlpha: true, ...opts });
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A scene-lit standard material whose geometry and colour come from the look's own GLSL:
|
|
108
|
+
* vertex.head / vertex.body — body sets `gPos` (local position, before the layout) and `gNrm` (local normal);
|
|
109
|
+
* the layout's matrix is applied here.
|
|
110
|
+
* fragment.head / fragment.body — body sets `diffuseColor.rgb` (and may scale `diffuseColor.a`).
|
|
111
|
+
* It lights with the scene's lights like any standard material (the gallery adds none).
|
|
112
|
+
*/
|
|
113
|
+
export function litMaterial(u, key, vertex, fragment, opts = {}) {
|
|
114
|
+
const m = new THREE.MeshStandardMaterial({ roughness: 0.55, metalness: 0, side: THREE.DoubleSide, transparent: true, ...opts });
|
|
115
|
+
m.onBeforeCompile = (sh) => {
|
|
116
|
+
for (const k of Object.keys(u))
|
|
117
|
+
sh.uniforms[k] = u[k];
|
|
118
|
+
sh.vertexShader = sh.vertexShader
|
|
119
|
+
.replace('#include <common>', `#include <common>\nprecision highp sampler2DArray;\nuniform sampler2DArray uTex;\nattribute vec4 aI;\n${baseGlsl}\n${vertex.head}`)
|
|
120
|
+
.replace('#include <beginnormal_vertex>', `vec3 gPos = position; vec3 gNrm = normal;\n${vertex.body}\n { mat4 M = uPlace[int(aI.x + 0.5)]; M[3][3] = 1.0; gPos = (M * vec4(gPos, 1.0)).xyz; gNrm = mat3(M) * gNrm; }\n vec3 objectNormal = gNrm;`)
|
|
121
|
+
.replace('#include <begin_vertex>', 'vec3 transformed = gPos;');
|
|
122
|
+
sh.fragmentShader = sh.fragmentShader
|
|
123
|
+
.replace('#include <common>', `#include <common>\nprecision highp sampler2DArray;\nuniform sampler2DArray uTex;\n${baseGlsl}\n${fragment.head}`)
|
|
124
|
+
.replace('#include <color_fragment>', `#include <color_fragment>\n${fragment.body}`);
|
|
125
|
+
};
|
|
126
|
+
m.customProgramCacheKey = () => key;
|
|
127
|
+
return m;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The shadow twin of a litMaterial: the same geometry (vertex.body + the layout) and the same cut-out
|
|
131
|
+
* (cutout.head / cutout.body, which may `discard`), so the look casts true shadows of its own shape.
|
|
132
|
+
* Set as mesh.customDepthMaterial (directional and spot lights).
|
|
133
|
+
*/
|
|
134
|
+
export function litDepthMaterial(u, key, vertex, cutout = { head: '', body: '' }) {
|
|
135
|
+
const m = new THREE.MeshDepthMaterial({ depthPacking: THREE.RGBADepthPacking, side: THREE.DoubleSide });
|
|
136
|
+
m.onBeforeCompile = (sh) => {
|
|
137
|
+
for (const k of Object.keys(u))
|
|
138
|
+
sh.uniforms[k] = u[k];
|
|
139
|
+
sh.vertexShader = sh.vertexShader
|
|
140
|
+
.replace('#include <common>', `#include <common>\nprecision highp sampler2DArray;\nuniform sampler2DArray uTex;\nattribute vec4 aI;\n${baseGlsl}\n${vertex.head}`)
|
|
141
|
+
.replace('#include <begin_vertex>', `vec3 gPos = position; vec3 gNrm = normal;\n${vertex.body}\n { mat4 M = uPlace[int(aI.x + 0.5)]; M[3][3] = 1.0; gPos = (M * vec4(gPos, 1.0)).xyz; }\n vec3 transformed = gPos;`);
|
|
142
|
+
sh.fragmentShader = sh.fragmentShader
|
|
143
|
+
.replace('#include <common>', `#include <common>\nprecision highp sampler2DArray;\nuniform sampler2DArray uTex;\n${baseGlsl}\n${cutout.head}`)
|
|
144
|
+
.replace('#include <clipping_planes_fragment>', `#include <clipping_planes_fragment>\n${cutout.body}`);
|
|
145
|
+
};
|
|
146
|
+
m.customProgramCacheKey = () => key + '-depth';
|
|
147
|
+
return m;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The gallery shell: navigation, layout, act, cursor, texture. `meshes` are added under the object; `setCount(n)`
|
|
151
|
+
* is called when the pictures change (set instance counts); `extra(dt, pointer, state)` runs every frame after
|
|
152
|
+
* the shared state is up to date.
|
|
153
|
+
*/
|
|
154
|
+
export function makeGallery(u, c, opts) {
|
|
155
|
+
const { W, H, meshes, setCount, extra, dispose } = opts; // extra and dispose are optional
|
|
156
|
+
u.uW.value = W;
|
|
157
|
+
u.uH.value = H;
|
|
158
|
+
const pick = new THREE.Mesh(new THREE.PlaneGeometry(W, H), new THREE.MeshBasicMaterial({ visible: false }));
|
|
159
|
+
const object = new THREE.Group();
|
|
160
|
+
for (const m of meshes)
|
|
161
|
+
object.add(m);
|
|
162
|
+
object.add(pick);
|
|
163
|
+
const cfg = { ...c };
|
|
164
|
+
const scroll = createScroll(cfg, () => { });
|
|
165
|
+
scroll.st.pitch = W * c.spacing;
|
|
166
|
+
const layout = createLayout(W, H);
|
|
167
|
+
const act = u.uAct.value;
|
|
168
|
+
const st = { time: 0 };
|
|
169
|
+
const _inv = new THREE.Matrix4(), _p = new THREE.Vector3();
|
|
170
|
+
const controls = Object.assign(scroll.controls, {
|
|
171
|
+
setTexture(tex, count) { if (u.uTex.value)
|
|
172
|
+
u.uTex.value.dispose(); u.uTex.value = tex; scroll.st.count = Math.min(count, MAXI); u.uCount.value = scroll.st.count; setCount(scroll.st.count); act.fill(0); act[controls.index] = 1; },
|
|
173
|
+
});
|
|
174
|
+
object.userData.gallery = controls;
|
|
175
|
+
return {
|
|
176
|
+
object, controls, pickMesh: pick, materials: meshes.map((m) => m.material), cfg,
|
|
177
|
+
apply(k) { Object.assign(cfg, k); scroll.st.pitch = W * cfg.spacing; },
|
|
178
|
+
update(dt, pointer, state) {
|
|
179
|
+
dt = Math.min(dt, 0.05);
|
|
180
|
+
st.time += dt;
|
|
181
|
+
u.uTime.value = st.time;
|
|
182
|
+
scroll.step(dt, pointer);
|
|
183
|
+
u.uS.value = scroll.st.s;
|
|
184
|
+
const n = scroll.st.count;
|
|
185
|
+
fillLayout(layout, u, scroll.st.s, n, cfg);
|
|
186
|
+
for (let i = 0; i < n; i++)
|
|
187
|
+
act[i] = approach(act[i], focusAt(i, scroll.st.s, n) > 0.5 ? 1 : 0, dt, cfg.changeTime);
|
|
188
|
+
// the cursor in the gallery's own frame (undo the lean's turn)
|
|
189
|
+
const rig = meshes[0].parent;
|
|
190
|
+
if (pointer && rig) {
|
|
191
|
+
rig.updateMatrix();
|
|
192
|
+
_inv.copy(rig.matrix).invert();
|
|
193
|
+
_p.set(pointer.x, pointer.y, 0).applyMatrix4(_inv);
|
|
194
|
+
u.uPointer.value.set(_p.x, _p.y, 0);
|
|
195
|
+
}
|
|
196
|
+
u.uPointerActive.value += ((pointer ? 1 : 0) - u.uPointerActive.value) * (1 - Math.exp(-dt * 5));
|
|
197
|
+
extra?.(dt, pointer, state);
|
|
198
|
+
},
|
|
199
|
+
dispose() {
|
|
200
|
+
for (const m of meshes) {
|
|
201
|
+
m.geometry.dispose();
|
|
202
|
+
m.material.dispose();
|
|
203
|
+
}
|
|
204
|
+
pick.geometry.dispose();
|
|
205
|
+
pick.material.dispose();
|
|
206
|
+
dispose?.();
|
|
207
|
+
if (u.uTex.value)
|
|
208
|
+
u.uTex.value.dispose();
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export interface PictureArray {
|
|
3
|
+
data: Uint8Array;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
/** Numbered gradient pictures, shown while a gallery has none of its own. */
|
|
9
|
+
export declare function placeholderPictures(n: number, aspect: number): HTMLCanvasElement[];
|
|
10
|
+
/** Load and cover-fit every picture into one array (bottom row first, as WebGL samples it). */
|
|
11
|
+
export declare function loadPictureArray(sources: (string | HTMLCanvasElement)[], aspect: number, W?: number): Promise<PictureArray>;
|
|
12
|
+
/** A fresh array texture over the pictures' pixels (the looks dispose their textures; the pixels stay). */
|
|
13
|
+
export declare function pictureTexture(p: PictureArray): THREE.DataArrayTexture;
|
|
14
|
+
//# sourceMappingURL=pictures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pictures.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/kit/pictures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,MAAM,WAAW,YAAY;IAAG,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAkBhG,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAmBlF;AAED,+FAA+F;AAC/F,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,SAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAmB/H;AAED,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC,gBAAgB,CAMtE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
const images = new Map();
|
|
3
|
+
function loadImage(url) {
|
|
4
|
+
let p = images.get(url);
|
|
5
|
+
if (!p) {
|
|
6
|
+
p = new Promise((resolve) => {
|
|
7
|
+
const im = new Image();
|
|
8
|
+
im.crossOrigin = 'anonymous';
|
|
9
|
+
im.onload = () => resolve(im);
|
|
10
|
+
im.onerror = () => resolve(null);
|
|
11
|
+
im.src = url;
|
|
12
|
+
});
|
|
13
|
+
images.set(url, p);
|
|
14
|
+
}
|
|
15
|
+
return p;
|
|
16
|
+
}
|
|
17
|
+
/** Numbered gradient pictures, shown while a gallery has none of its own. */
|
|
18
|
+
export function placeholderPictures(n, aspect) {
|
|
19
|
+
const W = 512, H = Math.round(W / aspect);
|
|
20
|
+
const pal = [['#0f2027', '#2c5364', '#ffb347'], ['#1b1b2f', '#0f3460', '#e94560'], ['#2d1b69', '#1de9b6', '#f9a825'],
|
|
21
|
+
['#0b3d2e', '#b5e48c', '#ff9f1c'], ['#3a0ca3', '#4cc9f0', '#f72585'], ['#23395d', '#06d6a0', '#ffd166']];
|
|
22
|
+
const out = [];
|
|
23
|
+
for (let i = 0; i < n; i++) {
|
|
24
|
+
const cv = document.createElement('canvas');
|
|
25
|
+
cv.width = W;
|
|
26
|
+
cv.height = H;
|
|
27
|
+
const g = cv.getContext('2d');
|
|
28
|
+
const p = pal[i % pal.length];
|
|
29
|
+
const lin = g.createLinearGradient(0, 0, W, H);
|
|
30
|
+
lin.addColorStop(0, p[0]);
|
|
31
|
+
lin.addColorStop(1, p[1]);
|
|
32
|
+
g.fillStyle = lin;
|
|
33
|
+
g.fillRect(0, 0, W, H);
|
|
34
|
+
const rg = g.createRadialGradient(W * 0.7, H * 0.35, 0, W * 0.7, H * 0.35, W * 0.5);
|
|
35
|
+
rg.addColorStop(0, p[2] + 'aa');
|
|
36
|
+
rg.addColorStop(1, p[2] + '00');
|
|
37
|
+
g.fillStyle = rg;
|
|
38
|
+
g.fillRect(0, 0, W, H);
|
|
39
|
+
g.fillStyle = 'rgba(255,255,255,0.85)';
|
|
40
|
+
g.font = `600 ${Math.round(H * 0.16)}px system-ui, sans-serif`;
|
|
41
|
+
g.fillText(String(i + 1).padStart(2, '0'), W * 0.07, H * 0.9);
|
|
42
|
+
out.push(cv);
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
/** Load and cover-fit every picture into one array (bottom row first, as WebGL samples it). */
|
|
47
|
+
export async function loadPictureArray(sources, aspect, W = 1024) {
|
|
48
|
+
const H = Math.max(2, Math.round(W / Math.max(0.1, aspect)));
|
|
49
|
+
const n = Math.max(1, sources.length);
|
|
50
|
+
const data = new Uint8Array(W * H * 4 * n);
|
|
51
|
+
const cv = document.createElement('canvas');
|
|
52
|
+
cv.width = W;
|
|
53
|
+
cv.height = H;
|
|
54
|
+
const ctx = cv.getContext('2d', { willReadFrequently: true });
|
|
55
|
+
const loaded = await Promise.all(sources.map((s) => (typeof s === 'string' ? loadImage(s) : Promise.resolve(s))));
|
|
56
|
+
for (let i = 0; i < n; i++) {
|
|
57
|
+
const img = loaded[i];
|
|
58
|
+
ctx.fillStyle = '#16181f';
|
|
59
|
+
ctx.fillRect(0, 0, W, H);
|
|
60
|
+
if (img) {
|
|
61
|
+
const iw = img.naturalWidth || img.width, ih = img.naturalHeight || img.height;
|
|
62
|
+
const s = Math.max(W / iw, H / ih);
|
|
63
|
+
ctx.drawImage(img, (W - iw * s) / 2, (H - ih * s) / 2, iw * s, ih * s);
|
|
64
|
+
}
|
|
65
|
+
const px = ctx.getImageData(0, 0, W, H).data, rb = W * 4;
|
|
66
|
+
for (let y = 0; y < H; y++)
|
|
67
|
+
data.set(px.subarray(y * rb, (y + 1) * rb), i * W * H * 4 + (H - 1 - y) * rb);
|
|
68
|
+
}
|
|
69
|
+
return { data, width: W, height: H, count: sources.length };
|
|
70
|
+
}
|
|
71
|
+
/** A fresh array texture over the pictures' pixels (the looks dispose their textures; the pixels stay). */
|
|
72
|
+
export function pictureTexture(p) {
|
|
73
|
+
const tex = new THREE.DataArrayTexture(p.data, p.width, p.height, Math.max(1, p.count));
|
|
74
|
+
tex.colorSpace = THREE.SRGBColorSpace;
|
|
75
|
+
tex.minFilter = THREE.LinearMipmapLinearFilter;
|
|
76
|
+
tex.magFilter = THREE.LinearFilter;
|
|
77
|
+
tex.generateMipmaps = true;
|
|
78
|
+
tex.anisotropy = 4;
|
|
79
|
+
tex.needsUpdate = true;
|
|
80
|
+
return tex;
|
|
81
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const catalog: {
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
tags: string[];
|
|
7
|
+
camera: {
|
|
8
|
+
position: number[];
|
|
9
|
+
target: number[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULTS: {
|
|
13
|
+
type: string;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
lean: number;
|
|
16
|
+
imageUrls: any[];
|
|
17
|
+
autoplay: number;
|
|
18
|
+
intensity: number;
|
|
19
|
+
opacity: number;
|
|
20
|
+
aspect: number;
|
|
21
|
+
frameWidth: number;
|
|
22
|
+
spacing: number;
|
|
23
|
+
curve: number;
|
|
24
|
+
tilt: number;
|
|
25
|
+
depth: number;
|
|
26
|
+
visible: number;
|
|
27
|
+
focusScale: number;
|
|
28
|
+
focusLift: number;
|
|
29
|
+
focusAmount: number;
|
|
30
|
+
dim: number;
|
|
31
|
+
stiffness: number;
|
|
32
|
+
damping: number;
|
|
33
|
+
throwing: number;
|
|
34
|
+
breathe: number;
|
|
35
|
+
reflection: number;
|
|
36
|
+
floorGap: number;
|
|
37
|
+
border: number;
|
|
38
|
+
borderColor: string;
|
|
39
|
+
backColor: string;
|
|
40
|
+
pointerMode: string;
|
|
41
|
+
pointerStrength: number;
|
|
42
|
+
pointerRadius: number;
|
|
43
|
+
pointerColor: string;
|
|
44
|
+
};
|
|
45
|
+
export declare const STRUCTURAL: string[];
|
|
46
|
+
export declare const POINTER_MODES: string[];
|
|
47
|
+
export declare const GUI: ({
|
|
48
|
+
key: string;
|
|
49
|
+
min: number;
|
|
50
|
+
max: number;
|
|
51
|
+
step: number;
|
|
52
|
+
tip: string;
|
|
53
|
+
options?: undefined;
|
|
54
|
+
color?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
key: string;
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
step: number;
|
|
60
|
+
tip?: undefined;
|
|
61
|
+
options?: undefined;
|
|
62
|
+
color?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
key: string;
|
|
65
|
+
options: string[];
|
|
66
|
+
min?: undefined;
|
|
67
|
+
max?: undefined;
|
|
68
|
+
step?: undefined;
|
|
69
|
+
tip?: undefined;
|
|
70
|
+
color?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
key: string;
|
|
73
|
+
color: boolean;
|
|
74
|
+
min?: undefined;
|
|
75
|
+
max?: undefined;
|
|
76
|
+
step?: undefined;
|
|
77
|
+
tip?: undefined;
|
|
78
|
+
options?: undefined;
|
|
79
|
+
})[];
|
|
80
|
+
export declare const PRESETS: ({
|
|
81
|
+
name: string;
|
|
82
|
+
description: string;
|
|
83
|
+
patch: {
|
|
84
|
+
curve?: undefined;
|
|
85
|
+
tilt?: undefined;
|
|
86
|
+
depth?: undefined;
|
|
87
|
+
spacing?: undefined;
|
|
88
|
+
focusScale?: undefined;
|
|
89
|
+
focusLift?: undefined;
|
|
90
|
+
dim?: undefined;
|
|
91
|
+
reflection?: undefined;
|
|
92
|
+
visible?: undefined;
|
|
93
|
+
stiffness?: undefined;
|
|
94
|
+
damping?: undefined;
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
patch: {
|
|
100
|
+
curve: number;
|
|
101
|
+
tilt: number;
|
|
102
|
+
depth: number;
|
|
103
|
+
spacing: number;
|
|
104
|
+
focusScale: number;
|
|
105
|
+
focusLift: number;
|
|
106
|
+
dim: number;
|
|
107
|
+
reflection: number;
|
|
108
|
+
visible?: undefined;
|
|
109
|
+
stiffness?: undefined;
|
|
110
|
+
damping?: undefined;
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
name: string;
|
|
114
|
+
description: string;
|
|
115
|
+
patch: {
|
|
116
|
+
curve: number;
|
|
117
|
+
tilt: number;
|
|
118
|
+
depth: number;
|
|
119
|
+
spacing: number;
|
|
120
|
+
visible: number;
|
|
121
|
+
focusScale: number;
|
|
122
|
+
focusLift: number;
|
|
123
|
+
dim: number;
|
|
124
|
+
reflection?: undefined;
|
|
125
|
+
stiffness?: undefined;
|
|
126
|
+
damping?: undefined;
|
|
127
|
+
};
|
|
128
|
+
} | {
|
|
129
|
+
name: string;
|
|
130
|
+
description: string;
|
|
131
|
+
patch: {
|
|
132
|
+
spacing: number;
|
|
133
|
+
tilt: number;
|
|
134
|
+
depth: number;
|
|
135
|
+
curve: number;
|
|
136
|
+
focusScale: number;
|
|
137
|
+
dim: number;
|
|
138
|
+
stiffness: number;
|
|
139
|
+
damping: number;
|
|
140
|
+
focusLift?: undefined;
|
|
141
|
+
reflection?: undefined;
|
|
142
|
+
visible?: undefined;
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
export declare function createUniforms(): {
|
|
146
|
+
uTex: {
|
|
147
|
+
value: any;
|
|
148
|
+
};
|
|
149
|
+
uBorder: {
|
|
150
|
+
value: number;
|
|
151
|
+
};
|
|
152
|
+
uBorderColor: {
|
|
153
|
+
value: THREE.Color;
|
|
154
|
+
};
|
|
155
|
+
uBackColor: {
|
|
156
|
+
value: THREE.Color;
|
|
157
|
+
};
|
|
158
|
+
uPointerColor: {
|
|
159
|
+
value: THREE.Color;
|
|
160
|
+
};
|
|
161
|
+
uIntensity: {
|
|
162
|
+
value: number;
|
|
163
|
+
};
|
|
164
|
+
uOpacity: {
|
|
165
|
+
value: number;
|
|
166
|
+
};
|
|
167
|
+
uReflection: {
|
|
168
|
+
value: number;
|
|
169
|
+
};
|
|
170
|
+
uAspect: {
|
|
171
|
+
value: number;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
175
|
+
export declare const TEX_W = 1024;
|
|
176
|
+
export declare function build(u: any, c: any): any;
|
|
177
|
+
//# sourceMappingURL=basicCarousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basicCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/looks/basicCarousel.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,OAAO;;;;;;;;;CAMnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpB,CAAC;AACF,eAAO,MAAM,UAAU,UAAwC,CAAC;AAChE,eAAO,MAAM,aAAa,UAAmB,CAAC;AAE9C,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaf,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnB,CAAC;AAKF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO7B;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAI/B;AAmDD,eAAO,MAAM,KAAK,OAAO,CAAC;AAG1B,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAA6C"}
|