This weekend I’ve been trying to use webcomponents (templates, shadow DOM and custom elements) to encapsulate THREE scene. I have done the following:
I’m having trouble displaying the code properly, so here’s a Fiddle to show it: https://jsfiddle.net/6zje01gr/1/
I am trying to reproduce the first example of this page: https://threejsfundamentals.org/threejs/lessons/threejs-responsive.html (with only one green cube)
If someone could help me understand what I am doing wrong, I’ll be grateful.