Best of Codrops2021

  1. 1
    Article
    Avatar of codropsCodrops·5y

    Trigonometry in CSS and JavaScript: Introduction to Trigonometry

    Trigonometric functions allow us to calculate unknown values of a right-angled triangle from known parameters. Sass and JavaScript both include trigonometric functions, and we’ll look at some ways to use these in this article and the following ones. We’re using these in the clip-path property to determine the coordinates of the polygon points, similar to calculating the height of a tree.

  2. 2
    Article
    Avatar of codropsCodrops·4y

    Teleportation Transition with Three.js

    This coding session was streamed live on December 5, 2021. In this ALL YOUR HTML stream and coding session we’ll be creating a teleportation-like transition with Three.js using some quaternions, and fragment shaders. The original effect comes from Marseille 2021 by La Phase 5.

  3. 3
    Article
    Avatar of codropsCodrops·5y

    Creating 3D Characters in Three.js

    Three.js is a JavaScript library for drawing in 3D with WebGL. It enables us to add 3D objects to a scene, and manipulate things like position and lighting. This article is for developers who are comfortable with JavaScript but relatively new to Three.js. Our goal is to walk through building a simple but effective 3D animated figure.

  4. 4
    Article
    Avatar of codropsCodrops·5y

    Magical Marbles in Three.js

    In April 2019, Harry Alisavakis made a great write-up about the “magical marbles” effect he shared prior on Twitter. The purpose of this tutorial is to offer a more concrete look at how you could implement code for this in Three.js to run on the web. This tutorial assumes intermediate familiarity with three.js and GLSL.