Skip to content

Instantly share code, notes, and snippets.

@supachailllpay
supachailllpay / UnityObjectLoader
Last active May 21, 2024 05:42
Load .obj and .mtl in Unity at runtime
Load .obj and .mtl in Unity at runtime
@supachailllpay
supachailllpay / pagination.js
Last active December 29, 2017 22:21
Simple Pagination (n length)
const pagination = (c, m, n) => {
let l, r, h, t, x
if (m <= n) {
x = Array(m).fill(0).map((x, i) => i)
} else {
h = Math.floor(n / 2)
l = Math.max(0, c - h)
t = Math.max(0, h - (c - l))
r = Math.min(m - 1, c + h + t)
t = Math.max(0, h + t - (r - c))
@supachailllpay
supachailllpay / css.md
Last active May 17, 2022 03:32
CSS Property Groups

Modules

Positioned Layout Module

  • position
  • top
  • right
  • bottom
  • left
  • inset