Created
August 1, 2015 20:46
-
-
Save nickjanssen/50b7c7ef0d069bc72b3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (data.userData.type) { | |
case 'BoxCollider': | |
entity.parent.addComponent($components.get('rigidBody', { | |
shape: { | |
type: 'box', | |
width: data.userData.size[0], | |
height: data.userData.size[1], | |
depth: data.userData.size[2] | |
}, | |
offset: (new THREE.Vector3()).fromArray(data.userData.center), | |
mass: 0, | |
group: 'level', | |
collidesWith: ['all'] | |
})); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment