| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764 |
- import type { Scene } from "./_helpers";
- const goldMaterial = {
- color: "#cc8833",
- metalness: 1,
- roughness: 0.05,
- };
- const blueMaterial = {
- color: "#3388cc",
- metalness: 1,
- roughness: 0.05,
- };
- const magentaMaterial = {
- color: "#cc3388",
- metalness: 1,
- roughness: 0.05,
- };
- export const pipes: Scene = {
- name: "Pipes",
- description:
- "Classic 3D Pipes screensaver -- chrome pipes snaking through space at right angles",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "camera",
- "env",
- "ambient",
- "directional",
- "pipe-system",
- "post",
- "fog",
- "controls",
- ],
- },
- camera: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 3, 12],
- rotation: null,
- scale: null,
- fov: 50,
- near: null,
- far: null,
- makeDefault: true,
- },
- children: [],
- },
- env: {
- type: "Environment",
- props: {
- preset: "warehouse",
- background: false,
- blur: 0.5,
- intensity: 1,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#ffffff", intensity: 0.3 },
- children: [],
- },
- directional: {
- type: "DirectionalLight",
- props: {
- position: [5, 10, 5],
- rotation: null,
- scale: null,
- color: "#ffffff",
- intensity: 1,
- castShadow: null,
- },
- children: [],
- },
- "pipe-system": {
- type: "Spin",
- props: {
- position: null,
- rotation: null,
- scale: null,
- speed: 0.1,
- axis: "y",
- },
- children: ["pipe1-group", "pipe2-group", "pipe3-group"],
- },
- "pipe1-group": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "p1-j0",
- "p1-s1",
- "p1-j1",
- "p1-s2",
- "p1-j2",
- "p1-s3",
- "p1-j3",
- "p1-s4",
- "p1-j4",
- "p1-s5",
- "p1-j5",
- "p1-s6",
- "p1-j6",
- ],
- },
- "p1-j0": {
- type: "Sphere",
- props: {
- position: [-3, -3, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j1": {
- type: "Sphere",
- props: {
- position: [-3, 0, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j2": {
- type: "Sphere",
- props: {
- position: [1, 0, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j3": {
- type: "Sphere",
- props: {
- position: [1, 2, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j4": {
- type: "Sphere",
- props: {
- position: [1, 2, -3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j5": {
- type: "Sphere",
- props: {
- position: [1, 0, -3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-j6": {
- type: "Sphere",
- props: {
- position: [-1, 0, -3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p1-s1": {
- type: "Cylinder",
- props: {
- position: [-3, -1.5, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "p1-s2": {
- type: "Cylinder",
- props: {
- position: [-1, 0, 0],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 4,
- radialSegments: 12,
- },
- children: [],
- },
- "p1-s3": {
- type: "Cylinder",
- props: {
- position: [1, 1, 0],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 2,
- radialSegments: 12,
- },
- children: [],
- },
- "p1-s4": {
- type: "Cylinder",
- props: {
- position: [1, 2, -1.5],
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "p1-s5": {
- type: "Cylinder",
- props: {
- position: [1, 1, -3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 2,
- radialSegments: 12,
- },
- children: [],
- },
- "p1-s6": {
- type: "Cylinder",
- props: {
- position: [0, 0, -3],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: goldMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 2,
- radialSegments: 12,
- },
- children: [],
- },
- "pipe2-group": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "p2-j0",
- "p2-s1",
- "p2-j1",
- "p2-s2",
- "p2-j2",
- "p2-s3",
- "p2-j3",
- "p2-s4",
- "p2-j4",
- "p2-s5",
- "p2-j5",
- "p2-s6",
- "p2-j6",
- ],
- },
- "p2-j0": {
- type: "Sphere",
- props: {
- position: [2, -3, 2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j1": {
- type: "Sphere",
- props: {
- position: [2, 1, 2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j2": {
- type: "Sphere",
- props: {
- position: [2, 1, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j3": {
- type: "Sphere",
- props: {
- position: [-1, 1, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j4": {
- type: "Sphere",
- props: {
- position: [-1, 4, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j5": {
- type: "Sphere",
- props: {
- position: [-3, 4, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-j6": {
- type: "Sphere",
- props: {
- position: [-3, 4, 1],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p2-s1": {
- type: "Cylinder",
- props: {
- position: [2, -1, 2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 4,
- radialSegments: 12,
- },
- children: [],
- },
- "p2-s2": {
- type: "Cylinder",
- props: {
- position: [2, 1, 0],
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 4,
- radialSegments: 12,
- },
- children: [],
- },
- "p2-s3": {
- type: "Cylinder",
- props: {
- position: [0.5, 1, -2],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "p2-s4": {
- type: "Cylinder",
- props: {
- position: [-1, 2.5, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "p2-s5": {
- type: "Cylinder",
- props: {
- position: [-2, 4, -2],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 2,
- radialSegments: 12,
- },
- children: [],
- },
- "p2-s6": {
- type: "Cylinder",
- props: {
- position: [-3, 4, -0.5],
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: blueMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "pipe3-group": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "p3-j0",
- "p3-s1",
- "p3-j1",
- "p3-s2",
- "p3-j2",
- "p3-s3",
- "p3-j3",
- "p3-s4",
- "p3-j4",
- "p3-s5",
- "p3-j5",
- ],
- },
- "p3-j0": {
- type: "Sphere",
- props: {
- position: [-2, 3, 3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-j1": {
- type: "Sphere",
- props: {
- position: [-2, -2, 3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-j2": {
- type: "Sphere",
- props: {
- position: [1, -2, 3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-j3": {
- type: "Sphere",
- props: {
- position: [1, -2, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-j4": {
- type: "Sphere",
- props: {
- position: [1, 0, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-j5": {
- type: "Sphere",
- props: {
- position: [-3, 0, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radius: 0.12,
- widthSegments: null,
- heightSegments: null,
- },
- children: [],
- },
- "p3-s1": {
- type: "Cylinder",
- props: {
- position: [-2, 0.5, 3],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 5,
- radialSegments: 12,
- },
- children: [],
- },
- "p3-s2": {
- type: "Cylinder",
- props: {
- position: [-0.5, -2, 3],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 3,
- radialSegments: 12,
- },
- children: [],
- },
- "p3-s3": {
- type: "Cylinder",
- props: {
- position: [1, -2, 0.5],
- rotation: [1.5708, 0, 0],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 5,
- radialSegments: 12,
- },
- children: [],
- },
- "p3-s4": {
- type: "Cylinder",
- props: {
- position: [1, -1, -2],
- rotation: null,
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 2,
- radialSegments: 12,
- },
- children: [],
- },
- "p3-s5": {
- type: "Cylinder",
- props: {
- position: [-1, 0, -2],
- rotation: [0, 0, 1.5708],
- scale: null,
- castShadow: null,
- receiveShadow: null,
- material: magentaMaterial,
- radiusTop: 0.08,
- radiusBottom: 0.08,
- height: 4,
- radialSegments: 12,
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 0.4,
- luminanceThreshold: 0.4,
- luminanceSmoothing: null,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.3, darkness: 0.4 },
- children: [],
- },
- fog: {
- type: "Fog",
- props: { color: "#111111", near: 10, far: 30 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: null,
- enablePan: null,
- enableRotate: null,
- minDistance: 5,
- maxDistance: 20,
- minPolarAngle: null,
- maxPolarAngle: null,
- autoRotate: true,
- autoRotateSpeed: 0.6,
- },
- children: [],
- },
- },
- },
- };
|