import { DisplayObject2dOpts, GgBox2d, IDisplayObject2dComponent, IEntity, IMaterialReadable2dComponent, Point2 } from '@gg-web-engine/core'; import { PixiGgWorld, PixiVisualTypeDocRepo2D } from '../types'; import { Container, Texture } from 'pixi.js'; export declare class PixiDisplayObjectComponent implements IDisplayObject2dComponent, Partial> { nativeSprite: Container; entity: IEntity | null; /** * The options this display object was actually built with, when constructed via * `PixiFactory.createPrimitive` - see `IMaterialReadable2dComponent`'s own doc. Left unset for a * sprite built any other way (e.g. `PixiFactory.createAnimatedSprite`), which is why this is * `Partial` rather than a hard implementation of that interface - check with * `isMaterialReadable2d` before relying on it. */ readonly materialOptions?: DisplayObject2dOpts; /** * The native scale the object was built with: a sized sprite (a plain or textured `BOX`, a * textured `CIRCLE`) gets its size from its native scale. `scale` is relative to it, so * `scale = { x: 1, y: 1 }` is always the size the object was created at. */ protected readonly baseScale: Point2; constructor(nativeSprite: Container, materialOptions?: DisplayObject2dOpts, baseScale?: Point2); get position(): Point2; set position(value: Point2); get rotation(): number; set rotation(value: number); get scale(): Point2; set scale(value: Point2); get visible(): boolean; set visible(value: boolean); get zIndex(): number; set zIndex(value: number); get tint(): number; set tint(value: number); get opacity(): number; set opacity(value: number); /** the native `Container.label`; `''` while nothing has named this object */ get name(): string; set name(value: string); addChild(child: PixiDisplayObjectComponent): void; removeChild(child: PixiDisplayObjectComponent): void; isEmpty(): boolean; popChild(name: string): PixiDisplayObjectComponent | null; /** Bounds in world (stage) coordinates, like the 3D adapters' `getBoundings`. */ getBoundings(): GgBox2d; /** * `Container.getLocalBounds()` - the subtree in the container's own frame, leaving out hidden * children - scaled by `baseScale`, since a sized sprite's built size is its native scale, which * the native local bounds leave out along with the rest of the container's own transform. */ getLocalBoundings(): GgBox2d; clone(): PixiDisplayObjectComponent; addToWorld(world: PixiGgWorld): void; removeFromWorld(world: PixiGgWorld, dispose?: boolean): void; dispose(): void; }