@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,155 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const catalog: {
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
camera: {
|
|
6
|
+
position: number[];
|
|
7
|
+
target: number[];
|
|
8
|
+
};
|
|
9
|
+
description: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULTS: {
|
|
13
|
+
type: string;
|
|
14
|
+
aspect: number;
|
|
15
|
+
width: number;
|
|
16
|
+
layers: number;
|
|
17
|
+
separation: number;
|
|
18
|
+
softness: number;
|
|
19
|
+
edge: number;
|
|
20
|
+
changeTime: number;
|
|
21
|
+
dim: number;
|
|
22
|
+
pointerMode: string;
|
|
23
|
+
pointerRadius: number;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
lean: number;
|
|
26
|
+
imageUrls: any[];
|
|
27
|
+
autoplay: number;
|
|
28
|
+
intensity: number;
|
|
29
|
+
opacity: number;
|
|
30
|
+
layout: string;
|
|
31
|
+
spacing: number;
|
|
32
|
+
depth: number;
|
|
33
|
+
visible: number;
|
|
34
|
+
shape: number;
|
|
35
|
+
stiffness: number;
|
|
36
|
+
damping: number;
|
|
37
|
+
throwing: number;
|
|
38
|
+
wave: number;
|
|
39
|
+
slant: number;
|
|
40
|
+
pointerStrength: number;
|
|
41
|
+
};
|
|
42
|
+
export declare const STRUCTURAL: string[];
|
|
43
|
+
export declare const POINTER_MODES: string[];
|
|
44
|
+
export declare const GUI: ({
|
|
45
|
+
key: string;
|
|
46
|
+
options: string[];
|
|
47
|
+
tip: string;
|
|
48
|
+
min?: undefined;
|
|
49
|
+
max?: undefined;
|
|
50
|
+
step?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
key: string;
|
|
53
|
+
min: number;
|
|
54
|
+
max: number;
|
|
55
|
+
step: number;
|
|
56
|
+
} | {
|
|
57
|
+
key: string;
|
|
58
|
+
options: string[];
|
|
59
|
+
})[];
|
|
60
|
+
export declare const PRESETS: ({
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
patch: {
|
|
64
|
+
layers?: undefined;
|
|
65
|
+
separation?: undefined;
|
|
66
|
+
softness?: undefined;
|
|
67
|
+
};
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
patch: {
|
|
72
|
+
layers: number;
|
|
73
|
+
separation: number;
|
|
74
|
+
softness?: undefined;
|
|
75
|
+
};
|
|
76
|
+
} | {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
patch: {
|
|
80
|
+
layers: number;
|
|
81
|
+
separation: number;
|
|
82
|
+
softness: number;
|
|
83
|
+
};
|
|
84
|
+
})[];
|
|
85
|
+
export declare function createUniforms(): {
|
|
86
|
+
uLayers: {
|
|
87
|
+
value: number;
|
|
88
|
+
};
|
|
89
|
+
uSep: {
|
|
90
|
+
value: number;
|
|
91
|
+
};
|
|
92
|
+
uSoft: {
|
|
93
|
+
value: number;
|
|
94
|
+
};
|
|
95
|
+
uEdge: {
|
|
96
|
+
value: number;
|
|
97
|
+
};
|
|
98
|
+
uTex: {
|
|
99
|
+
value: any;
|
|
100
|
+
};
|
|
101
|
+
uS: {
|
|
102
|
+
value: number;
|
|
103
|
+
};
|
|
104
|
+
uCount: {
|
|
105
|
+
value: number;
|
|
106
|
+
};
|
|
107
|
+
uTime: {
|
|
108
|
+
value: number;
|
|
109
|
+
};
|
|
110
|
+
uAct: {
|
|
111
|
+
value: Float32Array<ArrayBuffer>;
|
|
112
|
+
};
|
|
113
|
+
uW: {
|
|
114
|
+
value: number;
|
|
115
|
+
};
|
|
116
|
+
uH: {
|
|
117
|
+
value: number;
|
|
118
|
+
};
|
|
119
|
+
uWave: {
|
|
120
|
+
value: number;
|
|
121
|
+
};
|
|
122
|
+
uSlant: {
|
|
123
|
+
value: number;
|
|
124
|
+
};
|
|
125
|
+
uDim: {
|
|
126
|
+
value: number;
|
|
127
|
+
};
|
|
128
|
+
uIntensity: {
|
|
129
|
+
value: number;
|
|
130
|
+
};
|
|
131
|
+
uOpacity: {
|
|
132
|
+
value: number;
|
|
133
|
+
};
|
|
134
|
+
uPointer: {
|
|
135
|
+
value: THREE.Vector3;
|
|
136
|
+
};
|
|
137
|
+
uPointerActive: {
|
|
138
|
+
value: number;
|
|
139
|
+
};
|
|
140
|
+
uPointerMode: {
|
|
141
|
+
value: number;
|
|
142
|
+
};
|
|
143
|
+
uPointerStrength: {
|
|
144
|
+
value: number;
|
|
145
|
+
};
|
|
146
|
+
uPointerRadius: {
|
|
147
|
+
value: number;
|
|
148
|
+
};
|
|
149
|
+
uPlace: {
|
|
150
|
+
value: THREE.Matrix4[];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
154
|
+
export declare function build(u: any, c: any): any;
|
|
155
|
+
//# sourceMappingURL=depthLayers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depthLayers.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/looks/depthLayers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,OAAO;;;;;;;;;CAE8D,CAAC;AAEnF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC;AACF,eAAO,MAAM,UAAU,UAA6C,CAAC;AACrE,eAAO,MAAM,aAAa,UAAW,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;IAOf,CAAC;AACF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;IAInB,CAAC;AACF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkI;AAChK,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAA4H;AAuC5J,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAA6C"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// The approved lab module, verbatim but for its import paths and the lab's picture loader (Claude outputs/gallery-lab/
|
|
2
|
+
// layers.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.depthLayers) do not carry; its own autoplay is never used.
|
|
4
|
+
// layers — "Depth Layers". Every picture is split by its own brightness into a few thin sheets floating one behind
|
|
5
|
+
// another: the back sheet holds the whole picture, each sheet in front holds only what is brighter than its level
|
|
6
|
+
// (a soft threshold with a fine lit edge), so the light parts of the picture stand forward. An inactive picture's
|
|
7
|
+
// sheets are collapsed into one faint grey sheet. When it becomes the active one a soft wave crosses it and opens
|
|
8
|
+
// the sheets into depth, taking their colour; the sheets then slide past each other as the camera, the lean or the
|
|
9
|
+
// cursor moves — real parallax. The cursor opens the sheets a little further where it passes. Self-coloured.
|
|
10
|
+
import * as THREE from 'three';
|
|
11
|
+
import { BASE_DEFAULTS, BASE_GUI_MOTION, BASE_GUI_TAIL, LAYOUT_GUI, baseUniforms, applyBase, baseGlsl, instanced, shaderMaterial, makeGallery, withLean, fragHead } from '../kit/lookBase.js';
|
|
12
|
+
export const catalog = { key: 'depthLayers', name: 'Depth Layers', camera: { position: [1.1, 0.3, 4.5], target: [0, 0, 0] },
|
|
13
|
+
description: 'Pictures split by brightness into thin sheets floating in depth: inactive ones are collapsed into one faint grey sheet, the active one opens into depth in full colour and its sheets slide past each other with real parallax. Use for editorial, music and dreamy showcases.',
|
|
14
|
+
tags: ['gallery', 'layers', 'depth', 'parallax', 'editorial', 'interactive'] };
|
|
15
|
+
export const DEFAULTS = {
|
|
16
|
+
...BASE_DEFAULTS, type: 'depthLayers', aspect: 1.4, width: 2.2, layers: 6, // structural
|
|
17
|
+
separation: 0.09, softness: 0.08, edge: 0.12, changeTime: 2.0, dim: 0.35,
|
|
18
|
+
pointerMode: 'open', pointerRadius: 0.6,
|
|
19
|
+
};
|
|
20
|
+
export const STRUCTURAL = ['imageUrls', 'aspect', 'width', 'layers'];
|
|
21
|
+
export const POINTER_MODES = ['open'];
|
|
22
|
+
export const GUI = [
|
|
23
|
+
{ key: 'lean', min: 0, max: 3, step: 0.01, tip: 'The gallery turns toward the cursor' },
|
|
24
|
+
{ key: 'aspect', min: 0.6, max: 2.5, step: 0.01 }, { key: 'width', min: 1, max: 4, step: 0.01 }, { key: 'layers', min: 2, max: 10, step: 1, tip: 'Sheets per picture' },
|
|
25
|
+
...LAYOUT_GUI, ...BASE_GUI_MOTION,
|
|
26
|
+
{ key: 'separation', min: 0, max: 0.4, step: 0.005, tip: 'Distance between the sheets when open' }, { key: 'softness', min: 0.01, max: 0.3, step: 0.005, tip: 'Softness of each sheet’s brightness threshold' },
|
|
27
|
+
{ key: 'edge', min: 0, max: 1.5, step: 0.01, tip: 'Brightness of the fine edge along each sheet' },
|
|
28
|
+
{ key: 'pointerMode', options: ['none', ...POINTER_MODES] }, ...BASE_GUI_TAIL,
|
|
29
|
+
];
|
|
30
|
+
export const PRESETS = [
|
|
31
|
+
{ name: 'Layers', description: 'The default.', patch: {} },
|
|
32
|
+
{ name: 'Deep', description: 'Few sheets, far apart.', patch: { layers: 4, separation: 0.18 } },
|
|
33
|
+
{ name: 'Fine', description: 'Many close sheets, soft thresholds.', patch: { layers: 9, separation: 0.05, softness: 0.12 } },
|
|
34
|
+
];
|
|
35
|
+
export function createUniforms() { return { ...baseUniforms(), uLayers: { value: 6 }, uSep: { value: 0.09 }, uSoft: { value: 0.08 }, uEdge: { value: 0.35 } }; }
|
|
36
|
+
export function applyConfig(u, c) { const set = applyBase(u, c, POINTER_MODES); set('uSep', c.separation); set('uSoft', c.softness); set('uEdge', c.edge); }
|
|
37
|
+
const vert = /* glsl */ `
|
|
38
|
+
attribute vec4 aI; // picture, sheet, -, -
|
|
39
|
+
${baseGlsl}
|
|
40
|
+
uniform float uLayers, uSep;
|
|
41
|
+
varying vec2 vUv; varying float vImg; varying float vK; varying float vW; varying float vAlpha;
|
|
42
|
+
void main(){
|
|
43
|
+
float img = aI.x, k = aI.y; vec2 g = position.xy + 0.5;
|
|
44
|
+
vec2 p = vec2(position.x * uW, position.y * uH);
|
|
45
|
+
float w = waveAt(actOf(img), g);
|
|
46
|
+
float open = w * (1.0 + 1.5 * maskAt(p) * w);
|
|
47
|
+
vec3 local = vec3(p, k * uSep * open);
|
|
48
|
+
vUv = g; vImg = img; vK = k; vW = w; vAlpha = fadeAt(img);
|
|
49
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(placeAt(img, local), 1.0);
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
const frag = /* glsl */ `
|
|
53
|
+
${fragHead}
|
|
54
|
+
precision highp sampler2DArray;
|
|
55
|
+
uniform sampler2DArray uTex;
|
|
56
|
+
${baseGlsl}
|
|
57
|
+
uniform float uLayers, uSoft, uEdge;
|
|
58
|
+
varying vec2 vUv; varying float vImg; varying float vK; varying float vW; varying float vAlpha;
|
|
59
|
+
void main(){
|
|
60
|
+
vec3 pic = texture(uTex, vec3(vUv, vImg)).rgb;
|
|
61
|
+
float L = lumOf(textureLod(uTex, vec3(vUv, vImg), 1.5).rgb);
|
|
62
|
+
float t = vK / uLayers; // this sheet's brightness level
|
|
63
|
+
float m = vK < 0.5 ? 1.0 : smoothstep(t - uSoft, t + uSoft, L);
|
|
64
|
+
// a fine lit edge along the sheet's threshold (only while the sheets are open)
|
|
65
|
+
float e = vK < 0.5 ? 0.0 : exp(-pow((L - t) / max(uSoft * 0.2, 1e-3), 2.0)) * vW;
|
|
66
|
+
vec3 c = mix(fadedOf(pic), pic, vW) + pic * e * uEdge;
|
|
67
|
+
float a = m * vAlpha * uOpacity;
|
|
68
|
+
if (a < 0.003) discard;
|
|
69
|
+
gl_FragColor = vec4(c * uIntensity * a, a);
|
|
70
|
+
#include <tonemapping_fragment>
|
|
71
|
+
#include <colorspace_fragment>
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
export function build(u, c) { return withLean(buildGallery(u, c), c); }
|
|
75
|
+
function buildGallery(u, c) {
|
|
76
|
+
const W = c.width, H = W / c.aspect, N = Math.max(2, c.layers | 0);
|
|
77
|
+
u.uLayers.value = N;
|
|
78
|
+
const geo = instanced(new THREE.PlaneGeometry(1, 1, 16, 12), N, () => [0, 0]);
|
|
79
|
+
const mat = shaderMaterial(u, vert, frag, { depthWrite: false });
|
|
80
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
81
|
+
mesh.frustumCulled = false;
|
|
82
|
+
mesh.raycast = () => { };
|
|
83
|
+
const g = makeGallery(u, c, { W, H, meshes: [mesh], setCount: (n) => { geo.instanceCount = n * N; } });
|
|
84
|
+
const apply = g.apply;
|
|
85
|
+
g.apply = (k) => { apply(k); applyConfig(u, k); };
|
|
86
|
+
return g;
|
|
87
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const catalog: {
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
camera: {
|
|
6
|
+
position: number[];
|
|
7
|
+
target: number[];
|
|
8
|
+
};
|
|
9
|
+
description: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULTS: {
|
|
13
|
+
type: string;
|
|
14
|
+
aspect: number;
|
|
15
|
+
width: number;
|
|
16
|
+
lines: number;
|
|
17
|
+
angle: number;
|
|
18
|
+
bend: number;
|
|
19
|
+
hairline: number;
|
|
20
|
+
changeTime: number;
|
|
21
|
+
dim: number;
|
|
22
|
+
pointerMode: string;
|
|
23
|
+
pointerRadius: number;
|
|
24
|
+
turn: number;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
lean: number;
|
|
27
|
+
imageUrls: any[];
|
|
28
|
+
autoplay: number;
|
|
29
|
+
intensity: number;
|
|
30
|
+
opacity: number;
|
|
31
|
+
layout: string;
|
|
32
|
+
spacing: number;
|
|
33
|
+
depth: number;
|
|
34
|
+
visible: number;
|
|
35
|
+
shape: number;
|
|
36
|
+
stiffness: number;
|
|
37
|
+
damping: number;
|
|
38
|
+
throwing: number;
|
|
39
|
+
wave: number;
|
|
40
|
+
slant: number;
|
|
41
|
+
pointerStrength: number;
|
|
42
|
+
};
|
|
43
|
+
export declare const STRUCTURAL: string[];
|
|
44
|
+
export declare const POINTER_MODES: string[];
|
|
45
|
+
export declare const GUI: ({
|
|
46
|
+
key: string;
|
|
47
|
+
options: string[];
|
|
48
|
+
tip: string;
|
|
49
|
+
min?: undefined;
|
|
50
|
+
max?: undefined;
|
|
51
|
+
step?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
key: string;
|
|
54
|
+
min: number;
|
|
55
|
+
max: number;
|
|
56
|
+
step: number;
|
|
57
|
+
} | {
|
|
58
|
+
key: string;
|
|
59
|
+
options: string[];
|
|
60
|
+
})[];
|
|
61
|
+
export declare const PRESETS: ({
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
patch: {
|
|
65
|
+
lines?: undefined;
|
|
66
|
+
bend?: undefined;
|
|
67
|
+
hairline?: undefined;
|
|
68
|
+
angle?: undefined;
|
|
69
|
+
};
|
|
70
|
+
} | {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
patch: {
|
|
74
|
+
lines: number;
|
|
75
|
+
bend: number;
|
|
76
|
+
hairline: number;
|
|
77
|
+
angle?: undefined;
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
patch: {
|
|
83
|
+
lines: number;
|
|
84
|
+
bend: number;
|
|
85
|
+
hairline: number;
|
|
86
|
+
angle: number;
|
|
87
|
+
};
|
|
88
|
+
})[];
|
|
89
|
+
export declare function createUniforms(): {
|
|
90
|
+
uLines: {
|
|
91
|
+
value: number;
|
|
92
|
+
};
|
|
93
|
+
uAngle: {
|
|
94
|
+
value: number;
|
|
95
|
+
};
|
|
96
|
+
uBend: {
|
|
97
|
+
value: number;
|
|
98
|
+
};
|
|
99
|
+
uHair: {
|
|
100
|
+
value: number;
|
|
101
|
+
};
|
|
102
|
+
uTurn: {
|
|
103
|
+
value: number;
|
|
104
|
+
};
|
|
105
|
+
uTex: {
|
|
106
|
+
value: any;
|
|
107
|
+
};
|
|
108
|
+
uS: {
|
|
109
|
+
value: number;
|
|
110
|
+
};
|
|
111
|
+
uCount: {
|
|
112
|
+
value: number;
|
|
113
|
+
};
|
|
114
|
+
uTime: {
|
|
115
|
+
value: number;
|
|
116
|
+
};
|
|
117
|
+
uAct: {
|
|
118
|
+
value: Float32Array<ArrayBuffer>;
|
|
119
|
+
};
|
|
120
|
+
uW: {
|
|
121
|
+
value: number;
|
|
122
|
+
};
|
|
123
|
+
uH: {
|
|
124
|
+
value: number;
|
|
125
|
+
};
|
|
126
|
+
uWave: {
|
|
127
|
+
value: number;
|
|
128
|
+
};
|
|
129
|
+
uSlant: {
|
|
130
|
+
value: number;
|
|
131
|
+
};
|
|
132
|
+
uDim: {
|
|
133
|
+
value: number;
|
|
134
|
+
};
|
|
135
|
+
uIntensity: {
|
|
136
|
+
value: number;
|
|
137
|
+
};
|
|
138
|
+
uOpacity: {
|
|
139
|
+
value: number;
|
|
140
|
+
};
|
|
141
|
+
uPointer: {
|
|
142
|
+
value: THREE.Vector3;
|
|
143
|
+
};
|
|
144
|
+
uPointerActive: {
|
|
145
|
+
value: number;
|
|
146
|
+
};
|
|
147
|
+
uPointerMode: {
|
|
148
|
+
value: number;
|
|
149
|
+
};
|
|
150
|
+
uPointerStrength: {
|
|
151
|
+
value: number;
|
|
152
|
+
};
|
|
153
|
+
uPointerRadius: {
|
|
154
|
+
value: number;
|
|
155
|
+
};
|
|
156
|
+
uPlace: {
|
|
157
|
+
value: THREE.Matrix4[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
161
|
+
export declare function build(u: any, c: any): any;
|
|
162
|
+
//# sourceMappingURL=engraving.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engraving.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/looks/engraving.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,OAAO;;;;;;;;;CAE8D,CAAC;AAEnF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC;AACF,eAAO,MAAM,UAAU,UAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,UAAW,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;IAQf,CAAC;AACF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInB,CAAC;AACF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2J;AACzL,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAG/B;AAuCD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAA6C"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// The approved lab module, verbatim but for its import paths and the lab's picture loader (Claude outputs/gallery-lab/
|
|
2
|
+
// engraving.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.engraving) do not carry; its own autoplay is never used.
|
|
4
|
+
// engraving — every picture is drawn as banknote engraving: one family of fine parallel lines, each line bent by
|
|
5
|
+
// the picture's own tone (the lines swell around bright forms, as an engraver's burin follows them) and as wide as
|
|
6
|
+
// the picture is bright, anti-aliased with fwidth. An inactive picture is a faint grey hatch of hairlines. When it
|
|
7
|
+
// becomes the active one a soft wave crosses it: behind the wave the lines thicken and take the picture's colour
|
|
8
|
+
// until they meet and the picture is whole. The cursor turns the hatching's angle under it, like light catching the
|
|
9
|
+
// cut lines of a plate. Self-coloured.
|
|
10
|
+
import * as THREE from 'three';
|
|
11
|
+
import { BASE_DEFAULTS, BASE_GUI_MOTION, BASE_GUI_TAIL, LAYOUT_GUI, baseUniforms, applyBase, baseGlsl, instanced, shaderMaterial, makeGallery, withLean, fragHead } from '../kit/lookBase.js';
|
|
12
|
+
export const catalog = { key: 'engraving', name: 'Engraving', camera: { position: [0.3, 0.15, 4.6], target: [0, 0, 0] },
|
|
13
|
+
description: 'Pictures drawn as banknote engraving, fine parallel lines bent and widened by the picture’s tone: inactive ones are a faint grey hatch, the active one thickens into full colour behind a soft wave; the cursor turns the hatching under it. Use for luxury, finance, heritage and editorial showcases.',
|
|
14
|
+
tags: ['gallery', 'engraving', 'hatching', 'lines', 'luxury', 'interactive'] };
|
|
15
|
+
export const DEFAULTS = {
|
|
16
|
+
...BASE_DEFAULTS, type: 'engraving', aspect: 1.4, width: 2.2,
|
|
17
|
+
lines: 70, angle: 28, bend: 1.6, hairline: 0.22, changeTime: 2.2, dim: 0.6,
|
|
18
|
+
pointerMode: 'turn', pointerRadius: 0.55, turn: 0.9,
|
|
19
|
+
};
|
|
20
|
+
export const STRUCTURAL = ['imageUrls', 'aspect', 'width'];
|
|
21
|
+
export const POINTER_MODES = ['turn'];
|
|
22
|
+
export const GUI = [
|
|
23
|
+
{ key: 'lean', min: 0, max: 3, step: 0.01, tip: 'The gallery turns toward the cursor' },
|
|
24
|
+
{ key: 'aspect', min: 0.6, max: 2.5, step: 0.01 }, { key: 'width', min: 1, max: 4, step: 0.01 },
|
|
25
|
+
...LAYOUT_GUI, ...BASE_GUI_MOTION,
|
|
26
|
+
{ key: 'lines', min: 30, max: 300, step: 1, tip: 'Lines across the picture' }, { key: 'angle', min: -90, max: 90, step: 1, tip: 'Angle of the hatching (degrees)' },
|
|
27
|
+
{ key: 'bend', min: 0, max: 5, step: 0.01, tip: 'How much the picture’s tone bends the lines' },
|
|
28
|
+
{ key: 'hairline', min: 0.05, max: 0.8, step: 0.01, tip: 'Width of an inactive line, as a share of a bright line' },
|
|
29
|
+
{ key: 'pointerMode', options: ['none', ...POINTER_MODES] }, ...BASE_GUI_TAIL, { key: 'turn', min: 0, max: 1.6, step: 0.01, tip: 'How far the cursor turns the hatching (radians)' },
|
|
30
|
+
];
|
|
31
|
+
export const PRESETS = [
|
|
32
|
+
{ name: 'Plate', description: 'The default.', patch: {} },
|
|
33
|
+
{ name: 'Banknote', description: 'Very fine lines, strongly bent.', patch: { lines: 220, bend: 2.8, hairline: 0.25 } },
|
|
34
|
+
{ name: 'Woodcut', description: 'Few bold lines.', patch: { lines: 60, bend: 0.8, hairline: 0.45, angle: 0 } },
|
|
35
|
+
];
|
|
36
|
+
export function createUniforms() { return { ...baseUniforms(), uLines: { value: 120 }, uAngle: { value: 0.49 }, uBend: { value: 1.6 }, uHair: { value: 0.32 }, uTurn: { value: 0.9 } }; }
|
|
37
|
+
export function applyConfig(u, c) {
|
|
38
|
+
const set = applyBase(u, c, POINTER_MODES);
|
|
39
|
+
set('uLines', c.lines);
|
|
40
|
+
set('uBend', c.bend);
|
|
41
|
+
set('uHair', c.hairline);
|
|
42
|
+
set('uTurn', c.turn);
|
|
43
|
+
if (c.angle !== undefined)
|
|
44
|
+
u.uAngle.value = c.angle * Math.PI / 180;
|
|
45
|
+
}
|
|
46
|
+
const vert = /* glsl */ `
|
|
47
|
+
attribute vec4 aI;
|
|
48
|
+
${baseGlsl}
|
|
49
|
+
varying vec2 vUv; varying vec2 vP; varying float vImg; varying float vAct; varying float vAlpha;
|
|
50
|
+
void main(){
|
|
51
|
+
float img = aI.x; vec2 g = position.xy + 0.5;
|
|
52
|
+
vec2 p = vec2(position.x * uW, position.y * uH);
|
|
53
|
+
vUv = g; vP = p; vImg = img; vAct = actOf(img); vAlpha = fadeAt(img);
|
|
54
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(placeAt(img, vec3(p, 0.0)), 1.0);
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const frag = /* glsl */ `
|
|
58
|
+
${fragHead}
|
|
59
|
+
precision highp sampler2DArray;
|
|
60
|
+
uniform sampler2DArray uTex;
|
|
61
|
+
${baseGlsl}
|
|
62
|
+
uniform float uLines, uAngle, uBend, uHair, uTurn;
|
|
63
|
+
varying vec2 vUv; varying vec2 vP; varying float vImg; varying float vAct; varying float vAlpha;
|
|
64
|
+
void main(){
|
|
65
|
+
vec3 pic = texture(uTex, vec3(vUv, vImg)).rgb;
|
|
66
|
+
float L = lumOf(textureLod(uTex, vec3(vUv, vImg), 2.5).rgb);
|
|
67
|
+
float s = waveAt(vAct, vUv);
|
|
68
|
+
float ang = uAngle + uTurn * maskAt(vP);
|
|
69
|
+
vec2 q = vec2(cos(ang) * vP.x + sin(ang) * vP.y, -sin(ang) * vP.x + cos(ang) * vP.y);
|
|
70
|
+
float f = q.y * uLines / uH + L * uBend; // the line coordinate, bent by the tone
|
|
71
|
+
float dist = abs(fract(f) - 0.5); // 0 on a line's centre, 0.5 between
|
|
72
|
+
float px = max(fwidth(f), 1e-4);
|
|
73
|
+
float bright = lumOf(pic);
|
|
74
|
+
float width = mix(0.5 * uHair * (0.25 + 0.75 * bright), 0.56, s * s);
|
|
75
|
+
float line = 1.0 - smoothstep(width - px, width + px, dist);
|
|
76
|
+
vec3 c = mix(fadedOf(pic) * 1.3, pic, s);
|
|
77
|
+
float a = line * vAlpha * uOpacity;
|
|
78
|
+
if (a < 0.003) discard;
|
|
79
|
+
gl_FragColor = vec4(c * uIntensity * a, a);
|
|
80
|
+
#include <tonemapping_fragment>
|
|
81
|
+
#include <colorspace_fragment>
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
export function build(u, c) { return withLean(buildGallery(u, c), c); }
|
|
85
|
+
function buildGallery(u, c) {
|
|
86
|
+
const W = c.width, H = W / c.aspect;
|
|
87
|
+
const geo = instanced(new THREE.PlaneGeometry(1, 1, 1, 1), 1, () => [0, 0]);
|
|
88
|
+
const mat = shaderMaterial(u, vert, frag);
|
|
89
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
90
|
+
mesh.frustumCulled = false;
|
|
91
|
+
mesh.raycast = () => { };
|
|
92
|
+
const g = makeGallery(u, c, { W, H, meshes: [mesh], setCount: (n) => { geo.instanceCount = n; } });
|
|
93
|
+
const apply = g.apply;
|
|
94
|
+
g.apply = (k) => { apply(k); applyConfig(u, k); };
|
|
95
|
+
return g;
|
|
96
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const catalog: {
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
camera: {
|
|
6
|
+
position: number[];
|
|
7
|
+
target: number[];
|
|
8
|
+
};
|
|
9
|
+
description: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const DEFAULTS: {
|
|
13
|
+
type: string;
|
|
14
|
+
aspect: number;
|
|
15
|
+
width: number;
|
|
16
|
+
lines: number;
|
|
17
|
+
bend: number;
|
|
18
|
+
meander: number;
|
|
19
|
+
flow: number;
|
|
20
|
+
dashes: number;
|
|
21
|
+
hairline: number;
|
|
22
|
+
smoothing: number;
|
|
23
|
+
changeTime: number;
|
|
24
|
+
dim: number;
|
|
25
|
+
pointerMode: string;
|
|
26
|
+
pointerRadius: number;
|
|
27
|
+
part: number;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
lean: number;
|
|
30
|
+
imageUrls: any[];
|
|
31
|
+
autoplay: number;
|
|
32
|
+
intensity: number;
|
|
33
|
+
opacity: number;
|
|
34
|
+
layout: string;
|
|
35
|
+
spacing: number;
|
|
36
|
+
depth: number;
|
|
37
|
+
visible: number;
|
|
38
|
+
shape: number;
|
|
39
|
+
stiffness: number;
|
|
40
|
+
damping: number;
|
|
41
|
+
throwing: number;
|
|
42
|
+
wave: number;
|
|
43
|
+
slant: number;
|
|
44
|
+
pointerStrength: number;
|
|
45
|
+
};
|
|
46
|
+
export declare const STRUCTURAL: string[];
|
|
47
|
+
export declare const POINTER_MODES: string[];
|
|
48
|
+
export declare const GUI: ({
|
|
49
|
+
key: string;
|
|
50
|
+
options: string[];
|
|
51
|
+
tip: string;
|
|
52
|
+
min?: undefined;
|
|
53
|
+
max?: undefined;
|
|
54
|
+
step?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
key: string;
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
step: number;
|
|
60
|
+
} | {
|
|
61
|
+
key: string;
|
|
62
|
+
options: string[];
|
|
63
|
+
})[];
|
|
64
|
+
export declare const PRESETS: ({
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
patch: {
|
|
68
|
+
lines?: undefined;
|
|
69
|
+
meander?: undefined;
|
|
70
|
+
flow?: undefined;
|
|
71
|
+
hairline?: undefined;
|
|
72
|
+
dashes?: undefined;
|
|
73
|
+
bend?: undefined;
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
name: string;
|
|
77
|
+
description: string;
|
|
78
|
+
patch: {
|
|
79
|
+
lines: number;
|
|
80
|
+
meander: number;
|
|
81
|
+
flow: number;
|
|
82
|
+
hairline: number;
|
|
83
|
+
dashes?: undefined;
|
|
84
|
+
bend?: undefined;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
patch: {
|
|
90
|
+
lines: number;
|
|
91
|
+
flow: number;
|
|
92
|
+
dashes: number;
|
|
93
|
+
bend: number;
|
|
94
|
+
meander?: undefined;
|
|
95
|
+
hairline?: undefined;
|
|
96
|
+
};
|
|
97
|
+
})[];
|
|
98
|
+
export declare function createUniforms(): {
|
|
99
|
+
uLines: {
|
|
100
|
+
value: number;
|
|
101
|
+
};
|
|
102
|
+
uBend: {
|
|
103
|
+
value: number;
|
|
104
|
+
};
|
|
105
|
+
uMeander: {
|
|
106
|
+
value: number;
|
|
107
|
+
};
|
|
108
|
+
uFlowT: {
|
|
109
|
+
value: number;
|
|
110
|
+
};
|
|
111
|
+
uDashes: {
|
|
112
|
+
value: number;
|
|
113
|
+
};
|
|
114
|
+
uHair: {
|
|
115
|
+
value: number;
|
|
116
|
+
};
|
|
117
|
+
uSmooth: {
|
|
118
|
+
value: number;
|
|
119
|
+
};
|
|
120
|
+
uPart: {
|
|
121
|
+
value: number;
|
|
122
|
+
};
|
|
123
|
+
uTex: {
|
|
124
|
+
value: any;
|
|
125
|
+
};
|
|
126
|
+
uS: {
|
|
127
|
+
value: number;
|
|
128
|
+
};
|
|
129
|
+
uCount: {
|
|
130
|
+
value: number;
|
|
131
|
+
};
|
|
132
|
+
uTime: {
|
|
133
|
+
value: number;
|
|
134
|
+
};
|
|
135
|
+
uAct: {
|
|
136
|
+
value: Float32Array<ArrayBuffer>;
|
|
137
|
+
};
|
|
138
|
+
uW: {
|
|
139
|
+
value: number;
|
|
140
|
+
};
|
|
141
|
+
uH: {
|
|
142
|
+
value: number;
|
|
143
|
+
};
|
|
144
|
+
uWave: {
|
|
145
|
+
value: number;
|
|
146
|
+
};
|
|
147
|
+
uSlant: {
|
|
148
|
+
value: number;
|
|
149
|
+
};
|
|
150
|
+
uDim: {
|
|
151
|
+
value: number;
|
|
152
|
+
};
|
|
153
|
+
uIntensity: {
|
|
154
|
+
value: number;
|
|
155
|
+
};
|
|
156
|
+
uOpacity: {
|
|
157
|
+
value: number;
|
|
158
|
+
};
|
|
159
|
+
uPointer: {
|
|
160
|
+
value: THREE.Vector3;
|
|
161
|
+
};
|
|
162
|
+
uPointerActive: {
|
|
163
|
+
value: number;
|
|
164
|
+
};
|
|
165
|
+
uPointerMode: {
|
|
166
|
+
value: number;
|
|
167
|
+
};
|
|
168
|
+
uPointerStrength: {
|
|
169
|
+
value: number;
|
|
170
|
+
};
|
|
171
|
+
uPointerRadius: {
|
|
172
|
+
value: number;
|
|
173
|
+
};
|
|
174
|
+
uPlace: {
|
|
175
|
+
value: THREE.Matrix4[];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
179
|
+
export declare function build(u: any, c: any): any;
|
|
180
|
+
//# sourceMappingURL=flowLines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowLines.d.ts","sourceRoot":"","sources":["../../../../src/components/gallery/looks/flowLines.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,OAAO;;;;;;;;;CAE0D,CAAC;AAE/E,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC;AACF,eAAO,MAAM,UAAU,UAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,UAAW,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;IAUf,CAAC;AACF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInB,CAAC;AACF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7B;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAE/B;AAiDD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAA6C"}
|