-
Notifications
You must be signed in to change notification settings - Fork 1
/
earth.php
38 lines (33 loc) · 1.19 KB
/
earth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$title = "Earth | SolarSim";
$desc = "Earth is our planet! SolarSim is a free, 3D solar system simulator for younger learners to explore and learn from.";
include ("header.php");
?>
<div class="info-container">
<h1>Earth</h1>
<p>The Earth is the third planet in our solar system and the only known planet to support life! Its surface is 70% water, with
the rest made up of rocky or soil-based materials.</p>
<button id="zoom">Zoom</button>
</div>
<script id="vertexShader" type="x-shader/x-vertex">
uniform vec3 viewVector;
uniform float c;
uniform float p;
varying float intensity;
void main(){
vec3 vNormal = normalize( normalMatrix * normal );
vec3 vNormel = normalize( normalMatrix * viewVector );
intensity = pow( c - dot(vNormal, vNormel), p );
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>
<script id="fragmentShader" type="x-shader/x-fragment">
uniform vec3 glowColor;
varying float intensity;
void main(){
vec3 glow = glowColor * intensity;
gl_FragColor = vec4( glow, 1.0 );
}
</script>
<script src="js/earth.js"></script>
<?php require ("footer.php"); ?>