playcanvas
Version:
PlayCanvas WebGL game engine
53 lines (52 loc) • 1.94 kB
TypeScript
/**
* @import { GSplatInfo } from "./gsplat-info.js"
* @import { GraphicsDevice } from '../../platform/graphics/graphics-device.js'
* @import { GraphNode } from '../graph-node.js';
*/
/**
* @ignore
*/
export class GSplatWorkBuffer {
constructor(device: any);
/** @type {GraphicsDevice} */
device: GraphicsDevice;
/** @type {number} */
id: number;
/** @type {Texture} */
colorTexture: Texture;
/** @type {Texture} */
covATexture: Texture;
/** @type {Texture} */
covBTexture: Texture;
/** @type {Texture} */
centerTexture: Texture;
/** @type {RenderTarget} */
renderTarget: RenderTarget;
/** @type {Texture} */
orderTexture: Texture;
/** @type {GSplatWorkBufferRenderPass} */
renderPass: GSplatWorkBufferRenderPass;
destroy(): void;
get textureSize(): number;
setOrderData(data: any): void;
createTexture(name: any, format: any, w: any, h: any): Texture;
/**
* @param {number} textureSize - The texture size to resize to.
*/
resize(textureSize: number): void;
/**
* Render given splats to the work buffer.
*
* @param {GSplatInfo[]} splats - The splats to render.
* @param {GraphNode} cameraNode - The camera node.
* @param {number[][]|undefined} colorsByLod - Array of RGB colors per LOD. Index by lodIndex; if a
* shorter array is provided, index 0 will be reused as fallback.
*/
render(splats: GSplatInfo[], cameraNode: GraphNode, colorsByLod: number[][] | undefined): void;
}
import type { GraphicsDevice } from '../../platform/graphics/graphics-device.js';
import { Texture } from '../../platform/graphics/texture.js';
import { RenderTarget } from '../../platform/graphics/render-target.js';
import { GSplatWorkBufferRenderPass } from './gsplat-work-buffer-render-pass.js';
import type { GSplatInfo } from "./gsplat-info.js";
import type { GraphNode } from '../graph-node.js';