UNPKG

@spearwolf/twopoint5d

Version:

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

39 lines 1.51 kB
import { Color, type Node } from 'three/webgpu'; import { voInitialize } from '../../index.js'; import type { TextureAtlasFrame } from '../../texture/TextureAtlas.js'; import type { VertexObjectDescription, VO } from '../../vertex-objects/types.js'; export interface TexturedSprite extends VO { width: number; height: number; x: number; y: number; z: number; s: number; t: number; u: number; v: number; rotation: number; r: number; g: number; b: number; a: number; setQuadSize(quadSize: [width: number, height: number]): void; setTexCoords(texCoords: [s: number, t: number, u: number, v: number]): void; setInstancePosition(position: [x: number, y: number, z: number]): void; setColorValues(color: [r: number, g: number, b: number, a: number]): void; } export declare class TexturedSprite { [voInitialize](): void; setSize(width: number, height: number): void; setPosition(x: number, y: number, z?: number): void; setFrame(frame: TextureAtlasFrame): void; setColor(color: Color, a?: number): void; getColor(target?: Color): Color; } export declare const TexturedSpriteDescriptor: VertexObjectDescription; export type TAttributeNodeQuadSize = Node<'vec2'>; export type TAttributeNodeTexCoords = Node<'vec4'>; export type TAttributeNodeInstancePosition = Node<'vec3'>; export type TAttributeNodeRotation = Node<'float'>; export type TAttributeNodeColor = Node<'vec4'>; //# sourceMappingURL=TexturedSprite.d.ts.map