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

Add arrayTypeSize option, alternative to passing constructor in arrayType #95

Closed
wants to merge 1 commit into from

Conversation

deathcap
Copy link
Collaborator

The 'arrayType' option allows the type of the array for voxels to be configured, but it requires passing a constructor - problematic in some situations since it cannot be directly JSON serialized. For example, voxel-client/voxel-server sends the voxel-engine settings over the network as JSON, or other modules may want to otherwise persist these settings, but arrayType: Uint16Array doesn't make it through.

So this PR adds an alternative option, arrayTypeSize - an easily-serializable integer, representing the number of bytes for the typed array (1, 2, or 4 for Uint8Array, Uint16Array, or Uint32Array, respectively).

@kumavis
Copy link
Collaborator

kumavis commented Oct 17, 2014

@deathcap do you have voxel-engine merge access? You're really carrying the project right now, so if not we would happily add you.

@kumavis
Copy link
Collaborator

kumavis commented Jan 5, 2015

This commit is included in #103

@kumavis kumavis closed this Jan 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants