The scene's BoxTree its sprites go into.
The scene's: the sizes of its table and images, read now.
ReadonlyboxThe scene's BoxTree, shared with the meshes: a leaf per sprite (its id from LeafIds), its
box whatever the camera (getBoundingBox), whether it is shown and the bit of its layer,
as the mesh parts'. Followed a message later (see BoxTree.whenApplied): read it, do not
change it.
ReadonlygroupThe three.js objects that draw the sprites, in the scene's three.js scene: filled by the sprite renderer of the backend drawing the scene, emptied when it is freed.
Memory of the sprites, in bytes: their table and images (the scene's BoxTree apart).
Sprites in the controller.
Changes with every change of its sprites: added, removed, moved, resized, shown, hidden, made more or less opaque, moved to another layer or given another image. Compare it with the value read last to know whether something changed since.
Adds sprites, shown, in their layer (MeshLayer.Layer4 by default): each image drawn the first
time its key comes; their leaves inserted into the BoxTree at once, with their layer. Throws,
adding none, at a sprite whose layer is not one, or whose image the array cannot hold (the
scene's settings.sprites.maxImages, or fewer on a GPU taking fewer), and when the BoxTree
cannot hold them (settings.scene.boxTreeMaxNodes).
Their proxies, in the order of inputs.
Removes every sprite (see removeSprites): the BoxTree emptied at once when it holds only their leaves, else the meshes' kept.
The sprites in the controller.
Whether the proxy is of a sprite of this controller (not removed).
Whether an image of this key is held (see TextureImage): a sprite given it shares it, its
source not read, e.g. not drawn by the application.
Whether the sprite is active: its leaf in the BoxTree (see setActive). True when added; false for a removed sprite.
Removes sprites: their leaves from the BoxTree at once, their proxies invalidated, their image with its last sprite. The proxies removed already are skipped; throws, removing none, at a proxy of another controller.
Takes the sprite out of the BoxTree, or puts it back: inactive, it is neither bounded, culled in nor picked, its image and state kept (e.g. a sprite deleted, its deletion undoable). Hide it too for the renderers drawing without culling. Nothing for a removed sprite, nor when it is so already.
Entry point of the sprites: images facing the camera, of a size in world units (as three.js
Sprites), for markers and labels.addSprites()takes InputSprites and returns a SpriteProxy per sprite. Each sprite is an index of theSpriteTable(its position, size, image, opacity, layer, whether shown), its image a layer of aTextureArray(the scene'ssettings.sprites.imageSizepixels square), drawn once per key and shared. An image of any size fills its sprite's rectangle: a sprite of the image's aspect shows it undistorted.The controller is the only writer of its sprites. They are added and removed many at once (
addSprites,removeSprites); each is changed through its proxy (sprite.visible = false), which calls the controller: it updates its table, and queues the changes of its leaf for the scene's BoxTree (boxTree, shared with the meshes: their picking, later their culling), those of a task sent in one command. It tells nobody: the renderers read the table's and the images' changes once per frame, and draw the shown sprites of a layer in one instanced draw, listed again when one is shown, hidden or moved to another layer (SpriteTable.listVersion).