@shonsirsha Sorry for taking so long, but I got your button working. You needed to
- make a CSS3DRenderer (not just WebGLRenderer)
- then scale the sizing by 1000 (see why below)
Demo (click the button): https://codepen.io/trusktr/pen/oNXpMgX
Search the code for
cssRenderer to find the new parts, and take a look at each size or position number being 1000x bigger.
The reason the sizes must be bigger is because a DOM elements can not be smaller than 1 unit (CSS pixels), and your size was 0.7, 0.2. At that size, you can’t get precise DOM sizing. So by changing it to 700 and 200 the sizing works.
But I broke some stuff (now the text is far out from the wall) but you can take it from there. The button works!
But now you may want to tune the material for the css3d object mesh (the mesh returned from the
makeElementObject function, to configure how transparent you want it to be, so that you can see the content of the button.
To learn how, I highly recommend studying this example: https://codepen.io/trusktr/pen/RLLogx