tentone / nunuStudio

Web powered cross-platform 3D, WebXR game engine.
https://nunustudio.org
MIT License
2.09k stars 311 forks source link

Import OrbitControls from THREE! #460

Open hoaile175 opened 3 years ago

hoaile175 commented 3 years ago

I'm trying to import Orbitcontrols.js from THREEJS. I was download and push files into Asset.

include("three.module.js");
include("three.min.js");

include("OrbitControls.js");

var camera;
var orbit;
var controls;
var renderer;

function initialize()
{
    renderer = THREE.WebGLRenderer();
    camera = scene.getObjectByName("camera");

    //controls = new THREE.OrbitControls(camera, renderer.domElement); 
}

function update(){

}

How can i call it in my script.

Sorry my English is not good. Thanks

Description

.

Version
Platform
tentone commented 3 years ago

Hello

You only need to import the OrbitControls file THREE is already included in the project by default.

I recommend to use the "non-modular" version of the file for now.

Cheers