UNPKG

excalibur

Version:

Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.

31 lines (30 loc) 1.08 kB
import { Scene } from '../Scene'; import { GraphicsComponent } from './GraphicsComponent'; import { TransformComponent } from '../EntityComponentSystem/Components/TransformComponent'; import { Query, System, SystemType, World } from '../EntityComponentSystem'; export declare class GraphicsSystem extends System { world: World; static priority: 0; readonly systemType = SystemType.Draw; private _token; private _graphicsContext; private _camera; private _engine; private _sortedTransforms; query: Query<typeof TransformComponent | typeof GraphicsComponent>; get sortedTransforms(): TransformComponent[]; constructor(world: World); initialize(world: World, scene: Scene): void; private _zHasChanged; private _zIndexUpdate; preupdate(): void; update(elapsed: number): void; private _drawGraphicsComponent; private _targetInterpolationTransform; /** * This applies the current entity transform to the graphics context * @param entity */ private _applyTransform; private _applyOpacity; }