UNPKG

@giraphics/grpkggfx

Version:
40 lines (39 loc) 1.6 kB
/// <reference types="dist" /> import { Camera } from './../renderer/camera'; import SceneGraph from './../base/scenegraph'; import { PRIMITIVE_TYPE } from './../renderer/constants'; export declare class MultiGeometry extends SceneGraph { private vertexUppperLimit; private indexUppperLimit; private vertexInitLimit; private indexInitLimit; protected totalVertexCount: number; protected totalIndexCount: number; protected isDirty: Boolean; protected isMemoryQuotaExausted: boolean; private deviceVertexBufferSize; private deviceIndexBufferSize; private VERTEX_BYTES_PER_ELEMENT; private INDEX_BYTES_PER_ELEMENT; private resizeFactor; private scaleFactor; private hostVertexBuffer; private hostIndexBuffer; private deviceVertexBuffer; private indexBuffer; protected uniformBindGroup: GPUBindGroup; constructor(device: GPUDevice, primitiveType: PRIMITIVE_TYPE, vertexUppperLimit?: number); private allocateVertexBuffersIfNeeded; private allocateIndexBuffersIfNeeded; updateBuffers(): void; drawGeometry(geometryVertexArray: Float32Array, indexArray: Uint32Array): void; resetIndex(): void; initialize(): void; draw(passEncoder: GPURenderPassEncoder, camera: Camera): void; } export declare class StaticGeometry extends MultiGeometry { constructor(device: GPUDevice, primitiveType: PRIMITIVE_TYPE, vertexUppperLimit?: number); } export declare class DynamicGeometry extends MultiGeometry { constructor(device: GPUDevice, primitiveType: PRIMITIVE_TYPE, vertexUppperLimit?: number); }