AK51 commited on
Commit
eba50fd
·
verified ·
1 Parent(s): 604ec84

Upload 19 files

Browse files
.gitattributes ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ main.png filter=lfs diff=lfs merge=lfs -text
2
+ textures/earth.jpg filter=lfs diff=lfs merge=lfs -text
3
+ textures/jupiter.jpg filter=lfs diff=lfs merge=lfs -text
4
+ textures/mars.jpg filter=lfs diff=lfs merge=lfs -text
5
+ textures/mercury.jpg filter=lfs diff=lfs merge=lfs -text
6
+ textures/milky_way.jpg filter=lfs diff=lfs merge=lfs -text
7
+ textures/moon.jpg filter=lfs diff=lfs merge=lfs -text
8
+ textures/neptune.jpg filter=lfs diff=lfs merge=lfs -text
9
+ textures/pluto.jpg filter=lfs diff=lfs merge=lfs -text
10
+ textures/saturn.jpg filter=lfs diff=lfs merge=lfs -text
11
+ textures/sun.jpg filter=lfs diff=lfs merge=lfs -text
12
+ textures/venus.jpg filter=lfs diff=lfs merge=lfs -text
assets/index-BZEMTs19.js ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{M as te,O as wt,B as Ye,F as Oe,S as j,U as he,V as g,W as J,H as ee,N as xt,C as We,a as Y,b as f,A as Mt,c as me,d as qe,e as Ve,f as St,P as Tt,g as vt,h as Et,i as Ct,j as Pt,k as de,T as Qe,l as Lt,E as Dt,m as B,n as I,o as _e,Q as ze,R as Rt,p as At,q as Ot,r as Be,s as _t,D as zt,I as Bt,t as Xe,L as It,u as kt}from"./three-CiEkAr4i.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))e(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&e(a)}).observe(document,{childList:!0,subtree:!0});function o(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function e(i){if(i.ep)return;i.ep=!0;const n=o(i);fetch(i.href,n)}})();const Ze={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
2
+
3
+ varying vec2 vUv;
4
+
5
+ void main() {
6
+
7
+ vUv = uv;
8
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
9
+
10
+ }`,fragmentShader:`
11
+
12
+ uniform float opacity;
13
+
14
+ uniform sampler2D tDiffuse;
15
+
16
+ varying vec2 vUv;
17
+
18
+ void main() {
19
+
20
+ vec4 texel = texture2D( tDiffuse, vUv );
21
+ gl_FragColor = opacity * texel;
22
+
23
+
24
+ }`};class W{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const jt=new wt(-1,1,1,-1,0,1);class Ft extends Ye{constructor(){super(),this.setAttribute("position",new Oe([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Oe([0,2,0,0,2,0],2))}}const Ut=new Ft;class Ge{constructor(t){this._mesh=new te(Ut,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,jt)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class Nt extends W{constructor(t,o){super(),this.textureID=o!==void 0?o:"tDiffuse",t instanceof j?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=he.clone(t.uniforms),this.material=new j({name:t.name!==void 0?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new Ge(this.material)}render(t,o,e){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=e.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(o),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Ie extends W{constructor(t,o){super(),this.scene=t,this.camera=o,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,o,e){const i=t.getContext(),n=t.state;n.buffers.color.setMask(!1),n.buffers.depth.setMask(!1),n.buffers.color.setLocked(!0),n.buffers.depth.setLocked(!0);let a,r;this.inverse?(a=0,r=1):(a=1,r=0),n.buffers.stencil.setTest(!0),n.buffers.stencil.setOp(i.REPLACE,i.REPLACE,i.REPLACE),n.buffers.stencil.setFunc(i.ALWAYS,a,4294967295),n.buffers.stencil.setClear(r),n.buffers.stencil.setLocked(!0),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(o),this.clear&&t.clear(),t.render(this.scene,this.camera),n.buffers.color.setLocked(!1),n.buffers.depth.setLocked(!1),n.buffers.color.setMask(!0),n.buffers.depth.setMask(!0),n.buffers.stencil.setLocked(!1),n.buffers.stencil.setFunc(i.EQUAL,1,4294967295),n.buffers.stencil.setOp(i.KEEP,i.KEEP,i.KEEP),n.buffers.stencil.setLocked(!0)}}class Ht extends W{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class Kt{constructor(t,o){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),o===void 0){const e=t.getSize(new g);this._width=e.width,this._height=e.height,o=new J(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:ee}),o.texture.name="EffectComposer.rt1"}else this._width=o.width,this._height=o.height;this.renderTarget1=o,this.renderTarget2=o.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Nt(Ze),this.copyPass.material.blending=xt,this.clock=new We}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,o){this.passes.splice(o,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const o=this.passes.indexOf(t);o!==-1&&this.passes.splice(o,1)}isLastEnabledPass(t){for(let o=t+1;o<this.passes.length;o++)if(this.passes[o].enabled)return!1;return!0}render(t){t===void 0&&(t=this.clock.getDelta());const o=this.renderer.getRenderTarget();let e=!1;for(let i=0,n=this.passes.length;i<n;i++){const a=this.passes[i];if(a.enabled!==!1){if(a.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(i),a.render(this.renderer,this.writeBuffer,this.readBuffer,t,e),a.needsSwap){if(e){const r=this.renderer.getContext(),l=this.renderer.state.buffers.stencil;l.setFunc(r.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,t),l.setFunc(r.EQUAL,1,4294967295)}this.swapBuffers()}Ie!==void 0&&(a instanceof Ie?e=!0:a instanceof Ht&&(e=!1))}}this.renderer.setRenderTarget(o)}reset(t){if(t===void 0){const o=this.renderer.getSize(new g);this._pixelRatio=this.renderer.getPixelRatio(),this._width=o.width,this._height=o.height,t=this.renderTarget1.clone(),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(t,o){this._width=t,this._height=o;const e=this._width*this._pixelRatio,i=this._height*this._pixelRatio;this.renderTarget1.setSize(e,i),this.renderTarget2.setSize(e,i);for(let n=0;n<this.passes.length;n++)this.passes[n].setSize(e,i)}setPixelRatio(t){this._pixelRatio=t,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class Yt extends W{constructor(t,o,e=null,i=null,n=null){super(),this.scene=t,this.camera=o,this.overrideMaterial=e,this.clearColor=i,this.clearAlpha=n,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new Y}render(t,o,e){const i=t.autoClear;t.autoClear=!1;let n,a;this.overrideMaterial!==null&&(a=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(t.getClearColor(this._oldClearColor),t.setClearColor(this.clearColor)),this.clearAlpha!==null&&(n=t.getClearAlpha(),t.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&t.clearDepth(),t.setRenderTarget(this.renderToScreen?null:e),this.clear===!0&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),t.render(this.scene,this.camera),this.clearColor!==null&&t.setClearColor(this._oldClearColor),this.clearAlpha!==null&&t.setClearAlpha(n),this.overrideMaterial!==null&&(this.scene.overrideMaterial=a),t.autoClear=i}}const Wt={uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new Y(0)},defaultOpacity:{value:0}},vertexShader:`
25
+
26
+ varying vec2 vUv;
27
+
28
+ void main() {
29
+
30
+ vUv = uv;
31
+
32
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
33
+
34
+ }`,fragmentShader:`
35
+
36
+ uniform sampler2D tDiffuse;
37
+ uniform vec3 defaultColor;
38
+ uniform float defaultOpacity;
39
+ uniform float luminosityThreshold;
40
+ uniform float smoothWidth;
41
+
42
+ varying vec2 vUv;
43
+
44
+ void main() {
45
+
46
+ vec4 texel = texture2D( tDiffuse, vUv );
47
+
48
+ vec3 luma = vec3( 0.299, 0.587, 0.114 );
49
+
50
+ float v = dot( texel.xyz, luma );
51
+
52
+ vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );
53
+
54
+ float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );
55
+
56
+ gl_FragColor = mix( outputColor, texel, alpha );
57
+
58
+ }`};class F extends W{constructor(t,o,e,i){super(),this.strength=o!==void 0?o:1,this.radius=e,this.threshold=i,this.resolution=t!==void 0?new g(t.x,t.y):new g(256,256),this.clearColor=new Y(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let n=Math.round(this.resolution.x/2),a=Math.round(this.resolution.y/2);this.renderTargetBright=new J(n,a,{type:ee}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let x=0;x<this.nMips;x++){const S=new J(n,a,{type:ee});S.texture.name="UnrealBloomPass.h"+x,S.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(S);const h=new J(n,a,{type:ee});h.texture.name="UnrealBloomPass.v"+x,h.texture.generateMipmaps=!1,this.renderTargetsVertical.push(h),n=Math.round(n/2),a=Math.round(a/2)}const r=Wt;this.highPassUniforms=he.clone(r.uniforms),this.highPassUniforms.luminosityThreshold.value=i,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new j({uniforms:this.highPassUniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader}),this.separableBlurMaterials=[];const l=[3,5,7,9,11];n=Math.round(this.resolution.x/2),a=Math.round(this.resolution.y/2);for(let x=0;x<this.nMips;x++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(l[x])),this.separableBlurMaterials[x].uniforms.invSize.value=new g(1/n,1/a),n=Math.round(n/2),a=Math.round(a/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=o,this.compositeMaterial.uniforms.bloomRadius.value=.1;const u=[1,.8,.6,.4,.2];this.compositeMaterial.uniforms.bloomFactors.value=u,this.bloomTintColors=[new f(1,1,1),new f(1,1,1),new f(1,1,1),new f(1,1,1),new f(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors;const w=Ze;this.copyUniforms=he.clone(w.uniforms),this.blendMaterial=new j({uniforms:this.copyUniforms,vertexShader:w.vertexShader,fragmentShader:w.fragmentShader,blending:Mt,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new Y,this.oldClearAlpha=1,this.basic=new me,this.fsQuad=new Ge(null)}dispose(){for(let t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(let t=0;t<this.renderTargetsVertical.length;t++)this.renderTargetsVertical[t].dispose();this.renderTargetBright.dispose();for(let t=0;t<this.separableBlurMaterials.length;t++)this.separableBlurMaterials[t].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this.basic.dispose(),this.fsQuad.dispose()}setSize(t,o){let e=Math.round(t/2),i=Math.round(o/2);this.renderTargetBright.setSize(e,i);for(let n=0;n<this.nMips;n++)this.renderTargetsHorizontal[n].setSize(e,i),this.renderTargetsVertical[n].setSize(e,i),this.separableBlurMaterials[n].uniforms.invSize.value=new g(1/e,1/i),e=Math.round(e/2),i=Math.round(i/2)}render(t,o,e,i,n){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();const a=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),n&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=e.texture,t.setRenderTarget(null),t.clear(),this.fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=e.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this.fsQuad.render(t);let r=this.renderTargetBright;for(let l=0;l<this.nMips;l++)this.fsQuad.material=this.separableBlurMaterials[l],this.separableBlurMaterials[l].uniforms.colorTexture.value=r.texture,this.separableBlurMaterials[l].uniforms.direction.value=F.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[l]),t.clear(),this.fsQuad.render(t),this.separableBlurMaterials[l].uniforms.colorTexture.value=this.renderTargetsHorizontal[l].texture,this.separableBlurMaterials[l].uniforms.direction.value=F.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[l]),t.clear(),this.fsQuad.render(t),r=this.renderTargetsVertical[l];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,n&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.fsQuad.render(t)),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=a}getSeperableBlurMaterial(t){const o=[];for(let e=0;e<t;e++)o.push(.39894*Math.exp(-.5*e*e/(t*t))/t);return new j({defines:{KERNEL_RADIUS:t},uniforms:{colorTexture:{value:null},invSize:{value:new g(.5,.5)},direction:{value:new g(.5,.5)},gaussianCoefficients:{value:o}},vertexShader:`varying vec2 vUv;
59
+ void main() {
60
+ vUv = uv;
61
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
62
+ }`,fragmentShader:`#include <common>
63
+ varying vec2 vUv;
64
+ uniform sampler2D colorTexture;
65
+ uniform vec2 invSize;
66
+ uniform vec2 direction;
67
+ uniform float gaussianCoefficients[KERNEL_RADIUS];
68
+
69
+ void main() {
70
+ float weightSum = gaussianCoefficients[0];
71
+ vec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum;
72
+ for( int i = 1; i < KERNEL_RADIUS; i ++ ) {
73
+ float x = float(i);
74
+ float w = gaussianCoefficients[i];
75
+ vec2 uvOffset = direction * invSize * x;
76
+ vec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb;
77
+ vec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb;
78
+ diffuseSum += (sample1 + sample2) * w;
79
+ weightSum += 2.0 * w;
80
+ }
81
+ gl_FragColor = vec4(diffuseSum/weightSum, 1.0);
82
+ }`})}getCompositeMaterial(t){return new j({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
83
+ void main() {
84
+ vUv = uv;
85
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
86
+ }`,fragmentShader:`varying vec2 vUv;
87
+ uniform sampler2D blurTexture1;
88
+ uniform sampler2D blurTexture2;
89
+ uniform sampler2D blurTexture3;
90
+ uniform sampler2D blurTexture4;
91
+ uniform sampler2D blurTexture5;
92
+ uniform float bloomStrength;
93
+ uniform float bloomRadius;
94
+ uniform float bloomFactors[NUM_MIPS];
95
+ uniform vec3 bloomTintColors[NUM_MIPS];
96
+
97
+ float lerpBloomFactor(const in float factor) {
98
+ float mirrorFactor = 1.2 - factor;
99
+ return mix(factor, mirrorFactor, bloomRadius);
100
+ }
101
+
102
+ void main() {
103
+ gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
104
+ lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
105
+ lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
106
+ lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
107
+ lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
108
+ }`})}}F.BlurDirectionX=new g(1,0);F.BlurDirectionY=new g(0,1);class qt extends Ve{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new g(.5,.5),this.addEventListener("removed",function(){this.traverse(function(o){o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)})})}copy(t,o){return super.copy(t,o),this.element=t.element.cloneNode(!0),this.center=t.center,this}}const k=new f,ke=new qe,je=new qe,Fe=new f,Ue=new f;class Vt{constructor(t={}){const o=this;let e,i,n,a;const r={objects:new WeakMap},l=t.element!==void 0?t.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.getSize=function(){return{width:e,height:i}},this.render=function(h,m){h.matrixWorldAutoUpdate===!0&&h.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),ke.copy(m.matrixWorldInverse),je.multiplyMatrices(m.projectionMatrix,ke),u(h,h,m),S(h)},this.setSize=function(h,m){e=h,i=m,n=e/2,a=i/2,l.style.width=h+"px",l.style.height=m+"px"};function u(h,m,M){if(h.isCSS2DObject){k.setFromMatrixPosition(h.matrixWorld),k.applyMatrix4(je);const y=h.visible===!0&&k.z>=-1&&k.z<=1&&h.layers.test(M.layers)===!0;if(h.element.style.display=y===!0?"":"none",y===!0){h.onBeforeRender(o,m,M);const C=h.element;C.style.transform="translate("+-100*h.center.x+"%,"+-100*h.center.y+"%)translate("+(k.x*n+n)+"px,"+(-k.y*a+a)+"px)",C.parentNode!==l&&l.appendChild(C),h.onAfterRender(o,m,M)}const T={distanceToCameraSquared:w(M,h)};r.objects.set(h,T)}for(let y=0,T=h.children.length;y<T;y++)u(h.children[y],m,M)}function w(h,m){return Fe.setFromMatrixPosition(h.matrixWorld),Ue.setFromMatrixPosition(m.matrixWorld),Fe.distanceToSquared(Ue)}function x(h){const m=[];return h.traverse(function(M){M.isCSS2DObject&&m.push(M)}),m}function S(h){const m=x(h).sort(function(y,T){if(y.renderOrder!==T.renderOrder)return T.renderOrder-y.renderOrder;const C=r.objects.get(y).distanceToCameraSquared,L=r.objects.get(T).distanceToCameraSquared;return C-L}),M=m.length;for(let y=0,T=m.length;y<T;y++)m[y].element.style.zIndex=M-y}}}class Qt{constructor(t){if(!t)throw new Error("Canvas element is required for SceneManager");this.canvas=t,this.scene=new St,this.scene.background=new Y(0),this.camera=this.createCamera(),this.renderer=this.createRenderer(),this.labelRenderer=this.createLabelRenderer(),this.setupLighting(),this.createStarfield(),this.setupPostprocessing(),this.handleResize=this.onWindowResize.bind(this),window.addEventListener("resize",this.handleResize)}createCamera(){const t=new Tt(75,window.innerWidth/window.innerHeight,.1,1e4);return t.position.set(250,150,250),t.lookAt(0,0,0),t}createRenderer(){const t=new vt({canvas:this.canvas,antialias:!0,alpha:!1});return t.setSize(window.innerWidth,window.innerHeight),t.setPixelRatio(Math.min(window.devicePixelRatio,2)),t.shadowMap.enabled=!0,t.shadowMap.type=Et,t}createLabelRenderer(){const t=new Vt;return t.setSize(window.innerWidth,window.innerHeight),t.domElement.style.position="absolute",t.domElement.style.top="0px",t.domElement.style.pointerEvents="none",document.body.appendChild(t.domElement),t}setupLighting(){this.sunLight=new Ct(16777215,2,0),this.sunLight.position.set(0,0,0),this.sunLight.castShadow=!0,this.sunLight.shadow.mapSize.width=2048,this.sunLight.shadow.mapSize.height=2048,this.sunLight.shadow.camera.near=.1,this.sunLight.shadow.camera.far=5e3,this.scene.add(this.sunLight),this.ambientLight=new Pt(16777215,.5),this.scene.add(this.ambientLight)}createStarfield(){const o=new de(1e3,64,64),i=new Qe().load("/textures/milky_way.jpg",()=>{console.log("✓ Milky Way background loaded")},void 0,a=>{console.warn("✗ Failed to load Milky Way texture, using black background")}),n=new me({map:i,side:Lt,fog:!1});return this.starfield=new te(o,n),this.scene.add(this.starfield),console.log("Milky Way skybox created"),this.starfield}setupPostprocessing(){this.composer=new Kt(this.renderer);const t=new Yt(this.scene,this.camera);this.composer.addPass(t);const o=new F(new g(window.innerWidth,window.innerHeight),1.5,.4,.85);return this.composer.addPass(o),this.bloomPass=o,this.composer}addToScene(t){this.scene.add(t)}removeFromScene(t){this.scene.remove(t)}render(){this.composer?this.composer.render():this.renderer.render(this.scene,this.camera),this.labelRenderer&&this.labelRenderer.render(this.scene,this.camera)}onWindowResize(){this.camera.aspect=window.innerWidth/window.innerHeight,this.camera.updateProjectionMatrix(),this.renderer.setSize(window.innerWidth,window.innerHeight),this.labelRenderer&&this.labelRenderer.setSize(window.innerWidth,window.innerHeight),this.composer&&this.composer.setSize(window.innerWidth,window.innerHeight)}dispose(){window.removeEventListener("resize",this.handleResize),this.renderer.dispose(),this.composer&&this.composer.dispose(),this.starfield&&(this.starfield.geometry.dispose(),this.starfield.material.dispose()),this.scene.clear()}createLabel(t){const o=document.createElement("div");return o.className="planet-label",o.textContent=t,o.style.color="white",o.style.fontSize="14px",o.style.fontFamily="Arial, sans-serif",o.style.textShadow="0 0 5px black, 0 0 10px black",o.style.pointerEvents="none",o.style.userSelect="none",new qt(o)}getScene(){return this.scene}getCamera(){return this.camera}getRenderer(){return this.renderer}}const se={AU_TO_KM:149597900,SCALE_FACTOR_DISTANCE:1e-8,SCALE_FACTOR_SIZE:5e-5,TIME_SCALE:10};function $e(b,t=se.SCALE_FACTOR_DISTANCE){return b*se.AU_TO_KM*t}function Xt(b){return{sun:0,mercury:110,venus:120,earth:130,moon:132,mars:140,jupiter:150,saturn:160,uranus:170,neptune:180,pluto:190}[b]||0}function Zt(b,t=se.SCALE_FACTOR_SIZE){return b*t}const G={sun:{name:"Sun",diameter:1392e3,distance:0,orbitalPeriod:0,rotationPeriod:25.38,texture:"/textures/sun.jpg",emissive:!0,emissiveIntensity:1},mercury:{name:"Mercury",diameter:4879,distance:.39,orbitalPeriod:88,rotationPeriod:58.6,texture:"/textures/mercury.jpg"},venus:{name:"Venus",diameter:12104,distance:.72,orbitalPeriod:224.7,rotationPeriod:-243,texture:"/textures/venus.jpg"},earth:{name:"Earth",diameter:12756,distance:1,orbitalPeriod:365.2,rotationPeriod:1,texture:"/textures/earth.jpg"},moon:{name:"Moon",diameter:3474,distance:.00257,orbitalPeriod:27.3,rotationPeriod:27.3,texture:"/textures/moon.jpg",orbitAround:"earth"},mars:{name:"Mars",diameter:6779,distance:1.52,orbitalPeriod:687,rotationPeriod:1.026,texture:"/textures/mars.jpg"},jupiter:{name:"Jupiter",diameter:14e4,distance:5.2,orbitalPeriod:4332.6,rotationPeriod:.414,texture:"/textures/jupiter.jpg"},saturn:{name:"Saturn",diameter:117e3,distance:9.54,orbitalPeriod:10759.2,rotationPeriod:.44,texture:"/textures/saturn.jpg"},uranus:{name:"Uranus",diameter:50700,distance:19.19,orbitalPeriod:30685.4,rotationPeriod:-.718,texture:"/textures/uranus.jpg"},neptune:{name:"Neptune",diameter:49200,distance:30.06,orbitalPeriod:60190,rotationPeriod:.671,texture:"/textures/neptune.jpg"},pluto:{name:"Pluto",diameter:2470,distance:39.5,orbitalPeriod:90759,rotationPeriod:-6.387,texture:"/textures/pluto.jpg"}},Gt={count:5e3,innerRadius:2.2,outerRadius:3.2,thickness:.1};class $t{constructor(){this.time=0,this.timeScale=se.TIME_SCALE,this.isPaused=!1,this.distanceMode="equal",this.celestialBodies=new Map}registerBody(t,o,e){if(!t)throw new Error("Body name is required for registration");if(!o)throw new Error("Mesh is required for registration");if(!e)throw new Error("Body data is required for registration");const i=Math.random()*Math.PI*2;this.celestialBodies.set(t,{mesh:o,data:e,initialAngle:i})}update(t){if(!this.isPaused){this.time+=t*this.timeScale;for(const[o,e]of this.celestialBodies)if(e.data.distance!==0){if(e.data.orbitAround){const i=this.celestialBodies.get(e.data.orbitAround);i&&this.updateOrbit(e,i.mesh.position,this.time)}else this.updateOrbit(e,new f(0,0,0),this.time);this.updateRotation(e,this.time)}}}updateOrbit(t,o,e){let i;if(this.distanceMode==="equal"){const r=t.data.name.toLowerCase();t.data.orbitAround?i=2:i=Xt(r)}else i=$e(t.data.distance);const n=t.data.orbitalPeriod,a=t.initialAngle+e/n*Math.PI*2;t.mesh.position.x=o.x+Math.cos(a)*i,t.mesh.position.z=o.z+Math.sin(a)*i,t.mesh.position.y=o.y}updateRotation(t,o){const e=t.data.rotationPeriod,i=o/e*Math.PI*2;t.mesh.rotation.y=i}setTimeScale(t){if(typeof t!="number"||t<0)throw new Error("Time scale must be a non-negative number");this.timeScale=t}pause(){this.isPaused=!0}resume(){this.isPaused=!1}getTime(){return this.time}getTimeScale(){return this.timeScale}isPausedState(){return this.isPaused}getBody(t){return this.celestialBodies.get(t)}getAllBodies(){return this.celestialBodies}getBodyCount(){return this.celestialBodies.size}clearBodies(){this.celestialBodies.clear()}resetTime(){this.time=0}setDistanceMode(t){if(t!=="equal"&&t!=="realistic")throw new Error('Distance mode must be "equal" or "realistic"');this.distanceMode=t,console.log(`Distance mode set to: ${t}`)}getDistanceMode(){return this.distanceMode}}const Ne={type:"change"},ue={type:"start"},He={type:"end"},$=new Rt,Ke=new At,Jt=Math.cos(70*Ot.DEG2RAD);class es extends Dt{constructor(t,o){super(),this.object=t,this.domElement=o,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new f,this.cursor=new f,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:B.ROTATE,MIDDLE:B.DOLLY,RIGHT:B.PAN},this.touches={ONE:I.ROTATE,TWO:I.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return r.phi},this.getAzimuthalAngle=function(){return r.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(s){s.addEventListener("keydown",le),this._domElementKeyEvents=s},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",le),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(Ne),e.update(),n=i.NONE},this.update=function(){const s=new f,c=new ze().setFromUnitVectors(t.up,new f(0,1,0)),d=c.clone().invert(),p=new f,v=new ze,O=new f,P=2*Math.PI;return function(yt=null){const Ae=e.object.position;s.copy(Ae).sub(e.target),s.applyQuaternion(c),r.setFromVector3(s),e.autoRotate&&n===i.NONE&&U(Je(yt)),e.enableDamping?(r.theta+=l.theta*e.dampingFactor,r.phi+=l.phi*e.dampingFactor):(r.theta+=l.theta,r.phi+=l.phi);let D=e.minAzimuthAngle,R=e.maxAzimuthAngle;isFinite(D)&&isFinite(R)&&(D<-Math.PI?D+=P:D>Math.PI&&(D-=P),R<-Math.PI?R+=P:R>Math.PI&&(R-=P),D<=R?r.theta=Math.max(D,Math.min(R,r.theta)):r.theta=r.theta>(D+R)/2?Math.max(D,r.theta):Math.min(R,r.theta)),r.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,r.phi)),r.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(w,e.dampingFactor):e.target.add(w),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor),e.zoomToCursor&&q||e.object.isOrthographicCamera?r.radius=ae(r.radius):r.radius=ae(r.radius*u),s.setFromSpherical(r),s.applyQuaternion(d),Ae.copy(e.target).add(s),e.object.lookAt(e.target),e.enableDamping===!0?(l.theta*=1-e.dampingFactor,l.phi*=1-e.dampingFactor,w.multiplyScalar(1-e.dampingFactor)):(l.set(0,0,0),w.set(0,0,0));let ce=!1;if(e.zoomToCursor&&q){let H=null;if(e.object.isPerspectiveCamera){const K=s.length();H=ae(K*u);const Z=K-H;e.object.position.addScaledVector(fe,Z),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const K=new f(A.x,A.y,0);K.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),ce=!0;const Z=new f(A.x,A.y,0);Z.unproject(e.object),e.object.position.sub(Z).add(K),e.object.updateMatrixWorld(),H=s.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;H!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(H).add(e.object.position):($.origin.copy(e.object.position),$.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot($.direction))<Jt?t.lookAt(e.target):(Ke.setFromNormalAndCoplanarPoint(e.object.up,e.target),$.intersectPlane(Ke,e.target))))}else e.object.isOrthographicCamera&&(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),ce=!0);return u=1,q=!1,ce||p.distanceToSquared(e.object.position)>a||8*(1-v.dot(e.object.quaternion))>a||O.distanceToSquared(e.target)>0?(e.dispatchEvent(Ne),p.copy(e.object.position),v.copy(e.object.quaternion),O.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",De),e.domElement.removeEventListener("pointerdown",Ce),e.domElement.removeEventListener("pointercancel",N),e.domElement.removeEventListener("wheel",Pe),e.domElement.removeEventListener("pointermove",re),e.domElement.removeEventListener("pointerup",N),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",le),e._domElementKeyEvents=null)};const e=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let n=i.NONE;const a=1e-6,r=new _e,l=new _e;let u=1;const w=new f,x=new g,S=new g,h=new g,m=new g,M=new g,y=new g,T=new g,C=new g,L=new g,fe=new f,A=new g;let q=!1;const E=[],V={};let ie=!1;function Je(s){return s!==null?2*Math.PI/60*e.autoRotateSpeed*s:2*Math.PI/60/60*e.autoRotateSpeed}function Q(s){const c=Math.abs(s*.01);return Math.pow(.95,e.zoomSpeed*c)}function U(s){l.theta-=s}function X(s){l.phi-=s}const pe=function(){const s=new f;return function(d,p){s.setFromMatrixColumn(p,0),s.multiplyScalar(-d),w.add(s)}}(),ge=function(){const s=new f;return function(d,p){e.screenSpacePanning===!0?s.setFromMatrixColumn(p,1):(s.setFromMatrixColumn(p,0),s.crossVectors(e.object.up,s)),s.multiplyScalar(d),w.add(s)}}(),_=function(){const s=new f;return function(d,p){const v=e.domElement;if(e.object.isPerspectiveCamera){const O=e.object.position;s.copy(O).sub(e.target);let P=s.length();P*=Math.tan(e.object.fov/2*Math.PI/180),pe(2*d*P/v.clientHeight,e.object.matrix),ge(2*p*P/v.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(pe(d*(e.object.right-e.object.left)/e.object.zoom/v.clientWidth,e.object.matrix),ge(p*(e.object.top-e.object.bottom)/e.object.zoom/v.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function oe(s){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?u/=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function be(s){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?u*=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function ne(s,c){if(!e.zoomToCursor)return;q=!0;const d=e.domElement.getBoundingClientRect(),p=s-d.left,v=c-d.top,O=d.width,P=d.height;A.x=p/O*2-1,A.y=-(v/P)*2+1,fe.set(A.x,A.y,1).unproject(e.object).sub(e.object.position).normalize()}function ae(s){return Math.max(e.minDistance,Math.min(e.maxDistance,s))}function ye(s){x.set(s.clientX,s.clientY)}function et(s){ne(s.clientX,s.clientX),T.set(s.clientX,s.clientY)}function we(s){m.set(s.clientX,s.clientY)}function tt(s){S.set(s.clientX,s.clientY),h.subVectors(S,x).multiplyScalar(e.rotateSpeed);const c=e.domElement;U(2*Math.PI*h.x/c.clientHeight),X(2*Math.PI*h.y/c.clientHeight),x.copy(S),e.update()}function st(s){C.set(s.clientX,s.clientY),L.subVectors(C,T),L.y>0?oe(Q(L.y)):L.y<0&&be(Q(L.y)),T.copy(C),e.update()}function it(s){M.set(s.clientX,s.clientY),y.subVectors(M,m).multiplyScalar(e.panSpeed),_(y.x,y.y),m.copy(M),e.update()}function ot(s){ne(s.clientX,s.clientY),s.deltaY<0?be(Q(s.deltaY)):s.deltaY>0&&oe(Q(s.deltaY)),e.update()}function nt(s){let c=!1;switch(s.code){case e.keys.UP:s.ctrlKey||s.metaKey||s.shiftKey?X(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):_(0,e.keyPanSpeed),c=!0;break;case e.keys.BOTTOM:s.ctrlKey||s.metaKey||s.shiftKey?X(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):_(0,-e.keyPanSpeed),c=!0;break;case e.keys.LEFT:s.ctrlKey||s.metaKey||s.shiftKey?U(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):_(e.keyPanSpeed,0),c=!0;break;case e.keys.RIGHT:s.ctrlKey||s.metaKey||s.shiftKey?U(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):_(-e.keyPanSpeed,0),c=!0;break}c&&(s.preventDefault(),e.update())}function xe(s){if(E.length===1)x.set(s.pageX,s.pageY);else{const c=z(s),d=.5*(s.pageX+c.x),p=.5*(s.pageY+c.y);x.set(d,p)}}function Me(s){if(E.length===1)m.set(s.pageX,s.pageY);else{const c=z(s),d=.5*(s.pageX+c.x),p=.5*(s.pageY+c.y);m.set(d,p)}}function Se(s){const c=z(s),d=s.pageX-c.x,p=s.pageY-c.y,v=Math.sqrt(d*d+p*p);T.set(0,v)}function at(s){e.enableZoom&&Se(s),e.enablePan&&Me(s)}function rt(s){e.enableZoom&&Se(s),e.enableRotate&&xe(s)}function Te(s){if(E.length==1)S.set(s.pageX,s.pageY);else{const d=z(s),p=.5*(s.pageX+d.x),v=.5*(s.pageY+d.y);S.set(p,v)}h.subVectors(S,x).multiplyScalar(e.rotateSpeed);const c=e.domElement;U(2*Math.PI*h.x/c.clientHeight),X(2*Math.PI*h.y/c.clientHeight),x.copy(S)}function ve(s){if(E.length===1)M.set(s.pageX,s.pageY);else{const c=z(s),d=.5*(s.pageX+c.x),p=.5*(s.pageY+c.y);M.set(d,p)}y.subVectors(M,m).multiplyScalar(e.panSpeed),_(y.x,y.y),m.copy(M)}function Ee(s){const c=z(s),d=s.pageX-c.x,p=s.pageY-c.y,v=Math.sqrt(d*d+p*p);C.set(0,v),L.set(0,Math.pow(C.y/T.y,e.zoomSpeed)),oe(L.y),T.copy(C);const O=(s.pageX+c.x)*.5,P=(s.pageY+c.y)*.5;ne(O,P)}function lt(s){e.enableZoom&&Ee(s),e.enablePan&&ve(s)}function ct(s){e.enableZoom&&Ee(s),e.enableRotate&&Te(s)}function Ce(s){e.enabled!==!1&&(E.length===0&&(e.domElement.setPointerCapture(s.pointerId),e.domElement.addEventListener("pointermove",re),e.domElement.addEventListener("pointerup",N)),gt(s),s.pointerType==="touch"?ft(s):ut(s))}function re(s){e.enabled!==!1&&(s.pointerType==="touch"?pt(s):ht(s))}function N(s){bt(s),E.length===0&&(e.domElement.releasePointerCapture(s.pointerId),e.domElement.removeEventListener("pointermove",re),e.domElement.removeEventListener("pointerup",N)),e.dispatchEvent(He),n=i.NONE}function ut(s){let c;switch(s.button){case 0:c=e.mouseButtons.LEFT;break;case 1:c=e.mouseButtons.MIDDLE;break;case 2:c=e.mouseButtons.RIGHT;break;default:c=-1}switch(c){case B.DOLLY:if(e.enableZoom===!1)return;et(s),n=i.DOLLY;break;case B.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(e.enablePan===!1)return;we(s),n=i.PAN}else{if(e.enableRotate===!1)return;ye(s),n=i.ROTATE}break;case B.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(e.enableRotate===!1)return;ye(s),n=i.ROTATE}else{if(e.enablePan===!1)return;we(s),n=i.PAN}break;default:n=i.NONE}n!==i.NONE&&e.dispatchEvent(ue)}function ht(s){switch(n){case i.ROTATE:if(e.enableRotate===!1)return;tt(s);break;case i.DOLLY:if(e.enableZoom===!1)return;st(s);break;case i.PAN:if(e.enablePan===!1)return;it(s);break}}function Pe(s){e.enabled===!1||e.enableZoom===!1||n!==i.NONE||(s.preventDefault(),e.dispatchEvent(ue),ot(dt(s)),e.dispatchEvent(He))}function dt(s){const c=s.deltaMode,d={clientX:s.clientX,clientY:s.clientY,deltaY:s.deltaY};switch(c){case 1:d.deltaY*=16;break;case 2:d.deltaY*=100;break}return s.ctrlKey&&!ie&&(d.deltaY*=10),d}function mt(s){s.key==="Control"&&(ie=!0,document.addEventListener("keyup",Le,{passive:!0,capture:!0}))}function Le(s){s.key==="Control"&&(ie=!1,document.removeEventListener("keyup",Le,{passive:!0,capture:!0}))}function le(s){e.enabled===!1||e.enablePan===!1||nt(s)}function ft(s){switch(Re(s),E.length){case 1:switch(e.touches.ONE){case I.ROTATE:if(e.enableRotate===!1)return;xe(s),n=i.TOUCH_ROTATE;break;case I.PAN:if(e.enablePan===!1)return;Me(s),n=i.TOUCH_PAN;break;default:n=i.NONE}break;case 2:switch(e.touches.TWO){case I.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;at(s),n=i.TOUCH_DOLLY_PAN;break;case I.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;rt(s),n=i.TOUCH_DOLLY_ROTATE;break;default:n=i.NONE}break;default:n=i.NONE}n!==i.NONE&&e.dispatchEvent(ue)}function pt(s){switch(Re(s),n){case i.TOUCH_ROTATE:if(e.enableRotate===!1)return;Te(s),e.update();break;case i.TOUCH_PAN:if(e.enablePan===!1)return;ve(s),e.update();break;case i.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;lt(s),e.update();break;case i.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;ct(s),e.update();break;default:n=i.NONE}}function De(s){e.enabled!==!1&&s.preventDefault()}function gt(s){E.push(s.pointerId)}function bt(s){delete V[s.pointerId];for(let c=0;c<E.length;c++)if(E[c]==s.pointerId){E.splice(c,1);return}}function Re(s){let c=V[s.pointerId];c===void 0&&(c=new g,V[s.pointerId]=c),c.set(s.pageX,s.pageY)}function z(s){const c=s.pointerId===E[0]?E[1]:E[0];return V[c]}e.domElement.addEventListener("contextmenu",De),e.domElement.addEventListener("pointerdown",Ce),e.domElement.addEventListener("pointercancel",N),e.domElement.addEventListener("wheel",Pe,{passive:!1}),document.addEventListener("keydown",mt,{passive:!0,capture:!0}),this.update()}}class ts{constructor(t,o,e){if(!t)throw new Error("Camera is required for CameraController");if(!o)throw new Error("DOM element is required for CameraController");if(!e)throw new Error("Scene is required for CameraController");this.camera=t,this.domElement=o,this.scene=e,this.controls=this.setupOrbitControls(),this.initialPosition=t.position.clone(),this.initialTarget=new f(0,0,0)}setupOrbitControls(){const t=new es(this.camera,this.domElement);return t.enableDamping=!0,t.dampingFactor=.05,t.minDistance=.1,t.maxDistance=5e3,t.enablePan=!0,t.enableRotate=!0,t.enableZoom=!0,t.rotateSpeed=1,t.zoomSpeed=1,t.panSpeed=1,t.screenSpacePanning=!0,t.target.set(0,0,0),t}update(){this.controls.update()}reset(){this.camera.position.copy(this.initialPosition),this.controls.target.copy(this.initialTarget),this.controls.update()}setMinDistance(t){t>0&&(this.controls.minDistance=t)}setMaxDistance(t){t>0&&(this.controls.maxDistance=t)}getCameraPosition(){return this.camera.position.clone()}getTarget(){return this.controls.target.clone()}setEnabled(t){this.controls.enabled=t}isEnabled(){return this.controls.enabled}dispose(){this.controls.dispose()}}class ss{constructor(t){if(!t)throw new Error("TextureLoader is required for CelestialBodyFactory");this.textureLoader=t,this.loadedTextures=new Map}async createPlanet(t){if(!t)throw new Error("Body data is required to create a planet");const o=Zt(t.diameter)/2,e=new de(o,64,64);let i;try{i=await this.loadTexture(t.texture,t.name)}catch(r){console.warn(`Failed to load texture for ${t.name}: ${r.message}`),i=null}const n=this.createMaterial(t,i),a=new te(e,n);return a.castShadow=!t.emissive,a.receiveShadow=!0,a.userData={bodyData:t,type:"planet",name:t.name},a}async loadTexture(t,o){return this.loadedTextures.has(t)?this.loadedTextures.get(t):new Promise((e,i)=>{const n=setTimeout(()=>{i(new Error(`Texture loading timeout for ${t}`))},5e3);this.textureLoader.load(t,a=>{clearTimeout(n),this.loadedTextures.set(t,a),console.log(`✓ Loaded texture: ${t}`),e(a)},void 0,a=>{clearTimeout(n),console.warn(`✗ Failed to load texture: ${t}`),i(new Error(`Failed to load texture from ${t}: ${a.message||"Unknown error"}`))})})}createMaterial(t,o){const e=this.getFallbackColor(t),i={map:o||null,metalness:0,roughness:1};return o?t.emissive&&(i.emissiveMap=o,i.emissive=16777215,i.emissiveIntensity=t.emissiveIntensity||1):(i.color=e,i.emissive=e,i.emissiveIntensity=t.emissive?1:.2),new Be(i)}getFallbackColor(t){const o=t.name.toLowerCase();return t.emissive?16776960:o.includes("mercury")?9205843:o.includes("venus")?16762441:o.includes("earth")?7050198:o.includes("mars")?12665870:o.includes("jupiter")?14207645:o.includes("saturn")?16438693:o.includes("uranus")?5230823:o.includes("neptune")?4286197:o.includes("pluto")?8947848:o.includes("moon")?11184810:8947848}createSaturnRings(t){const o=t*1.2,e=t*2,i=new _t(o,e,64),n=i.attributes.position,a=new f;for(let u=0;u<n.count;u++)a.fromBufferAttribute(n,u),i.attributes.uv.setXY(u,a.length()<(o+e)/2?0:1,1);const r=new me({color:13413e3,side:zt,transparent:!0,opacity:.8});this.textureLoader.load("/textures/saturn_rings.png",u=>{r.map=u,r.needsUpdate=!0},void 0,u=>{console.warn("Saturn rings texture not found, using fallback color")});const l=new te(i,r);return l.rotation.x=Math.PI/2,l.castShadow=!1,l.receiveShadow=!0,l}createAsteroidBelt(t=Gt){const o=new de(.01,8,8),e=new Be({color:8947848,roughness:1,metalness:0}),i=new Bt(o,e,t.count),n=140,a=150,r=new Ve;for(let l=0;l<t.count;l++){const u=Math.random()*Math.PI*2,w=n+Math.random()*(a-n),x=(Math.random()-.5)*2;r.position.set(Math.cos(u)*w,x,Math.sin(u)*w),r.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI);const S=.5+Math.random();r.scale.set(S,S,S),r.updateMatrix(),i.setMatrixAt(l,r.matrix)}return i.instanceMatrix.needsUpdate=!0,i.castShadow=!0,i.receiveShadow=!0,i.userData={type:"asteroid-belt",count:t.count},i}clearTextureCache(){this.loadedTextures.clear()}getCachedTextureCount(){return this.loadedTextures.size}createOrbitLine(t,o=8947848){const i=new Ye,n=new Float32Array(129*3);for(let l=0;l<=128;l++){const u=l/128*Math.PI*2;n[l*3]=Math.cos(u)*t,n[l*3+1]=0,n[l*3+2]=Math.sin(u)*t}i.setAttribute("position",new Xe(n,3));const a=new It({color:o,transparent:!0,opacity:.6,linewidth:2}),r=new kt(i,a);return r.userData={type:"orbit-line"},r}}class is{constructor(){this.canvas=document.getElementById("solar-system-canvas"),this.isInitialized=!1,this.clock=new We,this.followingPlanet=null,this.cameraOffset=new f(0,.5,0)}async init(){try{this.showLoading(),this.sceneManager=new Qt(this.canvas),this.physicsEngine=new $t,this.cameraController=new ts(this.sceneManager.getCamera(),this.canvas,this.sceneManager.getScene()),this.bodyFactory=new ss(new Qe),await this.createCelestialBodies(),this.updatePlanetSizes("equal"),this.setupKeyboardShortcuts(),this.setupUI(),this.isInitialized=!0,this.hideLoading(),this.animate(),console.log(`
109
+ === KEYBOARD SHORTCUTS ===`),console.log("1 = Mercury, 2 = Venus, 3 = Earth, 4 = Mars"),console.log("5 = Jupiter, 6 = Saturn, 7 = Uranus, 8 = Neptune"),console.log("0 = Reset camera to see all planets"),console.log("Mouse: Drag to rotate, Scroll to zoom, Right-drag to pan")}catch(t){console.error("Failed to initialize:",t),this.showError(t.message)}}setupKeyboardShortcuts(){const t={1:"mercury",2:"venus",3:"earth",4:"mars",5:"jupiter",6:"saturn",7:"uranus",8:"neptune",9:"pluto",0:"reset"};window.addEventListener("keydown",o=>{const e=t[o.key];if(!e)return;if(e==="reset"){this.followingPlanet=null,this.sceneManager.getCamera().position.set(5,3,5),this.cameraController.controls.target.set(0,0,0),console.log("Camera reset to overview");return}const i=this.physicsEngine.getBody(e);if(i){const n=i.mesh,a=this.sceneManager.getCamera();this.followingPlanet=i;const r=new f(0,0,0).sub(n.position).normalize(),l=Math.max(n.geometry.parameters.radius*10,1),u=r.clone().multiplyScalar(-l);u.y+=l*.3,a.position.copy(n.position).add(u),this.cameraController.controls.target.set(0,0,0),console.log(`Following ${i.data.name}, looking at Sun. Press 0 to stop following.`)}})}setupUI(){document.getElementById("speed-slider").addEventListener("input",e=>{this.physicsEngine.setTimeScale(parseFloat(e.target.value))}),document.getElementById("view-select").addEventListener("change",e=>{const i=e.target.value;if(i==="sun")this.followingPlanet=null,this.sceneManager.getCamera().position.set(5,3,5),this.cameraController.controls.target.set(0,0,0),console.log("View: Sun (Center)");else{const n=this.physicsEngine.getBody(i);if(n){const a=n.mesh,r=this.sceneManager.getCamera();this.followingPlanet=n;const l=new f(0,0,0).sub(a.position).normalize(),u=Math.max(a.geometry.parameters.radius*10,1),w=l.clone().multiplyScalar(-u);w.y+=u*.3,r.position.copy(a.position).add(w),this.cameraController.controls.target.set(0,0,0),console.log(`View: Following ${n.data.name}, looking at Sun`)}}});const t=document.getElementById("pause-button");t.addEventListener("click",()=>{this.physicsEngine.isPausedState()?(this.physicsEngine.resume(),t.textContent="Pause"):(this.physicsEngine.pause(),t.textContent="Resume")}),document.getElementById("reset-button").addEventListener("click",()=>{this.followingPlanet=null,document.getElementById("view-select").value="sun",this.physicsEngine.getDistanceMode()==="realistic"?this.sceneManager.getCamera().position.set(50,30,50):this.sceneManager.getCamera().position.set(250,150,250),this.cameraController.controls.target.set(0,0,0)});const o=document.getElementById("distance-toggle");o.addEventListener("click",()=>{const i=this.physicsEngine.getDistanceMode()==="equal"?"realistic":"equal";if(this.physicsEngine.setDistanceMode(i),o.textContent=i==="equal"?"Realistic Distances":"Equal Spacing",this.updateOrbitLines(i),this.updatePlanetSizes(i),!this.followingPlanet){const n=this.sceneManager.getCamera();i==="realistic"?n.position.set(50,30,50):n.position.set(250,150,250),this.cameraController.controls.target.set(0,0,0)}i==="realistic"?(this.sceneManager.starfield.visible=!0,console.log("Switched to: Realistic Astronomical Distances (skybox visible)")):(this.sceneManager.starfield.visible=!0,console.log("Switched to: Equal Spacing (equal sizes, skybox visible)"))}),window.addEventListener("resize",()=>{this.sceneManager.onWindowResize()})}async createCelestialBodies(){console.log("Creating celestial bodies..."),this.orbitLines=[],this.originalScales=new Map;for(const[o,e]of Object.entries(G)){console.log(`Creating ${e.name}...`);try{const i=await this.bodyFactory.createPlanet(e);if(this.originalScales.set(o,{x:i.scale.x,y:i.scale.y,z:i.scale.z}),o==="saturn"){const r=this.bodyFactory.createSaturnRings(i.geometry.parameters.radius);i.add(r)}this.sceneManager.addToScene(i),this.physicsEngine.registerBody(o,i,e);const n=this.sceneManager.createLabel(e.name),a=i.geometry.parameters.radius;if(n.position.set(0,a*1.5,0),i.add(n),e.distance>0&&o!=="moon"){const r=e.name.toLowerCase(),l=this.physicsEngine.getDistanceMode()==="equal"?this.getEqualSpacedDistance(r):this.getScaledDistance(e.distance),u=this.bodyFactory.createOrbitLine(l);u.userData.planetKey=o,this.sceneManager.addToScene(u),this.orbitLines.push(u)}console.log(`✓ ${e.name} created successfully`)}catch(i){throw console.error(`✗ Failed to create ${e.name}:`,i),i}}console.log("Creating asteroid belt...");const t=this.bodyFactory.createAsteroidBelt();this.sceneManager.addToScene(t),console.log("✓ All celestial bodies created!")}getEqualSpacedDistance(t){return{sun:0,mercury:110,venus:120,earth:130,moon:132,mars:140,jupiter:150,saturn:160,uranus:170,neptune:180,pluto:190}[t]||0}getScaledDistance(t){return $e(t)}updateOrbitLines(t){this.orbitLines.forEach(o=>{const e=o.userData.planetKey,i=G[e];if(!i)return;const n=i.name.toLowerCase(),a=t==="equal"?this.getEqualSpacedDistance(n):this.getScaledDistance(i.distance),r=128,l=new Float32Array((r+1)*3);for(let u=0;u<=r;u++){const w=u/r*Math.PI*2;l[u*3]=Math.cos(w)*a,l[u*3+1]=0,l[u*3+2]=Math.sin(w)*a}o.geometry.setAttribute("position",new Xe(l,3)),o.geometry.attributes.position.needsUpdate=!0})}updatePlanetSizes(t){const o=this.originalScales.get("jupiter");for(const[e,i]of Object.entries(G)){const n=this.physicsEngine.getBody(e);if(!n)continue;const a=n.mesh;if(t==="equal")o?a.scale.set(o.x,o.y,o.z):a.scale.set(3,3,3);else{const r=this.originalScales.get(e);r&&a.scale.set(r.x*.01,r.y*.01,r.z*.01)}}}animate(){if(requestAnimationFrame(()=>this.animate()),!this.isInitialized)return;const t=this.clock.getDelta();if(this.physicsEngine.update(t),this.followingPlanet){const o=this.followingPlanet.mesh,e=this.sceneManager.getCamera();o.visible=!1;const i=new f(0,0,0).sub(o.position).normalize(),n=Math.max(o.geometry.parameters.radius*10,1),a=i.clone().multiplyScalar(-n);a.y+=n*.3,e.position.copy(o.position).add(a),this.cameraController.controls.target.set(0,0,0)}else for(const[o,e]of Object.entries(G)){const i=this.physicsEngine.getBody(o);i&&i.mesh&&(i.mesh.visible=!0)}this.cameraController.update(),this.sceneManager.render()}showLoading(){const t=document.getElementById("loading-screen");t&&(t.style.display="flex")}hideLoading(){const t=document.getElementById("loading-screen");t&&(t.style.display="none")}showError(t){const o=document.getElementById("error-screen");if(o){o.style.display="flex";const e=document.getElementById("error-message");e&&(e.textContent=t)}}}const os=new is;os.init();
assets/index-tn0RQdqM.css ADDED
File without changes
assets/three-CiEkAr4i.js ADDED
The diff for this file is too large to render. See raw diff
 
index.html ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="description" content="3D Interactive Solar System Visualization">
7
+ <title>Solar System 3D</title>
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ body {
16
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
17
+ overflow: hidden;
18
+ background: #000;
19
+ color: #fff;
20
+ }
21
+
22
+ #solar-system-canvas {
23
+ display: block;
24
+ width: 100vw;
25
+ height: 100vh;
26
+ }
27
+
28
+ /* Loading Screen */
29
+ #loading-screen {
30
+ position: fixed;
31
+ top: 0;
32
+ left: 0;
33
+ width: 100%;
34
+ height: 100%;
35
+ background: rgba(0, 0, 0, 0.9);
36
+ display: flex;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ align-items: center;
40
+ z-index: 1000;
41
+ }
42
+
43
+ #loading-screen h2 {
44
+ margin-bottom: 20px;
45
+ font-size: 24px;
46
+ }
47
+
48
+ .spinner {
49
+ border: 4px solid rgba(255, 255, 255, 0.1);
50
+ border-top: 4px solid #fff;
51
+ border-radius: 50%;
52
+ width: 50px;
53
+ height: 50px;
54
+ animation: spin 1s linear infinite;
55
+ }
56
+
57
+ @keyframes spin {
58
+ 0% { transform: rotate(0deg); }
59
+ 100% { transform: rotate(360deg); }
60
+ }
61
+
62
+ /* Error Screen */
63
+ #error-screen {
64
+ position: fixed;
65
+ top: 0;
66
+ left: 0;
67
+ width: 100%;
68
+ height: 100%;
69
+ background: rgba(0, 0, 0, 0.95);
70
+ display: none;
71
+ flex-direction: column;
72
+ justify-content: center;
73
+ align-items: center;
74
+ z-index: 1001;
75
+ padding: 20px;
76
+ }
77
+
78
+ #error-screen h2 {
79
+ color: #ff4444;
80
+ margin-bottom: 20px;
81
+ }
82
+
83
+ #error-message {
84
+ max-width: 600px;
85
+ text-align: center;
86
+ line-height: 1.6;
87
+ }
88
+
89
+ /* Control Panel */
90
+ #control-panel {
91
+ position: fixed;
92
+ top: 20px;
93
+ right: 20px;
94
+ background: rgba(0, 0, 0, 0.7);
95
+ padding: 20px;
96
+ border-radius: 8px;
97
+ backdrop-filter: blur(10px);
98
+ z-index: 100;
99
+ }
100
+
101
+ #control-panel h3 {
102
+ margin-bottom: 15px;
103
+ font-size: 18px;
104
+ }
105
+
106
+ .control-group {
107
+ margin-bottom: 15px;
108
+ }
109
+
110
+ .control-group label {
111
+ display: block;
112
+ margin-bottom: 5px;
113
+ font-size: 14px;
114
+ }
115
+
116
+ .control-group input[type="range"] {
117
+ width: 100%;
118
+ }
119
+
120
+ .control-group select {
121
+ width: 100%;
122
+ padding: 8px;
123
+ background: rgba(255, 255, 255, 0.1);
124
+ border: 1px solid rgba(255, 255, 255, 0.3);
125
+ color: #fff;
126
+ border-radius: 4px;
127
+ cursor: pointer;
128
+ font-size: 14px;
129
+ }
130
+
131
+ .control-group select option {
132
+ background: #000;
133
+ color: #fff;
134
+ }
135
+
136
+ .control-group button {
137
+ width: 100%;
138
+ padding: 8px;
139
+ margin-top: 5px;
140
+ background: rgba(255, 255, 255, 0.1);
141
+ border: 1px solid rgba(255, 255, 255, 0.3);
142
+ color: #fff;
143
+ border-radius: 4px;
144
+ cursor: pointer;
145
+ font-size: 14px;
146
+ transition: background 0.3s;
147
+ }
148
+
149
+ .control-group button:hover {
150
+ background: rgba(255, 255, 255, 0.2);
151
+ }
152
+
153
+ /* Planet Info Panel */
154
+ #planet-info {
155
+ position: fixed;
156
+ bottom: 20px;
157
+ left: 20px;
158
+ background: rgba(0, 0, 0, 0.7);
159
+ padding: 20px;
160
+ border-radius: 8px;
161
+ backdrop-filter: blur(10px);
162
+ z-index: 100;
163
+ display: none;
164
+ max-width: 400px;
165
+ }
166
+
167
+ #planet-info h3 {
168
+ margin-bottom: 10px;
169
+ font-size: 20px;
170
+ color: #4a9eff;
171
+ }
172
+
173
+ #planet-info .info-item {
174
+ margin-bottom: 8px;
175
+ font-size: 14px;
176
+ }
177
+
178
+ #planet-info .info-label {
179
+ font-weight: bold;
180
+ color: #aaa;
181
+ }
182
+
183
+ #planet-info .close-button {
184
+ position: absolute;
185
+ top: 10px;
186
+ right: 10px;
187
+ background: none;
188
+ border: none;
189
+ color: #fff;
190
+ font-size: 20px;
191
+ cursor: pointer;
192
+ padding: 5px 10px;
193
+ }
194
+
195
+ /* Responsive Design */
196
+ @media (max-width: 768px) {
197
+ #control-panel {
198
+ top: 10px;
199
+ right: 10px;
200
+ padding: 15px;
201
+ font-size: 12px;
202
+ }
203
+
204
+ #planet-info {
205
+ bottom: 10px;
206
+ left: 10px;
207
+ right: 10px;
208
+ max-width: none;
209
+ }
210
+ }
211
+ </style>
212
+ <script type="module" crossorigin src="./assets/index-BZEMTs19.js"></script>
213
+ <link rel="modulepreload" crossorigin href="./assets/three-CiEkAr4i.js">
214
+ <link rel="stylesheet" crossorigin href="./assets/index-tn0RQdqM.css">
215
+ </head>
216
+ <body>
217
+ <!-- Canvas for three.js rendering -->
218
+ <canvas id="solar-system-canvas"></canvas>
219
+
220
+ <!-- Loading Screen -->
221
+ <div id="loading-screen">
222
+ <h2>Loading Solar System...</h2>
223
+ <div class="spinner"></div>
224
+ </div>
225
+
226
+ <!-- Error Screen -->
227
+ <div id="error-screen">
228
+ <h2>Error</h2>
229
+ <p id="error-message"></p>
230
+ </div>
231
+
232
+ <!-- Control Panel -->
233
+ <div id="control-panel">
234
+ <h3>Controls</h3>
235
+ <div class="control-group">
236
+ <label for="speed-slider">Simulation Speed</label>
237
+ <input type="range" id="speed-slider" min="1" max="100" step="1" value="10">
238
+ </div>
239
+ <div class="control-group">
240
+ <label for="view-select">Point of View</label>
241
+ <select id="view-select">
242
+ <option value="sun">Sun (Center)</option>
243
+ <option value="mercury">Mercury</option>
244
+ <option value="venus">Venus</option>
245
+ <option value="earth">Earth</option>
246
+ <option value="mars">Mars</option>
247
+ <option value="jupiter">Jupiter</option>
248
+ <option value="saturn">Saturn</option>
249
+ <option value="uranus">Uranus</option>
250
+ <option value="neptune">Neptune</option>
251
+ <option value="pluto">Pluto</option>
252
+ </select>
253
+ </div>
254
+ <div class="control-group">
255
+ <button id="pause-button">Pause</button>
256
+ <button id="reset-button">Reset Camera</button>
257
+ <button id="distance-toggle">Realistic Distances</button>
258
+ </div>
259
+ </div>
260
+
261
+ <!-- Planet Information Panel -->
262
+ <div id="planet-info">
263
+ <button class="close-button" id="close-info">&times;</button>
264
+ <h3 id="planet-name"></h3>
265
+ <div class="info-item">
266
+ <span class="info-label">Diameter:</span>
267
+ <span id="planet-diameter"></span>
268
+ </div>
269
+ <div class="info-item">
270
+ <span class="info-label">Distance from Sun:</span>
271
+ <span id="planet-distance"></span>
272
+ </div>
273
+ <div class="info-item">
274
+ <span class="info-label">Orbital Period:</span>
275
+ <span id="planet-orbital-period"></span>
276
+ </div>
277
+ <div class="info-item">
278
+ <span class="info-label">Rotation Period:</span>
279
+ <span id="planet-rotation-period"></span>
280
+ </div>
281
+ </div>
282
+
283
+ <!-- Main Application Script -->
284
+ </body>
285
+ </html>
main.png ADDED

Git LFS Details

  • SHA256: 4df95a57c89cbe5726c72575e4bcf2912c49e4bbb51db3288f0d75dfa4495de3
  • Pointer size: 132 Bytes
  • Size of remote file: 4.45 MB
textures/.gitkeep ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # Texture files will be placed in this directory
2
+ # Placeholder file to ensure directory is tracked by git
textures/earth.jpg ADDED

Git LFS Details

  • SHA256: 767ee1dc6eb3802699bfccf6f264880f8acd0b80de3191cd24984fe279b07b7c
  • Pointer size: 131 Bytes
  • Size of remote file: 463 kB
textures/jupiter.jpg ADDED

Git LFS Details

  • SHA256: b0f04d005350252636b0e3396fc592548cbd9e9126b269d32d5c6abd4b0e4f2b
  • Pointer size: 131 Bytes
  • Size of remote file: 499 kB
textures/mars.jpg ADDED

Git LFS Details

  • SHA256: 2d187f3e77a98eaa8cea5f4cc722f633c122ef170b9e94ace6b5fb6cbc3f8e01
  • Pointer size: 131 Bytes
  • Size of remote file: 751 kB
textures/mercury.jpg ADDED

Git LFS Details

  • SHA256: 5a5c80607f643496bac9a631e71957def35ed788895f18b678ac849c2b38e48a
  • Pointer size: 131 Bytes
  • Size of remote file: 873 kB
textures/milky_way.jpg ADDED

Git LFS Details

  • SHA256: ec2240e6f3784d962ab81609b228bfd470e87c86d1fed5e99134d4cd3de24239
  • Pointer size: 131 Bytes
  • Size of remote file: 251 kB
textures/moon.jpg ADDED

Git LFS Details

  • SHA256: 2764ba6535ea0481a062846ee033cc7a909dae05b31a8fd13f3e98f3a7fd92bd
  • Pointer size: 132 Bytes
  • Size of remote file: 1.05 MB
textures/neptune.jpg ADDED

Git LFS Details

  • SHA256: cb42ea82709741d28b0af44d8b283cbc6dbd0c521a7f0e1e1e010ade00977df6
  • Pointer size: 131 Bytes
  • Size of remote file: 242 kB
textures/pluto.jpg ADDED

Git LFS Details

  • SHA256: 796b654648df0b241ad2e03ce60677bd7fd854c98fd8ff8b5c5f9750c01be082
  • Pointer size: 132 Bytes
  • Size of remote file: 1.18 MB
textures/saturn.jpg ADDED

Git LFS Details

  • SHA256: 54a900ca9bf7ab62e70f862852759abdf342e6d6436a95a2fe9ebdb6bcd3bbac
  • Pointer size: 131 Bytes
  • Size of remote file: 200 kB
textures/saturn_rings.png ADDED
textures/sun.jpg ADDED

Git LFS Details

  • SHA256: ff0f076ba65e03b5ab518451bc96699325be38e3ccbdd5869ee1c00f3a0c8816
  • Pointer size: 131 Bytes
  • Size of remote file: 822 kB
textures/uranus.jpg ADDED
textures/venus.jpg ADDED

Git LFS Details

  • SHA256: 225012ad4911730605c4e189ca2a3bf674fce50cc48aab4102b936b47d6991ac
  • Pointer size: 131 Bytes
  • Size of remote file: 230 kB