Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glb model shows incorrectly #5564

Closed
hmejbri opened this issue Aug 15, 2024 · 3 comments
Closed

Glb model shows incorrectly #5564

hmejbri opened this issue Aug 15, 2024 · 3 comments

Comments

@hmejbri
Copy link

hmejbri commented Aug 15, 2024

Description:
My glb model loads incorrectly in a-frame and it shows correctly using gltf.report. I tried exporting it to gltf then converting it to glb but still same problem (im compressing the model using DRACO). As per the code i copied the model viewer repo and changed the model path and added the dracoDecoder files path to a-scene.

Opera Snapshot_2024-08-15_103415_vworld historiar io
Opera Snapshot_2024-08-15_103441_gltf report

  • A-Frame Version: 1.2.0
  • Platform / Device: Windows / Pc
  • Reproducible Code Snippet or URL:
<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title>Vworld</title>
  <meta name="description" content="Model Viewer (VR / AR) • A-Frame">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
  <script src="info-message.js"></script>
  <script src="https://unpkg.com/[email protected]/dist/aframe-extras.min.js"></script>
  <script src="hide-on-enter-ar.js"></script>
  <script src="ar-shadows.js"></script>
  <script src="ar-hit-test.js"></script>
  <script src="model-viewer.js"></script>
  <script src="background-gradient.js"></script>
</head>
<body>

<a-scene
  renderer="colorManagement: true;"
  info-message="htmlSrc: #messageText"
  model-viewer="gltfModel: #villa;"
  gltf-model="dracoDecoderPath: /pupput/public/draco/;">
  <a-assets timeout="300000">
    <a-asset-item id="villa"
      src="/pupput/public/models/pupput/villa1.glb"
      response-type="arraybuffer" crossorigin="anonymous"></a-asset-item>

    <a-asset-item id="reticle"
      src="/pupput/public/models/pupput/villa1.glb"
      response-type="arraybuffer" crossorigin="anonymous"></a-asset-item>

    <img id="shadow" src="https://cdn.glitch.com/20600112-c04b-492c-8190-8a5ccc06f37d%2Fshadow.png?v=1606338852399"></img>
    <a-asset-item id="messageText" src="message.html"></a-asset-item>
  </a-assets>
</a-scene>
</body>
</html>

@mrxz
Copy link
Contributor

mrxz commented Aug 15, 2024

A-Frame 1.2.0 is quite an old version. Does this issue also happen when you use 1.6.0?

@hmejbri
Copy link
Author

hmejbri commented Aug 15, 2024

A-Frame 1.2.0 is quite an old version. Does this issue also happen when you use 1.6.0?

a-frame model viewer does not work on 1.6.0

@mrxz
Copy link
Contributor

mrxz commented Aug 15, 2024

The model viewer example is kept in this repo and should work just fine with 1.6.0 and master, see: https://github.com/aframevr/aframe/tree/master/examples/showcase/model-viewer. Often times examples on glitch can be outdated, which is a known issue (#5222).

The hosted version does use 1.6.0: https://aframe.io/examples/showcase/modelviewer/

@hmejbri hmejbri closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants