JSFiddle - React, Tailwind, and code Playground

by cabada

HTML

<body style="margin: 0px;">
<div id="container">
</div>
</body>

CSS

canvas
    {
    outline: none;
        }
        #container
        {
          width:100%;
          height:100%;
        }

JavaScript

import * as THREE from 'https://threejs.org/build/three.module.js';
    import { SkeletonUtils } from 'https://threejs.org/examples/jsm/utils/SkeletonUtils.js';
    import { ColladaLoader } from 'https://threejs.org/examples/jsm/loaders/ColladaLoader.js';
    import { OrbitControls } from 'https://threejs.org/examples/jsm/controls/OrbitControls.js';
    
      let handsDownPosition = {"mixamorig_RightForeArm":[0.8662505501056439, 0.46747884418466823, -0.7788513950436977],
             "mixamorig_RightArm":[0.8401931759443557, 0.045611522338455834, 0.6635681496277124],
             "mixamorig_LeftForeArm":[0.608317102762963, -0.11779675665799694, 0.24037089121639924],
             "mixamorig_LeftArm":[1.4952318125770683, -0.8291614845341023, 0.5383331381994383],
            "mixamorig_LeftUpLeg":[-0.0343446043962474, 0.0000012447812098859146, 3.1403980162060723],
            "mixamorig_LeftLeg":[-0.7075422396899137, -0.0001524750482477938, 0.019413529312351],
            "mixamorig_RightLeg":[-0.7075422396899137, -0.0001524750482477938, 0.019413529312351],
            "mixamorig_RightUpLeg":[-0.6334518288773031, -0.000017003869953180484, -3.2153994109689727]};
    
        var renderer = new THREE.WebGLRenderer({ alpha: true });
        
    var scene = new THREE.Scene();
    var clock = new THREE.Clock();
    var container = document.getElementById( 'container' );
    var loadingManager = new THREE.LoadingManager( function () {
    });

	renderer.setPixelRatio( window.devicePixelRatio );
        var size = container.getBoundingClientRect();
    renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );
    var cachemodels = {};
    var loader = new ColladaLoader( loadingManager );
    var camera = new THREE.PerspectiveCamera( 45, (container.getBoundingClientRect().width) / container.getBoundingClientRect().height, 0.01, 1000 );
    
    camera.position.set(3,5,3);
    camera.lookAt(0,0,0);
    
    	var ambientLight =...