Create, Compete & Win at Redbrick Connect 2024! 🎉

Sprite

A class that defines the plane that always faces the camera.

These are the elements used inside the Studio for GUI, Particles, etc. Sprites also inherit from Object3D, so they can use the properties and functions that exist in THREE.Object3D and THREE.Object3D.Sprite in addition to those described below.

Properties

.material

.material : SpriteMaterial

An instance of SpriteMaterial, defining the object’s appearance. Default is a white SpriteMaterial.

.center

.center : Vector2

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).