product-showroom.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. import type { Scene } from "./_helpers";
  2. export const productShowroom: Scene = {
  3. name: "Product Showroom",
  4. description:
  5. "Sleek glass torus knot on a pedestal with studio lighting, reflections, and contact shadows",
  6. spec: {
  7. root: "scene",
  8. elements: {
  9. scene: {
  10. type: "Group",
  11. props: { position: null, rotation: null, scale: null },
  12. children: [
  13. "camera",
  14. "env",
  15. "backdrop",
  16. "ambient",
  17. "key-light",
  18. "fill-light",
  19. "rim-light",
  20. "accent-light",
  21. "pedestal",
  22. "hero-float",
  23. "accent1",
  24. "accent2",
  25. "accent3",
  26. "floor",
  27. "shadows",
  28. "sparkles",
  29. "fx",
  30. "controls",
  31. ],
  32. },
  33. camera: {
  34. type: "PerspectiveCamera",
  35. props: {
  36. position: [0, 2, 6],
  37. rotation: null,
  38. scale: null,
  39. fov: 40,
  40. near: null,
  41. far: null,
  42. makeDefault: true,
  43. },
  44. children: [],
  45. },
  46. env: {
  47. type: "Environment",
  48. props: {
  49. preset: "studio",
  50. background: false,
  51. blur: 0.5,
  52. intensity: 0.8,
  53. },
  54. children: [],
  55. },
  56. backdrop: {
  57. type: "Backdrop",
  58. props: {
  59. position: [0, -0.5, -3],
  60. rotation: null,
  61. scale: [25, 10, 8],
  62. floor: 0.3,
  63. segments: 30,
  64. receiveShadow: true,
  65. },
  66. children: [],
  67. },
  68. ambient: {
  69. type: "AmbientLight",
  70. props: { color: "#e8e0f0", intensity: 0.25 },
  71. children: [],
  72. },
  73. "key-light": {
  74. type: "SpotLight",
  75. props: {
  76. position: [5, 8, 3],
  77. rotation: null,
  78. scale: null,
  79. color: "#ffffff",
  80. intensity: 80,
  81. distance: 25,
  82. decay: null,
  83. angle: 0.5,
  84. penumbra: 0.8,
  85. castShadow: true,
  86. },
  87. children: [],
  88. },
  89. "fill-light": {
  90. type: "SpotLight",
  91. props: {
  92. position: [-4, 5, 2],
  93. rotation: null,
  94. scale: null,
  95. color: "#aaccff",
  96. intensity: 30,
  97. distance: 20,
  98. decay: null,
  99. angle: 0.6,
  100. penumbra: 1,
  101. castShadow: false,
  102. },
  103. children: [],
  104. },
  105. "rim-light": {
  106. type: "SpotLight",
  107. props: {
  108. position: [0, 3, -5],
  109. rotation: null,
  110. scale: null,
  111. color: "#ffddcc",
  112. intensity: 40,
  113. distance: 15,
  114. decay: null,
  115. angle: 0.4,
  116. penumbra: 0.5,
  117. castShadow: false,
  118. },
  119. children: [],
  120. },
  121. "accent-light": {
  122. type: "PointLight",
  123. props: {
  124. position: [0, 0.5, 0],
  125. rotation: null,
  126. scale: null,
  127. color: "#ffffff",
  128. intensity: 5,
  129. distance: 4,
  130. decay: null,
  131. castShadow: null,
  132. },
  133. children: [],
  134. },
  135. pedestal: {
  136. type: "Group",
  137. props: { position: [0, 0, 0], rotation: null, scale: null },
  138. children: ["ped-base", "ped-column", "ped-top"],
  139. },
  140. "ped-base": {
  141. type: "Cylinder",
  142. props: {
  143. position: [0, 0.05, 0],
  144. rotation: null,
  145. scale: null,
  146. radiusTop: 1.2,
  147. radiusBottom: 1.3,
  148. height: 0.1,
  149. radialSegments: 48,
  150. castShadow: null,
  151. receiveShadow: null,
  152. material: {
  153. color: "#1a1a1a",
  154. metalness: 0.9,
  155. roughness: 0.1,
  156. },
  157. },
  158. children: [],
  159. },
  160. "ped-column": {
  161. type: "Cylinder",
  162. props: {
  163. position: [0, 0.45, 0],
  164. rotation: null,
  165. scale: null,
  166. radiusTop: 0.6,
  167. radiusBottom: 0.8,
  168. height: 0.7,
  169. radialSegments: 48,
  170. castShadow: null,
  171. receiveShadow: null,
  172. material: {
  173. color: "#111111",
  174. metalness: 0.95,
  175. roughness: 0.05,
  176. },
  177. },
  178. children: [],
  179. },
  180. "ped-top": {
  181. type: "Cylinder",
  182. props: {
  183. position: [0, 0.85, 0],
  184. rotation: null,
  185. scale: null,
  186. radiusTop: 0.9,
  187. radiusBottom: 0.7,
  188. height: 0.1,
  189. radialSegments: 48,
  190. castShadow: null,
  191. receiveShadow: null,
  192. material: {
  193. color: "#1a1a1a",
  194. metalness: 0.9,
  195. roughness: 0.1,
  196. },
  197. },
  198. children: [],
  199. },
  200. "hero-float": {
  201. type: "Float",
  202. props: {
  203. position: [0, 2.2, 0],
  204. rotation: null,
  205. scale: null,
  206. speed: 1.5,
  207. rotationIntensity: 0.3,
  208. floatIntensity: 0.4,
  209. enabled: true,
  210. },
  211. children: ["hero-spin"],
  212. },
  213. "hero-spin": {
  214. type: "Spin",
  215. props: {
  216. position: null,
  217. rotation: null,
  218. scale: null,
  219. speed: 0.3,
  220. axis: "y",
  221. },
  222. children: ["hero-object"],
  223. },
  224. "hero-object": {
  225. type: "TorusKnot",
  226. props: {
  227. position: [0, 0, 0],
  228. rotation: null,
  229. scale: null,
  230. castShadow: null,
  231. receiveShadow: null,
  232. radius: 0.6,
  233. tube: 0.22,
  234. p: 2,
  235. q: 3,
  236. tubularSegments: 128,
  237. radialSegments: 24,
  238. material: {
  239. color: "#ffffff",
  240. metalness: 1,
  241. roughness: 0,
  242. },
  243. },
  244. children: [],
  245. },
  246. accent1: {
  247. type: "Float",
  248. props: {
  249. position: [-1.5, 1.8, 0.5],
  250. rotation: null,
  251. scale: null,
  252. speed: 2,
  253. rotationIntensity: 0.5,
  254. floatIntensity: 1.2,
  255. enabled: true,
  256. },
  257. children: ["accent1-body"],
  258. },
  259. "accent1-body": {
  260. type: "GlassSphere",
  261. props: {
  262. position: null,
  263. rotation: null,
  264. scale: null,
  265. castShadow: null,
  266. receiveShadow: null,
  267. radius: 0.15,
  268. widthSegments: null,
  269. heightSegments: null,
  270. color: "#eeeeff",
  271. transmission: 1,
  272. thickness: 0.3,
  273. roughness: 0,
  274. chromaticAberration: 0.06,
  275. ior: 1.5,
  276. distortion: null,
  277. distortionScale: null,
  278. temporalDistortion: null,
  279. samples: 6,
  280. resolution: 128,
  281. },
  282. children: [],
  283. },
  284. accent2: {
  285. type: "Float",
  286. props: {
  287. position: [1.2, 2.5, -0.8],
  288. rotation: null,
  289. scale: null,
  290. speed: 1.8,
  291. rotationIntensity: 0.4,
  292. floatIntensity: 1.5,
  293. enabled: true,
  294. },
  295. children: ["accent2-body"],
  296. },
  297. "accent2-body": {
  298. type: "GlassSphere",
  299. props: {
  300. position: null,
  301. rotation: null,
  302. scale: null,
  303. castShadow: null,
  304. receiveShadow: null,
  305. radius: 0.1,
  306. widthSegments: null,
  307. heightSegments: null,
  308. color: "#ffeeff",
  309. transmission: 1,
  310. thickness: 0.2,
  311. roughness: 0,
  312. chromaticAberration: 0.08,
  313. ior: 1.6,
  314. distortion: null,
  315. distortionScale: null,
  316. temporalDistortion: null,
  317. samples: 6,
  318. resolution: 128,
  319. },
  320. children: [],
  321. },
  322. accent3: {
  323. type: "Float",
  324. props: {
  325. position: [0.8, 1.5, 1.2],
  326. rotation: null,
  327. scale: null,
  328. speed: 2.2,
  329. rotationIntensity: 0.6,
  330. floatIntensity: 0.8,
  331. enabled: true,
  332. },
  333. children: ["accent3-body"],
  334. },
  335. "accent3-body": {
  336. type: "GlassSphere",
  337. props: {
  338. position: null,
  339. rotation: null,
  340. scale: null,
  341. castShadow: null,
  342. receiveShadow: null,
  343. radius: 0.12,
  344. widthSegments: null,
  345. heightSegments: null,
  346. color: "#eeffee",
  347. transmission: 1,
  348. thickness: 0.25,
  349. roughness: 0,
  350. chromaticAberration: 0.05,
  351. ior: 1.4,
  352. distortion: null,
  353. distortionScale: null,
  354. temporalDistortion: null,
  355. samples: 6,
  356. resolution: 128,
  357. },
  358. children: [],
  359. },
  360. floor: {
  361. type: "ReflectorPlane",
  362. props: {
  363. position: [0, -0.5, 0],
  364. rotation: [-1.5708, 0, 0],
  365. scale: null,
  366. width: 25,
  367. height: 25,
  368. color: "#0a0a0a",
  369. resolution: 1024,
  370. blur: 300,
  371. mirror: 0.6,
  372. mixBlur: 8,
  373. mixStrength: 2,
  374. depthScale: 0.2,
  375. metalness: 0.8,
  376. roughness: 0.3,
  377. },
  378. children: [],
  379. },
  380. shadows: {
  381. type: "ContactShadows",
  382. props: {
  383. position: [0, -0.49, 0],
  384. rotation: null,
  385. scale: null,
  386. opacity: 0.5,
  387. width: 10,
  388. height: 10,
  389. blur: 2,
  390. near: null,
  391. far: 5,
  392. smooth: true,
  393. resolution: 512,
  394. frames: null,
  395. color: "#000000",
  396. },
  397. children: [],
  398. },
  399. sparkles: {
  400. type: "Sparkles",
  401. props: {
  402. position: [0, 2, 0],
  403. rotation: null,
  404. scale: [6, 4, 6],
  405. count: 30,
  406. speed: 0.05,
  407. opacity: 0.15,
  408. color: "#ffffff",
  409. size: 0.3,
  410. noise: 0.5,
  411. },
  412. children: [],
  413. },
  414. fx: {
  415. type: "EffectComposer",
  416. props: { enabled: true, multisampling: 8 },
  417. children: ["bloom", "vignette"],
  418. },
  419. bloom: {
  420. type: "Bloom",
  421. props: {
  422. intensity: 0.5,
  423. luminanceThreshold: 0.3,
  424. luminanceSmoothing: 0.4,
  425. mipmapBlur: true,
  426. },
  427. children: [],
  428. },
  429. vignette: {
  430. type: "Vignette",
  431. props: { offset: 0.3, darkness: 0.5 },
  432. children: [],
  433. },
  434. controls: {
  435. type: "OrbitControls",
  436. props: {
  437. enableDamping: true,
  438. dampingFactor: null,
  439. enableZoom: null,
  440. enablePan: null,
  441. enableRotate: null,
  442. minDistance: 3,
  443. maxDistance: 12,
  444. minPolarAngle: 0.3,
  445. maxPolarAngle: 1.4,
  446. autoRotate: true,
  447. autoRotateSpeed: 1,
  448. target: [0, 1.5, 0],
  449. },
  450. children: [],
  451. },
  452. },
  453. },
  454. };