dsman Posted May 1, 2015 Share Posted May 1, 2015 If I use jquery.min.js I get following error. I have tried referencing jquery in a page before the babylon.js is referenced and after it. Gives same error. b.prepare is not a function (at line # 9 babylon.2.0.js) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 2, 2015 Share Posted May 2, 2015 I never had any conflicts with jQuery and babylon. the error probably comes from something else. what is your error in the console? Quote Link to comment Share on other sites More sharing options...
dsman Posted May 2, 2015 Author Share Posted May 2, 2015 Hi, Earlier I remember having jquery file included in the html page where my babylon scene is hosted. At that time I didn't see error. But at specific day it started appearning. And that day, since jquery wasn't useful for me, I just commented its reference. Then it went away. But now since I require it, I tried adding jquery reference again. And it gives following error in console. I tried placing jquery reference both before babylon.js reference and after babylon.js reference. Gives error in both case. b.prepare is not a function (at line # 9 babylon.2.0.js)I am refering following js files in HTML page. <!--<script src="scripts/jquery.min.js"></script>--> <script src="scripts/babylon.2.0.js"></script><script src="scripts/hand-1.3.8.js"></script><script src="scripts/cannon.js"></script> <script src="scripts/math.js"></script> <!-- http://mathjs.org/ --><script src="scripts/utility.js"></script> <!-- my own code . Code in this file uses jquery code --><script src="scripts/geoutil.js"></script> <!-- my own code --><script src="scripts/model.js"></script> <!-- my own code --> Quote Link to comment Share on other sites More sharing options...
dsman Posted May 2, 2015 Author Share Posted May 2, 2015 Resolved. Code in my utility.js file was causing the problem. But strangely the error in console was showin in babylon.js file and it seemed no way relevant to my code in utility.js I commented all functions one by one in utility.js and found a function which if was causing a problem. 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.