Skip to main content
MAINTENANCE ALERT: Dec. 12th starting 9 AM CET. Community will be read-only. GET DETAILS
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trouble with integration of external javascript library

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;



    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.

1 Solution

Accepted Solutions
Not applicable

I found the error when I started from scratch.

View solution in original post

2 Replies
Not applicable

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.

Not applicable

I found the error when I started from scratch.