Comments (7)
@devhims
Hmm, in that case I assume that file is not loaded as a static file but in the format of a HTML page.
Check what it shows on the ./assets/specstand.glb
page and if it shows a HTML page, fix the config to serve static files on the assets folder.
In other way, moving the 3D model to the public
folder will work I think.
from egjs-view3d.
@devhims
I'm glad to hear that 👍
Don't worry about filing more issues. I may be slow to respond if I'm working on other things, but I'll check yours soon as I can :)
from egjs-view3d.
Hello @devhims!
By the error message, I guess there's something wrong with your 3D model.
.glb
file usually starts with the word "glTF" and followed by the glTF file's contents which basically has the same format as JSON.
Sample glb model
So I guess you should check your 3D model's validity first, or if you can share your model I can check that for you :)
There's a useful site to test your GLTF/GLB model here
from egjs-view3d.
Thanks for the response @WoodNeck! Actually, there is no issue with the model file. I had to first import the model in the js file and then use it.
import spec from './assets/specstand.glb';
then I used spec
as an argument in the load method. While this technique works for .glb models, it didn't work for .gltf files. If you've any suggestions that would be awesome!! :)
from egjs-view3d.
@WoodNeck can you please share a link that explains how to update the config. As for moving the files to the public folder, react by default doesn't allow us to import assets from outside src
directory.
UPDATE: Moving the files to the public folder and adjusting the relative path gets the issue resolved.
from egjs-view3d.
@devhims
I hope this helps :)
https://create-react-app.dev/docs/using-the-public-folder/
See the process.env.PUBLIC_URL
section
from egjs-view3d.
Thanks a bunch @WoodNeck! You're AWESOME!!
I'll most likely run into more issues as I continue to work on the library. I hope you don't mind me raising more issues. 😄
from egjs-view3d.
Related Issues (20)
- Y axis cannot be moved HOT 2
- Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json#overrides[0]': Cannot find module '@typescript-eslint/eslint-plugin' HOT 3
- Can I import glb files from memory into view3d? HOT 5
- I can't load view3D. HOT 2
- how to use plugins in vanilla javascript HOT 3
- how can i access model information HOT 2
- Loading new 3D model / setting iosSrc HOT 3
- Is this gjs-view3d support IE11 ? HOT 4
- Canvas get's blank after applying/removing CSS 'display: none' to wrapper element HOT 4
- Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'. HOT 1
- How to access THREE(three.js instance)? HOT 1
- Question: Is there a grid feature? HOT 1
- Disable negative rotation on the Y axis, is it possible to set via options? HOT 2
- New WebVR Plugin and Library Compilation HOT 2
- question. in react, on initial loading, want to use both zooming and rotating. HOT 2
- New Indexed DB Plugin
- ARButton only working in Safari on iOS HOT 2
- Right-click mouseRelease event does not "release" the model if the event happens outside of the browser window
- Problem with View3d
- requests for examples on view3d
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egjs-view3d.