Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endianness #12

Open
firebolt55439 opened this issue Jun 25, 2016 · 1 comment
Open

Endianness #12

firebolt55439 opened this issue Jun 25, 2016 · 1 comment

Comments

@firebolt55439
Copy link
Owner

All float32 values are actually little-endian; what may be confusing is that it is sent as big-endian across the wire (e.g. across the network).

Relevant code from extension to illustrate:

if((i + 40) < event.data.byteLength){
    for(var j = i; j <= (start + off + 4*5); j += 4){
        console.log("Leaderboard Score: " + dv.getFloat32(j, /*littleEndian=*/true));
    }
}
@firebolt55439
Copy link
Owner Author

^ @FlorianCassayre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant