Hello, I was wondering if there is anyway of updating the HTML mesh quicker? or sending an event when the HTML is changed to tell the renderer to use the updated HTML?
I have an example below:
Hello, I was wondering if there is anyway of updating the HTML mesh quicker? or sending an event when the HTML is changed to tell the renderer to use the updated HTML?
I have an example below:
I think your issue is that you want to change the properties of an object created in a JavaScript module from inline script. A trick I have used earlier is to first declare a global var in the inline script, and then assign this var in the module. After that, you can call any method that is exposed by the in the module defined object (here ‘ThreeML’), from any inline JS
<script>
var threeml;
</script>
<script type="module">
import { ThreeML } from '../../threeml/threeml.js';
threeml = new ThreeML();
</script>
Or you can put all your JS in the module, and assign the onclick programmatically.