0.0.1 • Published 10 months ago
configurator-sdk-amd v0.0.1
Configurator-sdk
Usage
Import the package and their dependencies within the script tag element.
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.152.2/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.152.2/examples/jsm/"
}
}
</script>
<script type="module">
import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
import { DRACOLoader } from "three/addons/loaders/DRACOLoader.js";
window.addEventListener("DOMContentLoaded", () => {
window.THREEJS = { THREE, OrbitControls, DRACOLoader, GLTFLoader };
var script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/npm/configurator-sdk/bundle.js";
document.head.appendChild(script);
});
</script>
Embed Custom element
Embed the custom elements which is generated by configurator-sdk package, is one of the web-component render the element within the tag.
<product-element></product-element>
0.0.1
10 months ago