UNPKG
piling.js
Version:
latest (0.10.0)
0.10.0
0.9.1
0.9.0
0.8.0
0.7.14
0.7.13
0.7.12
0.7.11
0.7.10
0.7.9
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.5.0
0.4.2
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
A WebGL-based Library for Visual Piling/Stacking
github.com/flekschas/piling.js
flekschas/piling.js
piling.js
/
src
/
orderer.js
14 lines
(11 loc)
•
223 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
createOrderer
= (
) => {
// The default row-major order
const
rowMajor
= (
cols
) =>
(
index
) =>
[
Math
.
floor
(index / cols), index % cols, ];
return
{ rowMajor, }; };
export
default
createOrderer;