Merge pull request #97 from pattern-x/feature/fix-pages

Fixed two demo pages
This commit is contained in:
yanzexuan1
2023-06-16 04:15:44 +00:00
parent 82f993ec92
commit ae23a023a3
4 changed files with 8 additions and 15 deletions

View File

@ -45,7 +45,7 @@
// draco decoder path is needed to load draco encoded models. // draco decoder path is needed to load draco encoded models.
// gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here. // gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here.
const decoderPath = "demo/three/js/libs/draco/gltf/"; const decoderPath = "./demo/three/js/libs/draco/gltf/";
viewer.setDracoDecoderPath(decoderPath); viewer.setDracoDecoderPath(decoderPath);
// loadProjectModel // loadProjectModel

View File

@ -3,19 +3,12 @@
<head> <head>
<link rel="icon" href="./demo/favicon.ico"> <link rel="icon" href="./demo/favicon.ico">
<link rel="stylesheet" type="text/css" href="./demo/global.css"> <link rel="stylesheet" type="text/css" href="./demo/global.css">
<!-- <style> <style>
#myCanvas { #myCanvas {
position: absolute; width: 100%;
width: calc(100% - 100px); height: 100%;
width: -moz-calc(100% - 100px);
width: -webkit-calc(100% - 100px);
height: calc(100% - 80px);
height: -moz-calc(100% - 80px);
height: -webkit-calc(100vh - 80px);
left: 50px;
top: 40px;
} }
</style> --> </style>
</head> </head>
<body> <body>
@ -60,7 +53,7 @@
// draco decoder path is needed to load draco encoded models. // draco decoder path is needed to load draco encoded models.
// gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here. // gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here.
const decoderPath = "demo/three/js/libs/draco/gltf/"; const decoderPath = "./demo/three/js/libs/draco/gltf/";
viewer.setDracoDecoderPath(decoderPath); viewer.setDracoDecoderPath(decoderPath);
// loadProjectModel // loadProjectModel

View File

@ -83,7 +83,7 @@
} }
); );
window.compareHelper = compareHelper; window.compareHelper = compareHelper;
const fontFiles = ["three/fonts/hztxt.shx", "three/fonts/simplex.shx"]; const fontFiles = ["./demo/three/fonts/hztxt.shx", "./demo/three/fonts/simplex.shx"];
await compareHelper.setFont(fontFiles); await compareHelper.setFont(fontFiles);
compareHelper.viewer1.toolbar?.updateMenus( compareHelper.viewer1.toolbar?.updateMenus(

View File

@ -97,7 +97,7 @@
); );
// draco decoder path is needed to load draco encoded models. // draco decoder path is needed to load draco encoded models.
// gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here. // gemini-viewer js sdk user maintains draco decoder code somewhere, and provides the path here.
const decoderPath = "demo/three/js/libs/draco/gltf/"; const decoderPath = "./demo/three/js/libs/draco/gltf/";
viewer.setDracoDecoderPath(decoderPath); viewer.setDracoDecoderPath(decoderPath);
// loadProjectModel // loadProjectModel