Rutas relativas

Se agregaron las rutas relativas a los archivos que están en el código
This commit is contained in:
2025-03-11 17:00:10 +00:00
parent e997fc05d2
commit 042e2577dc

View File

@@ -6,13 +6,13 @@ import { Button } from "@/components/ui/button";
const models = [ const models = [
{ {
name: "Motor de Combustión", name: "Motor de Combustión",
url: "/3d/motor_de_combustion/scene.gltf", url: "./3d/motor_de_combustion/scene.gltf",
route: "/previewer", route: "./previewer",
}, },
{ {
name: "Raspberry Pi Cam V2.1", name: "Raspberry Pi Cam V2.1",
url: "/3d/raspberry_pi_cam_v2.1/scene.gltf", url: "./3d/raspberry_pi_cam_v2.1/scene.gltf",
route: "/previewer2", route: "./previewer2",
}, },
]; ];
@@ -21,12 +21,12 @@ function ModelPreview({ url }: { url: string }) {
// Define heuristic parameters for best perspective // Define heuristic parameters for best perspective
const parameters: Record<string, { position: [number, number, number]; rotation: [number, number, number]; scale: number }> = { const parameters: Record<string, { position: [number, number, number]; rotation: [number, number, number]; scale: number }> = {
"/3d/motor_de_combustion/scene.gltf": { "./3d/motor_de_combustion/scene.gltf": {
position: [0, -1.5, 0], position: [0, -1.5, 0],
rotation: [0.2, Math.PI / 4, 0], rotation: [0.2, Math.PI / 4, 0],
scale: 0.01, scale: 0.01,
}, },
"/3d/raspberry_pi_cam_v2.1/scene.gltf": { "./3d/raspberry_pi_cam_v2.1/scene.gltf": {
position: [0, -0.5, 0], position: [0, -0.5, 0],
rotation: [0.1, Math.PI / 6, 0], rotation: [0.1, Math.PI / 6, 0],
scale: 0.5, scale: 0.5,