UNPKG

playcanvas

Version:

PlayCanvas WebGL game engine

17 lines (14 loc) 624 B
import { Vec3 } from '../../core/math/vec3.js'; import { BoundingBox } from '../../core/shape/bounding-box.js'; import { GSplatOctree } from './gsplat-octree.js'; class GSplatOctreeResource { /** * @param {string} assetFileUrl - The file URL of the container asset. * @param {object} data - Parsed JSON data. */ constructor(assetFileUrl, data){ /** @type {BoundingBox} */ this.aabb = new BoundingBox(); this.octree = new GSplatOctree(assetFileUrl, data); this.aabb.setMinMax(new Vec3(data.tree.bound.min), new Vec3(data.tree.bound.max)); } } export { GSplatOctreeResource };