Skip to content

Easier heightmap access #104

@avdstaaij

Description

@avdstaaij

There should be Editor.getHeight/Editor.getHeightGlobal methods to get the height at a position, in the former case taking the transform into account.

There should probably be caching functionality similar to Editor.worldSlice/Editor.worldSliceDecay: a system to mark certain heights as "outdated" or update them in a cache (though updating may be costly for the more complex heightmaps). Furthermore, since GDMC HTTP now has a GET /heightmaps endpoint (for a long time already...), it may be possible to avoid getting an entire WorldSlice in some cases.

Some questions on how the height retrieval functions should work still need to be answered:

  • What if no WorldSlice is loaded? Should we raise an exception? Make a costly GET /heightmaps call (every time)?
  • How do we make it possible to explicitly request only the heightmaps and not the rest of the chunk data? Naturally, we don't want to do this on every getHeight call. Should there be an explicit function for it? Should the getHeight function transparently request the heightmap if it wasn't loaded yet? In the last case, what range should it target?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions