[page:Object3D] →
[name]
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.
Example
var spriteMap = new v3d.TextureLoader().load("sprite.png");
var spriteMaterial = new v3d.SpriteMaterial({ map: spriteMap, color: 0xffffff });
var sprite = new v3d.Sprite(spriteMaterial);
scene.add(sprite);
Constructor
[name]([page:Material material])
[page:Material material] - (optional) an instance of [page:SpriteMaterial]. Default is a white [page:SpriteMaterial].
Creates a new [name].
Properties
See the base [page:Object3D] class for common properties.
[property:Boolean isSprite]
Used to check whether this or derived classes are sprites. Default is *true*.
You should not change this, as it used internally for optimisation.
[property:SpriteMaterial material]
An instance of [page:SpriteMaterial], defining the object's appearance.
Default is a white [page:SpriteMaterial].
Methods
See the base [page:Object3D] class for common methods.
[method:Sprite clone]()
Returns a clone of this Sprite object and any descendants.
[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])
Get intersections between a casted ray and this sprite.
[page:Raycaster.intersectObject] will call this method.
[sourceHint]