Releases: neefrehman/make-matrix
Releases · neefrehman/make-matrix
v1.2.1
v1.2.0
1.2.0 (2020-10-26)
Features
Added the ability for the initialValues callback to accept a vector of the current point in the matrix as an argument. This can allow you to populate your matrix in a "self-aware" way. (bbf3db3)
// create a 5x5 array, with each point self described by a string
const twoDStringArray = makeMatrix([5, 5], (vector) => vector.join());
// create a 7x3x8 array, with each point transformed into a vector object
const threeDObjectArray = makeMatrix([7, 3, 8], (vector) => {
return {
x: vector[0],
y: vector[1],
z: vector[2],
otherData: OTHER_DATA,
}
});v1.1.1
1.1.1 (2020-10-24)
Performance Improvements
Move mapping of initialValues to final recursive function call. This helps with performance, especially when a callback is
used to intialise values across the matrix. (0607056)
| Create a 5D array with static initial values | Create a 5D array with each point dynamically intialised via a callback | |
|---|---|---|
| Before | 1.212 ms |
2.936 ms |
| After | 0.629 ms |
0.972 ms |