A sprite is a plane that always faces towards the camera, generally with a
partially transparent texture applied.
Sprites do not cast shadows, setting castShadow = true
will
have no effect.
const map = new THREE.TextureLoader().load( 'sprite.png' );
const material = new THREE.SpriteMaterial( { map: map } );
const sprite = new THREE.Sprite( material );
scene.add( sprite );
[page:Material material] - (optional) an instance of
[page:SpriteMaterial]. Default is a white [page:SpriteMaterial].
Creates a new [name].
See the base [page:Object3D] class for common properties.
Read-only flag to check if a given object is of type [name].
An instance of [page:SpriteMaterial], defining the object's appearance. Default is a white [page:SpriteMaterial].
The sprite's anchor point, and the point around which the sprite rotates. A value of (0.5, 0.5) corresponds to the midpoint of the sprite. A value of (0, 0) corresponds to the lower left corner of the sprite. The default is (0.5, 0.5).
See the base [page:Object3D] class for common methods.
Copies the properties of the passed sprite to this one.
Get intersections between a casted ray and this sprite. [page:Raycaster.intersectObject]() will call this method. The raycaster must be initialized by calling [page:Raycaster.setFromCamera]() before raycasting against sprites.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]