gltf-viewer | Web Component to display glTF models | Canvas library
kandi X-RAY | gltf-viewer Summary
kandi X-RAY | gltf-viewer Summary
Web Component to display glTF models
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Imports a given context into an object .
- Extends PBRMaterialExtensionExtension for PBRSpec .
- Recursive comparison function .
- format the value into an object
- Queue task queue .
- Determines whether or not a test function .
- growf - container
- generate a string representation of a holder
- Initialize clock .
- Debounce a function .
gltf-viewer Key Features
gltf-viewer Examples and Code Snippets
Community Discussions
Trending Discussions on gltf-viewer
QUESTION
Hi i am loading a GLTF model in my scene. But the model looks too yellow i assume this has to do with the material. But i have no clue what is causing it, it is not the model itself since if i check it on donmccurdy's gltf viewer it looks perfect.
See a reference below:
GLTF Viewer:
And this is how the same model looks in my scene:
I have added an environment map to the scene this fixed may things but not the yellowness.. See current code below:
...ANSWER
Answered 2022-Mar-24 at 09:22Using GLTFLoader
requires a sRGB workflow which is not configured in your app. Add the following line and see if it fixes the color issue:
QUESTION
I'm trying to load a remote asset (.glb or .gltf) into the ModelViewer
in filament. The Google Filament sample-gltf-viewer shows a RemoteServer
object but I'm not seeing how I can load a remote asset from a URL (e.g. https://github.com/kelvinwatson/glb-files/raw/main/DamagedHelmet.glb)
I've tried the below but I get "Unable to parse glb file".
The code for RemoteServer doesn't indicate where we can pass a URL.
...ANSWER
Answered 2022-Feb-24 at 20:21Issue has been resolved. The issue was that I wasn't fully downloading the file, and that the modelViewer.loadModelGlb
needed to be called on the main thread.
Here is the working code:
QUESTION
My issue is that I'm trying to make a SurfaceView
display a 3D model that's just a small part of the whole application layout. The layout includes multiple views for displaying other data; however, as soon as I create the ModelViewer
the SurfaceView
vanishes. When I use version 1.9.9
of Filament the layout is displayed, but heavily pixelated and seems to make other layout elements disappear. With v1.7.0
the other elements don't dissapear, but nothing is displayed.
I'm using the following version in Gradle file:
...ANSWER
Answered 2021-Apr-28 at 19:30I fixed this a while back by making a copy of the ModelViewer
class and making a custom ModelViewer3D
class with a new constructor, which was a nice solution, because it gives you more control over the options than you would normally with the given ModelViewer
.
The uiHelper
isOpaque
field needed to be set to false to fix the above issue, and for a transparent background of the surface view the renderer needed to reset the clear options (which I made a separate function for, shown below).
QUESTION
I created an angular project with three.js, but when I load 3d models, they have a bad quality.
When I load this same models on this website : https://gltf-viewer.donmccurdy.com/ they are perfect, in a great quality. I don't understand why. I tried to copy some of the open source code of this website, but this doesn't change anything :
I tried to load in gltf with that :
...ANSWER
Answered 2021-Jan-30 at 02:21The viewer you linked to adds lights where as the code you posted for your own viewer does not
Here's the code from the viewer
https://github.com/donmccurdy/three-gltf-viewer/blob/master/src/viewer.js#L412
QUESTION
Hello I'm trying to implement a 3D Model Viewer using Three.Js however I have a problem with the loading times and I don't know where the problem might be.
As an example I'm trying to upload this model here (download link): https://opensplit.com/gltf/assets/PromoModel.glb
You can test it In this gltf Viewer here for example: https://gltf-viewer.donmccurdy.com/
It will basically pops up after only a few seconds.
However you can see how ridiculously long it takes on my website: https://opensplit.com/ The same model takes now more than two minutes to load.. this cannot be correct, why is it so slow?
Here is my code:
...ANSWER
Answered 2020-Jul-09 at 10:52You can look at the code for Dons viewer here: https://github.com/donmccurdy/three-gltf-viewer
QUESTION
Can anyone help me debug a glTF file? It looks ok in Don McCurdy's glTF viewer at https://gltf-viewer.donmccurdy.com/ (though it's pretty different from how it looks in Blender) but most of its pieces are missing when I use aframe to look at it: https://sgouros.com/scorpii/index1.html. The model is at https://sgouros.com/scorpii/data/scorpii3.glb
...ANSWER
Answered 2020-Jan-24 at 22:22This is happening because the transparent nodes of the model in most cases should have disabled writing to the depth buffer by their material.
Citing the Khronos wiki(or citing Don McCurdy citing the wiki):
The standard method for dealing with translucent objects ... involves disabling writes to the depth buffer and sorting transparent objects and/or polygons based on distance to the camera.
So you could just traverse the mesh and disable depthWrite for transparent objects:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gltf-viewer
The easiest way to get going is to install the polymer-cli:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page