Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed old code

  • Loading branch information...
commit 6e4387d71ced175b4100eae17ccb9e605fdcaa1a 1 parent 6948294
@chandlerprall authored
Showing with 0 additions and 66 deletions.
  1. +0 −66 physi.js
View
66 physi.js
@@ -82,72 +82,6 @@ var Physijs = (function() {
update_details = {
collisions: []
};
- /*
- switch ( event.data.cmd ) {
-
- case 'update':
- for ( obj_id in event.data.params.objects ) {
- if ( !event.data.params.objects.hasOwnProperty( obj_id ) ) continue;
-
- obj = event.data.params.objects[obj_id];
- sceneObj = self._objects[obj_id];
-
- // Update position & rotation
- sceneObj.position.set( obj.pos_x, obj.pos_y, obj.pos_z );
- if ( sceneObj.useQuaternion) {
- sceneObj.quaternion.set( obj.quat_x, obj.quat_y, obj.quat_z, obj.quat_w );
- } else {
- sceneObj.rotation = getEulerXYZFromQuaternion( obj.quat_x, obj.quat_y, obj.quat_z, obj.quat_w );
- };
-
- // Record velocities
- sceneObj._physijs.linearVelocity.set( obj.linear_x, obj.linear_y, obj.linear_z );
- sceneObj._physijs.angularVelocity.set( obj.angular_x, obj.angular_y, obj.angular_z );
-
- // Collisions
- collided_with.length = 0;
-
- if ( obj.collisions.length > 0 ) {
-
- for ( i = 0; i < obj.collisions.length; i++ ) {
- collisionObj = self._objects[obj.collisions[i]];
-
- if ( sceneObj._physijs.touches.indexOf( collisionObj._physijs.id ) === -1 ) {
- sceneObj._physijs.touches.push( collisionObj._physijs.id );
- sceneObj.dispatchEvent( 'collision', collisionObj );
- collisionObj.dispatchEvent( 'collision', sceneObj );
-
- update_details.collisions.push([ sceneObj, collisionObj ]);
- }
-
- collided_with.push( collisionObj._physijs.id );
- }
-
- for ( i = 0; i < sceneObj._physijs.touches.length; i++ ) {
- if ( collided_with.indexOf( sceneObj._physijs.touches[i] ) === -1 ) {
- sceneObj._physijs.touches.splice( i--, 1 );
- }
- }
-
- } else {
-
- sceneObj._physijs.touches.length = 0;
-
- }
- }
-
- _is_simulating = false;
- self.dispatchEvent( 'update', update_details );
-
- break;
-
- default:
- // Do nothing
- console.debug('Received: ' + event.data.cmd);
- console.dir(event.data.params);
- break;
- }
- */
if ( event.data instanceof Float32Array ) {
Please sign in to comment.
Something went wrong with that request. Please try again.