- position
- top
- right
- bottom
- left
- inset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Load .obj and .mtl in Unity at runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |