Currently facing a minor but persistent issue with THREE.js and seeking assistance.
Upon observation, I've discovered that linking a three.js 3D object using an URL functions properly. However, when a relative path is used, only a black window appears. See the functional code snippet below:
var jsLoader = new THREE.JSONLoader();
jsLoader.load('http://codepen.io/nickpettit/pen/nqyaK.js', function(geometry) {
var material = new THREE.MeshPhongMaterial();
var mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
mesh.scale.set(10,10,10);
});
On the other hand, attempting to use 'models/model.js' (simply a replica of the object from the aforementioned URL) does not yield the desired result.
I am certain that the path provided is accurate, as I have successfully linked the three.js build file in a similar manner (located in 'js/three.js'). What could be causing this discrepancy?
PS: Operating on Arch Linux.