Capítulo 556 de 859
This class can be used to render a DOM element onto a canvas and use it as a texture for a plane mesh.
A typical use case for this class is to render the GUI of lil-gui as a texture so it is compatible for VR.
const gui = new GUI( { width: 300 } ); // create lil-gui instance
const mesh = new HTMLMesh( gui.domElement );
scene.add( mesh );
Constructor
| Signature |
|---|
new HTMLMesh( dom : HTMLElement ) |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance and removes all event listeners. Call this method whenever this instance is no longer used in your app. |