| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- import type { Scene } from "./_helpers";
- export const mystify: Scene = {
- name: "Mystify",
- description:
- "Neon wireframe torus knots orbiting in the void -- the Windows Mystify screensaver in 3D",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "cam",
- "ambient",
- "shape1",
- "shape2",
- "shape3",
- "shape4",
- "shape5",
- "shape6",
- "shape7",
- "post",
- "controls",
- ],
- },
- cam: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 0, 10],
- rotation: null,
- scale: null,
- fov: 55,
- near: 0.1,
- far: 1000,
- makeDefault: true,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#111111", intensity: 0.1 },
- children: [],
- },
- shape1: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.5,
- radius: 3,
- tilt: 0.3,
- },
- children: ["s1-spin"],
- },
- "s1-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 1.5,
- axis: "x",
- },
- children: ["s1-body"],
- },
- "s1-body": {
- type: "TorusKnot",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.4,
- tube: 0.02,
- p: 2,
- q: 3,
- tubularSegments: 128,
- radialSegments: 4,
- material: {
- color: "#00ffff",
- emissive: "#00ffff",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape2: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -0.4,
- radius: 4,
- tilt: -0.5,
- },
- children: ["s2-spin"],
- },
- "s2-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -1,
- axis: "z",
- },
- children: ["s2-body"],
- },
- "s2-body": {
- type: "Torus",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.6,
- tube: 0.015,
- radialSegments: 4,
- tubularSegments: 128,
- material: {
- color: "#ff00ff",
- emissive: "#ff00ff",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape3: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.7,
- radius: 2.5,
- tilt: 0.8,
- },
- children: ["s3-spin"],
- },
- "s3-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 2,
- axis: "y",
- },
- children: ["s3-body"],
- },
- "s3-body": {
- type: "TorusKnot",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.35,
- tube: 0.015,
- p: 3,
- q: 2,
- tubularSegments: 128,
- radialSegments: 4,
- material: {
- color: "#ffff00",
- emissive: "#ffff00",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape4: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -0.6,
- radius: 3.5,
- tilt: -0.2,
- },
- children: ["s4-spin"],
- },
- "s4-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 1.2,
- axis: "x",
- },
- children: ["s4-body"],
- },
- "s4-body": {
- type: "Torus",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.5,
- tube: 0.012,
- radialSegments: 4,
- tubularSegments: 128,
- material: {
- color: "#00ff44",
- emissive: "#00ff44",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape5: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.3,
- radius: 5,
- tilt: 0.6,
- },
- children: ["s5-spin"],
- },
- "s5-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -1.8,
- axis: "z",
- },
- children: ["s5-body"],
- },
- "s5-body": {
- type: "TorusKnot",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.5,
- tube: 0.018,
- p: 2,
- q: 5,
- tubularSegments: 128,
- radialSegments: 4,
- material: {
- color: "#ff4400",
- emissive: "#ff4400",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape6: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -0.8,
- radius: 2,
- tilt: -0.7,
- },
- children: ["s6-spin"],
- },
- "s6-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 2.5,
- axis: "y",
- },
- children: ["s6-body"],
- },
- "s6-body": {
- type: "Torus",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.3,
- tube: 0.01,
- radialSegments: 4,
- tubularSegments: 128,
- material: {
- color: "#4488ff",
- emissive: "#4488ff",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- shape7: {
- type: "Orbit",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.45,
- radius: 4.5,
- tilt: 1,
- },
- children: ["s7-spin"],
- },
- "s7-spin": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: -0.8,
- axis: "x",
- },
- children: ["s7-body"],
- },
- "s7-body": {
- type: "TorusKnot",
- props: {
- position: null,
- rotation: null,
- scale: null,
- castShadow: false,
- receiveShadow: false,
- radius: 0.45,
- tube: 0.015,
- p: 3,
- q: 4,
- tubularSegments: 128,
- radialSegments: 4,
- material: {
- color: "#ff88ff",
- emissive: "#ff88ff",
- emissiveIntensity: 2,
- wireframe: true,
- },
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 3,
- luminanceThreshold: 0.05,
- luminanceSmoothing: 0.3,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.2, darkness: 0.8 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: true,
- enablePan: true,
- enableRotate: true,
- minDistance: 4,
- maxDistance: 18,
- minPolarAngle: null,
- maxPolarAngle: null,
- autoRotate: true,
- autoRotateSpeed: 0.3,
- },
- children: [],
- },
- },
- },
- };
|