Skip to content

Instantly share code, notes, and snippets.

@AugustoMoura
Created July 11, 2015 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AugustoMoura/bf6badc01f94627a822b to your computer and use it in GitHub Desktop.
Save AugustoMoura/bf6badc01f94627a822b to your computer and use it in GitHub Desktop.
world =
{
blocks_size = 2500;
blocks = -- a block is a class, that have a position in the map, a sLOD mesh and a distance to replace childs by a sLOD. Also have methos to load/unload childs and so on..
{
{
{0, 0}; -- the position in the world, integer value
"./blocks/block_0_0.blk";
};
{
{0, 1};
"./blocks/block_0_1.blk";
};
-- ...
{
{2, 6};
"./blocks/block_2_6.blk";
};
-- ...
{
{-15, 12}; -- world position = vec2(blocks_size * index.x, blocks_size * index.y), the Z coordinate is set per object
"./blocks/block_-15_12.blk";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment