| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- import { PI } from "./_helpers";
- import type { Scene } from "./_helpers";
- export const orbitalChaos: Scene = {
- name: "Orbital Chaos",
- description:
- "Everything in motion -- orbiting glass, spinning knots, morphing core, all with bloom",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "cam",
- "env",
- "stars",
- "ambient",
- "core-light",
- "accent-1",
- "accent-2",
- "core-pulse",
- "orbit-1",
- "orbit-2",
- "orbit-3",
- "orbit-4",
- "orbit-5",
- "orbit-6",
- "ring-spin-fast",
- "ring-spin-slow",
- "sparkles",
- "post",
- "fog",
- "controls",
- ],
- },
- cam: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 2, 8],
- fov: 50,
- makeDefault: true,
- },
- children: [],
- },
- env: {
- type: "Environment",
- props: { preset: "night", background: false, blur: 1, intensity: 0.15 },
- children: [],
- },
- stars: {
- type: "Stars",
- props: {
- radius: 120,
- depth: 60,
- count: 8000,
- factor: 5,
- saturation: 0.2,
- fade: true,
- speed: 0.5,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#110022", intensity: 0.3 },
- children: [],
- },
- "core-light": {
- type: "PointLight",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- color: "#ff44aa",
- intensity: 80,
- distance: 25,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- "accent-1": {
- type: "PointLight",
- props: {
- position: [5, 3, 5],
- rotation: null,
- scale: null,
- color: "#00ffff",
- intensity: 25,
- distance: 20,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- "accent-2": {
- type: "PointLight",
- props: {
- position: [-5, -2, -5],
- rotation: null,
- scale: null,
- color: "#ff00ff",
- intensity: 25,
- distance: 20,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- "core-pulse": {
- type: "Pulse",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.8,
- min: 0.85,
- max: 1.15,
- },
- children: ["core-spin"],
- },
- "core-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.3,
- axis: "y",
- },
- children: ["core-blob"],
- },
- "core-blob": {
- type: "DistortSphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 1.2,
- widthSegments: 64,
- heightSegments: 32,
- color: "#ff2288",
- speed: 4,
- distort: 0.6,
- metalness: 0.1,
- roughness: 0.1,
- },
- children: [],
- },
- "orbit-1": {
- type: "Orbit",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- speed: 0.8,
- radius: 4,
- tilt: 0.5,
- },
- children: ["orb-1-spin"],
- },
- "orb-1-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 2,
- axis: "x",
- },
- children: ["orb-1"],
- },
- "orb-1": {
- type: "GlassSphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.4,
- widthSegments: 32,
- heightSegments: 16,
- color: "#00ffff",
- transmission: 1,
- thickness: 0.5,
- roughness: 0,
- chromaticAberration: 0.15,
- ior: 1.8,
- distortion: 0.1,
- distortionScale: null,
- temporalDistortion: null,
- samples: 6,
- resolution: 128,
- },
- children: [],
- },
- "orbit-2": {
- type: "Orbit",
- props: {
- position: [0, 0.5, 0],
- rotation: null,
- scale: null,
- speed: -0.6,
- radius: 5.5,
- tilt: 1,
- },
- children: ["orb-2-spin"],
- },
- "orb-2-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 3,
- axis: "z",
- },
- children: ["orb-2"],
- },
- "orb-2": {
- type: "TorusKnot",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ff00ff",
- metalness: 0.9,
- roughness: 0.1,
- emissive: "#ff00ff",
- emissiveIntensity: 0.8,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.35,
- tube: 0.12,
- tubularSegments: 64,
- radialSegments: 8,
- p: 2,
- q: 3,
- },
- children: [],
- },
- "orbit-3": {
- type: "Orbit",
- props: {
- position: [0, -0.3, 0],
- rotation: null,
- scale: null,
- speed: 1.2,
- radius: 3.2,
- tilt: 0.3,
- },
- children: ["orb-3"],
- },
- "orb-3": {
- type: "GlassSphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.3,
- widthSegments: 32,
- heightSegments: 16,
- color: "#ff8800",
- transmission: 1,
- thickness: 0.4,
- roughness: 0,
- chromaticAberration: 0.1,
- ior: 1.6,
- distortion: 0,
- distortionScale: null,
- temporalDistortion: null,
- samples: 6,
- resolution: 128,
- },
- children: [],
- },
- "orbit-4": {
- type: "Orbit",
- props: {
- position: [0, 1, 0],
- rotation: null,
- scale: null,
- speed: -1.5,
- radius: 6.5,
- tilt: -0.8,
- },
- children: ["orb-4-spin"],
- },
- "orb-4-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -4,
- axis: "y",
- },
- children: ["orb-4"],
- },
- "orb-4": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#00ff88",
- metalness: null,
- roughness: null,
- emissive: "#00ff88",
- emissiveIntensity: 0.8,
- opacity: null,
- transparent: null,
- wireframe: true,
- },
- radius: 0.35,
- widthSegments: 16,
- heightSegments: 12,
- },
- children: [],
- },
- "orbit-5": {
- type: "Orbit",
- props: {
- position: [0, -0.5, 0],
- rotation: null,
- scale: null,
- speed: 0.4,
- radius: 8,
- tilt: 0.2,
- },
- children: ["orb-5-spin"],
- },
- "orb-5-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 1.5,
- axis: "z",
- },
- children: ["orb-5"],
- },
- "orb-5": {
- type: "GlassBox",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- width: 0.5,
- height: 0.5,
- depth: 0.5,
- color: "#ff44ff",
- transmission: 1,
- thickness: 0.4,
- roughness: 0,
- chromaticAberration: 0.08,
- ior: 1.7,
- distortion: 0,
- distortionScale: null,
- temporalDistortion: null,
- samples: 6,
- resolution: 128,
- },
- children: [],
- },
- "orbit-6": {
- type: "Orbit",
- props: {
- position: [0, 0.8, 0],
- rotation: null,
- scale: null,
- speed: 2,
- radius: 2.2,
- tilt: 1.5,
- },
- children: ["orb-6"],
- },
- "orb-6": {
- type: "DistortSphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.25,
- widthSegments: 32,
- heightSegments: 16,
- color: "#ffcc00",
- speed: 5,
- distort: 0.7,
- metalness: 0.5,
- roughness: 0.1,
- },
- children: [],
- },
- "ring-spin-fast": {
- type: "Spin",
- props: {
- position: null,
- rotation: [0.3, 0, 0],
- scale: null,
- speed: 0.5,
- axis: "y",
- },
- children: ["ring-inner"],
- },
- "ring-inner": {
- type: "Torus",
- props: {
- position: null,
- rotation: [PI / 2, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#00ffff",
- metalness: 0.9,
- roughness: 0.1,
- emissive: "#00ccff",
- emissiveIntensity: 0.5,
- opacity: 0.3,
- transparent: true,
- wireframe: null,
- },
- radius: 9,
- tube: 0.015,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- "ring-spin-slow": {
- type: "Spin",
- props: {
- position: null,
- rotation: [-0.5, 0, 0.3],
- scale: null,
- speed: -0.3,
- axis: "y",
- },
- children: ["ring-outer"],
- },
- "ring-outer": {
- type: "Torus",
- props: {
- position: null,
- rotation: [PI / 2, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ff00ff",
- metalness: 0.9,
- roughness: 0.1,
- emissive: "#ff00aa",
- emissiveIntensity: 0.3,
- opacity: 0.2,
- transparent: true,
- wireframe: null,
- },
- radius: 11,
- tube: 0.012,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- sparkles: {
- type: "Sparkles",
- props: {
- position: null,
- rotation: null,
- scale: [18, 18, 18],
- count: 400,
- speed: 0.4,
- opacity: 0.5,
- color: "#ffddaa",
- size: 1.2,
- noise: 2,
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 2,
- luminanceThreshold: 0.15,
- luminanceSmoothing: null,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.4, darkness: 0.7 },
- children: [],
- },
- fog: {
- type: "Fog",
- props: { color: "#030008", near: 10, far: 40 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: true,
- enablePan: null,
- enableRotate: true,
- minDistance: 5,
- maxDistance: 25,
- minPolarAngle: null,
- maxPolarAngle: null,
- autoRotate: true,
- autoRotateSpeed: 0.4,
- },
- children: [],
- },
- },
- },
- };
|