Release Healer Man 0.1.29
This commit is contained in:
1 parent
8c9809d3e0
commit
544c1bee91
120 files changed
+4363
-1036
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { useEffect, useMemo } from "react";
|
||||
import { BufferGeometry, Float32BufferAttribute, DoubleSide } from "three";
|
||||
import navigation from "../../server/generated/arena-navigation.json";
|
||||
|
||||
export function ArenaNavigationSurface({ stageId }: { stageId: string }) {
|
||||
const geometry = useMemo(() => {
|
||||
const mesh = new BufferGeometry();
|
||||
mesh.setAttribute("position", new Float32BufferAttribute((navigation as Record<string, number[]>)[stageId] ?? [], 3));
|
||||
mesh.computeVertexNormals();
|
||||
return mesh;
|
||||
}, [stageId]);
|
||||
useEffect(() => () => geometry.dispose(), [geometry]);
|
||||
return <mesh geometry={geometry} position={[0, -.12, 0]} receiveShadow>
|
||||
<meshStandardMaterial color="#465142" side={DoubleSide} roughness={.92} />
|
||||
</mesh>;
|
||||
}
|
||||
Reference in new issue
Block a user