aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-01-19 17:18:33 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2016-01-19 17:18:33 +0100
commitb8754fc9a249e714b03855278b6c1048e2caef9d (patch)
tree4c922c7cae3e1a14f8de883e7ef234e694481676
parent8a9f384ffa22c266d17c2926e0d597d229098762 (diff)
add favicon, remove stats
-rw-r--r--favicon.icobin0 -> 24663 bytes
-rw-r--r--index.html1
-rw-r--r--main.js14
-rw-r--r--package.json3
4 files changed, 4 insertions, 14 deletions
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..3a0b4e7
--- /dev/null
+++ b/favicon.ico
Binary files differ
diff --git a/index.html b/index.html
index 7e3c23f..7e68239 100644
--- a/index.html
+++ b/index.html
@@ -8,6 +8,7 @@
<script type="text/javascript">if(window.location.protocol=="http:"&&window.location.host=="sunsistemo.js.org")window.location.protocol="https";</script>
<title>Sunsistemo - N-body simulator</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
+ <link href="favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
<div id="gui"></div>
diff --git a/main.js b/main.js
index 197e856..83875f8 100644
--- a/main.js
+++ b/main.js
@@ -1,10 +1,9 @@
let THREE = require("three.js");
let OrbitControls = require("three-orbit-controls")(THREE);
let d3 = require("d3");
-let Stats = require("stats.js");
let scene, camera, light, renderer;
-let controls, stats;
+let controls;
let requestId = undefined;
import Body from "./systems.js";
@@ -13,7 +12,7 @@ import * as calc from "./calc.js";
let bodyTexture = true;
let numBodies = 1;
-let sphereP = 12;
+let sphereP = 16;
let sunOn;
let timer;
@@ -244,7 +243,6 @@ function clearSimulation() {
while (simDiv.firstChild) simDiv.removeChild(simDiv.firstChild);
let timeDiv = document.getElementById("time");
while (timeDiv.firstChild) timeDiv.removeChild(timeDiv.firstChild);
- let statDiv = d3.select("#stats").remove();
cancelAnimationFrame(requestId);
requestId = undefined;
window.removeEventListener("resize", onWindowResize);
@@ -342,13 +340,6 @@ function init() {
renderer.setSize(window.innerWidth, window.innerHeight);
document.getElementById("sim").appendChild(renderer.domElement);
- // stats
- stats = new Stats();
- stats.domElement.style.position = 'absolute';
- stats.domElement.style.right = '0px';
- stats.domElement.style.top = '0px';
- document.body.appendChild(stats.domElement);
-
return [spheres];
}
@@ -398,7 +389,6 @@ function animate() {
render();
controls.update();
- stats.update();
}
diff --git a/package.json b/package.json
index 64401dc..fceec40 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,6 @@
"dependencies": {
"three.js": "^0.73.0",
"d3": "^3.5.6",
- "three-orbit-controls": "^72.0.0",
- "stats.js": "0.0.14-master"
+ "three-orbit-controls": "^72.0.0"
}
}