/ Published in: JavaScript
This example adds a wall to keep the ball from rolling into space
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// create a wall var leftWall = Ti.UI.createView({ backgroundColor:'#fff', width:2, height:200, bottom:0, left:0 }); world.addBody(leftWall, { density:12.0, friction:0.3, restitution:0.4, type:'static' });
URL: http://lancespellman.com/2011/12/20/cool-box2d-stuff-with-appcelerator-titanium/