From de877acdb34a5e07ce6b7b9d21b9ca720181594d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 28 Jan 2019 20:24:42 +0100 Subject: transitions --- client/splash/renderer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/splash/renderer.js') diff --git a/client/splash/renderer.js b/client/splash/renderer.js index ad111f1a..5e973d77 100644 --- a/client/splash/renderer.js +++ b/client/splash/renderer.js @@ -17,10 +17,13 @@ let lights = [ new THREE.DirectionalLight(0xefefff, 1.5), new THREE.DirectionalLight(0xefefff, 1.5), ] -lights[0].position.set(1, 1, 1).normalize() -lights[1].position.set(-1, -1, -1).normalize() +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) -- cgit v1.2.3-70-g09d2 From 121cfd1b48254b54730ba323f0b60872f1c782d9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 28 Jan 2019 20:28:36 +0100 Subject: more --- client/splash/constants.js | 8 ++++---- client/splash/face/index.js | 10 +++++++--- client/splash/renderer.js | 8 -------- 3 files changed, 11 insertions(+), 15 deletions(-) (limited to 'client/splash/renderer.js') 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 - -- cgit v1.2.3-70-g09d2