UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

22 lines (21 loc) 418 B
import { calculateNormals, calculateTangents } from "./geometry-utils.js"; class Geometry { positions; normals; colors; uvs; uvs1; blendIndices; blendWeights; tangents; indices; calculateNormals() { this.normals = calculateNormals(this.positions, this.indices); } calculateTangents() { this.tangents = calculateTangents(this.positions, this.normals, this.uvs, this.indices); } } export { Geometry };