API Reference > imodeljs-frontend > Views > SpriteLocation SpriteLocation Class A Sprite location. Sprites generally move around on the screen and this object holds the current location and current Sprite within a ScreenViewport. SpriteLocations can be either inactive (not visible) or active. A SpriteLocation can also specify that a Sprite should be drawn partially transparent. Implements CanvasDecoration Methods Name Description activate(sprite: Sprite, viewport: ScreenViewport, locationWorld: XYAndZ, alpha?: number): void Activate this SpriteLocation to show a Sprite at a location in a single ScreenViewport. deactivate(): void Turn this SpriteLocation off so it will no longer show. decorate(context: DecorateContext): void If this SpriteLocation is active and the supplied DecorateContext is for its Viewport, add the Sprite to decorations. drawDecoration(ctx: CanvasRenderingContext2D): void Draw this sprite onto the supplied canvas. Properties Name Type Description isActive Accessor ReadOnly boolean position Point3d The current position of this sprite in view coordinates. Defined in core/frontend/src/Sprites.ts Line 89 Last Updated: 13 June, 2024