Difference between revisions of "Threejs"
From Wasya Wiki
| Line 15: | Line 15: | ||
== Picking == | == Picking == | ||
* https://sbcode.net/threejs/mousepick/ | * https://sbcode.net/threejs/mousepick/ | ||
| + | |||
| + | == destroy scene == | ||
| + | cancelAnimationFrame(this.id);// Stop the animation | ||
| + | this.renderer.domElement.addEventListener('dblclick', null, false); //remove listener to render | ||
| + | this.scene = null; | ||
| + | this.projector = null; | ||
| + | this.camera = null; | ||
| + | this.controls = null; | ||
| + | empty(this.modelContainer); | ||
Revision as of 01:28, 15 October 2022
Develop
Perspective Camera
/**
* PerspectiveCamera( fov : Number, aspect : Number, near : Number, far : Number )
*
* fov — Camera frustum vertical field of view.
* aspect — Camera frustum aspect ratio.
* near — Camera frustum near plane.
* far — Camera frustum far plane.
*/
Picking
destroy scene
cancelAnimationFrame(this.id);// Stop the animation
this.renderer.domElement.addEventListener('dblclick', null, false); //remove listener to render
this.scene = null;
this.projector = null;
this.camera = null;
this.controls = null;
empty(this.modelContainer);