summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-28 20:28:36 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-28 20:28:36 +0100
commit121cfd1b48254b54730ba323f0b60872f1c782d9 (patch)
tree11508bb76d3fee81afe94ac62e80b13674162540 /client
parentde877acdb34a5e07ce6b7b9d21b9ca720181594d (diff)
more
Diffstat (limited to 'client')
-rw-r--r--client/splash/constants.js8
-rw-r--r--client/splash/face/index.js10
-rw-r--r--client/splash/renderer.js8
3 files changed, 11 insertions, 15 deletions
diff --git a/client/splash/constants.js b/client/splash/constants.js
index 520da350..1d00d068 100644
--- a/client/splash/constants.js
+++ b/client/splash/constants.js
@@ -3,9 +3,9 @@
export const CAMERA_NEAR = 0.001
export const CAMERA_FAR = 1000
-export const CAMERA_X = 0
-export const CAMERA_Y = 0
-export const CAMERA_Z = 1.5
+export const CAMERA_X = 0.5
+export const CAMERA_Y = -0.5
+export const CAMERA_Z = 2.5
export const FOG_COLOR = 0x191919
@@ -21,7 +21,7 @@ export const CLOUD_COLORS = [
export const CLOUD_SCALE = 1
export const CLOUD_ROTATION_SPEED = 0.001
-export const CLOUD_MAX_COUNT = 80
+export const CLOUD_MAX_COUNT = 100
export const CLOUD_TEXT_MIN_SIZE = 0.01
export const CLOUD_TEXT_MAX_SIZE = 0.04
diff --git a/client/splash/face/index.js b/client/splash/face/index.js
index 5e7792d3..31ce8f3b 100644
--- a/client/splash/face/index.js
+++ b/client/splash/face/index.js
@@ -17,7 +17,7 @@ export function startAnimation() {
const face = faces[name]
mesh.remove()
mesh.load(name).then(meshes => {
- meshes.wireframe.position.z -= 0.01
+ meshes.wireframe.position.z -= 0.001
markers.swap(face)
.then({
from: { n: 0 },
@@ -31,19 +31,23 @@ export function startAnimation() {
.then({
from: { n: 0 },
to: { n: 1 },
+ delay: 500,
duration: 500,
easing: oktween.easing.quad_in,
update: (obj) => {
meshes.blank.material.opacity = 1 - obj.n
meshes.solid.material.opacity = obj.n
},
+ finished: () => {
+ mesh.removeMesh('blank')
+ }
})
.then({
from: { n: 0 },
to: { n: 1 },
delay: 500,
- duration: 500,
- easing: oktween.easing.quad_in_out,
+ duration: 1000,
+ easing: oktween.easing.quad_in,
update: (obj) => {
meshes.solid.material.opacity = 1 - obj.n
meshes.wireframe.material.opacity = obj.n
diff --git a/client/splash/renderer.js b/client/splash/renderer.js
index 5e973d77..14326f77 100644
--- a/client/splash/renderer.js
+++ b/client/splash/renderer.js
@@ -21,9 +21,6 @@ lights[0].position.set(3, 3, 3).normalize()
lights[1].position.set(-3, -3, -3).normalize()
lights.forEach(light => scene.add(light))
-var ambient = new THREE.AmbientLight( 0x555555 );
-scene.add(ambient);
-
export function init() {
const container = document.querySelector('#three_container')
container.appendChild(renderer.domElement)
@@ -37,8 +34,3 @@ export function init() {
export function render() {
renderer.render(scene, camera)
}
-
-
-window.scene = scene
-window.THREE = THREE
-