| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809 |
- import type { Scene } from "./_helpers";
- export const portalGallery: Scene = {
- name: "Portal Gallery",
- description:
- "Three framed portals into different worlds -- sunset clouds, starfield, and enchanted forest",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "cam",
- "env",
- "ambient",
- "directional",
- "floor",
- "shadows",
- "frame1",
- "frame2",
- "frame3",
- "gallery-sparkles",
- "post",
- "controls",
- ],
- },
- cam: {
- type: "PerspectiveCamera",
- props: {
- position: [0, 2, 7],
- rotation: null,
- scale: null,
- fov: 50,
- near: 0.1,
- far: 200,
- makeDefault: true,
- },
- children: [],
- },
- env: {
- type: "Environment",
- props: {
- preset: "lobby",
- background: false,
- blur: 0,
- intensity: 0.4,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#e8e0d8", intensity: 0.5 },
- children: [],
- },
- directional: {
- type: "DirectionalLight",
- props: {
- position: [5, 8, 3],
- rotation: null,
- scale: null,
- color: "#ffffff",
- intensity: 1,
- castShadow: true,
- },
- children: [],
- },
- floor: {
- type: "ReflectorPlane",
- props: {
- position: [0, 0, 0],
- rotation: [-1.5708, 0, 0],
- scale: null,
- width: 30,
- height: 30,
- color: "#2a2a2a",
- resolution: 1024,
- blur: 400,
- mirror: 0.4,
- mixBlur: 10,
- mixStrength: 1.5,
- metalness: 0.5,
- roughness: 0.8,
- },
- children: [],
- },
- shadows: {
- type: "ContactShadows",
- props: {
- position: [0, 0.01, 0],
- rotation: null,
- scale: null,
- opacity: 0.4,
- width: 20,
- height: 20,
- blur: 2.5,
- far: 8,
- color: "#000000",
- },
- children: [],
- },
- // --- PORTAL 1 (left, sunset world) ---
- frame1: {
- type: "Group",
- props: {
- position: [-3.5, 2, -2],
- rotation: [0, 0.3, 0],
- scale: null,
- },
- children: [
- "frame1-top",
- "frame1-bottom",
- "frame1-left",
- "frame1-right",
- "portal1-mesh",
- ],
- },
- "frame1-top": {
- type: "Box",
- props: {
- position: [0, 1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#8B7355", metalness: 0.3, roughness: 0.6 },
- },
- children: [],
- },
- "frame1-bottom": {
- type: "Box",
- props: {
- position: [0, -1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#8B7355", metalness: 0.3, roughness: 0.6 },
- },
- children: [],
- },
- "frame1-left": {
- type: "Box",
- props: {
- position: [-1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#8B7355", metalness: 0.3, roughness: 0.6 },
- },
- children: [],
- },
- "frame1-right": {
- type: "Box",
- props: {
- position: [1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#8B7355", metalness: 0.3, roughness: 0.6 },
- },
- children: [],
- },
- "portal1-mesh": {
- type: "Plane",
- props: {
- position: null,
- rotation: null,
- scale: null,
- width: 2,
- height: 3,
- },
- children: ["portal1-mat"],
- },
- "portal1-mat": {
- type: "MeshPortalMaterial",
- props: { blend: 0, blur: 0.5, resolution: 512 },
- children: [
- "p1-sky",
- "p1-sun-light",
- "p1-cloud1",
- "p1-cloud2",
- "p1-cloud3",
- "p1-ground",
- ],
- },
- "p1-sky": {
- type: "Sky",
- props: {
- distance: null,
- sunPosition: [100, 10, 50],
- inclination: null,
- azimuth: null,
- rayleigh: 2,
- turbidity: 10,
- mieCoefficient: 0.005,
- mieDirectionalG: null,
- },
- children: [],
- },
- "p1-sun-light": {
- type: "DirectionalLight",
- props: {
- position: [5, 5, 3],
- rotation: null,
- scale: null,
- color: "#ffaa55",
- intensity: 2,
- castShadow: false,
- },
- children: [],
- },
- "p1-cloud1": {
- type: "Cloud",
- props: {
- position: [-3, 4, -5],
- rotation: null,
- scale: null,
- seed: 1,
- segments: 20,
- bounds: [6, 2, 3],
- opacity: 0.6,
- color: "#ffddaa",
- speed: 0.1,
- volume: 5,
- fade: null,
- growth: null,
- },
- children: [],
- },
- "p1-cloud2": {
- type: "Cloud",
- props: {
- position: [4, 5, -8],
- rotation: null,
- scale: null,
- seed: 7,
- segments: 25,
- bounds: [8, 2, 4],
- opacity: 0.5,
- color: "#ffccaa",
- speed: 0.08,
- volume: 6,
- fade: null,
- growth: null,
- },
- children: [],
- },
- "p1-cloud3": {
- type: "Cloud",
- props: {
- position: [0, 3.5, -4],
- rotation: null,
- scale: null,
- seed: 14,
- segments: 15,
- bounds: [5, 1.5, 2.5],
- opacity: 0.7,
- color: "#ffeedd",
- speed: 0.12,
- volume: 4,
- fade: null,
- growth: null,
- },
- children: [],
- },
- "p1-ground": {
- type: "Plane",
- props: {
- position: [0, -2, 0],
- rotation: [-1.5708, 0, 0],
- scale: null,
- width: 30,
- height: 30,
- material: { color: "#886644", roughness: 1 },
- },
- children: [],
- },
- // --- PORTAL 2 (center, night/stars world) ---
- frame2: {
- type: "Group",
- props: {
- position: [0, 2, -3],
- rotation: null,
- scale: null,
- },
- children: [
- "frame2-top",
- "frame2-bottom",
- "frame2-left",
- "frame2-right",
- "portal2-mesh",
- ],
- },
- "frame2-top": {
- type: "Box",
- props: {
- position: [0, 1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#555566", metalness: 0.8, roughness: 0.2 },
- },
- children: [],
- },
- "frame2-bottom": {
- type: "Box",
- props: {
- position: [0, -1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#555566", metalness: 0.8, roughness: 0.2 },
- },
- children: [],
- },
- "frame2-left": {
- type: "Box",
- props: {
- position: [-1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#555566", metalness: 0.8, roughness: 0.2 },
- },
- children: [],
- },
- "frame2-right": {
- type: "Box",
- props: {
- position: [1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#555566", metalness: 0.8, roughness: 0.2 },
- },
- children: [],
- },
- "portal2-mesh": {
- type: "Plane",
- props: {
- position: null,
- rotation: null,
- scale: null,
- width: 2,
- height: 3,
- },
- children: ["portal2-mat"],
- },
- "portal2-mat": {
- type: "MeshPortalMaterial",
- props: { blend: 0, blur: 0.5, resolution: 512 },
- children: [
- "p2-stars",
- "p2-ambient",
- "p2-nebula1",
- "p2-nebula2",
- "p2-sparkles",
- ],
- },
- "p2-stars": {
- type: "Stars",
- props: {
- radius: 80,
- depth: 40,
- count: 6000,
- factor: 5,
- saturation: 0.5,
- fade: true,
- speed: 0.3,
- },
- children: [],
- },
- "p2-ambient": {
- type: "AmbientLight",
- props: { color: "#111133", intensity: 0.3 },
- children: [],
- },
- "p2-nebula1": {
- type: "Sphere",
- props: {
- position: [3, 2, -8],
- rotation: null,
- scale: null,
- radius: 2,
- widthSegments: null,
- heightSegments: null,
- material: {
- color: "#4400aa",
- emissive: "#4400aa",
- emissiveIntensity: 0.5,
- transparent: true,
- opacity: 0.3,
- },
- },
- children: [],
- },
- "p2-nebula2": {
- type: "Sphere",
- props: {
- position: [-4, -1, -10],
- rotation: null,
- scale: null,
- radius: 3,
- widthSegments: null,
- heightSegments: null,
- material: {
- color: "#aa0044",
- emissive: "#aa0044",
- emissiveIntensity: 0.4,
- transparent: true,
- opacity: 0.25,
- },
- },
- children: [],
- },
- "p2-sparkles": {
- type: "Sparkles",
- props: {
- position: [0, 0, -5],
- rotation: null,
- scale: [10, 10, 10],
- count: 200,
- speed: 0.2,
- opacity: 0.8,
- color: "#aabbff",
- size: 2,
- noise: 3,
- },
- children: [],
- },
- // --- PORTAL 3 (right, forest/nature world) ---
- frame3: {
- type: "Group",
- props: {
- position: [3.5, 2, -2],
- rotation: [0, -0.3, 0],
- scale: null,
- },
- children: [
- "frame3-top",
- "frame3-bottom",
- "frame3-left",
- "frame3-right",
- "portal3-mesh",
- ],
- },
- "frame3-top": {
- type: "Box",
- props: {
- position: [0, 1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#6B4423", metalness: 0.1, roughness: 0.8 },
- },
- children: [],
- },
- "frame3-bottom": {
- type: "Box",
- props: {
- position: [0, -1.55, 0],
- rotation: null,
- scale: null,
- width: 2.3,
- height: 0.15,
- depth: 0.15,
- material: { color: "#6B4423", metalness: 0.1, roughness: 0.8 },
- },
- children: [],
- },
- "frame3-left": {
- type: "Box",
- props: {
- position: [-1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#6B4423", metalness: 0.1, roughness: 0.8 },
- },
- children: [],
- },
- "frame3-right": {
- type: "Box",
- props: {
- position: [1.075, 0, 0],
- rotation: null,
- scale: null,
- width: 0.15,
- height: 3.25,
- depth: 0.15,
- material: { color: "#6B4423", metalness: 0.1, roughness: 0.8 },
- },
- children: [],
- },
- "portal3-mesh": {
- type: "Plane",
- props: {
- position: null,
- rotation: null,
- scale: null,
- width: 2,
- height: 3,
- },
- children: ["portal3-mat"],
- },
- "portal3-mat": {
- type: "MeshPortalMaterial",
- props: { blend: 0, blur: 0.5, resolution: 512 },
- children: [
- "p3-env",
- "p3-ambient",
- "p3-sun",
- "p3-tree1",
- "p3-tree2",
- "p3-tree3",
- "p3-tree4",
- "p3-tree5",
- "p3-ground",
- "p3-fireflies",
- ],
- },
- "p3-env": {
- type: "Environment",
- props: { preset: "forest", background: false, blur: 0, intensity: 0.8 },
- children: [],
- },
- "p3-ambient": {
- type: "AmbientLight",
- props: { color: "#334422", intensity: 0.4 },
- children: [],
- },
- "p3-sun": {
- type: "DirectionalLight",
- props: {
- position: [-3, 8, 2],
- rotation: null,
- scale: null,
- color: "#aaffaa",
- intensity: 1.5,
- castShadow: true,
- },
- children: [],
- },
- "p3-tree1": {
- type: "Group",
- props: { position: [-2, -2, -4], rotation: null, scale: null },
- children: ["p3-t1-trunk", "p3-t1-leaves"],
- },
- "p3-t1-trunk": {
- type: "Cylinder",
- props: {
- position: [0, 0.6, 0],
- rotation: null,
- scale: null,
- radiusTop: 0.08,
- radiusBottom: 0.12,
- height: 1.2,
- radialSegments: 8,
- material: { color: "#4a3520", roughness: 0.9 },
- },
- children: [],
- },
- "p3-t1-leaves": {
- type: "Cone",
- props: {
- position: [0, 1.8, 0],
- rotation: null,
- scale: null,
- radius: 0.6,
- height: 1.5,
- radialSegments: 8,
- material: { color: "#2d5a1e", roughness: 0.8 },
- },
- children: [],
- },
- "p3-tree2": {
- type: "Group",
- props: { position: [1.5, -2, -6], rotation: null, scale: null },
- children: ["p3-t2-trunk", "p3-t2-leaves"],
- },
- "p3-t2-trunk": {
- type: "Cylinder",
- props: {
- position: [0, 0.8, 0],
- rotation: null,
- scale: null,
- radiusTop: 0.1,
- radiusBottom: 0.15,
- height: 1.6,
- radialSegments: 8,
- material: { color: "#3d2b15", roughness: 0.9 },
- },
- children: [],
- },
- "p3-t2-leaves": {
- type: "Cone",
- props: {
- position: [0, 2.3, 0],
- rotation: null,
- scale: null,
- radius: 0.8,
- height: 2,
- radialSegments: 8,
- material: { color: "#1e4a10", roughness: 0.8 },
- },
- children: [],
- },
- "p3-tree3": {
- type: "Group",
- props: { position: [-0.5, -2, -3], rotation: null, scale: null },
- children: ["p3-t3-trunk", "p3-t3-leaves"],
- },
- "p3-t3-trunk": {
- type: "Cylinder",
- props: {
- position: [0, 0.5, 0],
- rotation: null,
- scale: null,
- radiusTop: 0.06,
- radiusBottom: 0.1,
- height: 1,
- radialSegments: 8,
- material: { color: "#4a3520", roughness: 0.9 },
- },
- children: [],
- },
- "p3-t3-leaves": {
- type: "Cone",
- props: {
- position: [0, 1.5, 0],
- rotation: null,
- scale: null,
- radius: 0.5,
- height: 1.2,
- radialSegments: 8,
- material: { color: "#3a6b2a", roughness: 0.8 },
- },
- children: [],
- },
- "p3-tree4": {
- type: "Group",
- props: { position: [3, -2, -8], rotation: null, scale: null },
- children: ["p3-t4-trunk", "p3-t4-leaves"],
- },
- "p3-t4-trunk": {
- type: "Cylinder",
- props: {
- position: [0, 1, 0],
- rotation: null,
- scale: null,
- radiusTop: 0.12,
- radiusBottom: 0.18,
- height: 2,
- radialSegments: 8,
- material: { color: "#3d2b15", roughness: 0.9 },
- },
- children: [],
- },
- "p3-t4-leaves": {
- type: "Cone",
- props: {
- position: [0, 2.8, 0],
- rotation: null,
- scale: null,
- radius: 1,
- height: 2.5,
- radialSegments: 8,
- material: { color: "#2d5a1e", roughness: 0.8 },
- },
- children: [],
- },
- "p3-tree5": {
- type: "Group",
- props: { position: [-3.5, -2, -7], rotation: null, scale: null },
- children: ["p3-t5-trunk", "p3-t5-leaves"],
- },
- "p3-t5-trunk": {
- type: "Cylinder",
- props: {
- position: [0, 0.7, 0],
- rotation: null,
- scale: null,
- radiusTop: 0.09,
- radiusBottom: 0.13,
- height: 1.4,
- radialSegments: 8,
- material: { color: "#4a3520", roughness: 0.9 },
- },
- children: [],
- },
- "p3-t5-leaves": {
- type: "Cone",
- props: {
- position: [0, 2, 0],
- rotation: null,
- scale: null,
- radius: 0.7,
- height: 1.8,
- radialSegments: 8,
- material: { color: "#1e4a10", roughness: 0.8 },
- },
- children: [],
- },
- "p3-ground": {
- type: "Plane",
- props: {
- position: [0, -2, 0],
- rotation: [-1.5708, 0, 0],
- scale: null,
- width: 30,
- height: 30,
- material: { color: "#3a5a2a", roughness: 1 },
- },
- children: [],
- },
- "p3-fireflies": {
- type: "Sparkles",
- props: {
- position: [0, 0, -5],
- rotation: null,
- scale: [6, 4, 6],
- count: 80,
- speed: 0.3,
- opacity: 0.7,
- color: "#aaff66",
- size: 1.5,
- noise: 2,
- },
- children: [],
- },
- "gallery-sparkles": {
- type: "Sparkles",
- props: {
- position: [0, 3, 0],
- rotation: null,
- scale: [12, 5, 10],
- count: 40,
- speed: 0.05,
- opacity: 0.2,
- color: "#ffffff",
- size: 0.3,
- noise: null,
- },
- children: [],
- },
- post: {
- type: "EffectComposer",
- props: { enabled: true, multisampling: 8 },
- children: ["bloom", "vignette"],
- },
- bloom: {
- type: "Bloom",
- props: {
- intensity: 0.6,
- luminanceThreshold: 0.3,
- luminanceSmoothing: null,
- mipmapBlur: true,
- },
- children: [],
- },
- vignette: {
- type: "Vignette",
- props: { offset: 0.4, darkness: 0.4 },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: true,
- enablePan: null,
- enableRotate: true,
- minDistance: 4,
- maxDistance: 16,
- minPolarAngle: null,
- maxPolarAngle: null,
- autoRotate: true,
- autoRotateSpeed: 0.3,
- target: [0, 1.8, -2],
- },
- children: [],
- },
- },
- },
- };
|