import type { Quaternion, Vector2, Vector3 } from "three/src/Three"; import { Component } from "../../hierarchy_object/Component"; import type { IUnknownSizeCssRenderOption } from "../render/CssRenderer"; import type { ICssImageRenderOption } from "../render/CssSpriteRenderer"; import { ImageRenderingMode } from "../render/CssSpriteRenderer"; import { CssFilter } from "../render/filter/CssFilter"; /** * represents a sprite instance * * this class is used from the SpriteStaticInstancer */ export declare class SpriteInstance { private readonly _width; private readonly _height; private readonly _position; private readonly _rotation; private readonly _scale; private readonly _centerOffset; constructor(width: number, height: number, position: Vector3, rotation?: Quaternion, scale?: Vector3, centerOffset?: Vector2); /** * sprite instance width */ get width(): number; /** * sprite instance height */ get height(): number; /** * sprite instance position */ get position(): Vector3; /** * sprite instance rotation */ get rotation(): Quaternion | undefined; /** * sprite instance scale */ get scale(): Vector3 | undefined; /** * sprite instance center offset */ get centerOffset(): Vector2 | undefined; } /** * this component draws multiple sprite instances * * drawcall optimization is not yet available */ export declare class SpriteStaticInstancer extends Component implements IUnknownSizeCssRenderOption, ICssImageRenderOption { private _imageSource; private _useZaxisSorter; private _zaxisSortOffset; private _pointerEvents; private _viewScale; private _imageRenderingMode; private readonly _filter; private _initializeFunction; private _started; start(): void; /** * set instances to be drawn * @param instances instances to be drawn * @returns */ setInstances(instances: SpriteInstance[]): void; /** * image source of the sprite * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get imageSource(): string; /** * image source of the sprite * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ set imageSource(value: string); /** * if this is true, the zaxis sorter will be attached to the sprite atlas instances * otherwise the zaxis initializer will be attached * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get useZindexSorter(): boolean; /** * if this is true, the zaxis sorter will be attached to the sprite atlas instances * otherwise the zaxis initializer will be attached * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ set useZindexSorter(value: boolean); /** * offset of the zaxis sorter * * this is only used if useZindexSorter is true * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get zindexSortOffset(): number; /** * offset of the zaxis sorter * * this is only used if useZindexSorter is true * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ set zindexSortOffset(value: number); /** * if this is true, the sprite atlas instances can be clicked * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get pointerEvents(): boolean; /** * if this is true, the sprite atlas instances can be clicked * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ set pointerEvents(value: boolean); /** * element viewScale * * value to scaling html element. the smaller value, the higher resolution of element. * * note: if the viewScale is greater than 1, render will have different behaviour depending on the browser. In the case of firefox, normal operation is guaranteed. * * Even if you change this value after the instance is created. Objects that have already been created will not be changed * @param value */ get viewScale(): number; /** * element viewScale * * value to scaling html element. the smaller value, the higher resolution of element. * * note: if the viewScale is greater than 1, render will have different behaviour depending on the browser. In the case of firefox, normal operation is guaranteed. * * Even if you change this value after the instance is created. Objects that have already been created will not be changed * @param value */ set viewScale(value: number); /** * css filter * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get filter(): CssFilter; /** * image rendering mode (default: ImageRenderingMode.Pixelated) * * @see https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ get imageRenderingMode(): ImageRenderingMode; /** * image rendering mode (default: ImageRenderingMode.Pixelated) * * @see https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering * * Even if you change this value after the instance is created. Objects that have already been created will not be changed */ set imageRenderingMode(value: ImageRenderingMode); }