Rutas relativas
Se agregaron las rutas relativas a los archivos que están en el código
This commit is contained in:
@@ -6,13 +6,13 @@ import { Button } from "@/components/ui/button";
|
||||
const models = [
|
||||
{
|
||||
name: "Motor de Combustión",
|
||||
url: "/3d/motor_de_combustion/scene.gltf",
|
||||
route: "/previewer",
|
||||
url: "./3d/motor_de_combustion/scene.gltf",
|
||||
route: "./previewer",
|
||||
},
|
||||
{
|
||||
name: "Raspberry Pi Cam V2.1",
|
||||
url: "/3d/raspberry_pi_cam_v2.1/scene.gltf",
|
||||
route: "/previewer2",
|
||||
url: "./3d/raspberry_pi_cam_v2.1/scene.gltf",
|
||||
route: "./previewer2",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -21,12 +21,12 @@ function ModelPreview({ url }: { url: string }) {
|
||||
|
||||
// Define heuristic parameters for best perspective
|
||||
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],
|
||||
rotation: [0.2, Math.PI / 4, 0],
|
||||
scale: 0.01,
|
||||
},
|
||||
"/3d/raspberry_pi_cam_v2.1/scene.gltf": {
|
||||
"./3d/raspberry_pi_cam_v2.1/scene.gltf": {
|
||||
position: [0, -0.5, 0],
|
||||
rotation: [0.1, Math.PI / 6, 0],
|
||||
scale: 0.5,
|
||||
|
||||
Reference in New Issue
Block a user