shx-3d-render
parent
d3808bdb58
commit
b7a48c39e6
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,9 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
const threeJSisLading = false;
|
||||
const threeJSloaded = false;
|
||||
|
||||
let globalInputFormsObjValues = {
|
||||
"test1": {
|
||||
"text1": "test"
|
||||
|
@ -94,6 +97,19 @@
|
|||
connectedCallback() {
|
||||
this.innerHTML = '<div class="shx-input-forms-container"></div>';
|
||||
this.container = this.querySelector('.shx-input-forms-container');
|
||||
|
||||
if(!threeJSisLading && !threeJSloaded) {
|
||||
// load threejs
|
||||
let script = document.createElement('script');
|
||||
script.src = {{ 'three.module.min.js' | asset_url }};
|
||||
script.id = 'threejs-script';
|
||||
document.head.appendChild(script);
|
||||
|
||||
script.onload = () => {
|
||||
threeJSloaded = true;
|
||||
console.log('threejs loaded');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initCurrentVariant(id) {
|
||||
|
|
Loading…
Reference in New Issue