build/craftymatter.js
function( options, part, isSleeping ) {
	        var entity = part.entity;

	        if ( options.showSleeping && isSleeping ) {
	            entity.alpha = 0.5;
	        }

	        if ( entity._x !== part.position.x - ( entity._w / 2 ) ) {
	            entity.matterMoved = true;
	            entity.x = part.position.x - ( entity._w / 2 );
	        }

	        if ( entity._y !== part.position.y - ( entity._h / 2 ) ) {
	            entity.matterMoved = true;
	            entity.y = part.position.y - ( entity._h / 2 );
	        }

	        debug.moveEntity( entity );

	        _rotateEntity( entity,  part.angle );

	    }
function( options, part, isSleeping ) {
	        var entity = part.entity;

	        if ( options.showSleeping && isSleeping ) {
	            entity.alpha = 0.5;
	        }

	        if ( entity._x !== part.position.x - ( entity._w / 2 ) ) {
	            entity.matterMoved = true;
	            entity.x = part.position.x - ( entity._w / 2 );
	        }

	        if ( entity._y !== part.position.y - ( entity._h / 2 ) ) {
	            entity.matterMoved = true;
	            entity.y = part.position.y - ( entity._h / 2 );
	        }

	        debug.moveEntity( entity );

	        _rotateEntity( entity,  part.angle );

	    }
function ( options , part , isSleeping ) { var entity = part . entity ; if ( options . showSleeping && isSleeping ) { entity . alpha = 0.5 ; } if ( entity . _x !== part . position . x - ( entity . _w / 2 ) ) { entity . matterMoved = true ; entity . x = part . position . x - ( entity . _w / 2 ) ; } if ( entity . _y !== part . position . y - ( entity . _h / 2 ) ) { entity . matterMoved = true ; entity . y = part . position . y - ( entity . _h / 2 ) ; } debug . moveEntity ( entity ) ; _rotateEntity ( entity , part . angle ) ; }
Moves an entity according to matter calculations
@param  {object}  options    engine.options
@param  {object}  part       part to be moved
@param  {Boolean} isSleeping
Moves an entity according to matter calculations