| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474 |
- import type { Scene } from "./_helpers";
- export const clockworkOrrery: Scene = {
- name: "Clockwork Orrery",
- description:
- "Interlocking brass/gold rings spinning at different tilts and speeds with orbiting metallic planets. Like the inside of a celestial clockwork mechanism.",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "cam",
- "env",
- "ambient",
- "key",
- "warm",
- "accent",
- "center",
- "ring-spin-0",
- "ring-spin-1",
- "ring-spin-2",
- "ring-spin-3",
- "planet-orbit-0",
- "planet-orbit-1",
- "planet-orbit-2",
- "sparkles",
- "post",
- "controls",
- ],
- },
- cam: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 3, 8],
- fov: 50,
- makeDefault: true,
- },
- children: [],
- },
- env: {
- type: "Environment",
- props: {
- preset: "dawn",
- background: true,
- blur: 1,
- intensity: 0.5,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#332200", intensity: 0.4 },
- children: [],
- },
- key: {
- type: "DirectionalLight",
- props: {
- position: [5, 10, 5],
- rotation: null,
- scale: null,
- color: "#ffddaa",
- intensity: 2,
- castShadow: true,
- },
- children: [],
- },
- warm: {
- type: "PointLight",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- color: "#ffaa44",
- intensity: 30,
- distance: 15,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- accent: {
- type: "PointLight",
- props: {
- position: [-4, 3, -4],
- rotation: null,
- scale: null,
- color: "#ffcc88",
- intensity: 15,
- distance: 15,
- decay: 2,
- castShadow: false,
- },
- children: [],
- },
- center: {
- type: "Float",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.5,
- rotationIntensity: 0.1,
- floatIntensity: 0.2,
- enabled: true,
- },
- children: ["center-sphere"],
- },
- "center-sphere": {
- type: "GlassSphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.5,
- widthSegments: 32,
- heightSegments: 16,
- color: "#ffddaa",
- transmission: 1,
- thickness: 0.8,
- roughness: 0,
- chromaticAberration: 0.1,
- ior: 1.8,
- distortion: 0.05,
- distortionScale: null,
- temporalDistortion: null,
- samples: 10,
- resolution: 256,
- },
- children: [],
- },
- "ring-spin-0": {
- type: "Spin",
- props: {
- position: null,
- rotation: [0.3, 0, 0.8],
- scale: null,
- speed: 1.2,
- axis: "y",
- },
- children: ["ring-torus-0"],
- },
- "ring-torus-0": {
- type: "Torus",
- props: {
- position: null,
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ffcc44",
- metalness: 0.95,
- roughness: 0.1,
- emissive: "#cc9900",
- emissiveIntensity: 0.4,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 2,
- tube: 0.04,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- "ring-spin-1": {
- type: "Spin",
- props: {
- position: null,
- rotation: [0.9, 0, -0.2],
- scale: null,
- speed: -0.7,
- axis: "y",
- },
- children: ["ring-torus-1"],
- },
- "ring-torus-1": {
- type: "Torus",
- props: {
- position: null,
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#cc8833",
- metalness: 0.95,
- roughness: 0.1,
- emissive: "#aa6622",
- emissiveIntensity: 0.3,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 3.2,
- tube: 0.035,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- "ring-spin-2": {
- type: "Spin",
- props: {
- position: null,
- rotation: [-0.4, 0, 0.5],
- scale: null,
- speed: 0.4,
- axis: "y",
- },
- children: ["ring-torus-2"],
- },
- "ring-torus-2": {
- type: "Torus",
- props: {
- position: null,
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#bb9944",
- metalness: 0.95,
- roughness: 0.1,
- emissive: "#886622",
- emissiveIntensity: 0.25,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 4.5,
- tube: 0.03,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- "ring-spin-3": {
- type: "Spin",
- props: {
- position: null,
- rotation: [0.1, 0, -0.1],
- scale: null,
- speed: -0.2,
- axis: "y",
- },
- children: ["ring-torus-3"],
- },
- "ring-torus-3": {
- type: "Torus",
- props: {
- position: null,
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#997744",
- metalness: 0.95,
- roughness: 0.1,
- emissive: "#664422",
- emissiveIntensity: 0.15,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 6,
- tube: 0.025,
- radialSegments: null,
- tubularSegments: 128,
- },
- children: [],
- },
- "planet-orbit-0": {
- type: "Orbit",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- speed: 0.6,
- radius: 2.5,
- tilt: 0.3,
- },
- children: ["planet-spin-0"],
- },
- "planet-spin-0": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 3,
- axis: "y",
- },
- children: ["planet-sphere-0"],
- },
- "planet-sphere-0": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ffffff",
- metalness: 1,
- roughness: 0.02,
- emissive: "#ffffff",
- emissiveIntensity: 0.2,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.2,
- widthSegments: 32,
- heightSegments: 16,
- },
- children: [],
- },
- "planet-orbit-1": {
- type: "Orbit",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- speed: -0.9,
- radius: 3.8,
- tilt: 0.8,
- },
- children: ["planet-spin-1"],
- },
- "planet-spin-1": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -2,
- axis: "x",
- },
- children: ["planet-sphere-1"],
- },
- "planet-sphere-1": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ffcc88",
- metalness: 0.8,
- roughness: 0.15,
- emissive: "#ffcc88",
- emissiveIntensity: 0.2,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.15,
- widthSegments: 32,
- heightSegments: 16,
- },
- children: [],
- },
- "planet-orbit-2": {
- type: "Orbit",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- speed: 0.35,
- radius: 5.2,
- tilt: -0.5,
- },
- children: ["planet-spin-2"],
- },
- "planet-spin-2": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 1.5,
- axis: "z",
- },
- children: ["planet-sphere-2"],
- },
- "planet-sphere-2": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- material: {
- color: "#ccaa66",
- metalness: 0.9,
- roughness: 0.05,
- emissive: "#ccaa66",
- emissiveIntensity: 0.2,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.18,
- widthSegments: 32,
- heightSegments: 16,
- },
- children: [],
- },
- sparkles: {
- type: "Sparkles",
- props: {
- position: null,
- rotation: null,
- scale: [14, 10, 14],
- count: 150,
- speed: 0.15,
- opacity: 0.3,
- color: "#ffcc66",
- size: 1,
- noise: 2,
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 1.2,
- luminanceThreshold: 0.2,
- luminanceSmoothing: null,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.5, darkness: 0.5 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: true,
- enablePan: null,
- enableRotate: true,
- minDistance: 4,
- maxDistance: 18,
- minPolarAngle: 0.3,
- maxPolarAngle: 1.5,
- autoRotate: true,
- autoRotateSpeed: 0.3,
- },
- children: [],
- },
- },
- },
- };
|