Sign in to follow this  

Using Modules

Recommended Posts

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');
window.addEventListener('DOMContentLoaded', function(){
var canvas = document.getElementById('renderCanvas');
var engine = new BABYLON.Engine(canvas, true); 
var scene = createScene;
window.addEventListener('resize', function() {

Share this post

Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.