UNPKG

ts-game-engine

Version:

Simple WebGL game/render engine written in TypeScript

36 lines (35 loc) 1.38 kB
import { Entity } from "./Entity"; import { Scene } from "../Scene"; import { Mesh } from "../Meshes"; import { Material } from "../Materials"; import { IRenderable, IGlobalUniforms, IDisposable } from "../Interfaces"; import { PipelineState } from "../Systems/Graphics/PipelineState"; export declare class MeshRenderer extends Entity implements IRenderable, IDisposable { protected readonly culling: boolean; protected readonly context: WebGL2RenderingContext; protected readonly pipelineState: PipelineState; protected mesh: Mesh | undefined; get Mesh(): Mesh | undefined; protected material: Material | undefined; get Material(): Material | undefined; get IsRenderable(): boolean; private aabb; protected vao: WebGLVertexArrayObject; constructor(scene: Scene, name: string, culling?: boolean); Dispose(): void; Render(): void; SetMesh(mesh: Mesh): void; SetMaterial(material: Material): void; protected UpdateVAO(): void; protected GetGlobalUniformsObject(): IGlobalUniforms; protected UpdateAABB(): void; protected IsCulled(): boolean; private aabbMesh; private aabbMaterial; private aabbVAO; private aabbMeshDirty; private readonly aabbColor; private CreateBoundsDebug; private RenderBoundsDebug; private DisposeBoundsDebug; }