Skip to content

Instantly share code, notes, and snippets.

View cstrachan88's full-sized avatar

Courtney Strachan cstrachan88

View GitHub Profile
@TheSandvichMaker
TheSandvichMaker / .readme.md
Last active December 28, 2024 22:28
Implementation of David Eberly's mesh clipping algorithm
@amitmerchant1990
amitmerchant1990 / console.js
Created January 24, 2025 08:07
Calculate used localStorage size for a website
let totalSize = 0;
for (let key in localStorage) {
if (localStorage.hasOwnProperty(key)) {
let keySize = new Blob([key]).size; // Size of the key
let valueSize = new Blob([localStorage[key]]).size; // Size of the value
totalSize += keySize + valueSize;
}
}
@Memresable
Memresable / gizmo.md
Last active June 25, 2025 19:51
A Simple And Intuitive Explanation of How Gizmos Work In 3D Space

A Simple And Intuitive Explanation of How Gizmos Work In 3D Space

If you've ever used a 3D editor, then you've most likely used a certain thing called "Gizmo", Gizmos are essentially transformation modifiers that's within a world, they let you modify the object's position, orientation and scale. The implementation of a Gizmo is actually fairly straightforward for the most part (or may not be depending on how your application handles things internally, but at the fundamental level it's simple).

This article would only cover Translations and Rotations, Scaling is very easy to implement after understanding how the first two work. And also this may give you a hint into how Blender's robust implementation of Gizmo works as well!

box-gizmo