PhilT Posted March 12, 2018 Share Posted March 12, 2018 Hit another one so thought I'd just make a single thread! Uncaught TypeError: Cannot read property 'World' of undefined at new OimoJSPlugin (es6.js:79131) at HTMLDocument.document.addEventListener (main.js:15) Let me know if you need any more info. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2018 Share Posted March 12, 2018 Pinging @RaananW Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 13, 2018 Share Posted March 13, 2018 that could be a combination of things I just changed Oimo's reference, what version of babylon are you using? npm-latest or repo latest? check if OIMO was included in the build, and that the OIMO namespace exists Quote Link to comment Share on other sites More sharing options...
PhilT Posted March 13, 2018 Author Share Posted March 13, 2018 I'm using master and whatever is in the 'preview release' folder. Should I be building locally? Live reload enabled. es6.js:10915 Babylon.js engine (v3.2.0-beta.1) launched main.js:14 ƒ OimoJSPlugin(iterations) { this.name = "OimoJSPlugin"; this._tmpImpostorsArray = []; this._tmpPositionVector = BABYLON.Vector3.Zero(); this.BJSOIMO = t… main.js:15 Uncaught ReferenceError: OIMO is not defined at HTMLDocument.document.addEventListener (main.js:15) Quote Link to comment Share on other sites More sharing options...
PhilT Posted March 13, 2018 Author Share Posted March 13, 2018 Ah, of course I wasn't actually importing oimo like I was cannon! However, if I do: import './node_modules/babylonjs/dist/preview release/oimo.js' I get: oimo.js:4 Uncaught TypeError: Cannot read property 'OIMO' of undefined at oimo.js:4 at oimo.js:5 Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 21, 2018 Share Posted March 21, 2018 yeah, Oimo is not es6 friendly..... But I believe the new optional dependencies feature I pushed just recently should address this. Have you tried the latest preview release? Quote Link to comment Share on other sites More sharing options...
PhilT Posted March 22, 2018 Author Share Posted March 22, 2018 Just pulled but still getting the same error. Is it the same syntax @RaananW? Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 25, 2018 Share Posted March 25, 2018 Are you still loading oimo? Loading it as es6 module will not work. You will need to load it as a regular is file so it will be included in the global namespace (window.OIMO) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.