Credits: tokkoro

How to create NIKE LOGO using Three.js

Kelvin Joseph
2 min readMar 20, 2023

To create a Nike logo using Three.js, you can follow these steps:

  1. Set up a basic Three.js scene with a canvas element, renderer, camera, and scene.
javascriptCopy code
const canvas = document.getElementById("canvas");
const renderer = new THREE.WebGLRenderer({canvas});
const camera = new THREE.PerspectiveCamera(75, canvas.width / canvas.height, 0.1, 1000);
camera.position.z = 5;
const scene = new THREE.Scene();

2. Create the basic shape of the Nike logo using THREE.Shape class.

javascriptCopy code
const nikeShape = new THREE.Shape();
nikeShape.moveTo(-1, -1);
nikeShape.lineTo(-1, 1);
nikeShape.quadraticCurveTo(0, 2, 1, 1);
nikeShape.lineTo(1, -1);

3. Extrude the Nike logo shape to create a 3D object using the THREE.ExtrudeGeometry class.

javascriptCopy code
const extrudeSettings = { depth: 0.5, bevelEnabled: true, bevelSegments: 2, steps: 2, bevelSize: 0.2, bevelThickness: 0.2 };
const nikeGeometry = new THREE.ExtrudeGeometry(nikeShape, extrudeSettings);

4. Create a material for the Nike logo using the THREE.MeshBasicMaterial class.

javascriptCopy code
const nikeMaterial = new THREE.MeshBasicMaterial({ color: 0xffffff });

5. Create a mesh object using the Nike geometry and material.

javascriptCopy code
const nikeMesh = new THREE.Mesh(nikeGeometry, nikeMaterial);

6. Add the mesh object to the scene and render it.

javascriptCopy code
scene.add(nikeMesh);
function animate() {
requestAnimationFrame(animate);
nikeMesh.rotation.x += 0.01;
nikeMesh.rotation.y += 0.01;
renderer.render(scene, camera);
}
animate()

This will create a 3D Nike logo with a rotating animation. You can customize the appearance and animation of the logo by adjusting the shape, extrude settings, material, and animation properties.

--

--