unconed / MathBox.js

MathBox is a (work in progress) library for making presentation-quality math diagrams in WebGL.
MIT License
1.94k stars 127 forks source link

background color #41

Closed wbw20 closed 9 years ago

wbw20 commented 9 years ago

hey

great library. I was wondering how to set the background color of the canvas. I am a MathBox noob. Thanks

:green_heart:

wbw20 commented 9 years ago

whoops... just saw this: https://github.com/unconed/MathBox.js/issues/28

take care

HLueckhoff commented 9 years ago

You can set the background by regular threejs means. This line works for me: mathbox._world._renderer.setClearColorHex(0xEDD59A, 1); You basically get the threejs renderer first and from then on it is a matter of standard threejs API calls. Just keep in mind that the underlying three version is somewhat ancient.