Attempting to incorporate a 3D model into my website using the modelviewer library, but encountering difficulties in loading the file as shown below:
Just to note, I am utilizing github pages with a custom domain from godaddy which may be contributing to the issue.
Initially suspected it was a permission problem, but after placing my .glb model in the folder and downloading it via a link (e.g., www.website.com/origami.glb), it downloaded successfully.
Below is the code snippet:
<!DOCTYPE html>
<html style="font-size: 100%;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>test</title>
<link rel="stylesheet" href="./styles/styles.css" id="" type="text/css">
<link rel="stylesheet" href="./styles/stylesMob.css" id="" type="text/css">
<link rel="stylesheet" href="./styles/navStyle.css" id="" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<style>
model-viewer{
width: 400px;
height: 1600px;
margin: auto;
}
</style>
</head>
<body>
<ul>
<li><a href="index.html">main</a></li>
<li><a class="active" href="projects.html">projects</a></li>
<li><a href="about.html">about</a></li>
<li><a href="about.html">contact</a></li>
</ul>
<h4 style="font-size: 20px; color: red;"> * the website is wip * </h4>
<div>
<model-viewer src="origami.glb" ></model-viewer>
</div>
</body>
</html>