<div id="scene" />
body {
  margin: 0;
  background-color: #5d93ff;
}
const geometry = new THREE.SphereGeometry( 20, 64, 64 );

const scene = new THREE.Scene();

scene.background = new THREE.Color(0x5d93ff);

const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 10000);

const renderer = new THREE.WebGLRenderer();

renderer.setSize(window.innerWidth, window.innerHeight);
document.getElementById('scene').appendChild(renderer.domElement);

const material = new THREE.MeshLambertMaterial( { color: 0xF7A046 } );

const mesh = new THREE.Mesh(geometry, material);

mesh.scale.x = 0.1;
mesh.scale.y = 0.1;
mesh.scale.z = 0.1;

scene.add(mesh);

camera.position.z = 5;

const frontSpot = new THREE.SpotLight(0xF7A958);

frontSpot.position.set(1000, 1000, 1000);
scene.add(frontSpot);

const frontSpot2 = new THREE.SpotLight(0xFAC690);

frontSpot2.position.set(-500, -500, -500);
scene.add(frontSpot2);

const animate = function () {
  requestAnimationFrame(animate);

  mesh.rotation.x += 0.005;
  mesh.rotation.y += 0.005;
  mesh.rotation.z += 0.005;

  renderer.render(scene, camera);
};


animate();

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js