citologia e histologia
This commit is contained in:
1 parent
7994e56cd0
commit
65a4fdea9e
17 files changed
+431
-7
No files matched your search
@@ -6,6 +6,11 @@ import { useAtlasStore, type BodyRegion, type ClipAxis } from "../../store/useAt
|
||||
import { SystemModel } from "./SystemModel.js";
|
||||
import type { Structure } from "../../lib/api.js";
|
||||
|
||||
// Sistemas apresentados como diagrama 2D (fotomicrografia real com
|
||||
// hotspots) em vez de malha 3D — ver SkinDiagram.tsx e
|
||||
// MicroscopyDiagram.tsx.
|
||||
const NON_3D_SYSTEMS = new Set(["tegumentar", "citologia", "histologia"]);
|
||||
|
||||
// Normais de referência em anatomia: sagital separa esq./dir., coronal
|
||||
// (= frontal) separa ant./post., transversal separa sup./inf.
|
||||
const AXIS_NORMAL: Record<ClipAxis, [number, number, number]> = {
|
||||
@@ -304,10 +309,14 @@ export function Scene({
|
||||
// um sistema visível — a visibilidade por malha é resolvida dentro de
|
||||
// cada SystemModel.
|
||||
const structuresByFile = useMemo(() => {
|
||||
// Tegumentar não tem malha 3D (é um diagrama 2D — ver SkinDiagram.tsx),
|
||||
// então nunca entra na busca de .glb, senão o GLTFLoader tentaria
|
||||
// carregar o modelFile placeholder ("n/a") dessas estruturas.
|
||||
const structuresList = [...bySlug.values()].filter((s) => s.system.slug !== "tegumentar");
|
||||
// Tegumentar/Citologia/Histologia não têm malha 3D (são diagramas 2D
|
||||
// com fotomicrografias reais — ver SkinDiagram.tsx e
|
||||
// MicroscopyDiagram.tsx), então nunca entram na busca de .glb, senão o
|
||||
// GLTFLoader tentaria carregar o modelFile dessas estruturas (que é o
|
||||
// caminho de uma imagem, não um .glb).
|
||||
const structuresList = [...bySlug.values()].filter(
|
||||
(s) => !NON_3D_SYSTEMS.has(s.system.slug),
|
||||
);
|
||||
const map = new Map<string, Structure[]>();
|
||||
for (const s of structuresList) {
|
||||
if (!map.has(s.modelFile)) map.set(s.modelFile, []);
|
||||
|
||||
Reference in new issue
Block a user