@codefluss/plugin-background-3d 0.0.2-alpha.2 → 0.0.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background-store-BHibKahl.js +2 -0
- package/dist/background-store-BHibKahl.js.map +1 -0
- package/dist/index.mjs +7 -13
- package/dist/index.mjs.map +1 -1
- package/dist/interactive-background-RndPe2JV.js +55 -0
- package/dist/interactive-background-RndPe2JV.js.map +1 -0
- package/package.json +17 -17
- package/dist/background-3d-config.d.ts +0 -15
- package/dist/background-3d-config.d.ts.map +0 -1
- package/dist/components/background-3d-component.d.ts +0 -12
- package/dist/components/background-3d-component.d.ts.map +0 -1
- package/dist/components/background-renderer.d.ts +0 -15
- package/dist/components/background-renderer.d.ts.map +0 -1
- package/dist/components/interactive-background.d.ts +0 -12
- package/dist/components/interactive-background.d.ts.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/interactive-background-c2gBuha0.js +0 -103
- package/dist/interactive-background-c2gBuha0.js.map +0 -1
- package/dist/locales/index.d.ts +0 -414
- package/dist/locales/index.d.ts.map +0 -1
- package/dist/renderer.d.ts +0 -7
- package/dist/renderer.d.ts.map +0 -1
- package/dist/scenes/dark-room-scene.d.ts +0 -3
- package/dist/scenes/dark-room-scene.d.ts.map +0 -1
- package/dist/scenes/elegant-wave-scene.d.ts +0 -3
- package/dist/scenes/elegant-wave-scene.d.ts.map +0 -1
- package/dist/scenes/gradient-mesh-scene.d.ts +0 -3
- package/dist/scenes/gradient-mesh-scene.d.ts.map +0 -1
- package/dist/scenes/holographic-scene.d.ts +0 -3
- package/dist/scenes/holographic-scene.d.ts.map +0 -1
- package/dist/scenes/particle-flow-scene.d.ts +0 -11
- package/dist/scenes/particle-flow-scene.d.ts.map +0 -1
- package/dist/scenes/physics-cubes-scene.d.ts +0 -14
- package/dist/scenes/physics-cubes-scene.d.ts.map +0 -1
- package/dist/scenes/starfield-scene.d.ts +0 -11
- package/dist/scenes/starfield-scene.d.ts.map +0 -1
- package/dist/scenes/wave-scene.d.ts +0 -3
- package/dist/scenes/wave-scene.d.ts.map +0 -1
- package/dist/store/background-store.d.ts +0 -12
- package/dist/store/background-store.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -58
- package/dist/types/index.d.ts.map +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InteractiveBackgroundProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Interactive Background Component
|
|
4
|
-
*
|
|
5
|
-
* Features:
|
|
6
|
-
* - Viewport detection (only renders when visible)
|
|
7
|
-
* - Scene type selection
|
|
8
|
-
* - Performance monitoring
|
|
9
|
-
* - Instance-based state
|
|
10
|
-
*/
|
|
11
|
-
export default function InteractiveBackground({ instanceId, data, isEditorMode }: InteractiveBackgroundProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=interactive-background.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-background.d.ts","sourceRoot":"","sources":["../../src/components/interactive-background.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,0BAA0B,EAAa,MAAM,UAAU,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,UAAU,EACV,IAAI,EACJ,YAAY,EACb,EAAE,0BAA0B,2CAgE5B"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @codefluss/plugin-background-3d
|
|
3
|
-
*
|
|
4
|
-
* Interactive 3D background plugin with multiple scene types
|
|
5
|
-
*/
|
|
6
|
-
export { background3DConfig } from './background-3d-config';
|
|
7
|
-
export { Background3DComponent } from './components/background-3d-component';
|
|
8
|
-
export { createBackgroundInstance } from './store/background-store';
|
|
9
|
-
export type { Background3DData, BackgroundStore, SceneType, Background3DComponentProps, InteractiveBackgroundProps, SceneContentProps } from './types';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,SAAS,CAAC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useState as n,useRef as o,useEffect as a,useMemo as i}from"react";import{useFrame as s,useThree as c,Canvas as l}from"@react-three/fiber";import{useInstance as h,globalPerfMonitor as u,InstanceProvider as m}from"@codefluss/threejs-shared";import{createBackgroundInstance as d}from"./index.mjs";import*as f from"three";import{MeshTransmissionMaterial as p,OrbitControls as g}from"@react-three/drei";function y({data:c}){const l=h(),[m,d]=n("high"),[p,g]=n(1e4),y=o(null);a(()=>{const t=c.performance?.maxParticles||1e4,e=c.performance?.quality||"auto";if("auto"!==e)switch(e){case"high":g(t),d("high");break;case"medium":g(Math.floor(.5*t)),d("medium");break;case"low":g(Math.floor(.2*t)),d("low")}else g(t),d("high")},[c.performance]),a(()=>{if("auto"!==c.performance?.quality)return;const t=l.getState().instanceId;u.registerCanvas(t);const e=e=>{const r=e;if(r.detail.instanceId===t){const t=r.detail.quality;d(t);const e=c.performance?.maxParticles||1e4;switch(t){case"high":g(e);break;case"medium":g(Math.floor(.5*e));break;case"low":g(Math.floor(.2*e))}}};return window.addEventListener("performance:quality-change",e),()=>{window.removeEventListener("performance:quality-change",e),u.unregisterCanvas(t)}},[l,c.performance]);const M=i(()=>{const t=new Float32Array(3*p);for(let e=0;e<p;e++){const r=3*e,n=50*Math.random()+10,o=Math.random()*Math.PI*2,a=Math.acos(2*Math.random()-1);t[r]=n*Math.sin(a)*Math.cos(o),t[r+1]=n*Math.sin(a)*Math.sin(o),t[r+2]=n*Math.cos(a)}return t},[p]);s((t,e)=>{if("auto"===c.performance?.quality){const t=1/e,r=l.getState().instanceId;u.updateMetrics(r,t)}if(c.camera?.autoRotate){const e=c.camera?.rotationSpeed||.5;t.camera.position.x=5*Math.sin(t.clock.elapsedTime*e*.1),t.camera.position.z=5*Math.cos(t.clock.elapsedTime*e*.1),t.camera.lookAt(0,0,0)}y.current&&(y.current.rotation.y+=.05*e)});const b="high"===m?2:"medium"===m?1.5:1;/* @__PURE__ */
|
|
2
|
-
return t(e,{children:[
|
|
3
|
-
/* @__PURE__ */r("ambientLight",{intensity:.1}),
|
|
4
|
-
/* @__PURE__ */t("points",{ref:y,children:[
|
|
5
|
-
/* @__PURE__ */r("bufferGeometry",{children:/* @__PURE__ */r("bufferAttribute",{attach:"attributes-position",args:[M,3]})}),
|
|
6
|
-
/* @__PURE__ */r("pointsMaterial",{size:b,sizeAttenuation:!0,transparent:!0,opacity:.8,color:"#ffffff",blending:f.AdditiveBlending,depthWrite:!1})]})]})}function M({data:n}){const a=o(null),c=n.performance?.maxParticles||5e3,[l,h]=i(()=>{const t=new Float32Array(3*c),e=new Float32Array(3*c),r=new f.Color("#667eea"),n=new f.Color("#764ba2");for(let o=0;o<c;o++){const a=3*o;t[a]=20*(Math.random()-.5),t[a+1]=20*(Math.random()-.5),t[a+2]=40*Math.random()-20;const i=Math.random(),s=r.clone().lerp(n,i);e[a]=s.r,e[a+1]=s.g,e[a+2]=s.b}return[t,e]},[c]);return s(t=>{if(!a.current)return;const e=a.current.geometry.attributes.position.array;for(let r=0;r<c;r++){const n=3*r;e[n+2]+=.1;const o=t.clock.elapsedTime;e[n]+=.01*Math.sin(o+.1*r),e[n+1]+=.01*Math.cos(o+.1*r),e[n+2]>20&&(e[n+2]=-20)}a.current.geometry.attributes.position.needsUpdate=!0,a.current.rotation.y=.05*t.clock.elapsedTime}),/* @__PURE__ */t(e,{children:[
|
|
7
|
-
/* @__PURE__ */r("ambientLight",{intensity:.2}),
|
|
8
|
-
/* @__PURE__ */t("points",{ref:a,children:[
|
|
9
|
-
/* @__PURE__ */t("bufferGeometry",{children:[
|
|
10
|
-
/* @__PURE__ */r("bufferAttribute",{attach:"attributes-position",args:[l,3]}),
|
|
11
|
-
/* @__PURE__ */r("bufferAttribute",{attach:"attributes-color",args:[h,3]})]}),
|
|
12
|
-
/* @__PURE__ */r("pointsMaterial",{size:1.5,sizeAttenuation:!0,transparent:!0,opacity:.8,vertexColors:!0,blending:f.AdditiveBlending,depthWrite:!1})]})]})}function b(){const e=o(null),n=o(null),a=o({x:0,y:0}),c=i(()=>new f.PlaneGeometry(20,20,100,100),[]);return s(t=>{if(!e.current||!n.current)return;const r=t.clock.getElapsedTime(),o=e.current.geometry.attributes.position,i=a.current.x,s=a.current.y;for(let e=0;e<o.count;e++){const t=o.getX(e),n=o.getY(e),a=Math.sqrt(Math.pow(t-i,2)+Math.pow(n-s,2)),c=Math.max(0,1-a/5)*Math.sin(2*a-5*r)*.5,l=.3*Math.sin(.5*t+2*r)+.4*Math.cos(.3*n+1.5*r)+.2*Math.sin(.2*(t+n)+1.8*r)+c;o.setZ(e,l)}o.needsUpdate=!0,e.current.geometry.computeVertexNormals(),n.current.geometry!==e.current.geometry&&(n.current.geometry=e.current.geometry)}),/* @__PURE__ */t("group",{rotation:[-Math.PI/3,0,0],onPointerMove:t=>{t.point&&(a.current.x=t.point.x,a.current.y=t.point.z)},children:[
|
|
13
|
-
/* @__PURE__ */r("mesh",{ref:e,geometry:c,children:/* @__PURE__ */r("meshStandardMaterial",{color:"#1a1a2e",side:f.DoubleSide,metalness:.6,roughness:.4})}),
|
|
14
|
-
/* @__PURE__ */r("mesh",{ref:n,geometry:c,position:[0,.1,0],children:/* @__PURE__ */r("meshBasicMaterial",{color:"#4a90e2",wireframe:!0,transparent:!0,opacity:.3})})]})}function w({data:n}){/* @__PURE__ */
|
|
15
|
-
return t(e,{children:[
|
|
16
|
-
/* @__PURE__ */r("ambientLight",{intensity:.5}),
|
|
17
|
-
/* @__PURE__ */r("pointLight",{position:[10,10,10],intensity:1,color:"#ffffff"}),
|
|
18
|
-
/* @__PURE__ */r("pointLight",{position:[-10,-10,-10],intensity:.5,color:"#4a90e2"}),
|
|
19
|
-
/* @__PURE__ */r(b,{})]})}function S({data:n}){const a=o(null),c=i(()=>{const t=[];for(let e=0;e<20;e++)t.push([8*(Math.random()-.5),5*Math.random()+2,8*(Math.random()-.5)]);return t},[]);return s(t=>{if(!a.current)return;const e=t.clock.getElapsedTime();a.current.children.forEach((t,r)=>{if(r>=c.length)return;const n=c[r][1];t.position.y=n+1.5*Math.sin(e+.5*r),t.rotation.x=.3*e+r,t.rotation.y=.2*e+r})}),/* @__PURE__ */t(e,{children:[
|
|
20
|
-
/* @__PURE__ */r("color",{attach:"background",args:["#0a0a0f"]}),
|
|
21
|
-
/* @__PURE__ */r("fog",{attach:"fog",args:["#0a0a0f",5,20]}),
|
|
22
|
-
/* @__PURE__ */r("ambientLight",{intensity:.3}),
|
|
23
|
-
/* @__PURE__ */r("pointLight",{position:[10,10,10],intensity:1,castShadow:!0}),
|
|
24
|
-
/* @__PURE__ */r("spotLight",{position:[0,10,0],angle:.6,penumbra:1,intensity:1.5,castShadow:!0,"shadow-mapSize":[2048,2048]}),
|
|
25
|
-
/* @__PURE__ */t("group",{ref:a,children:[
|
|
26
|
-
/* @__PURE__ */t("mesh",{position:[0,-3,0],receiveShadow:!0,children:[
|
|
27
|
-
/* @__PURE__ */r("boxGeometry",{args:[10,.5,10]}),
|
|
28
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#1a1a1a"})]}),c.map((e,n)=>/* @__PURE__ */t("mesh",{position:e,castShadow:!0,receiveShadow:!0,children:[
|
|
29
|
-
/* @__PURE__ */r("boxGeometry",{args:[.5,.5,.5]}),
|
|
30
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#60a5fa",metalness:.6,roughness:.4})]},n))]})]})}function v(){const e=o(null);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime();e.current.rotation.x=.2*r,e.current.rotation.y=.3*r}),/* @__PURE__ */t("mesh",{ref:e,children:[
|
|
31
|
-
/* @__PURE__ */r("icosahedronGeometry",{args:[2,4]}),
|
|
32
|
-
/* @__PURE__ */r(p,{backside:!0,samples:16,resolution:512,transmission:1,roughness:.1,thickness:1.5,chromaticAberration:.5,distortion:.3,color:"#a78bfa"})]})}function x(){const e=o(null);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime();e.current.rotation.y=.1*r,e.current.children.forEach((t,e)=>{t.position.y=.5*Math.sin(r+e),t.rotation.x=r*(.5+.1*e),t.rotation.z=r*(.3+.1*e)})}),/* @__PURE__ */t("group",{ref:e,children:[
|
|
33
|
-
/* @__PURE__ */t("mesh",{position:[3,0,0],children:[
|
|
34
|
-
/* @__PURE__ */r("torusGeometry",{args:[.5,.2,16,32]}),
|
|
35
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#60a5fa",emissive:"#60a5fa",emissiveIntensity:.5,metalness:.8,roughness:.2})]}),
|
|
36
|
-
/* @__PURE__ */t("mesh",{position:[-3,0,0],children:[
|
|
37
|
-
/* @__PURE__ */r("torusGeometry",{args:[.5,.2,16,32]}),
|
|
38
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#f472b6",emissive:"#f472b6",emissiveIntensity:.5,metalness:.8,roughness:.2})]}),
|
|
39
|
-
/* @__PURE__ */t("mesh",{position:[0,3,0],children:[
|
|
40
|
-
/* @__PURE__ */r("torusGeometry",{args:[.5,.2,16,32]}),
|
|
41
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#34d399",emissive:"#34d399",emissiveIntensity:.5,metalness:.8,roughness:.2})]})]})}function k({data:n}){/* @__PURE__ */
|
|
42
|
-
return t(e,{children:[
|
|
43
|
-
/* @__PURE__ */r("color",{attach:"background",args:["#0a0a0f"]}),
|
|
44
|
-
/* @__PURE__ */r("ambientLight",{intensity:.5}),
|
|
45
|
-
/* @__PURE__ */r("pointLight",{position:[10,10,10],intensity:2,color:"#a78bfa"}),
|
|
46
|
-
/* @__PURE__ */r("pointLight",{position:[-10,-10,-10],intensity:1.5,color:"#60a5fa"}),
|
|
47
|
-
/* @__PURE__ */r("spotLight",{position:[0,10,0],angle:.6,penumbra:1,intensity:2,color:"#ffffff"}),
|
|
48
|
-
/* @__PURE__ */r(v,{}),
|
|
49
|
-
/* @__PURE__ */r(x,{})]})}function L(){/* @__PURE__ */
|
|
50
|
-
return t("group",{children:[
|
|
51
|
-
/* @__PURE__ */t("mesh",{rotation:[-Math.PI/2,0,0],position:[0,-3,0],receiveShadow:!0,children:[
|
|
52
|
-
/* @__PURE__ */r("planeGeometry",{args:[20,20]}),
|
|
53
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#0a0a0a",roughness:.8,metalness:.2})]}),
|
|
54
|
-
/* @__PURE__ */t("mesh",{position:[0,0,-10],receiveShadow:!0,children:[
|
|
55
|
-
/* @__PURE__ */r("planeGeometry",{args:[20,10]}),
|
|
56
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#0f0f0f",roughness:.9})]}),
|
|
57
|
-
/* @__PURE__ */t("mesh",{position:[-10,0,0],rotation:[0,Math.PI/2,0],receiveShadow:!0,children:[
|
|
58
|
-
/* @__PURE__ */r("planeGeometry",{args:[20,10]}),
|
|
59
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#0f0f0f",roughness:.9})]}),
|
|
60
|
-
/* @__PURE__ */t("mesh",{position:[10,0,0],rotation:[0,-Math.PI/2,0],receiveShadow:!0,children:[
|
|
61
|
-
/* @__PURE__ */r("planeGeometry",{args:[20,10]}),
|
|
62
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#0f0f0f",roughness:.9})]}),
|
|
63
|
-
/* @__PURE__ */t("mesh",{rotation:[Math.PI/2,0,0],position:[0,5,0],receiveShadow:!0,children:[
|
|
64
|
-
/* @__PURE__ */r("planeGeometry",{args:[20,20]}),
|
|
65
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#0a0a0a",roughness:.8})]})]})}function A(){const e=o(null);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime();e.current.rotation.y=.5*r,e.current.position.y=.3*Math.sin(r)}),/* @__PURE__ */t("mesh",{ref:e,position:[0,0,-5],castShadow:!0,receiveShadow:!0,children:[
|
|
66
|
-
/* @__PURE__ */r("boxGeometry",{args:[2,2,2]}),
|
|
67
|
-
/* @__PURE__ */r("meshStandardMaterial",{color:"#1a1a1a",roughness:.3,metalness:.7})]})}function I(){const n=o(null),a=o(null),{viewport:i,camera:l}=c();return s(t=>{if(!n.current||!a.current)return;const e=t.pointer.x*i.width/2;n.current.position.set(2*e,3,5),a.current.position.set(2*e,0,-5),l.position.x=.5*t.pointer.x,l.position.y=2+.3*t.pointer.y}),/* @__PURE__ */t(e,{children:[
|
|
68
|
-
/* @__PURE__ */r("object3D",{ref:a}),
|
|
69
|
-
/* @__PURE__ */r("spotLight",{ref:n,intensity:50,angle:.4,penumbra:.5,color:"#ffffff",castShadow:!0,"shadow-mapSize":[2048,2048],target:a.current||void 0})]})}function P(){const e=o(null),n=i(()=>{const t=new Float32Array(1500);for(let e=0;e<500;e++)t[3*e]=18*(Math.random()-.5),t[3*e+1]=8*Math.random()-3,t[3*e+2]=18*(Math.random()-.5)-5;return t},[]);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime(),n=e.current.geometry.attributes.position.array;for(let e=0;e<n.length;e+=3)n[e+1]+=.001*Math.sin(r+n[e]);e.current.geometry.attributes.position.needsUpdate=!0}),/* @__PURE__ */t("points",{ref:e,children:[
|
|
70
|
-
/* @__PURE__ */r("bufferGeometry",{children:/* @__PURE__ */r("bufferAttribute",{attach:"attributes-position",args:[n,3]})}),
|
|
71
|
-
/* @__PURE__ */r("pointsMaterial",{size:.02,color:"#333333",transparent:!0,opacity:.3})]})}function G({data:n}){/* @__PURE__ */
|
|
72
|
-
return t(e,{children:[
|
|
73
|
-
/* @__PURE__ */r("color",{attach:"background",args:["#000000"]}),
|
|
74
|
-
/* @__PURE__ */r("fog",{attach:"fog",args:["#000000",5,20]}),
|
|
75
|
-
/* @__PURE__ */r("ambientLight",{intensity:.05,color:"#ffffff"}),
|
|
76
|
-
/* @__PURE__ */r(L,{}),
|
|
77
|
-
/* @__PURE__ */r(A,{}),
|
|
78
|
-
/* @__PURE__ */r(I,{}),
|
|
79
|
-
/* @__PURE__ */r(P,{})]})}function z(){const t=o(null),e=o({x:0,y:0}),n=i(()=>new f.PlaneGeometry(20,20,100,100),[]);return s(r=>{if(!t.current)return;const n=r.clock.getElapsedTime(),o=t.current.geometry.attributes.position;for(let t=0;t<o.count;t++){const r=o.getX(t),a=o.getY(t),i=Math.sqrt(Math.pow(r-e.current.x,2)+Math.pow(a-e.current.y,2)),s=.3*Math.sin(.5*r+.5*n)+.4*Math.sin(.3*a+.3*n)+.2*Math.sin(.2*(r+a)+.4*n)+Math.sin(2*i-3*n)*Math.exp(.3*-i)*.8;o.setZ(t,s)}o.needsUpdate=!0,t.current.geometry.computeVertexNormals(),t.current.rotation.z=.05*Math.sin(.1*n)}),/* @__PURE__ */r("mesh",{ref:t,geometry:n,rotation:[-Math.PI/2.5,0,0],onPointerMove:t=>{t.point&&(e.current.x=t.point.x,e.current.y=t.point.z)},children:/* @__PURE__ */r("meshStandardMaterial",{color:"#1a1a2e",side:f.DoubleSide,metalness:.8,roughness:.2,emissive:"#0f3460",emissiveIntensity:.3})})}function E(){const e=o(null),n=o({x:0,y:0}),[a,c]=i(()=>{const t=2e3,e=new Float32Array(6e3),r=new Float32Array(6e3);for(let n=0;n<t;n++){e[3*n]=30*(Math.random()-.5),e[3*n+1]=30*(Math.random()-.5),e[3*n+2]=15*(Math.random()-.5);const t=new f.Color;t.setHSL(.6+.1*Math.random(),.8,.6),r[3*n]=t.r,r[3*n+1]=t.g,r[3*n+2]=t.b}return[e,r]},[]);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime(),o=e.current.geometry.attributes.position.array;for(let e=0;e<o.length;e+=3){const t=o[e],a=o[e+1];o[e+2]+=.002*Math.sin(r+.5*t+.3*a);const i=10*n.current.x-t,s=10*n.current.y-a;Math.sqrt(i*i+s*s)<5&&(o[e]+=.001*i,o[e+1]+=.001*s)}e.current.geometry.attributes.position.needsUpdate=!0}),/* @__PURE__ */t("points",{ref:e,children:[
|
|
80
|
-
/* @__PURE__ */t("bufferGeometry",{children:[
|
|
81
|
-
/* @__PURE__ */r("bufferAttribute",{attach:"attributes-position",args:[a,3]}),
|
|
82
|
-
/* @__PURE__ */r("bufferAttribute",{attach:"attributes-color",args:[c,3]})]}),
|
|
83
|
-
/* @__PURE__ */r("pointsMaterial",{size:.05,vertexColors:!0,transparent:!0,opacity:.6,sizeAttenuation:!0})]})}function T({data:n}){/* @__PURE__ */
|
|
84
|
-
return t(e,{children:[
|
|
85
|
-
/* @__PURE__ */r("color",{attach:"background",args:["#0a0a0f"]}),
|
|
86
|
-
/* @__PURE__ */r("ambientLight",{intensity:.3,color:"#ffffff"}),
|
|
87
|
-
/* @__PURE__ */r("pointLight",{position:[10,10,10],intensity:1,color:"#4a90e2"}),
|
|
88
|
-
/* @__PURE__ */r("pointLight",{position:[-10,-10,-10],intensity:.5,color:"#e94560"}),
|
|
89
|
-
/* @__PURE__ */r("spotLight",{position:[0,15,0],angle:.3,penumbra:1,intensity:1,color:"#ffffff",castShadow:!0}),
|
|
90
|
-
/* @__PURE__ */r(z,{}),
|
|
91
|
-
/* @__PURE__ */r(E,{}),
|
|
92
|
-
/* @__PURE__ */r(g,{enableZoom:!1,enablePan:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/3})]})}function q(){const e=o(null),n=o(null),a=i(()=>new f.PlaneGeometry(20,20,100,100),[]);return s(t=>{if(!e.current)return;const r=t.clock.getElapsedTime(),o=e.current.geometry.attributes.position,a=e.current.geometry.attributes.color;if(!a){const t=new Float32Array(3*o.count);e.current.geometry.setAttribute("color",new f.BufferAttribute(t,3))}for(let e=0;e<o.count;e++){const t=o.getX(e),n=o.getY(e),i=1.5*Math.sin(.3*t+.5*r)+1.5*Math.cos(.3*n+.3*r)+1*Math.sin(.2*(t+n)+.4*r);o.setZ(e,i);const s=(t+10)/20,c=(n+10)/20,l=(i+4)/8,h=.5*Math.sin(s*Math.PI+.2*r)+.5,u=.5*Math.sin(c*Math.PI+.3*r)+.5,m=.5*Math.sin(l*Math.PI+.4*r)+.5;a&&a.setXYZ(e,h,u,m)}o.needsUpdate=!0,a&&(a.needsUpdate=!0),e.current.geometry.computeVertexNormals(),n.current&&n.current.geometry!==e.current.geometry&&(n.current.geometry=e.current.geometry),e.current.rotation.x=.1*Math.sin(.1*r),e.current.rotation.y=.1*Math.cos(.15*r)}),/* @__PURE__ */t("group",{children:[
|
|
93
|
-
/* @__PURE__ */r("mesh",{ref:e,geometry:a,children:/* @__PURE__ */r("meshStandardMaterial",{vertexColors:!0,side:f.DoubleSide,metalness:.5,roughness:.3})}),
|
|
94
|
-
/* @__PURE__ */r("mesh",{ref:n,geometry:a,position:[0,.1,0],children:/* @__PURE__ */r("meshBasicMaterial",{color:"#ffffff",wireframe:!0,transparent:!0,opacity:.1})})]})}function C({data:n}){/* @__PURE__ */
|
|
95
|
-
return t(e,{children:[
|
|
96
|
-
/* @__PURE__ */r("color",{attach:"background",args:["#000000"]}),
|
|
97
|
-
/* @__PURE__ */r("ambientLight",{intensity:.5}),
|
|
98
|
-
/* @__PURE__ */r("pointLight",{position:[10,10,10],intensity:2,color:"#8b5cf6"}),
|
|
99
|
-
/* @__PURE__ */r("pointLight",{position:[-10,-10,-10],intensity:1.5,color:"#4c1d95"}),
|
|
100
|
-
/* @__PURE__ */r("spotLight",{position:[0,15,0],angle:.6,penumbra:1,intensity:2,color:"#ffffff"}),
|
|
101
|
-
/* @__PURE__ */r(q,{})]})}function F({instanceId:t,data:e,isEditorMode:i}){const s=o(null),[c,h]=n(i);a(()=>{if(i)return;const t=s.current;if(!t)return;const e=new IntersectionObserver(([t])=>{h(t.isIntersecting)},{threshold:.1,rootMargin:"100px"});return e.observe(t),()=>e.disconnect()},[i]);const u=function(t){switch(t){case"starfield":default:return y;case"particles":return M;case"wave":return w;case"physics-cubes":return S;case"holographic":return k;case"dark-room":return G;case"elegant-wave":return T;case"gradient-mesh":return C}}(e.scene?.type);/* @__PURE__ */
|
|
102
|
-
return r("div",{ref:s,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0},children:c&&/* @__PURE__ */r(m,{instanceId:t,createStore:d,children:/* @__PURE__ */r(l,{camera:{position:e.camera?.position||[0,0,5],fov:e.camera?.fov||75},dpr:[1,2],performance:{min:.5},style:{background:e.scene?.backgroundColor||"transparent"},children:/* @__PURE__ */r(u,{data:e})})})})}export{F as default};
|
|
103
|
-
//# sourceMappingURL=interactive-background-c2gBuha0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-background-c2gBuha0.js","sources":["../src/scenes/starfield-scene.tsx","../src/scenes/particle-flow-scene.tsx","../src/scenes/wave-scene.tsx","../src/scenes/physics-cubes-scene.tsx","../src/scenes/holographic-scene.tsx","../src/scenes/dark-room-scene.tsx","../src/scenes/elegant-wave-scene.tsx","../src/scenes/gradient-mesh-scene.tsx","../src/components/interactive-background.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState, useMemo, useRef } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport { useInstance, globalPerfMonitor, type QualityLevel } from '@codefluss/threejs-shared';\nimport * as THREE from 'three';\nimport type { SceneContentProps, BackgroundStore } from '../types';\n\n/**\n * Starfield Scene - Animated star field background\n *\n * Features:\n * - Adaptive particle count based on performance\n * - Auto-rotating camera (optional)\n * - FPS tracking for performance monitoring\n */\nexport function StarfieldScene({ data }: SceneContentProps) {\n const instance = useInstance<BackgroundStore>();\n const [quality, setQuality] = useState<QualityLevel>('high');\n const [particleCount, setParticleCount] = useState(10000);\n const pointsRef = useRef<THREE.Points>(null);\n\n // Determine initial particle count\n useEffect(() => {\n const baseCount = data.performance?.maxParticles || 10000;\n const qualitySetting = data.performance?.quality || 'auto';\n\n if (qualitySetting !== 'auto') {\n // Manual quality setting\n switch (qualitySetting) {\n case 'high':\n setParticleCount(baseCount);\n setQuality('high');\n break;\n case 'medium':\n setParticleCount(Math.floor(baseCount * 0.5));\n setQuality('medium');\n break;\n case 'low':\n setParticleCount(Math.floor(baseCount * 0.2));\n setQuality('low');\n break;\n }\n } else {\n // Auto mode - start with high\n setParticleCount(baseCount);\n setQuality('high');\n }\n }, [data.performance]);\n\n // Listen to global performance changes (auto mode only)\n useEffect(() => {\n if (data.performance?.quality !== 'auto') return;\n\n const instanceId = instance.getState().instanceId;\n globalPerfMonitor.registerCanvas(instanceId);\n\n const handleQualityChange = (e: Event) => {\n const customEvent = e as CustomEvent;\n if (customEvent.detail.instanceId === instanceId) {\n const newQuality = customEvent.detail.quality as QualityLevel;\n setQuality(newQuality);\n\n const baseCount = data.performance?.maxParticles || 10000;\n switch (newQuality) {\n case 'high':\n setParticleCount(baseCount);\n break;\n case 'medium':\n setParticleCount(Math.floor(baseCount * 0.5));\n break;\n case 'low':\n setParticleCount(Math.floor(baseCount * 0.2));\n break;\n }\n }\n };\n\n window.addEventListener('performance:quality-change', handleQualityChange);\n\n return () => {\n window.removeEventListener('performance:quality-change', handleQualityChange);\n globalPerfMonitor.unregisterCanvas(instanceId);\n };\n }, [instance, data.performance]);\n\n // Generate star positions\n const positions = useMemo(() => {\n const positions = new Float32Array(particleCount * 3);\n\n for (let i = 0; i < particleCount; i++) {\n const i3 = i * 3;\n\n // Random position in sphere\n const radius = Math.random() * 50 + 10;\n const theta = Math.random() * Math.PI * 2;\n const phi = Math.acos(Math.random() * 2 - 1);\n\n positions[i3] = radius * Math.sin(phi) * Math.cos(theta);\n positions[i3 + 1] = radius * Math.sin(phi) * Math.sin(theta);\n positions[i3 + 2] = radius * Math.cos(phi);\n }\n\n return positions;\n }, [particleCount]);\n\n // Animation and FPS tracking\n useFrame((state, delta) => {\n // Track FPS for auto quality\n if (data.performance?.quality === 'auto') {\n const fps = 1 / delta;\n const instanceId = instance.getState().instanceId;\n globalPerfMonitor.updateMetrics(instanceId, fps);\n }\n\n // Auto-rotate camera\n if (data.camera?.autoRotate) {\n const speed = data.camera?.rotationSpeed || 0.5;\n state.camera.position.x = Math.sin(state.clock.elapsedTime * speed * 0.1) * 5;\n state.camera.position.z = Math.cos(state.clock.elapsedTime * speed * 0.1) * 5;\n state.camera.lookAt(0, 0, 0);\n }\n\n // Rotate stars slowly\n if (pointsRef.current) {\n pointsRef.current.rotation.y += delta * 0.05;\n }\n });\n\n // Point size based on quality\n const pointSize = quality === 'high' ? 2 : quality === 'medium' ? 1.5 : 1;\n\n return (\n <>\n {/* Ambient light */}\n <ambientLight intensity={0.1} />\n\n {/* Stars */}\n <points ref={pointsRef}>\n <bufferGeometry>\n <bufferAttribute\n attach=\"attributes-position\"\n args={[positions, 3]}\n />\n </bufferGeometry>\n <pointsMaterial\n size={pointSize}\n sizeAttenuation\n transparent\n opacity={0.8}\n color=\"#ffffff\"\n blending={THREE.AdditiveBlending}\n depthWrite={false}\n />\n </points>\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * Particle Flow Scene - Flowing particle stream background\n *\n * Features:\n * - Continuous particle flow animation\n * - Color gradients\n * - Wave-like motion\n */\nexport function ParticleFlowScene({ data }: SceneContentProps) {\n const particlesRef = useRef<THREE.Points>(null);\n const particleCount = data.performance?.maxParticles || 5000;\n\n // Generate initial particle positions\n const [positions, colors] = useMemo(() => {\n const positions = new Float32Array(particleCount * 3);\n const colors = new Float32Array(particleCount * 3);\n\n const colorStart = new THREE.Color('#667eea');\n const colorEnd = new THREE.Color('#764ba2');\n\n for (let i = 0; i < particleCount; i++) {\n const i3 = i * 3;\n\n // Position in flow path\n positions[i3] = (Math.random() - 0.5) * 20;\n positions[i3 + 1] = (Math.random() - 0.5) * 20;\n positions[i3 + 2] = Math.random() * 40 - 20;\n\n // Color gradient\n const mixRatio = Math.random();\n const color = colorStart.clone().lerp(colorEnd, mixRatio);\n\n colors[i3] = color.r;\n colors[i3 + 1] = color.g;\n colors[i3 + 2] = color.b;\n }\n\n return [positions, colors];\n }, [particleCount]);\n\n // Animation\n useFrame((state) => {\n if (!particlesRef.current) return;\n\n const positions = particlesRef.current.geometry.attributes.position.array as Float32Array;\n\n // Update particle positions\n for (let i = 0; i < particleCount; i++) {\n const i3 = i * 3;\n\n // Move particles forward\n positions[i3 + 2] += 0.1;\n\n // Add wave motion\n const time = state.clock.elapsedTime;\n positions[i3] += Math.sin(time + i * 0.1) * 0.01;\n positions[i3 + 1] += Math.cos(time + i * 0.1) * 0.01;\n\n // Reset particles that moved too far\n if (positions[i3 + 2] > 20) {\n positions[i3 + 2] = -20;\n }\n }\n\n particlesRef.current.geometry.attributes.position.needsUpdate = true;\n\n // Rotate slowly\n particlesRef.current.rotation.y = state.clock.elapsedTime * 0.05;\n });\n\n return (\n <>\n {/* Ambient light */}\n <ambientLight intensity={0.2} />\n\n {/* Particles */}\n <points ref={particlesRef}>\n <bufferGeometry>\n <bufferAttribute\n attach=\"attributes-position\"\n args={[positions, 3]}\n />\n <bufferAttribute\n attach=\"attributes-color\"\n args={[colors, 3]}\n />\n </bufferGeometry>\n <pointsMaterial\n size={1.5}\n sizeAttenuation\n transparent\n opacity={0.8}\n vertexColors\n blending={THREE.AdditiveBlending}\n depthWrite={false}\n />\n </points>\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * WaveScene - Interactive wave plane with mouse tracking\n *\n * Features:\n * - Dual wave layers (solid + wireframe)\n * - Mouse-influenced ripples\n * - Smooth wave animations\n * - Responsive to user interaction\n */\n\nfunction WavePlane() {\n const meshRef = useRef<THREE.Mesh>(null);\n const wireframeMeshRef = useRef<THREE.Mesh>(null);\n const mousePosition = useRef({ x: 0, y: 0 });\n\n const geometry = useMemo(() => new THREE.PlaneGeometry(20, 20, 100, 100), []);\n\n const handlePointerMove = (event: { point?: THREE.Vector3 }) => {\n if (event.point) {\n // Direct mapping without inversion or scaling\n mousePosition.current.x = event.point.x;\n mousePosition.current.y = event.point.z;\n }\n };\n\n useFrame((state) => {\n if (!meshRef.current || !wireframeMeshRef.current) return;\n\n const time = state.clock.getElapsedTime();\n const positions = meshRef.current.geometry.attributes.position;\n const mouseX = mousePosition.current.x;\n const mouseY = mousePosition.current.y;\n\n // Animate wave vertices\n for (let i = 0; i < positions.count; i++) {\n const x = positions.getX(i);\n const y = positions.getY(i);\n\n // Distance from mouse (no additional scaling needed)\n const distanceToMouse = Math.sqrt(\n Math.pow(x - mouseX, 2) + Math.pow(y - mouseY, 2)\n );\n\n // Mouse influence ripple\n const mouseInfluence =\n Math.max(0, 1 - distanceToMouse / 5) *\n Math.sin(distanceToMouse * 2 - time * 5) *\n 0.5;\n\n // Wave layers\n const wave1 = Math.sin(x * 0.5 + time * 2) * 0.3;\n const wave2 = Math.cos(y * 0.3 + time * 1.5) * 0.4;\n const wave3 = Math.sin((x + y) * 0.2 + time * 1.8) * 0.2;\n\n const z = wave1 + wave2 + wave3 + mouseInfluence;\n positions.setZ(i, z);\n }\n\n positions.needsUpdate = true;\n meshRef.current.geometry.computeVertexNormals();\n\n // Sync wireframe geometry\n if (wireframeMeshRef.current.geometry !== meshRef.current.geometry) {\n wireframeMeshRef.current.geometry = meshRef.current.geometry;\n }\n });\n\n return (\n <group rotation={[-Math.PI / 3, 0, 0]} onPointerMove={handlePointerMove}>\n {/* Solid wave layer */}\n <mesh ref={meshRef} geometry={geometry}>\n <meshStandardMaterial\n color=\"#1a1a2e\"\n side={THREE.DoubleSide}\n metalness={0.6}\n roughness={0.4}\n />\n </mesh>\n\n {/* Wireframe layer */}\n <mesh ref={wireframeMeshRef} geometry={geometry} position={[0, 0.1, 0]}>\n <meshBasicMaterial\n color=\"#4a90e2\"\n wireframe\n transparent\n opacity={0.3}\n />\n </mesh>\n </group>\n );\n}\n\nexport function WaveScene({ data: _ }: SceneContentProps) {\n return (\n <>\n <ambientLight intensity={0.5} />\n <pointLight position={[10, 10, 10]} intensity={1} color=\"#ffffff\" />\n <pointLight position={[-10, -10, -10]} intensity={0.5} color=\"#4a90e2\" />\n\n <WavePlane />\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * PhysicsCubesScene - Animated falling cubes\n *\n * Note: Physics simulation (Rapier) is disabled for Storybook compatibility.\n * Uses simplified animation instead.\n *\n * Features:\n * - Animated cubes with rotation\n * - Floating animation\n * - Visual floor and scene\n */\n\nexport function PhysicsCubesScene({ data: _ }: SceneContentProps) {\n const cubeCount = 20;\n const cubesRef = useRef<THREE.Group>(null);\n\n const cubePositions = useMemo(() => {\n const positions: [number, number, number][] = [];\n for (let i = 0; i < cubeCount; i++) {\n positions.push([\n (Math.random() - 0.5) * 8,\n Math.random() * 5 + 2,\n (Math.random() - 0.5) * 8\n ]);\n }\n return positions;\n }, []);\n\n useFrame((state) => {\n if (!cubesRef.current) return;\n const time = state.clock.getElapsedTime();\n\n cubesRef.current.children.forEach((cube, i) => {\n if (i >= cubePositions.length) return; // Floor mesh\n\n const baseY = cubePositions[i][1];\n cube.position.y = baseY + Math.sin(time + i * 0.5) * 1.5;\n cube.rotation.x = time * 0.3 + i;\n cube.rotation.y = time * 0.2 + i;\n });\n });\n\n return (\n <>\n <color attach=\"background\" args={['#0a0a0f']} />\n <fog attach=\"fog\" args={['#0a0a0f', 5, 20]} />\n\n <ambientLight intensity={0.3} />\n <pointLight position={[10, 10, 10]} intensity={1} castShadow />\n <spotLight\n position={[0, 10, 0]}\n angle={0.6}\n penumbra={1}\n intensity={1.5}\n castShadow\n shadow-mapSize={[2048, 2048]}\n />\n\n <group ref={cubesRef}>\n {/* Floor */}\n <mesh position={[0, -3, 0]} receiveShadow>\n <boxGeometry args={[10, 0.5, 10]} />\n <meshStandardMaterial color=\"#1a1a1a\" />\n </mesh>\n\n {/* Animated Cubes */}\n {cubePositions.map((pos, i) => (\n <mesh key={i} position={pos} castShadow receiveShadow>\n <boxGeometry args={[0.5, 0.5, 0.5]} />\n <meshStandardMaterial\n color=\"#60a5fa\"\n metalness={0.6}\n roughness={0.4}\n />\n </mesh>\n ))}\n </group>\n </>\n );\n}\n","\"use client\";\n\nimport { useRef } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport { MeshTransmissionMaterial } from '@react-three/drei';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * HolographicScene - Holographic sphere with floating shapes\n *\n * Features:\n * - MeshTransmissionMaterial for glass/holographic effect\n * - Floating torus shapes\n * - Chromatic aberration and distortion\n * - Smooth rotation animations\n */\n\nfunction HolographicSphere() {\n const meshRef = useRef<THREE.Mesh>(null);\n\n useFrame((state) => {\n if (!meshRef.current) return;\n const time = state.clock.getElapsedTime();\n\n meshRef.current.rotation.x = time * 0.2;\n meshRef.current.rotation.y = time * 0.3;\n });\n\n return (\n <mesh ref={meshRef}>\n <icosahedronGeometry args={[2, 4]} />\n <MeshTransmissionMaterial\n backside\n samples={16}\n resolution={512}\n transmission={1}\n roughness={0.1}\n thickness={1.5}\n chromaticAberration={0.5}\n distortion={0.3}\n color=\"#a78bfa\"\n />\n </mesh>\n );\n}\n\nfunction FloatingShapes() {\n const group = useRef<THREE.Group>(null);\n\n useFrame((state) => {\n if (!group.current) return;\n const time = state.clock.getElapsedTime();\n\n group.current.rotation.y = time * 0.1;\n\n group.current.children.forEach((child, i) => {\n child.position.y = Math.sin(time + i) * 0.5;\n child.rotation.x = time * (0.5 + i * 0.1);\n child.rotation.z = time * (0.3 + i * 0.1);\n });\n });\n\n return (\n <group ref={group}>\n <mesh position={[3, 0, 0]}>\n <torusGeometry args={[0.5, 0.2, 16, 32]} />\n <meshStandardMaterial\n color=\"#60a5fa\"\n emissive=\"#60a5fa\"\n emissiveIntensity={0.5}\n metalness={0.8}\n roughness={0.2}\n />\n </mesh>\n\n <mesh position={[-3, 0, 0]}>\n <torusGeometry args={[0.5, 0.2, 16, 32]} />\n <meshStandardMaterial\n color=\"#f472b6\"\n emissive=\"#f472b6\"\n emissiveIntensity={0.5}\n metalness={0.8}\n roughness={0.2}\n />\n </mesh>\n\n <mesh position={[0, 3, 0]}>\n <torusGeometry args={[0.5, 0.2, 16, 32]} />\n <meshStandardMaterial\n color=\"#34d399\"\n emissive=\"#34d399\"\n emissiveIntensity={0.5}\n metalness={0.8}\n roughness={0.2}\n />\n </mesh>\n </group>\n );\n}\n\nexport function HolographicScene({ data: _ }: SceneContentProps) {\n return (\n <>\n <color attach=\"background\" args={['#0a0a0f']} />\n\n <ambientLight intensity={0.5} />\n <pointLight position={[10, 10, 10]} intensity={2} color=\"#a78bfa\" />\n <pointLight position={[-10, -10, -10]} intensity={1.5} color=\"#60a5fa\" />\n <spotLight\n position={[0, 10, 0]}\n angle={0.6}\n penumbra={1}\n intensity={2}\n color=\"#ffffff\"\n />\n\n <HolographicSphere />\n <FloatingShapes />\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame, useThree } from '@react-three/fiber';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * DarkRoomScene - Dark room with spotlight\n *\n * Features:\n * - Enclosed room environment\n * - Mouse-following spotlight\n * - Floating particles\n * - Camera parallax effect\n */\n\nfunction DarkRoom() {\n return (\n <group>\n {/* Floor */}\n <mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, -3, 0]} receiveShadow>\n <planeGeometry args={[20, 20]} />\n <meshStandardMaterial color=\"#0a0a0a\" roughness={0.8} metalness={0.2} />\n </mesh>\n\n {/* Walls */}\n <mesh position={[0, 0, -10]} receiveShadow>\n <planeGeometry args={[20, 10]} />\n <meshStandardMaterial color=\"#0f0f0f\" roughness={0.9} />\n </mesh>\n\n <mesh position={[-10, 0, 0]} rotation={[0, Math.PI / 2, 0]} receiveShadow>\n <planeGeometry args={[20, 10]} />\n <meshStandardMaterial color=\"#0f0f0f\" roughness={0.9} />\n </mesh>\n\n <mesh position={[10, 0, 0]} rotation={[0, -Math.PI / 2, 0]} receiveShadow>\n <planeGeometry args={[20, 10]} />\n <meshStandardMaterial color=\"#0f0f0f\" roughness={0.9} />\n </mesh>\n\n {/* Ceiling */}\n <mesh rotation={[Math.PI / 2, 0, 0]} position={[0, 5, 0]} receiveShadow>\n <planeGeometry args={[20, 20]} />\n <meshStandardMaterial color=\"#0a0a0a\" roughness={0.8} />\n </mesh>\n </group>\n );\n}\n\nfunction CenterObject() {\n const meshRef = useRef<THREE.Mesh>(null);\n\n useFrame((state) => {\n if (!meshRef.current) return;\n const time = state.clock.getElapsedTime();\n meshRef.current.rotation.y = time * 0.5;\n meshRef.current.position.y = Math.sin(time) * 0.3;\n });\n\n return (\n <mesh ref={meshRef} position={[0, 0, -5]} castShadow receiveShadow>\n <boxGeometry args={[2, 2, 2]} />\n <meshStandardMaterial\n color=\"#1a1a1a\"\n roughness={0.3}\n metalness={0.7}\n />\n </mesh>\n );\n}\n\nfunction Spotlight() {\n const lightRef = useRef<THREE.SpotLight>(null);\n const targetRef = useRef<THREE.Object3D>(null);\n const { viewport, camera } = useThree();\n\n useFrame((state) => {\n if (!lightRef.current || !targetRef.current) return;\n\n const x = (state.pointer.x * viewport.width) / 2;\n\n lightRef.current.position.set(x * 2, 3, 5);\n targetRef.current.position.set(x * 2, 0, -5);\n\n // Parallax effect\n camera.position.x = state.pointer.x * 0.5;\n camera.position.y = 2 + state.pointer.y * 0.3;\n });\n\n return (\n <>\n <object3D ref={targetRef} />\n <spotLight\n ref={lightRef}\n intensity={50}\n angle={0.4}\n penumbra={0.5}\n color=\"#ffffff\"\n castShadow\n shadow-mapSize={[2048, 2048]}\n target={targetRef.current || undefined}\n />\n </>\n );\n}\n\nfunction FloatingParticles() {\n const particlesRef = useRef<THREE.Points>(null);\n\n const positions = useMemo(() => {\n const count = 500;\n const pos = new Float32Array(count * 3);\n\n for (let i = 0; i < count; i++) {\n pos[i * 3] = (Math.random() - 0.5) * 18;\n pos[i * 3 + 1] = Math.random() * 8 - 3;\n pos[i * 3 + 2] = (Math.random() - 0.5) * 18 - 5;\n }\n\n return pos;\n }, []);\n\n useFrame((state) => {\n if (!particlesRef.current) return;\n\n const time = state.clock.getElapsedTime();\n const positions = particlesRef.current.geometry.attributes.position\n .array as Float32Array;\n\n for (let i = 0; i < positions.length; i += 3) {\n positions[i + 1] += Math.sin(time + positions[i]) * 0.001;\n }\n\n particlesRef.current.geometry.attributes.position.needsUpdate = true;\n });\n\n return (\n <points ref={particlesRef}>\n <bufferGeometry>\n <bufferAttribute\n attach=\"attributes-position\"\n args={[positions, 3]}\n />\n </bufferGeometry>\n <pointsMaterial size={0.02} color=\"#333333\" transparent opacity={0.3} />\n </points>\n );\n}\n\nexport function DarkRoomScene({ data: _ }: SceneContentProps) {\n return (\n <>\n <color attach=\"background\" args={['#000000']} />\n <fog attach=\"fog\" args={['#000000', 5, 20]} />\n\n <ambientLight intensity={0.05} color=\"#ffffff\" />\n\n <DarkRoom />\n <CenterObject />\n <Spotlight />\n <FloatingParticles />\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport { OrbitControls } from '@react-three/drei';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * ElegantWaveScene - Multiple wave layers with particle attraction\n *\n * Features:\n * - Elegant wave plane with mouse interaction\n * - Multiple wave layers for complex motion\n * - Floating particles with mouse attraction\n * - Gentle rotation and color effects\n */\n\nfunction ElegantWaves() {\n const meshRef = useRef<THREE.Mesh>(null);\n const mouseRef = useRef({ x: 0, y: 0 });\n\n const geometry = useMemo(() => {\n return new THREE.PlaneGeometry(20, 20, 100, 100);\n }, []);\n\n const handlePointerMove = (event: { point?: THREE.Vector3 }) => {\n if (event.point) {\n // Direct mapping without scaling\n mouseRef.current.x = event.point.x;\n mouseRef.current.y = event.point.z;\n }\n };\n\n useFrame((state) => {\n if (!meshRef.current) return;\n\n const time = state.clock.getElapsedTime();\n const positions = meshRef.current.geometry.attributes.position;\n\n for (let i = 0; i < positions.count; i++) {\n const x = positions.getX(i);\n const y = positions.getY(i);\n\n // Distance from mouse (no additional scaling)\n const distanceFromMouse = Math.sqrt(\n Math.pow(x - mouseRef.current.x, 2) +\n Math.pow(y - mouseRef.current.y, 2)\n );\n\n // Multiple wave layers\n const wave1 = Math.sin(x * 0.5 + time * 0.5) * 0.3;\n const wave2 = Math.sin(y * 0.3 + time * 0.3) * 0.4;\n const wave3 = Math.sin((x + y) * 0.2 + time * 0.4) * 0.2;\n\n // Mouse interaction ripple\n const mouseInfluence =\n Math.sin(distanceFromMouse * 2 - time * 3) *\n Math.exp(-distanceFromMouse * 0.3) *\n 0.8;\n\n const z = wave1 + wave2 + wave3 + mouseInfluence;\n positions.setZ(i, z);\n }\n\n positions.needsUpdate = true;\n meshRef.current.geometry.computeVertexNormals();\n\n // Gentle rotation\n meshRef.current.rotation.z = Math.sin(time * 0.1) * 0.05;\n });\n\n return (\n <mesh\n ref={meshRef}\n geometry={geometry}\n rotation={[-Math.PI / 2.5, 0, 0]}\n onPointerMove={handlePointerMove}\n >\n <meshStandardMaterial\n color=\"#1a1a2e\"\n side={THREE.DoubleSide}\n metalness={0.8}\n roughness={0.2}\n emissive=\"#0f3460\"\n emissiveIntensity={0.3}\n />\n </mesh>\n );\n}\n\nfunction Particles() {\n const particlesRef = useRef<THREE.Points>(null);\n const mouseRef = useRef({ x: 0, y: 0 });\n\n const [positions, colors] = useMemo(() => {\n const count = 2000;\n const pos = new Float32Array(count * 3);\n const col = new Float32Array(count * 3);\n\n for (let i = 0; i < count; i++) {\n pos[i * 3] = (Math.random() - 0.5) * 30;\n pos[i * 3 + 1] = (Math.random() - 0.5) * 30;\n pos[i * 3 + 2] = (Math.random() - 0.5) * 15;\n\n const color = new THREE.Color();\n color.setHSL(0.6 + Math.random() * 0.1, 0.8, 0.6);\n col[i * 3] = color.r;\n col[i * 3 + 1] = color.g;\n col[i * 3 + 2] = color.b;\n }\n\n return [pos, col];\n }, []);\n\n useFrame((state) => {\n if (!particlesRef.current) return;\n\n const time = state.clock.getElapsedTime();\n const positions = particlesRef.current.geometry.attributes.position\n .array as Float32Array;\n\n for (let i = 0; i < positions.length; i += 3) {\n const x = positions[i];\n const y = positions[i + 1];\n\n // Floating animation\n positions[i + 2] += Math.sin(time + x * 0.5 + y * 0.3) * 0.002;\n\n // Mouse attraction\n const dx = mouseRef.current.x * 10 - x;\n const dy = mouseRef.current.y * 10 - y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (distance < 5) {\n positions[i] += dx * 0.001;\n positions[i + 1] += dy * 0.001;\n }\n }\n\n particlesRef.current.geometry.attributes.position.needsUpdate = true;\n });\n\n return (\n <points ref={particlesRef}>\n <bufferGeometry>\n <bufferAttribute\n attach=\"attributes-position\"\n args={[positions, 3]}\n />\n <bufferAttribute\n attach=\"attributes-color\"\n args={[colors, 3]}\n />\n </bufferGeometry>\n <pointsMaterial size={0.05} vertexColors transparent opacity={0.6} sizeAttenuation />\n </points>\n );\n}\n\nexport function ElegantWaveScene({ data: _ }: SceneContentProps) {\n return (\n <>\n <color attach=\"background\" args={['#0a0a0f']} />\n\n <ambientLight intensity={0.3} color=\"#ffffff\" />\n <pointLight position={[10, 10, 10]} intensity={1} color=\"#4a90e2\" />\n <pointLight position={[-10, -10, -10]} intensity={0.5} color=\"#e94560\" />\n <spotLight\n position={[0, 15, 0]}\n angle={0.3}\n penumbra={1}\n intensity={1}\n color=\"#ffffff\"\n castShadow\n />\n\n <ElegantWaves />\n <Particles />\n\n <OrbitControls\n enableZoom={false}\n enablePan={false}\n maxPolarAngle={Math.PI / 2}\n minPolarAngle={Math.PI / 3}\n />\n </>\n );\n}\n","\"use client\";\n\nimport { useRef, useMemo } from 'react';\nimport { useFrame } from '@react-three/fiber';\nimport * as THREE from 'three';\nimport type { SceneContentProps } from '../types';\n\n/**\n * GradientMeshScene - Animated gradient mesh effect\n *\n * Features:\n * - Animated mesh with gradient colors\n * - Flowing wave motion\n * - Color transitions\n * - Wireframe overlay option\n *\n * Note: Simplified version of shader-based gradient mesh\n */\n\nfunction GradientMesh() {\n const meshRef = useRef<THREE.Mesh>(null);\n const wireframeRef = useRef<THREE.Mesh>(null);\n\n const geometry = useMemo(() => {\n return new THREE.PlaneGeometry(20, 20, 100, 100);\n }, []);\n\n useFrame((state) => {\n if (!meshRef.current) return;\n\n const time = state.clock.getElapsedTime();\n const positions = meshRef.current.geometry.attributes.position;\n const colors = meshRef.current.geometry.attributes.color as THREE.BufferAttribute;\n\n if (!colors) {\n // Initialize colors\n const colorArray = new Float32Array(positions.count * 3);\n meshRef.current.geometry.setAttribute(\n 'color',\n new THREE.BufferAttribute(colorArray, 3)\n );\n }\n\n for (let i = 0; i < positions.count; i++) {\n const x = positions.getX(i);\n const y = positions.getY(i);\n\n // Wave animation\n const wave1 = Math.sin(x * 0.3 + time * 0.5) * 1.5;\n const wave2 = Math.cos(y * 0.3 + time * 0.3) * 1.5;\n const wave3 = Math.sin((x + y) * 0.2 + time * 0.4) * 1.0;\n\n const z = wave1 + wave2 + wave3;\n positions.setZ(i, z);\n\n // Color gradient based on position and time\n const normalizedX = (x + 10) / 20;\n const normalizedY = (y + 10) / 20;\n const normalizedZ = (z + 4) / 8;\n\n const r = Math.sin(normalizedX * Math.PI + time * 0.2) * 0.5 + 0.5;\n const g = Math.sin(normalizedY * Math.PI + time * 0.3) * 0.5 + 0.5;\n const b = Math.sin(normalizedZ * Math.PI + time * 0.4) * 0.5 + 0.5;\n\n if (colors) {\n colors.setXYZ(i, r, g, b);\n }\n }\n\n positions.needsUpdate = true;\n if (colors) colors.needsUpdate = true;\n meshRef.current.geometry.computeVertexNormals();\n\n // Sync wireframe if exists\n if (wireframeRef.current && wireframeRef.current.geometry !== meshRef.current.geometry) {\n wireframeRef.current.geometry = meshRef.current.geometry;\n }\n\n // Gentle rotation\n meshRef.current.rotation.x = Math.sin(time * 0.1) * 0.1;\n meshRef.current.rotation.y = Math.cos(time * 0.15) * 0.1;\n });\n\n return (\n <group>\n {/* Main gradient mesh */}\n <mesh ref={meshRef} geometry={geometry}>\n <meshStandardMaterial\n vertexColors\n side={THREE.DoubleSide}\n metalness={0.5}\n roughness={0.3}\n />\n </mesh>\n\n {/* Wireframe overlay */}\n <mesh ref={wireframeRef} geometry={geometry} position={[0, 0.1, 0]}>\n <meshBasicMaterial\n color=\"#ffffff\"\n wireframe\n transparent\n opacity={0.1}\n />\n </mesh>\n </group>\n );\n}\n\nexport function GradientMeshScene({ data: _ }: SceneContentProps) {\n return (\n <>\n <color attach=\"background\" args={['#000000']} />\n\n <ambientLight intensity={0.5} />\n <pointLight position={[10, 10, 10]} intensity={2} color=\"#8b5cf6\" />\n <pointLight position={[-10, -10, -10]} intensity={1.5} color=\"#4c1d95\" />\n <spotLight\n position={[0, 15, 0]}\n angle={0.6}\n penumbra={1}\n intensity={2}\n color=\"#ffffff\"\n />\n\n <GradientMesh />\n </>\n );\n}\n","\"use client\";\n\nimport { useEffect, useRef, useState } from 'react';\nimport { Canvas } from '@react-three/fiber';\nimport { InstanceProvider } from '@codefluss/threejs-shared';\nimport { createBackgroundInstance } from '../store/background-store';\nimport { StarfieldScene } from '../scenes/starfield-scene';\nimport { ParticleFlowScene } from '../scenes/particle-flow-scene';\nimport { WaveScene } from '../scenes/wave-scene';\nimport { PhysicsCubesScene } from '../scenes/physics-cubes-scene';\nimport { HolographicScene } from '../scenes/holographic-scene';\nimport { DarkRoomScene } from '../scenes/dark-room-scene';\nimport { ElegantWaveScene } from '../scenes/elegant-wave-scene';\nimport { GradientMeshScene } from '../scenes/gradient-mesh-scene';\nimport type { InteractiveBackgroundProps, SceneType } from '../types';\n\n/**\n * Interactive Background Component\n *\n * Features:\n * - Viewport detection (only renders when visible)\n * - Scene type selection\n * - Performance monitoring\n * - Instance-based state\n */\nexport default function InteractiveBackground({\n instanceId,\n data,\n isEditorMode\n}: InteractiveBackgroundProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const [isInViewport, setIsInViewport] = useState(isEditorMode);\n\n // IntersectionObserver - only render when visible\n useEffect(() => {\n // In editor mode, always render\n if (isEditorMode) return;\n\n const container = containerRef.current;\n if (!container) return;\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n setIsInViewport(entry.isIntersecting);\n },\n {\n threshold: 0.1, // 10% visible = activate\n rootMargin: '100px' // Preload 100px before visibility\n }\n );\n\n observer.observe(container);\n\n return () => observer.disconnect();\n }, [isEditorMode]);\n\n // Get scene component based on type\n const SceneComponent = getSceneComponent(data.scene?.type);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n left: 0\n }}\n >\n {/* Only render when in viewport or editor mode */}\n {isInViewport && (\n <InstanceProvider\n instanceId={instanceId}\n createStore={createBackgroundInstance}\n >\n <Canvas\n camera={{\n position: data.camera?.position || [0, 0, 5],\n fov: data.camera?.fov || 75\n }}\n dpr={[1, 2]} // Adaptive DPR\n performance={{ min: 0.5 }} // Minimum 50% performance\n style={{\n background: data.scene?.backgroundColor || 'transparent'\n }}\n >\n <SceneComponent data={data} />\n </Canvas>\n </InstanceProvider>\n )}\n </div>\n );\n}\n\n/**\n * Get scene component based on type\n */\nfunction getSceneComponent(type?: SceneType) {\n switch (type) {\n case 'starfield':\n return StarfieldScene;\n case 'particles':\n return ParticleFlowScene;\n case 'wave':\n return WaveScene;\n case 'physics-cubes':\n return PhysicsCubesScene;\n case 'holographic':\n return HolographicScene;\n case 'dark-room':\n return DarkRoomScene;\n case 'elegant-wave':\n return ElegantWaveScene;\n case 'gradient-mesh':\n return GradientMeshScene;\n default:\n return StarfieldScene;\n }\n}\n"],"names":["StarfieldScene","data","instance","useInstance","quality","setQuality","useState","particleCount","setParticleCount","pointsRef","useRef","useEffect","baseCount","performance","maxParticles","qualitySetting","Math","floor","instanceId","getState","globalPerfMonitor","registerCanvas","handleQualityChange","e","customEvent","detail","newQuality","window","addEventListener","removeEventListener","unregisterCanvas","positions","useMemo","Float32Array","i","i3","radius","random","theta","PI","phi","acos","sin","cos","useFrame","state","delta","fps","updateMetrics","camera","autoRotate","speed","rotationSpeed","position","x","clock","elapsedTime","z","lookAt","current","rotation","y","pointSize","jsxs","Fragment","children","jsx","intensity","ref","attach","args","size","sizeAttenuation","transparent","opacity","color","blending","THREE","AdditiveBlending","depthWrite","ParticleFlowScene","particlesRef","colors","colorStart","Color","colorEnd","mixRatio","clone","lerp","r","g","b","geometry","attributes","array","time","needsUpdate","vertexColors","WavePlane","meshRef","wireframeMeshRef","mousePosition","PlaneGeometry","getElapsedTime","mouseX","mouseY","count","getX","getY","distanceToMouse","sqrt","pow","mouseInfluence","max","setZ","computeVertexNormals","onPointerMove","event","point","side","DoubleSide","metalness","roughness","wireframe","WaveScene","_","PhysicsCubesScene","cubesRef","cubePositions","push","forEach","cube","length","baseY","castShadow","angle","penumbra","receiveShadow","map","pos","HolographicSphere","MeshTransmissionMaterial","backside","samples","resolution","transmission","thickness","chromaticAberration","distortion","FloatingShapes","group","child","emissive","emissiveIntensity","HolographicScene","DarkRoom","CenterObject","Spotlight","lightRef","targetRef","viewport","useThree","pointer","width","set","target","FloatingParticles","DarkRoomScene","ElegantWaves","mouseRef","distanceFromMouse","exp","Particles","col","setHSL","dx","dy","ElegantWaveScene","OrbitControls","enableZoom","enablePan","maxPolarAngle","minPolarAngle","GradientMesh","wireframeRef","colorArray","setAttribute","BufferAttribute","normalizedX","normalizedY","normalizedZ","setXYZ","GradientMeshScene","InteractiveBackground","isEditorMode","containerRef","isInViewport","setIsInViewport","container","observer","IntersectionObserver","entry","isIntersecting","threshold","rootMargin","observe","disconnect","SceneComponent","type","getSceneComponent","scene","style","height","top","left","InstanceProvider","createStore","createBackgroundInstance","Canvas","fov","dpr","min","background","backgroundColor"],"mappings":"qdAgBO,SAASA,GAAeC,KAAEA,IAC/B,MAAMC,EAAWC,KACVC,EAASC,GAAcC,EAAuB,SAC9CC,EAAeC,GAAoBF,EAAS,KAC7CG,EAAYC,EAAqB,MAGvCC,EAAU,KACR,MAAMC,EAAYX,EAAKY,aAAaC,cAAgB,IAC9CC,EAAiBd,EAAKY,aAAaT,SAAW,OAEpD,GAAuB,SAAnBW,EAEF,OAAQA,GACN,IAAK,OACHP,EAAiBI,GACjBP,EAAW,QACX,MACF,IAAK,SACHG,EAAiBQ,KAAKC,MAAkB,GAAZL,IAC5BP,EAAW,UACX,MACF,IAAK,MACHG,EAAiBQ,KAAKC,MAAkB,GAAZL,IAC5BP,EAAW,YAKfG,EAAiBI,GACjBP,EAAW,SAEZ,CAACJ,EAAKY,cAGTF,EAAU,KACR,GAAkC,SAA9BV,EAAKY,aAAaT,QAAoB,OAE1C,MAAMc,EAAahB,EAASiB,WAAWD,WACvCE,EAAkBC,eAAeH,GAEjC,MAAMI,EAAuBC,IAC3B,MAAMC,EAAcD,EACpB,GAAIC,EAAYC,OAAOP,aAAeA,EAAY,CAChD,MAAMQ,EAAaF,EAAYC,OAAOrB,QACtCC,EAAWqB,GAEX,MAAMd,EAAYX,EAAKY,aAAaC,cAAgB,IACpD,OAAQY,GACN,IAAK,OACHlB,EAAiBI,GACjB,MACF,IAAK,SACHJ,EAAiBQ,KAAKC,MAAkB,GAAZL,IAC5B,MACF,IAAK,MACHJ,EAAiBQ,KAAKC,MAAkB,GAAZL,IAGlC,GAKF,OAFAe,OAAOC,iBAAiB,6BAA8BN,GAE/C,KACLK,OAAO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