| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- import type { Scene } from "./_helpers";
- export const stormCell: Scene = {
- name: "Storm Cell",
- description:
- "Dark violent thunderstorm -- spinning cloud masses, pulsing lightning, rain particles, camera shake",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "sky",
- "ambient",
- "sun",
- "cloud-spin-1",
- "cloud-spin-2",
- "cloud-spin-3",
- "lightning-1-pulse",
- "lightning-2-pulse",
- "lightning-3-pulse",
- "rain",
- "shake",
- "post",
- "fog",
- "controls",
- ],
- },
- sky: {
- type: "Sky",
- props: {
- distance: null,
- sunPosition: [10, 2, 0],
- inclination: null,
- azimuth: null,
- turbidity: 20,
- rayleigh: 0.5,
- mieCoefficient: 0.01,
- mieDirectionalG: 0.9,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#111122", intensity: 0.15 },
- children: [],
- },
- sun: {
- type: "DirectionalLight",
- props: {
- position: [10, 3, 0],
- rotation: null,
- scale: null,
- color: "#334466",
- intensity: 0.5,
- castShadow: true,
- },
- children: [],
- },
- "cloud-spin-1": {
- type: "Spin",
- props: {
- position: [0, 4, 0],
- rotation: null,
- scale: null,
- speed: 0.08,
- axis: "y",
- },
- children: ["cloud-1"],
- },
- "cloud-1": {
- type: "Cloud",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- seed: 1,
- segments: 40,
- bounds: [25, 3, 25],
- volume: 15,
- speed: 0.3,
- fade: 20,
- opacity: 0.9,
- color: "#222233",
- growth: 10,
- },
- children: [],
- },
- "cloud-spin-2": {
- type: "Spin",
- props: {
- position: [0, 6, -3],
- rotation: null,
- scale: null,
- speed: -0.05,
- axis: "y",
- },
- children: ["cloud-2"],
- },
- "cloud-2": {
- type: "Cloud",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- seed: 42,
- segments: 30,
- bounds: [20, 2, 20],
- volume: 12,
- speed: 0.2,
- fade: 15,
- opacity: 0.7,
- color: "#1a1a2a",
- growth: 8,
- },
- children: [],
- },
- "cloud-spin-3": {
- type: "Spin",
- props: {
- position: [0, 8, 2],
- rotation: null,
- scale: null,
- speed: 0.03,
- axis: "y",
- },
- children: ["cloud-3"],
- },
- "cloud-3": {
- type: "Cloud",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- seed: 99,
- segments: 25,
- bounds: [30, 2, 30],
- volume: 10,
- speed: 0.15,
- fade: 25,
- opacity: 0.5,
- color: "#2a2a3a",
- growth: 6,
- },
- children: [],
- },
- "lightning-1-pulse": {
- type: "Pulse",
- props: {
- position: [2, 5, -1],
- rotation: null,
- scale: null,
- speed: 3,
- min: 0,
- max: 1,
- },
- children: ["lightning-1"],
- },
- "lightning-1": {
- type: "PointLight",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- color: "#aabbff",
- intensity: 80,
- distance: 30,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- "lightning-2-pulse": {
- type: "Pulse",
- props: {
- position: [-3, 6, 3],
- rotation: null,
- scale: null,
- speed: 4.5,
- min: 0,
- max: 1,
- },
- children: ["lightning-2"],
- },
- "lightning-2": {
- type: "PointLight",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- color: "#aaccff",
- intensity: 60,
- distance: 25,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- "lightning-3-pulse": {
- type: "Pulse",
- props: {
- position: [0, 4, -4],
- rotation: null,
- scale: null,
- speed: 2.5,
- min: 0,
- max: 1,
- },
- children: ["lightning-3"],
- },
- "lightning-3": {
- type: "PointLight",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- color: "#99bbff",
- intensity: 40,
- distance: 20,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- rain: {
- type: "Sparkles",
- props: {
- position: [0, 5, 0],
- rotation: null,
- scale: [20, 15, 20],
- count: 500,
- speed: 5,
- opacity: 0.4,
- color: "#6688aa",
- size: 0.5,
- noise: 0.5,
- },
- children: [],
- },
- shake: {
- type: "CameraShake",
- props: {
- intensity: 0.2,
- maxYaw: 0.02,
- maxPitch: 0.03,
- maxRoll: 0.01,
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 0.8,
- luminanceThreshold: 0.3,
- luminanceSmoothing: null,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.3, darkness: 0.8 },
- children: [],
- },
- fog: {
- type: "Fog",
- props: { color: "#0a0a15", near: 5, far: 30 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: null,
- dampingFactor: null,
- enableZoom: true,
- enablePan: null,
- enableRotate: true,
- minDistance: 3,
- maxDistance: 20,
- minPolarAngle: 0.2,
- maxPolarAngle: 1.3,
- autoRotate: true,
- autoRotateSpeed: 0.1,
- },
- children: [],
- },
- },
- },
- };
|