I'm trying to load a background image or a color at least, but I have been unsuccessful. I can't quite figure out where the problem is; I tried commenting out my javascript files in the html so it would only be the css, and I still can't get anything to show up (I thought my stylesheet was linked properly but now I'm not so sure), and when I load the three.js scene normally with the javascript files nothing changes other than when I turn the WEBGLRenderer alpha on/off so it can be black or white. The autoClearColor function also does nothing. I've looked at several methods of writing it in the stylesheet between youtube tutorials and forums and nothing seems to work. Here is my code where I think the issue might be (js, then css):
renderer = new THREE.WebGLRenderer({ alpha: true, }) //renderer.autoClearColor = 0xF7BDFF renderer.setSize(innerWidth, innerHeight) document.body.appendChild(renderer.domElement) body{ background-image: url('images/abstractdraw.png') } https://stackoverflow.com/questions/66467569/unable-to-load-background-color-or-image-in-three-js March 04, 2021 at 10:07AM
没有评论:
发表评论