Skip to content

Instantly share code, notes, and snippets.

@jcole
Created March 24, 2012 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcole/2182511 to your computer and use it in GitHub Desktop.
Save jcole/2182511 to your computer and use it in GitHub Desktop.
Example of removing an object from EaselBox
# Example for how to remove an object:
obj = @world.addEntity( type: 'dynamic',radiusPixels: 30) # first, create the object
@world.removeEntity(obj) # now, remove it
# What "removeEntity" does:
removeEntity: (object) ->
@box2dWorld.DestroyBody(object.body)
@easelStage.removeChild(object.easelObj)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment