Having encountered a JavaScript error in browser (on the last line mentioned above) with generated code from TypeScript:
define(["require", "exports", "three", "jquery", "./test"], function (require, exports, THREE, jQuery, Test) {
var Main = (function () {
function Main() {
this.container = jQuery('#test');
this.scene = new THREE.Scene();
...
The error message states: Uncaught TypeError: Cannot read property 'Scene' of undefined.
It is interesting that jQuery functions properly while Three.js seems to not be loading at all.
Configurations for requires are as follows:
requirejs.config({
baseUrl: "src",
paths: {
"main": "../main",
"test": "../test",
"three": "../three/three",
"sizzle": "/src/sizzle/dist/sizzle"
}
});
jQuery is located in the 'js/src' directory, whereas Three.js resides in 'js/three/three.js' (The use of Express hides the js folder from the browser, and relocating three.js to the src folder didn't resolve the issue). Sizzle stands alone due to previous errors when it was placed within a subfolder under src directory.
Am I overlooking something obvious in regards to this issue? I am currently stumped with no clear leads.