renderer.setClearColor(0x000000, 0); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); /* EARTH */ const loader = new THREE.TextureLoader(); const earthTexture = loader.load("earth.jpg"); const geometry = new THREE.SphereGeometry(1, 64, 64); const material = new THREE.ShaderMaterial({ uniforms: { dayMap: { value: earthTexture }, lightDirection: { value: new THREE.Vector3(1,0,1).normalize() } }, vertexShader: ` varying vec2 vUv; varying vec3 vNormal; varying vec3 vWorldPosition; void main(){ vUv = uv; vNormal = normalize(normalMatrix * normal); vec4 worldPos = modelMatrix * vec4(position, 1.0); vWorldPosition = worldPos.xyz; gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); } `, fragmentShader: ` uniform sampler2D dayMap; uniform vec3 lightDirection; varying vec2 vUv; varying vec3 vNormal; varying vec3 vWorldPosition; void main(){ vec3 color = texture2D(dayMap, vUv).rgb; vec3 n = normalize(vNormal); float light = dot(n, normalize(lightDirection)); float diffuse = smoothstep(0.05, 0.55, light); vec3 finalColor = color * (0.10 + diffuse); vec3 viewDir = normalize(cameraPosition - vWorldPosition); float rim = pow(1.0 - max(dot(viewDir, n), 0.0), 2.5); float daySoft = smoothstep(-0.2, 0.3, light); finalColor += vec3(0.35, 0.65, 1.0) * (rim * daySoft * 0.65); gl_FragColor = vec4(clamp(finalColor, 0.0, 1.0), 1.0); } ` }); const earth = new THREE.Mesh(geometry, material); scene.add(earth); const earth = new THREE.Mesh(geometry, material); scene.add(earth); /* STARS */ const size = 64; const canvas = document.createElement("canvas"); canvas.width = size; canvas.height = size; const ctx = canvas.getContext("2d"); const gradient = ctx.createRadialGradient(size/2,size/2,0,size/2,size/2,size/2); gradient.addColorStop(0.0,"rgba(255,255,255,1)"); gradient.addColorStop(0.08,"rgba(255,255,255,1)"); gradient.addColorStop(0.2,"rgba(255,255,255,0.6)"); gradient.addColorStop(0.4,"rgba(255,255,255,0.2)"); gradient.addColorStop(1.0,"rgba(255,255,255,0)"); ctx.fillStyle=gradient; ctx.beginPath(); ctx.arc(size/2,size/2,size/2,0,Math.PI*2); ctx.fill(); const alphaMap = new THREE.CanvasTexture(canvas); const starCount = 5100; const starGeometry = new THREE.BufferGeometry(); const starPositions = new Float32Array(starCount*3); const starSpeeds = new Float32Array(starCount); for(let i=0;i{ shader.vertexShader = shader.vertexShader.replace( '#include ', ` #include float dist = -mvPosition.z; float nearFactor = smoothstep(0.0, 120.0, dist); float sizeFactor = mix(0.08, 1.0, nearFactor); gl_PointSize *= sizeFactor; if(dist < 25.0){ gl_PointSize = min(gl_PointSize, 0.9); } ` ); }; } applyNearControl(coreMaterial); applyNearControl(glowMaterial); scene.add(new THREE.Points(starGeometry, coreMaterial)); scene.add(new THREE.Points(starGeometry, glowMaterial)); let time=0; function animate(){ requestAnimationFrame(animate); time+=0.002; earth.rotation.y+=0.001; earth.position.x = 0.08 + Math.sin(time * 0.6) * 0.06; earth.position.y = -0.75 + Math.sin(time * 0.4) * 0.04; const zWave = Math.sin(time * 0.5); const zClamped = zWave > 0 ? zWave * 0.65 : zWave; camera.position.z = 5.8 + zClamped * 0.9; const p=starGeometry.attributes.position.array; for(let i=0;i5) p[i+2]=-2000; } starGeometry.attributes.position.needsUpdate=true; renderer.render(scene,camera); } animate();
TerraLens
A decentralized Earth intelligence layer.
Visualizing planetary data, ecosystems, and wildlife in real time.
Enter TerraLens
Data Layer
Decentralized planetary data streams
DAO
Community-driven governance system
Marketplace
Tokenized datasets & digital assets
Earth Intelligence
Real-time ecosystem insights

Understanding TerraLens

TerraLens connects decentralized data, ecosystems, and governance into a unified Earth intelligence layer.

Data Layer

Decentralized planetary data streams forming the foundation.

DAO Governance

Community-driven coordination and decision making.

Marketplace

Tokenized datasets and digital environmental assets.