<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
let renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

let scene = new THREE.Scene();
let camera = new THREE.PerspectiveCamera(50, window.innerWidth/window.innerHeight, 0.1, 1000);
camera.position.z = 20;

let light = new THREE.AmbientLight(0x414141, 10);

let material = new THREE.MeshStandardMaterial();
let geometry = new THREE.BoxGeometry(10, 10, 1);
let badge = new THREE.Mesh(geometry, material);

scene.add(camera);
scene.add(light);
scene.add(badge);

animate();

function animate() {
	requestAnimationFrame(animate);
  badge.rotation.y += 0.01;
  renderer.render(scene, camera);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.