When i try to render my dat.gui with a button and a textbox on top of my WebGL window i get this:
The "Close Controls" part of the dat.gui is showing, but for some reason my button and textbox is not. I use three.js to create the WebGL window.
function ini()
{
this.button1 = function () { alert("HEJ"); };
this.text1 = "Hallo World";
}
var gui = new dat.GUI({ autoPlace: false });
var div = document.getElementById('datGui');
div.appendChild(gui.domElement);
var i = new ini();
gui.add(i, "button1");
gui.add(i, "text1");
<div id="datGui">
<canvas id="canvas" style="position: absolute; background-color: black; width: auto; "></canvas>
</div>