Looking for some code help to load 3d models in website using 3js

Hi there

I’m an artist and seeking some kind of code help for loading the GLTF models in the webiste using 3js.


Where I can showcase the wide variety of furniture assets in the website and play around in the website.

Some code help would be really helpful.

Thanks inadvance.

tried this code, found this in one of the tutorial. Used GLTFLoader, OrbitControls from the 3js website.

Its pretty much working fine for the other users. But its only showing me the plain white background.

You will need to share more information for us to help — there are many examples on the threejs website, and if your own code isn’t working, you need to share the code, the error(s) you get in the console, and (ideally) a demo. See https://stackoverflow.com/help/how-to-ask and https://threejs.org/docs/#manual/en/introduction/Loading-3D-models.

`[index.html|attachment](upload://uvdHnBcCZ7648pg7rn6EOduiysz.html) (2.1 KB) `

Well Ive tried this code, I must confess its from a tutorial but the output is a blank webpage.

Some GLTF to webpage loader help would be really helpful mate.

Your link is broken. Can you try again? Or even better, create a live example using Codepen/Codesandbox/Glitch.

GLTF Loader

As well sharing the Drive link - https://drive.google.com/drive/folders/1lFgKLesPqcHUK7dKLtFeHF8zShsdAQ9Y?usp=sharing

Ive got this code from internet, If I remove the orbitcontrols properties from the entire code, I Can able to view a 3d model, after adding the orbitcontrols just only the blank screen.

Need some help on this.


try changing
controls.addEventListener('change', renderer)
controls.addEventListener('change', function(){ renderer.render(scene,camera) })

i didn’t try, just guessing …
Also Zoom/scroll out and in …
Also either run app.js or the inHtml js script not both

1 Like