diff --git a/dist/xrfragment.three.js b/dist/xrfragment.three.js
index 55dabf4..a85f6a8 100644
--- a/dist/xrfragment.three.js
+++ b/dist/xrfragment.three.js
@@ -628,6 +628,7 @@ xrfragment.parseModel = function(model,url){
xrfragment.model[file] = model
model.scene.traverse( (mesh) => {
+ console.log("| "+mesh.name)
if( mesh.userData ){
let frag = {}
for( let k in mesh.userData ){
diff --git a/example/assets/style.css b/example/assets/style.css
index 3699964..640aeff 100644
--- a/example/assets/style.css
+++ b/example/assets/style.css
@@ -73,7 +73,7 @@ input[type="submit"] {
a#source{
position: absolute;
- bottom: 31px;
+ bottom: 29px;
right: 20px;
color: #888;
font-weight: bold;
@@ -82,6 +82,17 @@ a#source{
z-index:2000;
}
+a#model{
+ position: absolute;
+ bottom: 29px;
+ right: 130px;
+ color: #888;
+ font-weight: bold;
+ font-family: sans-serif;
+ text-decoration: underline;
+ z-index:2000;
+}
+
.render {
position:absolute;
top:0;
diff --git a/example/threejs/sandbox/index.html b/example/threejs/sandbox/index.html
index 673665c..373eae7 100644
--- a/example/threejs/sandbox/index.html
+++ b/example/threejs/sandbox/index.html
@@ -20,6 +20,7 @@
sourcecode
+ ⬇️ model
@@ -67,7 +68,6 @@
};
init();
- animate();
function init() {
@@ -148,7 +148,10 @@
render();
};
- loader.load( 'example2.gltf#pos=0,1,2', loadGLTF );
+
+ let file = 'example2.gltf#pos=0,1,2'
+ $('#model').setAttribute("href","./../../asset/"+file)
+ loader.load( file, loadGLTF );
// setup mouse controls
@@ -164,7 +167,7 @@
controls.maxPolarAngle = Math.PI / 2;
controls.target = new THREE.Vector3(0,1.6,0)
- camera.position.set( 0, 1.6, 1.5 );
+ camera.position.set( 0, 1.6, 10 );
controls.update()
const geometry = new THREE.BufferGeometry();
@@ -271,6 +274,7 @@
statsMesh.material.map.update();
}
+ animate();