Open naoak opened 3 years ago
I've managed to achieve this. Here is sample codes. https://codesandbox.io/s/ms-matrix-proxy-wmbk6?file=/src/main.js:219-273
We were able to reduce the memory usage compared to generating a 2D array. However, the performance of index access was 20 to 400 times worse due to the use of proxies.
Hi, MarchingSquaresJS requires 2-dimensional input data, but i have very huge 1-dimensional ArrayLike data (e.g. Float32Array). Is there any better way than converting it to 2D data? One thing I'm thinking about is to support multi-dimensional arrays like ndarray whose data source is 1D ArrayLike but can be accessed as like 2D array by get/set methods. Any thoughts? Thanks.