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

Async loading of chunks #123

Open
rom1504 opened this issue Jan 8, 2016 · 1 comment
Open

Async loading of chunks #123

rom1504 opened this issue Jan 8, 2016 · 1 comment

Comments

@rom1504
Copy link

rom1504 commented Jan 8, 2016

I have a package that handle operations (getting blocks, setting blocks, loading from files, saving from files) on a minecraft world.
It is designed to be async to handle easily IO backends.
It's currently only used on a minecraft server but it works fairly well so I'm investigating ways to visualize World instance with voxeljs.
The most used interface to get blocks in voxel seems to be the generate(x,y,z) function but that is completely sync hence I can't use it.
I found in a few modules the use of generateVoxelChunk and emitting "missingChunk" event to handle async chunk loading, but that seems a bit hacky and it's a bit hard to make it work, because I can't find any documentation on generateVoxelChunk.

Does anyone have a clue what would be the best way to render the chunk asyncly ?

prismarine-world provide a getColumn async function, and it should be called when voxeljs decide it's time to render such and such chunks.

I'll keep testing things but I'd appreciate any info about this !

@rom1504
Copy link
Author

rom1504 commented Jan 8, 2016

oh and I stumbled upon https://github.com/voxel/voxel-engine-stackgl
Is this ready to be used, would it make it easier ?

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

No branches or pull requests

1 participant