UNPKG

playcanvas

Version:

PlayCanvas WebGL game engine

33 lines (32 loc) 1.35 kB
export class GSplatCompressedResource extends GSplatResourceBase { /** * @param {GraphicsDevice} device - The graphics device. * @param {GSplatCompressedData} gsplatData - The splat data. */ constructor(device: GraphicsDevice, gsplatData: GSplatCompressedData); /** @type {Texture} */ packedTexture: Texture; /** @type {Texture} */ chunkTexture: Texture; /** @type {Texture?} */ shTexture0: Texture | null; /** @type {Texture?} */ shTexture1: Texture | null; /** @type {Texture?} */ shTexture2: Texture | null; chunks: Float32Array<ArrayBuffer>; /** * 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; } import { GSplatResourceBase } from './gsplat-resource-base.js'; import type { Texture } from '../../platform/graphics/texture.js'; import { Vec2 } from '../../core/math/vec2.js'; import type { GraphicsDevice } from '../../platform/graphics/graphics-device.js'; import type { GSplatCompressedData } from './gsplat-compressed-data.js';