Skip to content

Commit cfa0d22

Browse files
committed
minor fix
1 parent 5605ab1 commit cfa0d22

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

js/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function loop() {
170170
let object = {
171171
position: bricks.items[i].position,
172172
scale: bricks.items[i].scale,
173-
color: bricks.items[i].color
173+
hue: bricks.items[i].color.h
174174
};
175175
message.property.push(object);
176176
}
@@ -359,7 +359,7 @@ function onTouchEvent(event) {
359359
}
360360
else if(command == GAMEOVER)
361361
{
362-
command = PLAYAGAIN;
362+
// command = PLAYAGAIN;
363363
}
364364

365365
}

js/brick.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Brick {
8484
* @param {THREE.Color} newColor
8585
*/
8686
set color(newColor) {
87-
this.material.color.set(newColor);
87+
this.material.color.setHSL(newColor, 1, 0.5);
8888
}
8989

9090
get name() {

js/master.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ socket.on('sync', function(data) {
7878
for(let i = 0;i < data.property.length; i++) {
7979
bricks.items[i].position = data.property[i].position;
8080
bricks.items[i].scale = data.property[i].scale;
81-
bricks.items[i].color = (data.property[i].hue, 1., .5);
82-
console.log(data.property[i].hue);
81+
bricks.items[i].color = data.property[i].hue;
8382
}
8483

8584
if(data.score != previousScoreValue) {

views/awal.html

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
display: block;
2828

2929
}
30+
3031
#particles-js{
3132
height:100vh;
3233
background: rgb(117,188,220);

0 commit comments

Comments
 (0)