@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,256 @@
|
|
|
1
|
+
// The approved lab module, verbatim but for its import paths and the lab's picture loader (Claude outputs/gallery-lab/
|
|
2
|
+
// loom.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.loom) do not carry; its own autoplay is never used.
|
|
4
|
+
// loom — the picture is woven. A taut warp of fine threads is always there, for every picture in the row. The
|
|
5
|
+
// image is the weft: one horizontal thread per row, carrying its row of the picture. An inactive picture is a sparse
|
|
6
|
+
// grey weave — thin grey weft threads with the warp showing between them. When a picture becomes the active one a
|
|
7
|
+
// soft diagonal wave crosses it from the top-left: under the wave each weft thread swells to fill its row and takes
|
|
8
|
+
// its colour, until the cloth is closed and the warp disappears under the picture. Leaving runs the wave back. Each
|
|
9
|
+
// picture follows its own active value at a constant rate, so the wave never jumps and can reverse half-way.
|
|
10
|
+
// Self-coloured: no lighting of its own. Cursor: a soft reveal — the grey weave swells and colours where it passes.
|
|
11
|
+
import * as THREE from 'three';
|
|
12
|
+
import { fragHead, col, mulberry32, createScroll, focusAt, approach, withLean } from '../kit/galleryKit.js';
|
|
13
|
+
import { createLayout, layoutUniforms, fillLayout, layoutGlsl, LAYOUT_GUI } from '../kit/galleryKit.js';
|
|
14
|
+
export const catalog = { key: 'loom', name: 'Loom', camera: { position: [0.4, 0.15, 4.9], target: [0, 0, 0] },
|
|
15
|
+
description: 'Pictures woven on a loom: inactive pictures are a sparse grey weave of thin threads over a fine warp; the active one is woven closed in full colour by a soft diagonal wave, and a change unravels it the same way. Use for craft, textiles, slow reveals, graphic showcases.',
|
|
16
|
+
tags: ['gallery', 'loom', 'weave', 'threads', 'reveal', 'navigation', 'interactive'] };
|
|
17
|
+
export const DEFAULTS = {
|
|
18
|
+
type: 'loom', enabled: true, lean: 1, imageUrls: [], autoplay: 0, intensity: 1, opacity: 1,
|
|
19
|
+
aspect: 1.5, width: 2.4, warp: 150, weft: 96, // structural
|
|
20
|
+
layout: 'row', spacing: 1.3, depth: 1.0, visible: 2.2, shape: 1, dim: 0.35,
|
|
21
|
+
stiffness: 30, damping: 9, throwing: 0.12,
|
|
22
|
+
weaveTime: 2.2, unravelTime: 1.6, wave: 0.35, slant: 0.35, thread: 0.22, shuttle: 0.3, weave: 0.25, warpGlow: 0.22,
|
|
23
|
+
warpColor: '#d8c9a8', shuttleColor: '#ffd9a6',
|
|
24
|
+
pointerMode: 'reveal', pointerStrength: 1, pointerRadius: 0.5, pointerColor: '#ffd9a6',
|
|
25
|
+
};
|
|
26
|
+
export const STRUCTURAL = ['imageUrls', 'aspect', 'width', 'warp', 'weft'];
|
|
27
|
+
export const POINTER_MODES = ['reveal'];
|
|
28
|
+
export const GUI = [
|
|
29
|
+
{ key: 'lean', min: 0, max: 3, step: 0.01, tip: 'The gallery turns toward the cursor' },
|
|
30
|
+
{ key: 'aspect', min: 0.6, max: 2.5, step: 0.01 }, { key: 'width', min: 1, max: 4, step: 0.01 }, { key: 'warp', min: 30, max: 300, step: 1 }, { key: 'weft', min: 20, max: 160, step: 1 },
|
|
31
|
+
...LAYOUT_GUI, { key: 'dim', min: 0, max: 1, step: 0.01 },
|
|
32
|
+
{ key: 'stiffness', min: 5, max: 120, step: 1 }, { key: 'damping', min: 2, max: 30, step: 0.1 },
|
|
33
|
+
{ key: 'weaveTime', min: 0.5, max: 8, step: 0.1 }, { key: 'unravelTime', min: 0.3, max: 6, step: 0.1 },
|
|
34
|
+
{ key: 'wave', min: 0.05, max: 1, step: 0.01, tip: 'Softness of the weaving wave' }, { key: 'slant', min: 0, max: 1, step: 0.01, tip: 'How diagonal the wave is' },
|
|
35
|
+
{ key: 'thread', min: 0.05, max: 0.8, step: 0.01, tip: 'Thickness of the inactive weft threads' }, { key: 'shuttle', min: 0, max: 1.5, step: 0.01, tip: 'A faint brightening on the wave' }, { key: 'weave', min: 0, max: 1, step: 0.01 }, { key: 'warpGlow', min: 0, max: 2, step: 0.01 }, { key: 'autoplay', min: 0, max: 20, step: 0.5 },
|
|
36
|
+
{ key: 'pointerMode', options: ['none', ...POINTER_MODES] }, { key: 'pointerStrength', min: 0, max: 3, step: 0.01 }, { key: 'pointerRadius', min: 0.2, max: 3, step: 0.01 },
|
|
37
|
+
{ key: 'intensity', min: 0, max: 3, step: 0.01 }, { key: 'opacity', min: 0, max: 1, step: 0.01 },
|
|
38
|
+
{ key: 'warpColor', color: true }, { key: 'shuttleColor', color: true }, { key: 'pointerColor', color: true },
|
|
39
|
+
];
|
|
40
|
+
export const PRESETS = [
|
|
41
|
+
{ name: 'Loom', description: 'The default.', patch: {} },
|
|
42
|
+
{ name: 'Fine cloth', description: 'Dense warp and weft, quick weaving.', patch: { warp: 240, weft: 140, weaveTime: 1.6, thread: 0.3 } },
|
|
43
|
+
{ name: 'Tapestry', description: 'Coarse threads, a slow, soft wave.', patch: { warp: 60, weft: 40, weaveTime: 3.6, wave: 0.6, thread: 0.18, warpGlow: 0.35 } },
|
|
44
|
+
{ name: 'Curtain', description: 'A straight wave straight down.', patch: { slant: 0, wave: 0.2 } },
|
|
45
|
+
];
|
|
46
|
+
const MAXI = 32;
|
|
47
|
+
export function createUniforms() {
|
|
48
|
+
return {
|
|
49
|
+
...layoutUniforms(), uTex: { value: null }, uS: { value: 0 }, uCount: { value: 1 }, uTime: { value: 0 },
|
|
50
|
+
uWoven: { value: new Float32Array(MAXI).fill(0) }, // 0..1 rows woven (from the top); >1 none
|
|
51
|
+
uSpacing: { value: 1.3 }, uDepth: { value: 1 }, uVisible: { value: 2.2 }, uDim: { value: 0.35 },
|
|
52
|
+
uShuttle: { value: 0.3 }, uWave: { value: 0.35 }, uSlant: { value: 0.35 }, uThread: { value: 0.22 }, uWeave: { value: 0.6 }, uWarpGlow: { value: 0.5 }, uSway: { value: 0.3 }, uIntensity: { value: 1 }, uOpacity: { value: 1 },
|
|
53
|
+
uWarpColor: { value: col('#d8c9a8') }, uRimColor: { value: col('#ffe2b8') }, uShuttleColor: { value: col('#ffd9a6') }, uPointerColor: { value: col('#ffd9a6') },
|
|
54
|
+
uPointer: { value: new THREE.Vector3() }, uPointerActive: { value: 0 }, uPointerMode: { value: 0 }, uPointerStrength: { value: 1 }, uPointerRadius: { value: 0.6 },
|
|
55
|
+
uW: { value: 2.4 }, uH: { value: 1.6 }, uNw: { value: 120 }, uNf: { value: 72 }, uKey: { value: new THREE.Vector3(0.4, 0.5, 0.75).normalize() },
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function applyConfig(u, c) {
|
|
59
|
+
const set = (k, v) => { if (v === undefined)
|
|
60
|
+
return; if (u[k].value && u[k].value.isColor) {
|
|
61
|
+
if (v.isColor)
|
|
62
|
+
u[k].value.copy(v);
|
|
63
|
+
else
|
|
64
|
+
u[k].value.set(v);
|
|
65
|
+
}
|
|
66
|
+
else
|
|
67
|
+
u[k].value = v; };
|
|
68
|
+
set('uSpacing', c.spacing);
|
|
69
|
+
set('uDepth', c.depth);
|
|
70
|
+
set('uVisible', c.visible);
|
|
71
|
+
set('uDim', c.dim);
|
|
72
|
+
set('uShuttle', c.shuttle);
|
|
73
|
+
set('uWave', c.wave);
|
|
74
|
+
set('uSlant', c.slant);
|
|
75
|
+
set('uThread', c.thread);
|
|
76
|
+
set('uWeave', c.weave);
|
|
77
|
+
set('uWarpGlow', c.warpGlow);
|
|
78
|
+
set('uSway', c.sway);
|
|
79
|
+
set('uIntensity', c.intensity);
|
|
80
|
+
set('uOpacity', c.opacity);
|
|
81
|
+
set('uWarpColor', c.warpColor);
|
|
82
|
+
set('uShuttleColor', c.shuttleColor);
|
|
83
|
+
set('uPointerColor', c.pointerColor);
|
|
84
|
+
set('uPointerStrength', c.pointerStrength);
|
|
85
|
+
set('uPointerRadius', c.pointerRadius);
|
|
86
|
+
if (c.pointerMode !== undefined)
|
|
87
|
+
u.uPointerMode.value = POINTER_MODES.indexOf(c.pointerMode);
|
|
88
|
+
}
|
|
89
|
+
const common = /* glsl */ `
|
|
90
|
+
uniform float uS, uCount, uTime, uSpacing, uDepth, uVisible, uSway, uW, uH, uNw, uNf;
|
|
91
|
+
uniform float uWoven[${MAXI}];
|
|
92
|
+
uniform vec3 uPointer; uniform float uPointerActive, uPointerMode, uPointerStrength, uPointerRadius;
|
|
93
|
+
${layoutGlsl}
|
|
94
|
+
float wrapd(float d, float n){ return n > 1.0 ? mod(d + n * 0.5, n) - n * 0.5 : d; }
|
|
95
|
+
float focusOf(float img, out float d){ d = wrapd(img - uS, uCount); return 1.0 - smoothstep(0.0, 1.0, abs(d)); }
|
|
96
|
+
`;
|
|
97
|
+
// warp: one vertical thread per instance per picture
|
|
98
|
+
const warpVert = /* glsl */ `
|
|
99
|
+
attribute vec4 aInst; // image, k, hash, hash2
|
|
100
|
+
${common}
|
|
101
|
+
varying float vFocus; varying float vAlpha; varying float vH; varying vec3 vN; varying vec3 vV; varying float vPw; varying float vY; varying float vWoven;
|
|
102
|
+
void main(){
|
|
103
|
+
vWoven = uWoven[int(aInst.x + 0.5)];
|
|
104
|
+
float img = aInst.x, k = aInst.y, h1 = aInst.z; float d; float focus = focusOf(img, d);
|
|
105
|
+
float x = (k / uNw - 0.5) * uW + 0.5 / uNw * uW;
|
|
106
|
+
vec3 p = placeAt(img, vec3(x + position.x, position.y * uH, 0.0));
|
|
107
|
+
vec2 dp = p.xy - uPointer.xy; float dist = length(dp);
|
|
108
|
+
float pw = uPointerActive * (1.0 - smoothstep(0.0, uPointerRadius, dist));
|
|
109
|
+
vPw = pw; vY = position.y + 0.5;
|
|
110
|
+
vFocus = focus; vAlpha = fadeAt(img); vH = h1;
|
|
111
|
+
vec4 mv = modelViewMatrix * vec4(p, 1.0); vN = normalize(normalMatrix * vec3(0.0, 0.0, 1.0)); vV = -mv.xyz;
|
|
112
|
+
gl_Position = projectionMatrix * mv;
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
const warpFrag = /* glsl */ `
|
|
116
|
+
${fragHead}
|
|
117
|
+
uniform float uWarpGlow, uDim, uIntensity, uOpacity, uPointerMode; uniform vec3 uWarpColor, uRimColor, uKey, uPointerColor;
|
|
118
|
+
varying float vFocus; varying float vAlpha; varying float vH; varying vec3 vN; varying vec3 vV; varying float vPw; varying float vY; varying float vWoven;
|
|
119
|
+
void main(){
|
|
120
|
+
vec3 c = uWarpColor * uWarpGlow * (0.75 + 0.25 * vH);
|
|
121
|
+
c *= 1.0 - uDim * (1.0 - vFocus) * 0.6;
|
|
122
|
+
// the closed cloth hides the warp
|
|
123
|
+
float a = vAlpha * uOpacity * (1.0 - 0.9 * smoothstep(0.5, 1.0, vWoven));
|
|
124
|
+
if (a < 0.003) discard;
|
|
125
|
+
gl_FragColor = vec4(c * uIntensity * a, a);
|
|
126
|
+
#include <tonemapping_fragment>
|
|
127
|
+
#include <colorspace_fragment>
|
|
128
|
+
}
|
|
129
|
+
`;
|
|
130
|
+
// weft: one horizontal thread per row per picture, revealed by the shuttle
|
|
131
|
+
const weftVert = /* glsl */ `
|
|
132
|
+
attribute vec4 aInst; // image, row j, hash, hash2
|
|
133
|
+
${common}
|
|
134
|
+
uniform float uWeave;
|
|
135
|
+
varying vec2 vUv; varying float vImg; varying float vFocus; varying float vAlpha; varying float vWoven; varying float vRowT; varying float vRow; varying float vPw; varying float vV;
|
|
136
|
+
void main(){
|
|
137
|
+
vV = position.y + 0.5;
|
|
138
|
+
float img = aInst.x, j = aInst.y, h1 = aInst.z; float d; float focus = focusOf(img, d);
|
|
139
|
+
int ii = int(img + 0.5); float woven = uWoven[ii];
|
|
140
|
+
float rowT = (j + 0.5) / uNf; // 0 at the top
|
|
141
|
+
float y = (0.5 - rowT) * uH;
|
|
142
|
+
float z = (mod(j, 2.0) < 0.5 ? 1.0 : -1.0) * uWeave * 0.006; // over / under the warp
|
|
143
|
+
float xLocal = (uv.x - 0.5) * uW;
|
|
144
|
+
vWoven = woven; vRowT = rowT;
|
|
145
|
+
vec3 p = placeAt(img, vec3(xLocal, y + position.y * (uH / uNf), z));
|
|
146
|
+
vec2 dp = p.xy - uPointer.xy; float dist = length(dp);
|
|
147
|
+
float pw = uPointerActive * uPointerStrength * (1.0 - smoothstep(uPointerRadius * 0.35, uPointerRadius, dist)); vPw = pw;
|
|
148
|
+
vUv = vec2(uv.x, 1.0 - rowT); vImg = img; vFocus = focus; vRow = j;
|
|
149
|
+
vAlpha = fadeAt(img);
|
|
150
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(p, 1.0);
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
const weftFrag = /* glsl */ `
|
|
154
|
+
${fragHead}
|
|
155
|
+
precision highp sampler2DArray;
|
|
156
|
+
uniform sampler2DArray uTex; uniform float uDim, uShuttle, uWave, uSlant, uThread, uIntensity, uOpacity, uPointerMode; uniform vec3 uShuttleColor, uPointerColor;
|
|
157
|
+
varying vec2 vUv; varying float vImg; varying float vFocus; varying float vAlpha; varying float vWoven; varying float vRowT; varying float vRow; varying float vPw; varying float vV;
|
|
158
|
+
void main(){
|
|
159
|
+
// the wave: a soft diagonal front from the top-left; behind it the cloth is closed and coloured
|
|
160
|
+
float pos = mix(vRowT, vUv.x, uSlant * 0.5) ; // 0 at the top-left .. ~1 at the bottom-right
|
|
161
|
+
float front = vWoven * (1.0 + uWave) - uWave * 0.5;
|
|
162
|
+
float w = smoothstep(front + uWave * 0.5, front - uWave * 0.5, pos);
|
|
163
|
+
w = w * w * (3.0 - 2.0 * w);
|
|
164
|
+
float act = max(w, vPw * step(-0.5, uPointerMode) * (1.0 - w) * 0.85);
|
|
165
|
+
// the weft thread: thin when grey, swelling to fill its row (covering the warp) as it is woven
|
|
166
|
+
float thick = mix(uThread, 1.12, act); // a little over 1: the closed cloth has no gaps
|
|
167
|
+
float y = abs(vV - 0.5) * 2.0; // 0 on the thread's crown, 1 at the row's edge
|
|
168
|
+
float aa = fwidth(y) * 1.5;
|
|
169
|
+
float body = 1.0 - smoothstep(thick - aa, thick + aa, y);
|
|
170
|
+
if (body < 0.003) discard;
|
|
171
|
+
float round = 0.8 + 0.2 * sqrt(max(0.0, 1.0 - (y / max(thick, 0.001)) * (y / max(thick, 0.001))));
|
|
172
|
+
vec3 pic = texture(uTex, vec3(vUv, vImg)).rgb;
|
|
173
|
+
float lum = dot(pic, vec3(0.299, 0.587, 0.114));
|
|
174
|
+
vec3 faded = vec3(0.12 + 0.88 * lum) * uDim;
|
|
175
|
+
vec3 c = mix(faded, pic * 1.08, act) * mix(round, 1.0, act * act);
|
|
176
|
+
c += (pic + uShuttleColor * 0.3) * uShuttle * 0.5 * (w * (1.0 - w) * 4.0) * vWoven * (1.0 - vWoven) * 4.0; // faint, only while weaving
|
|
177
|
+
float a = vAlpha * uOpacity * body * mix(0.85, 1.0, act);
|
|
178
|
+
if (a < 0.003) discard;
|
|
179
|
+
gl_FragColor = vec4(c * uIntensity * a, a);
|
|
180
|
+
#include <tonemapping_fragment>
|
|
181
|
+
#include <colorspace_fragment>
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
184
|
+
export function build(u, c) { return withLean(buildGallery(u, c), c); }
|
|
185
|
+
function buildGallery(u, c) {
|
|
186
|
+
const Nw = Math.max(10, c.warp | 0), Nf = Math.max(8, c.weft | 0), W = c.width, H = W / c.aspect;
|
|
187
|
+
u.uW.value = W;
|
|
188
|
+
u.uH.value = H;
|
|
189
|
+
u.uNw.value = Nw;
|
|
190
|
+
u.uNf.value = Nf;
|
|
191
|
+
const rnd = mulberry32(4);
|
|
192
|
+
const mk = (per, q) => { const geo = new THREE.InstancedBufferGeometry(); geo.index = q.index; geo.attributes.position = q.attributes.position; geo.attributes.uv = q.attributes.uv; const a = new Float32Array(MAXI * per * 4); for (let i = 0; i < MAXI; i++)
|
|
193
|
+
for (let k = 0; k < per; k++)
|
|
194
|
+
a.set([i, k, rnd(), rnd()], (i * per + k) * 4); geo.setAttribute('aInst', new THREE.InstancedBufferAttribute(a, 4)); geo.instanceCount = 0; geo.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 20); return geo; };
|
|
195
|
+
const warpGeo = mk(Nw, new THREE.PlaneGeometry(W / Nw * 0.22, 1));
|
|
196
|
+
const weftGeo = mk(Nf, new THREE.PlaneGeometry(W, 1));
|
|
197
|
+
const warpMat = new THREE.ShaderMaterial({ uniforms: u, vertexShader: warpVert, fragmentShader: warpFrag, glslVersion: THREE.GLSL3, side: THREE.DoubleSide, transparent: true, depthWrite: true, premultipliedAlpha: true });
|
|
198
|
+
const weftMat = new THREE.ShaderMaterial({ uniforms: u, vertexShader: weftVert, fragmentShader: weftFrag, glslVersion: THREE.GLSL3, side: THREE.DoubleSide, transparent: true, depthWrite: true, premultipliedAlpha: true });
|
|
199
|
+
const warp = new THREE.Mesh(warpGeo, warpMat);
|
|
200
|
+
warp.frustumCulled = false;
|
|
201
|
+
warp.raycast = () => { };
|
|
202
|
+
const weft = new THREE.Mesh(weftGeo, weftMat);
|
|
203
|
+
weft.frustumCulled = false;
|
|
204
|
+
weft.raycast = () => { };
|
|
205
|
+
const beamMat = new THREE.MeshStandardMaterial({ color: '#4a3a2a', roughness: 0.7 });
|
|
206
|
+
const beamT = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 0.02, 1, 10), beamMat);
|
|
207
|
+
beamT.rotation.z = Math.PI / 2;
|
|
208
|
+
beamT.position.y = H / 2 + 0.03;
|
|
209
|
+
const beamB = beamT.clone();
|
|
210
|
+
beamB.position.y = -H / 2 - 0.03;
|
|
211
|
+
const pick = new THREE.Mesh(new THREE.PlaneGeometry(W, H), new THREE.MeshBasicMaterial({ visible: false }));
|
|
212
|
+
const object = new THREE.Group();
|
|
213
|
+
object.add(warp, weft, pick);
|
|
214
|
+
beamT.visible = beamB.visible = false;
|
|
215
|
+
const cfg = { ...c };
|
|
216
|
+
const scroll = createScroll(cfg, () => { });
|
|
217
|
+
scroll.st.pitch = W * c.spacing;
|
|
218
|
+
const st = { time: 0, prevIndex: 0, unravel: new Float32Array(MAXI) };
|
|
219
|
+
const woven = u.uWoven.value;
|
|
220
|
+
const controls = Object.assign(scroll.controls, { setTexture(tex, count) { if (u.uTex.value)
|
|
221
|
+
u.uTex.value.dispose(); u.uTex.value = tex; scroll.st.count = Math.min(count, MAXI); u.uCount.value = scroll.st.count; warpGeo.instanceCount = scroll.st.count * Nw; weftGeo.instanceCount = scroll.st.count * Nf; woven.fill(0); woven[controls.index] = 1; } });
|
|
222
|
+
object.userData.gallery = controls;
|
|
223
|
+
const _inv = new THREE.Matrix4(), _p = new THREE.Vector3();
|
|
224
|
+
const layout = createLayout(W, H);
|
|
225
|
+
return {
|
|
226
|
+
object, controls, pickMesh: pick, materials: [warpMat, weftMat, beamMat],
|
|
227
|
+
apply(k) { Object.assign(cfg, k); applyConfig(u, k); scroll.st.pitch = W * cfg.spacing; },
|
|
228
|
+
update(dt, pointer) {
|
|
229
|
+
dt = Math.min(dt, 0.05);
|
|
230
|
+
st.time += dt;
|
|
231
|
+
u.uTime.value = st.time;
|
|
232
|
+
scroll.step(dt, pointer);
|
|
233
|
+
u.uS.value = scroll.st.s;
|
|
234
|
+
const idx = controls.index, n = scroll.st.count;
|
|
235
|
+
fillLayout(layout, u, scroll.st.s, n, cfg);
|
|
236
|
+
for (let i = 0; i < n; i++) {
|
|
237
|
+
const on = focusAt(i, scroll.st.s, n) > 0.5;
|
|
238
|
+
woven[i] = approach(woven[i], on ? 1 : 0, dt, on ? cfg.weaveTime : cfg.unravelTime);
|
|
239
|
+
}
|
|
240
|
+
const span = Math.min(n, 2 * cfg.visible + 1) * W * cfg.spacing;
|
|
241
|
+
beamT.scale.set(1, span, 1);
|
|
242
|
+
beamB.scale.set(1, span, 1);
|
|
243
|
+
beamT.position.x = beamB.position.x = 0;
|
|
244
|
+
pick.position.x = 0;
|
|
245
|
+
if (pointer) {
|
|
246
|
+
weft.parent.updateMatrix();
|
|
247
|
+
_inv.copy(weft.parent.matrix).invert(); /* the cursor arrives in the gallery's own frame; undo the lean */
|
|
248
|
+
_p.set(pointer.x, pointer.y, 0).applyMatrix4(_inv);
|
|
249
|
+
u.uPointer.value.set(_p.x, _p.y, 0);
|
|
250
|
+
}
|
|
251
|
+
u.uPointerActive.value += ((pointer ? 1 : 0) - u.uPointerActive.value) * (1 - Math.exp(-dt * 6));
|
|
252
|
+
},
|
|
253
|
+
dispose() { warpGeo.dispose(); weftGeo.dispose(); warpMat.dispose(); weftMat.dispose(); beamT.geometry.dispose(); beamMat.dispose(); pick.geometry.dispose(); if (u.uTex.value)
|
|
254
|
+
u.uTex.value.dispose(); },
|
|
255
|
+
};
|
|
256
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
radius: number;
|
|
22
|
+
spacing: number;
|
|
23
|
+
sag: number;
|
|
24
|
+
span: number;
|
|
25
|
+
cord: number;
|
|
26
|
+
focusDrop: number;
|
|
27
|
+
focusLift: number;
|
|
28
|
+
visible: number;
|
|
29
|
+
stiffness: number;
|
|
30
|
+
damping: number;
|
|
31
|
+
throwing: number;
|
|
32
|
+
gravity: number;
|
|
33
|
+
swingDamping: number;
|
|
34
|
+
wind: number;
|
|
35
|
+
tug: number;
|
|
36
|
+
glow: number;
|
|
37
|
+
lamp: number;
|
|
38
|
+
lampColor: string;
|
|
39
|
+
paperColor: string;
|
|
40
|
+
rimColor: string;
|
|
41
|
+
ringColor: string;
|
|
42
|
+
pointerMode: string;
|
|
43
|
+
pointerStrength: number;
|
|
44
|
+
pointerRadius: number;
|
|
45
|
+
pointerColor: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const STRUCTURAL: string[];
|
|
48
|
+
export declare const POINTER_MODES: string[];
|
|
49
|
+
export declare const GUI: ({
|
|
50
|
+
key: string;
|
|
51
|
+
min: number;
|
|
52
|
+
max: number;
|
|
53
|
+
step: number;
|
|
54
|
+
tip: string;
|
|
55
|
+
options?: undefined;
|
|
56
|
+
color?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
key: string;
|
|
59
|
+
min: number;
|
|
60
|
+
max: number;
|
|
61
|
+
step: number;
|
|
62
|
+
tip?: undefined;
|
|
63
|
+
options?: undefined;
|
|
64
|
+
color?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
key: string;
|
|
67
|
+
options: string[];
|
|
68
|
+
min?: undefined;
|
|
69
|
+
max?: undefined;
|
|
70
|
+
step?: undefined;
|
|
71
|
+
tip?: undefined;
|
|
72
|
+
color?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
key: string;
|
|
75
|
+
color: boolean;
|
|
76
|
+
min?: undefined;
|
|
77
|
+
max?: undefined;
|
|
78
|
+
step?: undefined;
|
|
79
|
+
tip?: undefined;
|
|
80
|
+
options?: undefined;
|
|
81
|
+
})[];
|
|
82
|
+
export declare const PRESETS: ({
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
patch: {
|
|
86
|
+
wind?: undefined;
|
|
87
|
+
swingDamping?: undefined;
|
|
88
|
+
gravity?: undefined;
|
|
89
|
+
span?: undefined;
|
|
90
|
+
sag?: undefined;
|
|
91
|
+
spacing?: undefined;
|
|
92
|
+
tug?: undefined;
|
|
93
|
+
glow?: undefined;
|
|
94
|
+
lamp?: undefined;
|
|
95
|
+
focusDrop?: undefined;
|
|
96
|
+
focusLift?: undefined;
|
|
97
|
+
};
|
|
98
|
+
} | {
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
patch: {
|
|
102
|
+
wind: number;
|
|
103
|
+
swingDamping: number;
|
|
104
|
+
gravity: number;
|
|
105
|
+
span: number;
|
|
106
|
+
sag: number;
|
|
107
|
+
spacing: number;
|
|
108
|
+
tug?: undefined;
|
|
109
|
+
glow?: undefined;
|
|
110
|
+
lamp?: undefined;
|
|
111
|
+
focusDrop?: undefined;
|
|
112
|
+
focusLift?: undefined;
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
patch: {
|
|
118
|
+
wind: number;
|
|
119
|
+
swingDamping: number;
|
|
120
|
+
gravity: number;
|
|
121
|
+
spacing: number;
|
|
122
|
+
sag: number;
|
|
123
|
+
tug: number;
|
|
124
|
+
span?: undefined;
|
|
125
|
+
glow?: undefined;
|
|
126
|
+
lamp?: undefined;
|
|
127
|
+
focusDrop?: undefined;
|
|
128
|
+
focusLift?: undefined;
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
name: string;
|
|
132
|
+
description: string;
|
|
133
|
+
patch: {
|
|
134
|
+
sag: number;
|
|
135
|
+
wind: number;
|
|
136
|
+
glow: number;
|
|
137
|
+
lamp: number;
|
|
138
|
+
focusDrop: number;
|
|
139
|
+
focusLift: number;
|
|
140
|
+
spacing: number;
|
|
141
|
+
swingDamping?: undefined;
|
|
142
|
+
gravity?: undefined;
|
|
143
|
+
span?: undefined;
|
|
144
|
+
tug?: undefined;
|
|
145
|
+
};
|
|
146
|
+
})[];
|
|
147
|
+
export declare function createUniforms(): {
|
|
148
|
+
uTex: {
|
|
149
|
+
value: any;
|
|
150
|
+
};
|
|
151
|
+
uGlow: {
|
|
152
|
+
value: number;
|
|
153
|
+
};
|
|
154
|
+
uLamp: {
|
|
155
|
+
value: number;
|
|
156
|
+
};
|
|
157
|
+
uIntensity: {
|
|
158
|
+
value: number;
|
|
159
|
+
};
|
|
160
|
+
uOpacity: {
|
|
161
|
+
value: number;
|
|
162
|
+
};
|
|
163
|
+
uLampColor: {
|
|
164
|
+
value: THREE.Color;
|
|
165
|
+
};
|
|
166
|
+
uPaperColor: {
|
|
167
|
+
value: THREE.Color;
|
|
168
|
+
};
|
|
169
|
+
uRimColor: {
|
|
170
|
+
value: THREE.Color;
|
|
171
|
+
};
|
|
172
|
+
uPointerColor: {
|
|
173
|
+
value: THREE.Color;
|
|
174
|
+
};
|
|
175
|
+
uTime: {
|
|
176
|
+
value: number;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
180
|
+
export declare function build(u: any, c: any): any;
|
|
181
|
+
//# sourceMappingURL=paperLanterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paperLanterns.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/looks/paperLanterns.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,UAAoC,CAAC;AAC5D,eAAO,MAAM,aAAa,UAAqB,CAAC;AAEhD,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYf,CAAC;AACF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnB,CAAC;AAMF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO7B;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAI/B;AAuED,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAA6C"}
|