Skip to content

mesutnafizsimsek/ThreeJS-TypeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThreeJS-TypeScript

ThreeJS-TypeScript learning path

Usage

npm install

npm run dev

Explanation of Scene-Renderer-3D Objects- Cameras - Canvases

A scene is the main environment that three.js created. The 3D Objects and cameras are child of Scenes. Scenes can have multiple objects and multiple cameras.

Renderers get a parameter of HTML canvas element and draw 2D representation of 3D environments to HTML. Renderers have render() function which has a Object3D object and camera. We can render only one object too.

3D objects are added to Scenes, their default positions is 0,0,0. 3D objects has material and geometry properties.

ThreeJS has different type of cameras, Eg. Perspective cameras and Orthogonal cameras. Cameras has also a position. Cameras has usefull LookAt function which rotates cameras to required objects' locations.

Canvases should be added to HTML code. Later they should be finded in JS code and connected to a Renderer objects. Renderers renders cameras' perspectives to Canvases.

All objects in ThreeJS inherits from Object3D class. Scene, Camera, Cubes etc are Object3D and has same properties.

About

ThreeJS-TypeScript journal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published