4a How to import Orbit Controls from local directory three.js

Опубликовано: 02 Октябрь 2024
на канале: flanniganable
3,209
like

OrbitControls.js allows the user to control the camera position using the left, middle, and right mouse buttons.
Learn where find and download OrbitControls.js.
Learn how to place OrbitControls.js in code editor.
Learn how to change path in OrbitControls.js to find three.module.js.
Learn how to add code to your program to use OrbitControls.js if you are using a canvas element and when not using a canvas element.

Timestamps:
00:00 Intro/demo
00:30 Where to find and download OrbitControls.js
01:17 How to put OrbitControls.js into code editor
01:33 How to change path in OrbitControls.js to find three.module.js
02:11 How to add code to your program to use OrbitControls.js without defined canvas element
03:12 How to add code to your program to use OrbitControls.js with defined canvas element.

Resources:
Mr.Doob Github OrbitControls.js: https://raw.githubusercontent.com/mrd...
three.js OrbitControls documentation: https://raw.githubusercontent.com/mrd...

Credits:
Skybox - Jockum Skoglund @ https://opengameart.org/content/miram...