Currently, I am utilizing the THREE JS CSS3DRenderer in an attempt to have a CSS3DObject update its position.z when clicked. Below is the code I am working with:
var element = document.createElement("div");
element.style.width = "90px";
element.style.height = "120px";
element.style.backgroundColor = "#5C6167";
var object = new THREE.CSS3DObject(element);
object.position.x = 0;
object.position.y = 0;
object.position.z = 100;
object.addEventListener('click', function (event) {
new TWEEN.Tween(object.position).to({z: 200}, 500).easing(TWEEN.Easing.Quadratic.Out).start();
});
scene.add(object);
Unfortunately, it seems that the CSS3DObject is not recognizing the click event. Any advice or guidance on this matter would be greatly appreciated. Thank you!