File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ function loop() {
170
170
let object = {
171
171
position : bricks . items [ i ] . position ,
172
172
scale : bricks . items [ i ] . scale ,
173
- color : bricks . items [ i ] . color
173
+ hue : bricks . items [ i ] . color . h
174
174
} ;
175
175
message . property . push ( object ) ;
176
176
}
@@ -359,7 +359,7 @@ function onTouchEvent(event) {
359
359
}
360
360
else if ( command == GAMEOVER )
361
361
{
362
- command = PLAYAGAIN ;
362
+ // command = PLAYAGAIN;
363
363
}
364
364
365
365
}
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class Brick {
84
84
* @param {THREE.Color } newColor
85
85
*/
86
86
set color ( newColor ) {
87
- this . material . color . set ( newColor ) ;
87
+ this . material . color . setHSL ( newColor , 1 , 0.5 ) ;
88
88
}
89
89
90
90
get name ( ) {
Original file line number Diff line number Diff line change @@ -78,8 +78,7 @@ socket.on('sync', function(data) {
78
78
for ( let i = 0 ; i < data . property . length ; i ++ ) {
79
79
bricks . items [ i ] . position = data . property [ i ] . position ;
80
80
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 ;
83
82
}
84
83
85
84
if ( data . score != previousScoreValue ) {
Original file line number Diff line number Diff line change 27
27
display : block;
28
28
29
29
}
30
+
30
31
# particles-js {
31
32
height : 100vh ;
32
33
background : rgb (117 , 188 , 220 );
You can’t perform that action at this time.
0 commit comments