Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.52k stars 128 forks source link

Add a transparent prop to scene component #52

Closed petitssoldats closed 9 years ago

petitssoldats commented 9 years ago

The transparent prop is a boolean, that changes the alpha of the THREE.WebGLRenderer and the opacity of the clear color of it (setClearColor).

:bowtie: :ocean:

Izzimach commented 9 years ago

Looks like the default clearAlpha in setClearColor is 1 and this change uses 0 as the default if the user doesn't specify it. Doesn't seem to break anything, but I'm putting this here for future reference. Need to regen the pixel reference images since they apparently use alpha=1.

Izzimach commented 9 years ago

https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js#L416