This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loader = new THREE.GLTFLoader(); | |
var mixer; | |
loader.load( SRC_GLB, | |
( gltf ) => { | |
//add the scene to a container (or directly to our THREE scene) | |
container.add( gltf.scene ) | |
//configure the animation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var heightPx = 512; | |
var widthPx = 512; | |
var sizePx = Math.max( widthPx, heightPx ); | |
var targetSize = 0.5; | |
var scaleX = targetSize * widthPx / sizePx; | |
var scaleY = targetSize * heightPx / sizePx; |