Stupid question how to place my three.js into my main div?

Hi,

I have searched the net and yet despite the many examples I can’t seem to apply it to my project.

Could you tell me how to integrate my scene three.js with a green to die for in my “app” div so that all this ugly color fills my page? Here below is my codesandbox :

Thanks a lot

It’s not really a THREE problem, it’s a HTML problem.

As a quick solution replace this line 48 in “index.js”

document.body.appendChild(renderer.domElement);

with this:

const stl = renderer.domElement.style;
stl.position = "absolute";
stl.top = "0px";
stl.left = "0px";
stl.zIndex = "-1";
1 Like