1- import * as THREE from 'three' ;
1+ //import * as THREE from 'three';
2+ import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js' ;
23
34import initTinyUSDZ from 'https://lighttransport.github.io/tinyusdz/tinyusdz.js' ;
45
@@ -24,7 +25,8 @@ initTinyUSDZ().then(function(TinyUSDZLoader) {
2425
2526 // First mesh only
2627 const mesh = usd . getMesh ( 0 ) ;
27- console . log ( mesh ) ;
28+ //console.log("usd", usd)
29+ //console.log("mesh", mesh);
2830
2931 //const geometry = new THREE.BoxGeometry( 1, 1, 1 );
3032 const geometry = new THREE . BufferGeometry ( ) ;
@@ -37,10 +39,10 @@ initTinyUSDZ().then(function(TinyUSDZLoader) {
3739 }
3840
3941 const usdMaterial = usd . getMaterial ( mesh . materialId ) ;
40- console . log ( "usdMat" , usdMaterial ) ;
41- if ( usdMaterial . aaa ) {
42- console . log ( "aaa" ) ;
43- }
42+ // console.log("usdMat", usdMaterial);
43+ // if (usdMaterial.aaa) {
44+ // console.log("aaa");
45+ // }
4446
4547 var material ;
4648
@@ -80,8 +82,8 @@ initTinyUSDZ().then(function(TinyUSDZLoader) {
8082
8183 function animate ( ) {
8284
83- cube . rotation . x += 0.01 ;
84- cube . rotation . y += 0.01 ;
85+ // cube.rotation.x += 0.01;
86+ cube . rotation . y += 0.02 ;
8587
8688 renderer . render ( scene , camera ) ;
8789
0 commit comments