fix: some small issues
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m58s

This commit is contained in:
max_richter 2024-05-06 01:38:59 +02:00
parent 2351c65179
commit 9ba26374db

View File

@ -1,27 +0,0 @@
import { MeshMatcapMaterial, TextureLoader, type Group } from "three";
import { createGeometryPool, createInstancedGeometryPool } from "./geometryPool";
const loader = new TextureLoader();
const matcap = loader.load('/matcap_green.jpg');
matcap.colorSpace = "srgb";
const material = new MeshMatcapMaterial({
color: 0xffffff,
matcap
});
let geometryPool: ReturnType<typeof createGeometryPool>;
let instancePool: ReturnType<typeof createInstancedGeometryPool>;
export function updateGeometries(inputs: Int32Array[], group: Group) {
geometryPool = geometryPool || createGeometryPool(group, material);
instancePool = instancePool || createInstancedGeometryPool(group, material);
let totalVertices = 0;
let totalFaces = 0;
geometryPool.update(inputs.filter(i => i[0] === 1));
instancePool.update(inputs.filter(i => i[0] === 2));
return { totalFaces, totalVertices };
}