JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My</title>
<style>
body {
width: 100vw;
height: 100vh;
margin: 0;
overflow: hidden;
}
</style>
</head>
<body>
<script src="three.min.js"></script>
<!-- <script src="stats.module.js"></script>-->
<script src="THREEx.KeyboardState.js"></script>
<script src="FBXLoader.js"></script>
<script src="inflate.min.js"></script>
<script src="OrbitControls.js"></script>
<script>
// MAIN
var container, scene, camera, renderer, controls, stats, light, action, mixer;
var keyboard = new THREEx.KeyboardState();
var clock = new THREE.Clock();
init();
animate();
// FUNCTIONS
function init()
{
// SCENE
scene = new THREE.Scene();
scene.background = new THREE.Color( 0xa0a0a0 );
scene.fog = new THREE.Fog( 0xa0a0a0, 200, 800 );
// CAMERA
var SCREEN_WIDTH = window.innerWidth, SCREEN_HEIGHT = window.innerHeight;
var VIEW_ANGLE = 45, ASPECT = SCREEN_WIDTH / SCREEN_HEIGHT, NEAR = 0.1, FAR = 20000;
camera = new THREE.PerspectiveCamera( VIEW_ANGLE, ASPECT, NEAR, FAR);
scene.add(camera);
camera.position.set( 0, 100, 800 );
// camera.rotation.y = 100;
camera.lookAt(scene.position);
// RENDERER
renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.shadowMap.enabled = true;
document.body.appendChild( renderer.domElement );
light = new THREE.HemisphereLight( 0xffffff, 0x444444 );
light.position.set( 0, 200, 0 );
scene.add( light );
light = new THREE.DirectionalLight( 0xffffff );
light.position.set( 0, 200, 100 );
light.castShadow = true;
light.shadow.camera.top = 180;
light.shadow.camera.bottom = - 100;
light.shadow.camera.left = - 120;
light.shadow.camera.right = 120;
scene.add( light );
// controls = new...