UNPKG

@spearwolf/twopoint5d

Version:

Create 2.5D realtime graphics and pixelart with WebGL and three.js

71 lines 3.68 kB
import { type EventizedObject } from '@spearwolf/eventize'; import type { WebGPURenderer } from 'three/webgpu'; import { type Texture } from 'three/webgpu'; import { FrameBasedAnimations } from './FrameBasedAnimations.js'; import type { TextureAtlas } from './TextureAtlas.js'; import { TextureCoords } from './TextureCoords.js'; import { TextureFactory, type TextureOptionClasses } from './TextureFactory.js'; import { type TexturePackerJsonData } from './TexturePackerJson.js'; import { TileSet, type TileSetOptions } from './TileSet.js'; import type { FrameBasedAnimationsDataMap } from './types.ts'; export type TextureResourceType = 'image' | 'atlas' | 'tileset'; export type TextureResourceSubType = 'imageCoords' | 'atlas' | 'tileSet' | 'texture' | 'frameBasedAnimations'; export declare const TextureResourceSubtypes: { readonly ImageCoords: "imageCoords"; readonly Atlas: "atlas"; readonly TileSet: "tileSet"; readonly Texture: "texture"; readonly FrameBasedAnimations: "frameBasedAnimations"; }; export declare const TextureResourceEvents: { readonly ImageCoords: "imageCoords"; readonly Atlas: "atlas"; readonly TileSet: "tileSet"; readonly Texture: "texture"; readonly FrameBasedAnimations: "frameBasedAnimations"; readonly Dispose: "dispose"; readonly Error: "error"; }; export interface TextureResource extends EventizedObject { } export declare class TextureResource { #private; static fromImage(id: string, imageUrl: string, textureClasses?: TextureOptionClasses[]): TextureResource; static fromTileSet(id: string, imageUrl: string, tileSetOptions: TileSetOptions, textureClasses?: TextureOptionClasses[], frameBasedAnimations?: FrameBasedAnimationsDataMap): TextureResource; static fromAtlas(id: string, atlasUrl: string, overrideImageUrl?: string, textureClasses?: TextureOptionClasses[], frameBasedAnimations?: FrameBasedAnimationsDataMap): TextureResource; readonly id: string; readonly type: TextureResourceType; refCount: number; get imageUrl(): string | undefined; set imageUrl(val: string | undefined); get imageCoords(): TextureCoords | undefined; set imageCoords(val: TextureCoords | undefined); get atlasUrl(): string | undefined; set atlasUrl(value: string | undefined); get atlasJson(): TexturePackerJsonData | undefined; set atlasJson(value: TexturePackerJsonData | undefined); get overrideImageUrl(): string | undefined; set overrideImageUrl(value: string | undefined); get atlas(): TextureAtlas | undefined; set atlas(value: TextureAtlas | undefined); get tileSetOptions(): TileSetOptions | undefined; set tileSetOptions(value: TileSetOptions | undefined); get tileSet(): TileSet | undefined; set tileSet(value: TileSet | undefined); get frameBasedAnimations(): FrameBasedAnimations | undefined; set frameBasedAnimations(value: FrameBasedAnimations | undefined); get frameBasedAnimationsData(): FrameBasedAnimationsDataMap | undefined; set frameBasedAnimationsData(value: FrameBasedAnimationsDataMap | undefined); get textureClasses(): TextureOptionClasses[] | undefined; set textureClasses(value: TextureOptionClasses[] | undefined); get textureFactory(): TextureFactory | undefined; set textureFactory(value: TextureFactory | undefined); get texture(): Texture | undefined; set texture(value: Texture | undefined); get renderer(): WebGPURenderer | undefined; set renderer(value: WebGPURenderer | undefined); constructor(id: string, type: TextureResourceType); dispose(): void; load(): TextureResource; } //# sourceMappingURL=TextureResource.d.ts.map