morfeo 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,12 +3,21 @@
3
3
  // Cada objeto mide ~2 unidades y viene centrado. Materiales con brillo: se ven bien con los reflejos del entorno.
4
4
  import React, {useMemo} from 'react';
5
5
  import * as THREE from 'three';
6
+ import {OBJETOS_INGENIERIA, ObjetoIngenieria} from './objetos-ingenieria';
7
+ import {OBJETOS_CIENCIA, ObjetoCiencia} from './objetos-ciencia';
8
+ import {OBJETOS_VARIOS, ObjetoVario} from './objetos-varios';
6
9
 
7
10
  export const OBJETOS_3D = [
8
11
  'corazon', 'estrella', 'rayo', 'diamante', 'trofeo', 'cohete', 'foco', 'reloj', 'planeta', 'arbol',
9
12
  'nube', 'regalo', 'llave', 'candado', 'casa', 'libro', 'globo', 'medalla', 'escudo', 'pin',
10
13
  // construcción (aceptan opciones: ver más abajo)
11
14
  'tuberia', 'muro', 'viga', 'columna', 'escalera', 'losa', 'tanque', 'suelo',
15
+ // plomería, electricidad, electrónica y mecánica (objetos-ingenieria.tsx)
16
+ ...OBJETOS_INGENIERIA,
17
+ // ciencia y cuerpo, consola, casa y ciudad, transporte, escuela (objetos-ciencia.tsx)
18
+ ...OBJETOS_CIENCIA,
19
+ // música, ropa, animales, deporte, oficina, industria, naturaleza (objetos-varios.tsx)
20
+ ...OBJETOS_VARIOS,
12
21
  ] as const;
13
22
 
14
23
  type M = {color?: string; metal?: number; rugosidad?: number};
@@ -543,6 +552,8 @@ export const Objeto3D: React.FC<{forma: string; t: number; opciones?: Record<str
543
552
  );
544
553
  }
545
554
  default:
546
- return null;
555
+ if ((OBJETOS_INGENIERIA as readonly string[]).includes(forma)) return <ObjetoIngenieria forma={forma} t={t} opciones={o} {...m} />;
556
+ if ((OBJETOS_CIENCIA as readonly string[]).includes(forma)) return <ObjetoCiencia forma={forma} t={t} opciones={o} {...m} />;
557
+ return (OBJETOS_VARIOS as readonly string[]).includes(forma) ? <ObjetoVario forma={forma} t={t} opciones={o} {...m} /> : null;
547
558
  }
548
559
  };