Skip to content

Instantly share code, notes, and snippets.

View cstrachan88's full-sized avatar

Courtney Strachan cstrachan88

View GitHub Profile
@p1xelHer0
p1xelHer0 / miniaudio_from_memory.odin
Created April 21, 2024 10:45
Play audio files from memory with Odin #load
package audio
import "core:fmt"
// https://miniaud.io/docs/
import ma "vendor:miniaudio"
// 0 - Use native channel count of the device
AUDIO_CHANNELS :: 0
AUDIO_SAMPLE_RATE :: 0
@jakubtomsu
jakubtomsu / realtime_collision_detection.odin
Last active March 6, 2026 18:39
Port of some functions from 'Real Time Collision Detection' book by Christer Ericson to Odin
// Port of some collision functions to Odin by Jakub Tomšů.
//
// from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, © 2005 Elsevier Inc
//
// This should serve as an reference implementation for common collision queries for games.
// The goal is good numerical robustness, handling edge cases and optimized math equations.
// The code isn't necessarily very optimized.
//
// There are a few cases you don't want to use the procedures below directly, but instead manually inline the math and adapt it to your needs.
// In my experience this method is clearer when writing complex level queries where I need to handle edge cases differently etc.
@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 March 16, 2026 18: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


@tahatorabpour
tahatorabpour / README.md
Last active February 21, 2026 09:21
Blender, high performance Multithreaded Exporter (Rift exporter)

Article:

https://lotusspring.substack.com

Disclaimer!

This code was written without the intention of being publicly shared. Not much effort was put into beautification or anything like that, one big file that does it all! Some effort is requried on your part to make this compile.

Python Disclaimer!

I heavily dislike python and consider the code wasteful slop. I have very little python experience, so there are likely much better ways of writing the python portion. Exercise caution!