Bombadilo101 Posted October 4, 2015 Share Posted October 4, 2015 So... I've been trying for days now to get modules to play nice with babylon.js, thus far without success. babelify, webpack, browserify, nothing seems to be working. Can anyone give me a hint on how to properly package it so that it actually functions? The current error I'm running into (and there have been dozens of various errors from the various attempts) is that BABYLON is not defined. require ('./babylon.js');var createScene = require ('./Sub_Scene1.js'); console.log('1');window.addEventListener('DOMContentLoaded', function(){ var canvas = document.getElementById('renderCanvas');var engine = new BABYLON.Engine(canvas, true); console.log('2'); var scene = createScene;engine.runRenderLoop(function(){scene.render();}); window.addEventListener('resize', function() {engine.resize();});});console.log('3'); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 5, 2015 Share Posted October 5, 2015 Are you using the latest version of babylon.js ? (2.2) Quote Link to comment Share on other sites More sharing options...
Bombadilo101 Posted December 25, 2015 Author Share Posted December 25, 2015 I was not, problem was fixed. 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.