1.0.0 • Published 5 years ago
swizz v1.0.0
swizz
Provide swizzles for arrays, like GLSL.
import swizzle from 'swizz'
let arr = swizzle([0, 1, 2, 3])
arr.zyx = arr.xyz
arr // [2, 1, 0, 3]
Supported swizzles: xyzw
, stpd
, rgba
.
Uses Proxy under the hood.
Related art
Refs
1.0.0
5 years ago