Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hook to handle EC_RigidBody boxes using Physijs #41

Merged
merged 1 commit into from
Mar 27, 2014

Conversation

erno
Copy link
Member

@erno erno commented Mar 27, 2014

No description provided.

erno added a commit that referenced this pull request Mar 27, 2014
Add hook to handle EC_RigidBody boxes using Physijs
@erno erno merged commit 8f932af into realXtend:dev Mar 27, 2014
console.log("ok, have cube");
var boxSize = component.size;
if (!(boxSize.x && boxSize.y && boxSize.z))
console.log("RigidBody of entitity " + entity.id + ": one or more dimensions are zero");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed a typo in the log message, i've written this sometimes too :) "entitity"

@antont
Copy link
Member

antont commented Mar 27, 2014

does this mean that visible mesh debug boxes are now always created for entities with rigidbodies? i don't see what would make this code optional here.

also, i wonder if the centralised way to register component handlers proposed in issue #35 would be good for this. it is there already in scene for the data part, but not for view. needing this pattern all over seems weak?

Application.prototype.onRigidBodyPossiblyAdded = function(entity, component) {
if (! (component instanceof EC_RigidBody))
return;

when we already have nice registerComponent and createComponent in

function registerComponent(typeId, typeName, factory) {

(i copy that note also to the correct issue to have that talk in the right place)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants