fix: some small issues
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m58s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m58s
This commit is contained in:
parent
2351c65179
commit
9ba26374db
@ -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 };
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user