Hello community,
I'm new to the world of extensions and as a first test (after I've gone through the tutorials) I'm trying to integrate an external .js library but it says the object is not defined. In detail: The library is called three.js - which outputs 3d elements.
Here's what my first test should display:
Little excerpt:
function ThreeJS() {
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000); // Error: Three is not defined.
camera.position.z = 1000;
.......
......
}
Please note the attached zip-file.
What have I done wrong?
Thank you.
I found the error when I started from scratch.
Ok, when I add Qv.AddExtension(extensionPath + "three.min.js"); to the Init_JS_Frameworks() function the above error disappears but then I get the prototype undefined error. I use QV 11SR6 + IE 10.
Could anyone add above sample code to a working example so that I can see that it actually works?
BTW: all files are in the main folder - now subfolders.
Thank you.
I found the error when I started from scratch.