@@ -127,18 +127,18 @@ export default class App {
127
127
const onRenderTick = ( ) => {
128
128
balls . forEach ( ball => {
129
129
if ( ball . position . y >= render . canvas . height - 100 ) {
130
- Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : 0.01 , y : - 0.01 } )
130
+ Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : 0.003 , y : - 0.003 } )
131
131
}
132
132
if ( ball . position . y < 120 ) {
133
- Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : - 0.01 , y : 0.01 } )
133
+ Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : - 0.003 , y : 0.003 } )
134
134
}
135
135
136
136
if ( ball . position . x < 80 ) {
137
- Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : 0.01 , y : - 0.01 } )
137
+ Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : 0.003 , y : - 0.003 } )
138
138
}
139
139
140
140
if ( ball . position . x > render . canvas . width - 80 ) {
141
- Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : - 0.01 , y : 0.01 } )
141
+ Body . applyForce ( ball , { x : ball . position . x , y : ball . position . y } , { x : - 0.003 , y : 0.003 } )
142
142
}
143
143
} )
144
144
}
@@ -182,14 +182,15 @@ export default class App {
182
182
addRect ( {
183
183
x : cx2 ,
184
184
y : cy2 ,
185
- w : 10 / 1000 * m ,
186
- h : 300 / 1000 * m ,
185
+ w : 100 / 1000 * m ,
186
+ h : 3000 / 1000 * m ,
187
187
options : {
188
188
angle : angle2 ,
189
189
isStatic : true ,
190
190
density : 1 ,
191
191
render : {
192
- fillStyle : 'red' ,
192
+ fillStyle : 'transparent' ,
193
+ strokeStyle : 'white' ,
193
194
lineWidth : 0
194
195
}
195
196
}
0 commit comments