mirror of
https://github.com/storytold/spark.git
synced 2026-10-20 08:04:33 +00:00
using new robot head splat (#9)
This commit is contained in:
@@ -49,6 +49,7 @@
|
|||||||
for (let i = 0; i < NUM_ROBOTS; i++) {
|
for (let i = 0; i < NUM_ROBOTS; i++) {
|
||||||
const robot = new SplatMesh({ url: splatURL });
|
const robot = new SplatMesh({ url: splatURL });
|
||||||
robot.rotation.x = Math.PI;
|
robot.rotation.x = Math.PI;
|
||||||
|
robot.scale.setScalar(0.2);
|
||||||
robot.position.set(0, 0, i);
|
robot.position.set(0, 0, i);
|
||||||
robot.speed = 600 + i * 10;
|
robot.speed = 600 + i * 10;
|
||||||
robot.angle = 0;
|
robot.angle = 0;
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
const robot = hits[index].object;
|
const robot = hits[index].object;
|
||||||
if (!robot.clickedTimer) {
|
if (!robot.clickedTimer) {
|
||||||
// Tint object and start countdown timer to remove tint
|
// Tint object and start countdown timer to remove tint
|
||||||
robot.recolor.set(1, 0.6, 0.6);
|
robot.recolor.set(1, 0.5, 0.5);
|
||||||
robot.clickedTimer = 40;
|
robot.clickedTimer = 40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user