ManiacalLabs / SimPixel

WebGL Pixel Art Visualizer
http://simpixel.io
GNU General Public License v3.0
9 stars 7 forks source link

Config doesn't handle negative coordinates #1

Closed adammhaile closed 7 years ago

adammhaile commented 7 years ago

Actually... I think what happens is that the values roll over to near the max 16 bit unsigned value so that pixels render, just WAY off center. Should be easy fix, as it is currently being cast to a Uint16 array: https://github.com/ManiacalLabs/WebVis/blob/a88f23d11d9488f8210cf2e77e9ed706fbde7a7b/src/js/network.js#L32 I updated BP to send it as signed, so should just need to change this.

adammhaile commented 7 years ago

@mwcz Switched to using Int16 for coords array and now it works fine.

mwcz commented 7 years ago

+1 c'est bon