@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
52 lines (51 loc) • 2.35 kB
TypeScript
/** @ignore */
export class GSplatCompressed {
/**
* @param {import('../../platform/graphics/graphics-device.js').GraphicsDevice} device - The graphics device.
* @param {import('./gsplat-compressed-data.js').GSplatCompressedData} gsplatData - The splat data.
*/
constructor(device: import("../../platform/graphics/graphics-device.js").GraphicsDevice, gsplatData: import("./gsplat-compressed-data.js").GSplatCompressedData);
device: import("../../platform/graphics/graphics-device.js").GraphicsDevice;
numSplats: any;
/** @type {import('../../core/shape/bounding-box.js').BoundingBox} */
aabb: import("../../core/shape/bounding-box.js").BoundingBox;
/** @type {Float32Array} */
centers: Float32Array;
/** @type {Texture} */
packedTexture: Texture;
/** @type {Texture} */
chunkTexture: Texture;
/** @type {Texture?} */
shTexture0: Texture | null;
/** @type {Texture?} */
shTexture1: Texture | null;
/** @type {Texture?} */
shTexture2: Texture | null;
destroy(): void;
/**
* @returns {import('../materials/material.js').Material} material - The material to set up for
* the splat rendering.
*/
createMaterial(options: any): import("../materials/material.js").Material;
/**
* Evaluates the texture size needed to store a given number of elements.
* The function calculates a width and height that is close to a square
* that can contain 'count' elements.
*
* @param {number} count - The number of elements to store in the texture.
* @returns {Vec2} The width and height of the texture.
*/
evalTextureSize(count: number): Vec2;
/**
* Creates a new texture with the specified parameters.
*
* @param {string} name - The name of the texture to be created.
* @param {number} format - The pixel format of the texture.
* @param {Vec2} size - The width and height of the texture.
* @param {Uint8Array|Uint16Array|Uint32Array} [data] - The initial data to fill the texture with.
* @returns {Texture} The created texture instance.
*/
createTexture(name: string, format: number, size: Vec2, data?: Uint8Array | Uint16Array | Uint32Array): Texture;
}
import { Texture } from '../../platform/graphics/texture.js';
import { Vec2 } from '../../core/math/vec2.js';