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

oimo.module.js: OIMO is not defined #45

Closed
TimMensch opened this issue Jan 25, 2017 · 1 comment
Closed

oimo.module.js: OIMO is not defined #45

TimMensch opened this issue Jan 25, 2017 · 1 comment

Comments

@TimMensch
Copy link

Hi,

I'm using the ES6 import from Oimo, and I'm getting an error that seems to be deep within the prebuilt oimo.module.js:

Uncaught ReferenceError: OIMO is not defined
    at eval (eval at evaluate (:117:21), <anonymous>:1:1)
    at BoxShape.updateProxy (http://192.168.128.125:8888/js/main.js:50564:13)
    at RigidBody.syncShapes (http://192.168.128.125:8888/js/main.js:54910:19)
    at RigidBody.setupMass (http://192.168.128.125:8888/js/main.js:54703:14)
    at World.add (http://192.168.128.125:8888/js/main.js:55873:22)
    ...

So my code clearly sees OIMO, and it's been included using Rollup+NodeResolve+CommonJS. But the Oimo code apparently is assuming an OIMO global variable, which doesn't exist.

A bit of grepping finds only one more place that an OIMO global is expected in oimo.module.js here:

if(r[n2+0]) {
	var q = new Quat().setFromAxis( r[n2], r[n2+1], r[n2+2], r[n2+3] );
	//var q = body.rotationAxisToQuad( r[0], r[1], r[2], r[3] );
	shapes[i].relativeRotation = new OIMO.Mat33().setQuat(q);
}

Looks like relatively simple fixes? For now I'm patching window.OIMO to point to OIMO.

@lo-th
Copy link
Owner

lo-th commented Jan 25, 2017

yea is a error in code thank's i fix that
i see other error in boxshape

@lo-th lo-th closed this as completed Jan 26, 2017
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

No branches or pull requests

2 participants