game.view.materials['cloud' + i].uniforms.texture1.value = game.assets.textures['cloud' + i + 'a'];
game.view.materials['cloud' + i].uniforms.texture2.value = game.assets.textures['cloud' + i + 'b'];
game.view.materials['cloud' + i].uniforms.texture3.value = game.assets.textures['cloud' + i + 'c'];
- game.view.materials['cloud' + i].uniforms.lerp.value = 0.0;
+ if(game.ui.reachedEnd) {
+ game.view.materials['cloud' + i].uniforms.lerp.value = 2.0;
+ } else {
+ game.view.materials['cloud' + i].uniforms.lerp.value = 0.0;
+ }
game.view.materials['cloud' + i].transparent = true;
} else {
for(let variant of ['a', 'b', 'c']) {
game.objects.clouds = new THREE.Group();
let textureVariantSuffix = '';
if(game.settings['graphics'] > 2) {
- textureVariantSuffix = 'a';
+ if(game.ui.reachedEnd) {
+ textureVariantSuffix = 'c';
+ } else {
+ textureVariantSuffix = 'a';
+ }
}
if(game.settings['graphics'] <= 2) {
let numClouds = 300;
for(let step of axis) {
let shape = 1 + Math.floor(Math.random() * 5);
let cloud = new THREE.Mesh(cloudGeometry, game.view.materials['cloud' + shape + textureVariantSuffix]);
- cloud.position.x = cameraX + step * maxCameraDistance * Math.sin(angle);
+ cloud.position.x = cameraX + step * 1.2 * maxCameraDistance * Math.sin(angle);
cloud.position.y = cameraY + step * maxCameraDistance * Math.cos(angle);
cloud.position.z = z;
let scale = 15 + 0.5 * Math.abs(cloud.position.z);