From 9ba26374db4bc17267a4e95ae059973d95b6d963 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 6 May 2024 01:38:59 +0200 Subject: [PATCH] fix: some small issues --- app/src/lib/result-viewer/updateGeometries.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/app/src/lib/result-viewer/updateGeometries.ts b/app/src/lib/result-viewer/updateGeometries.ts index 0be14b2..e69de29 100644 --- a/app/src/lib/result-viewer/updateGeometries.ts +++ b/app/src/lib/result-viewer/updateGeometries.ts @@ -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; -let instancePool: ReturnType; - -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 }; -}