toji / gl-matrix

Javascript Matrix and Vector library for High Performance WebGL apps
glmatrix.net
MIT License
5.38k stars 722 forks source link

WebAssembly? #280

Closed dakom closed 4 years ago

dakom commented 6 years ago

Given the popularity and target of gl-matrix, I'd imagine that a wasm port is on the radar... is that correct?

maierfelix commented 6 years ago

I'm currently working on a little 1:1 port without affecting the API conventions. First benchmarks already show good improvements! :)

stefnotch commented 6 years ago

#283, WebAssembly Port

ghost commented 5 years ago

@dakom, @stefnotch Is a port of gl-matrix not redundent, because there already exists OpenGL Mathematics? Both even have the same acronym, GLM.

It's also important to know that IO communication between JS and WebAssembly causes a lot of overhead. Unless you built the entire scene in WebAssembly and only sent it back once, there is no point of using GLM (whichever version) in WebAssembly.

stefnotch commented 5 years ago

@Kevin-at-Navigram Cool project. 👍 However, it still needs a WebAssembly bridge to be useful.

Regarding your performance concerns: https://github.com/toji/gl-matrix/issues/283 and https://maierfelix.github.io/glmw/mat4/ tl;dr: Using a WebAssembly version of gl-matrix with JavaScript would result in a serious performance improvement.