| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940 |
- import { PI } from "./_helpers";
- import type { Scene } from "./_helpers";
- export const floatingIslands: Scene = {
- name: "Floating Islands",
- description:
- "Sky, clouds, islands with trees and bridges floating in sunset light",
- spec: {
- root: "scene",
- elements: {
- scene: {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "cam",
- "sky",
- "ambient",
- "sun",
- "clouds",
- "island-main-float",
- "island-left-float",
- "island-right-float",
- "island-far-float",
- "island-tiny1-float",
- "island-tiny2-float",
- "bridge-1",
- "bridge-2",
- "sparkles",
- "controls",
- ],
- },
- cam: {
- type: "PerspectiveCamera",
- props: {
- position: [8, 6, 14],
- rotation: null,
- scale: null,
- fov: 50,
- near: 0.1,
- far: 500,
- makeDefault: true,
- },
- children: [],
- },
- sky: {
- type: "Environment",
- props: {
- preset: "dawn",
- background: true,
- blur: 0.8,
- intensity: 0.5,
- },
- children: [],
- },
- ambient: {
- type: "AmbientLight",
- props: { color: "#ffd4a0", intensity: 0.5 },
- children: [],
- },
- sun: {
- type: "DirectionalLight",
- props: {
- position: [8, 12, 6],
- rotation: null,
- scale: null,
- color: "#ffcc88",
- intensity: 2.5,
- castShadow: true,
- },
- children: [],
- },
- clouds: {
- type: "Cloud",
- props: {
- position: [0, 4, -8],
- rotation: null,
- scale: null,
- seed: 7,
- segments: 40,
- bounds: [25, 3, 20],
- volume: 10,
- speed: 0.1,
- fade: 25,
- opacity: 0.6,
- color: "#ffe8d0",
- growth: 8,
- },
- children: [],
- },
- "island-main-float": {
- type: "Float",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- speed: 0.4,
- rotationIntensity: 0.02,
- floatIntensity: 0.3,
- enabled: true,
- },
- children: ["island-main"],
- },
- "island-main": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "main-base",
- "main-top",
- "main-underhang",
- "tree-1-trunk",
- "tree-1-canopy",
- "tree-2-trunk",
- "tree-2-canopy",
- "tree-3-trunk",
- "tree-3-canopy",
- "house-base",
- "house-roof",
- ],
- },
- "main-base": {
- type: "Cylinder",
- props: {
- position: [0, -0.5, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 3,
- radiusBottom: 1.5,
- height: 2,
- radialSegments: 16,
- },
- children: [],
- },
- "main-top": {
- type: "Cylinder",
- props: {
- position: [0, 0.55, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#4a8c3f",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 3.1,
- radiusBottom: 3,
- height: 0.3,
- radialSegments: 16,
- },
- children: [],
- },
- "main-underhang": {
- type: "Cone",
- props: {
- position: [0, -2.5, 0],
- rotation: [PI, 0, 0],
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#6B4513",
- metalness: 0.1,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 1.5,
- height: 2.5,
- radialSegments: 12,
- },
- children: [],
- },
- "tree-1-trunk": {
- type: "Cylinder",
- props: {
- position: [1, 1, 0.5],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B5A2B",
- metalness: 0,
- roughness: 1,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 0.06,
- radiusBottom: 0.1,
- height: 1.5,
- radialSegments: 8,
- },
- children: [],
- },
- "tree-1-canopy": {
- type: "Sphere",
- props: {
- position: [1, 2.2, 0.5],
- rotation: null,
- scale: [1, 1.2, 1],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#2d7a2d",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.6,
- widthSegments: 16,
- heightSegments: 12,
- },
- children: [],
- },
- "tree-2-trunk": {
- type: "Cylinder",
- props: {
- position: [-1.2, 0.8, -0.8],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B5A2B",
- metalness: 0,
- roughness: 1,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 0.05,
- radiusBottom: 0.08,
- height: 1.1,
- radialSegments: 8,
- },
- children: [],
- },
- "tree-2-canopy": {
- type: "Sphere",
- props: {
- position: [-1.2, 1.7, -0.8],
- rotation: null,
- scale: [1, 1.3, 1],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#3a8c3a",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.45,
- widthSegments: 16,
- heightSegments: 12,
- },
- children: [],
- },
- "tree-3-trunk": {
- type: "Cylinder",
- props: {
- position: [-0.3, 1.2, 1.5],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B5A2B",
- metalness: 0,
- roughness: 1,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 0.07,
- radiusBottom: 0.12,
- height: 2,
- radialSegments: 8,
- },
- children: [],
- },
- "tree-3-canopy": {
- type: "Sphere",
- props: {
- position: [-0.3, 2.7, 1.5],
- rotation: null,
- scale: [1.2, 1.4, 1.2],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#1a6b1a",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.7,
- widthSegments: 16,
- heightSegments: 12,
- },
- children: [],
- },
- "house-base": {
- type: "RoundedBox",
- props: {
- position: [0, 0.9, -0.5],
- rotation: [0, 0.3, 0],
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#e8d8c0",
- metalness: 0,
- roughness: 0.8,
- emissive: "#ffddaa",
- emissiveIntensity: 0.05,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- width: 0.8,
- height: 0.7,
- depth: 0.7,
- radius: 0.05,
- smoothness: 4,
- },
- children: [],
- },
- "house-roof": {
- type: "Cone",
- props: {
- position: [0, 1.55, -0.5],
- rotation: [0, 1.085, 0],
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#a04030",
- metalness: 0.1,
- roughness: 0.8,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.6,
- height: 0.5,
- radialSegments: 4,
- },
- children: [],
- },
- "island-left-float": {
- type: "Float",
- props: {
- position: [-6, 0.1, 2],
- rotation: null,
- scale: null,
- speed: 0.6,
- rotationIntensity: 0.03,
- floatIntensity: 0.5,
- enabled: true,
- },
- children: ["island-left"],
- },
- "island-left": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "left-base",
- "left-top",
- "left-under",
- "left-tree-t",
- "left-tree-c",
- ],
- },
- "left-base": {
- type: "Cylinder",
- props: {
- position: [0, -0.3, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 1.8,
- radiusBottom: 0.8,
- height: 1.2,
- radialSegments: 12,
- },
- children: [],
- },
- "left-top": {
- type: "Cylinder",
- props: {
- position: [0, 0.25, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#4a8c3f",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 1.85,
- radiusBottom: 1.8,
- height: 0.2,
- radialSegments: 12,
- },
- children: [],
- },
- "left-under": {
- type: "Cone",
- props: {
- position: [0, -1.5, 0],
- rotation: [PI, 0, 0],
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#6B4513",
- metalness: 0.1,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.8,
- height: 1.5,
- radialSegments: 10,
- },
- children: [],
- },
- "left-tree-t": {
- type: "Cylinder",
- props: {
- position: [0.3, 0.8, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B5A2B",
- metalness: 0,
- roughness: 1,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 0.04,
- radiusBottom: 0.07,
- height: 1,
- radialSegments: 8,
- },
- children: [],
- },
- "left-tree-c": {
- type: "Sphere",
- props: {
- position: [0.3, 1.6, 0],
- rotation: null,
- scale: [1, 1.2, 1],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#2d7a2d",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.4,
- widthSegments: 12,
- heightSegments: 8,
- },
- children: [],
- },
- "island-right-float": {
- type: "Float",
- props: {
- position: [5.5, 0, -3],
- rotation: null,
- scale: null,
- speed: 0.5,
- rotationIntensity: 0.02,
- floatIntensity: 0.4,
- enabled: true,
- },
- children: ["island-right"],
- },
- "island-right": {
- type: "Group",
- props: { position: null, rotation: null, scale: null },
- children: [
- "right-base",
- "right-top",
- "right-under",
- "right-tree-t",
- "right-tree-c",
- ],
- },
- "right-base": {
- type: "Cylinder",
- props: {
- position: [0, -0.3, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 2,
- radiusBottom: 1,
- height: 1.5,
- radialSegments: 12,
- },
- children: [],
- },
- "right-top": {
- type: "Cylinder",
- props: {
- position: [0, 0.4, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#4a8c3f",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 2.05,
- radiusBottom: 2,
- height: 0.2,
- radialSegments: 12,
- },
- children: [],
- },
- "right-under": {
- type: "Cone",
- props: {
- position: [0, -2, 0],
- rotation: [PI, 0, 0],
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#6B4513",
- metalness: 0.1,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 1,
- height: 2,
- radialSegments: 10,
- },
- children: [],
- },
- "right-tree-t": {
- type: "Cylinder",
- props: {
- position: [-0.5, 0.9, 0.3],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B5A2B",
- metalness: 0,
- roughness: 1,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 0.05,
- radiusBottom: 0.09,
- height: 1.3,
- radialSegments: 8,
- },
- children: [],
- },
- "right-tree-c": {
- type: "Sphere",
- props: {
- position: [-0.5, 2, 0.3],
- rotation: null,
- scale: [1, 1.3, 1],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#3a8c3a",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 0.5,
- widthSegments: 12,
- heightSegments: 8,
- },
- children: [],
- },
- "island-far-float": {
- type: "Float",
- props: {
- position: [2, 3, -10],
- rotation: null,
- scale: [0.7, 0.7, 0.7],
- speed: 0.3,
- rotationIntensity: 0.01,
- floatIntensity: 0.3,
- enabled: true,
- },
- children: ["far-base", "far-top", "far-under"],
- },
- "far-base": {
- type: "Cylinder",
- props: {
- position: [0, 0, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 2.5,
- radiusBottom: 1.2,
- height: 1.5,
- radialSegments: 12,
- },
- children: [],
- },
- "far-top": {
- type: "Cylinder",
- props: {
- position: [0, 0.65, 0],
- rotation: null,
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#3a7a3a",
- metalness: 0,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radiusTop: 2.55,
- radiusBottom: 2.5,
- height: 0.2,
- radialSegments: 12,
- },
- children: [],
- },
- "far-under": {
- type: "Cone",
- props: {
- position: [0, -1.8, 0],
- rotation: [PI, 0, 0],
- scale: null,
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#6B4513",
- metalness: 0.1,
- roughness: 0.95,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 1.2,
- height: 2,
- radialSegments: 10,
- },
- children: [],
- },
- "island-tiny1-float": {
- type: "Float",
- props: {
- position: [-3, 2.5, -5],
- rotation: null,
- scale: [0.4, 0.4, 0.4],
- speed: 0.8,
- rotationIntensity: 0.05,
- floatIntensity: 0.8,
- enabled: true,
- },
- children: ["tiny1-rock"],
- },
- "tiny1-rock": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: [1, 0.6, 1],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 1,
- widthSegments: 12,
- heightSegments: 8,
- },
- children: [],
- },
- "island-tiny2-float": {
- type: "Float",
- props: {
- position: [8, -0.5, 1],
- rotation: null,
- scale: [0.3, 0.3, 0.3],
- speed: 1,
- rotationIntensity: 0.08,
- floatIntensity: 1,
- enabled: true,
- },
- children: ["tiny2-rock"],
- },
- "tiny2-rock": {
- type: "Sphere",
- props: {
- position: null,
- rotation: null,
- scale: [1.2, 0.5, 0.8],
- castShadow: true,
- receiveShadow: false,
- material: {
- color: "#7a5a10",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- radius: 1,
- widthSegments: 12,
- heightSegments: 8,
- },
- children: [],
- },
- "bridge-1": {
- type: "RoundedBox",
- props: {
- position: [-3.57, -0.1, 1.19],
- rotation: [0, 0.32, 0],
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- width: 3.5,
- height: 0.5,
- depth: 0.6,
- radius: 0.05,
- smoothness: 2,
- },
- children: [],
- },
- "bridge-2": {
- type: "RoundedBox",
- props: {
- position: [3.19, -0.1, -1.74],
- rotation: [0, 0.5, 0],
- scale: null,
- castShadow: true,
- receiveShadow: true,
- material: {
- color: "#8B6914",
- metalness: 0.1,
- roughness: 0.9,
- emissive: null,
- emissiveIntensity: null,
- opacity: null,
- transparent: null,
- wireframe: null,
- },
- width: 3.0,
- height: 0.5,
- depth: 0.6,
- radius: 0.05,
- smoothness: 2,
- },
- children: [],
- },
- sparkles: {
- type: "Sparkles",
- props: {
- position: [0, 2, 0],
- rotation: null,
- scale: [20, 8, 20],
- count: 120,
- speed: 0.1,
- opacity: 0.5,
- color: "#ffeeaa",
- size: 1.5,
- noise: 1,
- },
- children: [],
- },
- controls: {
- type: "OrbitControls",
- props: {
- enableDamping: true,
- dampingFactor: null,
- enableZoom: true,
- enablePan: null,
- enableRotate: true,
- minDistance: 8,
- maxDistance: 30,
- minPolarAngle: 0.2,
- maxPolarAngle: 1.5,
- autoRotate: true,
- autoRotateSpeed: 0.3,
- target: [0, 1, 0],
- },
- children: [],
- },
- },
- },
- };
|