Import
TubePainter is an addon, and must be imported explicitly, see Installation#Addons.
import { TubePainter } from 'three/addons/misc/TubePainter.js';
Properties
Methods
.lineTo( position : Vector3 )
Draw a stroke from the current position to the given one. This method extends the tube while drawing with the XR controllers.
| position |
The destination position. |
.moveTo( position : Vector3 )
Moves the current painting position to the given value.
| position |
The new painting position. |
.setColor( color : Color )
Sets the color of newly rendered tube segments.
| color |
The color. |
.setSize( size : number )
Sets the size of newly rendered tube segments.
| size |
The size. |
.update()
Updates the internal geometry buffers so the new painted segments are rendered.