@@ -7,7 +7,7 @@ Example.car = function() {
77 Composites = Matter . Composites ,
88 MouseConstraint = Matter . MouseConstraint ,
99 Mouse = Matter . Mouse ,
10- World = Matter . World ,
10+ Composite = Matter . Composite ,
1111 Bodies = Matter . Bodies ;
1212
1313 // create engine
@@ -33,7 +33,7 @@ Example.car = function() {
3333 Runner . run ( runner , engine ) ;
3434
3535 // add bodies
36- World . add ( world , [
36+ Composite . add ( world , [
3737 // walls
3838 Bodies . rectangle ( 400 , 0 , 800 , 50 , { isStatic : true } ) ,
3939 Bodies . rectangle ( 400 , 600 , 800 , 50 , { isStatic : true } ) ,
@@ -43,12 +43,12 @@ Example.car = function() {
4343
4444 // see car function defined later in this file
4545 var scale = 0.9 ;
46- World . add ( world , Example . car . car ( 150 , 100 , 150 * scale , 30 * scale , 30 * scale ) ) ;
46+ Composite . add ( world , Example . car . car ( 150 , 100 , 150 * scale , 30 * scale , 30 * scale ) ) ;
4747
4848 scale = 0.8 ;
49- World . add ( world , Example . car . car ( 350 , 300 , 150 * scale , 30 * scale , 30 * scale ) ) ;
49+ Composite . add ( world , Example . car . car ( 350 , 300 , 150 * scale , 30 * scale , 30 * scale ) ) ;
5050
51- World . add ( world , [
51+ Composite . add ( world , [
5252 Bodies . rectangle ( 200 , 150 , 400 , 20 , { isStatic : true , angle : Math . PI * 0.06 , render : { fillStyle : '#060a19' } } ) ,
5353 Bodies . rectangle ( 500 , 350 , 650 , 20 , { isStatic : true , angle : - Math . PI * 0.06 , render : { fillStyle : '#060a19' } } ) ,
5454 Bodies . rectangle ( 300 , 560 , 600 , 20 , { isStatic : true , angle : Math . PI * 0.04 , render : { fillStyle : '#060a19' } } )
@@ -66,7 +66,7 @@ Example.car = function() {
6666 }
6767 } ) ;
6868
69- World . add ( world , mouseConstraint ) ;
69+ Composite . add ( world , mouseConstraint ) ;
7070
7171 // keep the mouse in sync with rendering
7272 render . mouse = mouse ;
0 commit comments