Skip to main content

flutter3d_voxel 1.0.0-rc.2 copy "flutter3d_voxel: ^1.0.0-rc.2" to clipboard
flutter3d_voxel: ^1.0.0-rc.2 copied to clipboard

A world of blocks: chunks, a seeded terrain, edits kept as deltas, greedy meshes to draw, greedy boxes to collide with and the navigation mesh baked again where an edit landed.

1.0.0-rc.2 #

  • Breaking: one concept has one spelling. A field of view is fieldOfView (where it was fovY, yfov or fov), a ray is cast with rayCast and half a size is halfExtents, as the rest of the engine names them: VoxelRays.raycast. The same values under the one name; serialized keys are unchanged, and dart fix renames the calls, the arguments and the overrides.

  • Breaking: VoxelNavigation.config is settings. A parameter or a field that holds a …Settings is named settings, as every other one is, where some were tuning, config or options: the same value under one name. dart fix renames the arguments and the fields.

  • Breaking: results that were records are final classes. VoxelHit answered or held a record, which can never gain a field. Each answers a final class now, with the record's field names (a positional $1 has a name of its own), == and hashCode. A field read compiles as before; a destructuring pattern names the class, and flutter3d_build:migrate rewrites the $1 reads.

  • Breaking: ChunkKey and VoxelBox are final classes, where they were record typedefs a minor could never add a field to. The fields keep their names and both compare by value with ==; a record literal (x: …, y: …, z: …) is ChunkKey(x: …, y: …, z: …), and a record no longer equals one.

  • A voxel world is a format of its own. VoxelWorld.toJson writes the envelope (f3d.voxelWorld, VoxelWorld.format), keeps the keys a later build added, and refuses a newer world; a world saved before the envelope reads as version 1, against the v1/sandbox.voxels.json fixture.

  • Seeded terrain says which drawing made it. VoxelTerrain writes generatorVersion beside the seed, and a world drawn by a newer one is refused rather than having its edits land on other blocks.

  • Breaking: a world that will not read throws VoxelFormatException, a Flutter3dFormatException, where it threw the SDK's FormatException.

  • Breaking: one suffix for settings, Settings, and Descriptor in the HAL. NavMeshConfig is NavMeshSettings. Every settings class is final with a const constructor and a copyWith over every field; a nullable field is reset with copyWith(clearX: true). dart fix carries the renames.

  • Breaking: VoxelWorld.takeChanges is drainChanges, the one verb for a read that empties what it reads. dart fix carries it.

  • 1.0.0 is a promise: strict semver from there. This release candidate already keeps it. A patch fixes bugs and breaks nothing, a minor adds, and a break waits for a major. The whole public API is stable, with no experimental exceptions, and is held to the snapshot in api/. A deprecated name stays until the next major and for at least six months, and says what replaces it. CONTRIBUTING.md has the rules, and SUPPORT.md says which releases get fixes and on which platforms.

  • The first publication, and the number skips from 0.1.0. That number was carried inside the workspace and never reached pub.dev, so nobody outside saw the ones passed over. The shelf goes out on one number so that one number names one tree, and ^1.0.0 on any flutter3d_* package resolves against every other.

  • A world of blocks, kept as a seed and the edits since. VoxelWorld holds a byte a voxel in chunks of sixteen cubed, drawn from a VoxelTerrain: rolling ground from a GameRandom stream and nothing but +, - and *, so two machines draw it bit for bit. toJson writes the terrain's few numbers and every voxel that differs from it, and a voxel edited back to what the terrain had is no edit at all. restoreEdits puts a save back over a world touching only what differs.

  • A chunk's faces as greedy meshes. meshChunk draws a face only where a block meets air, reads across chunk borders so a wall has no seam in it, and merges the faces of one slice, direction and material into the fewest rectangles it finds: MeshData per material, wound for the engine's back-face culling, with texture coordinates in metres.

  • Collision as boxes, on whichever physics the run chose. boxesOf covers a chunk's solid voxels exactly once with greedy boxes, and VoxelCollision keeps a CollisionWorld's statics on them, chunk by chunk, replacing only an edited chunk's. A world attached to the native core mirrors those statics by revision, so the core collides with the blocks as they are with nothing voxel-shaped in it.

  • The navigation mesh follows the digging. VoxelNavigation bakes the boxes as brushes on a lattice fixed to the world's footprint, and follow bakes again only the tiles an edit reaches — the same mesh as baking the edited world whole, digest for digest.

  • raycast picks a block. Through the grid rather than the merged boxes, which say where a ray stopped and not which voxel it was; the face it entered by is where a placed block goes.

Its flutter3d_* dependencies ask for ^1.0.0.

0
likes
140
points
71
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A world of blocks: chunks, a seeded terrain, edits kept as deltas, greedy meshes to draw, greedy boxes to collide with and the navigation mesh baked again where an edit landed.

Topics

#game-development #voxel #game-engine #procedural-generation

License

MIT (license)

Dependencies

flutter3d_core, flutter3d_foundation, flutter3d_physics, flutter3d_sim, vector_math

More

Packages that depend on flutter3d_voxel