flutter3d_voxel 1.0.0-rc.2
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 wasfovY,yfovorfov), a ray is cast withrayCastand half a size ishalfExtents, as the rest of the engine names them:VoxelRays.raycast. The same values under the one name; serialized keys are unchanged, anddart fixrenames the calls, the arguments and the overrides. -
Breaking:
VoxelNavigation.configissettings. A parameter or a field that holds a…Settingsis namedsettings, as every other one is, where some weretuning,configoroptions: the same value under one name.dart fixrenames the arguments and the fields. -
Breaking: results that were records are final classes.
VoxelHitanswered or held a record, which can never gain a field. Each answers a final class now, with the record's field names (a positional$1has a name of its own),==andhashCode. A field read compiles as before; a destructuring pattern names the class, andflutter3d_build:migraterewrites the$1reads. -
Breaking:
ChunkKeyandVoxelBoxare 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: …)isChunkKey(x: …, y: …, z: …), and a record no longer equals one. -
A voxel world is a format of its own.
VoxelWorld.toJsonwrites 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 thev1/sandbox.voxels.jsonfixture. -
Seeded terrain says which drawing made it.
VoxelTerrainwritesgeneratorVersionbeside 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, aFlutter3dFormatException, where it threw the SDK'sFormatException. -
Breaking: one suffix for settings, Settings, and Descriptor in the HAL.
NavMeshConfigisNavMeshSettings. Every settings class isfinalwith aconstconstructor and acopyWithover every field; a nullable field is reset withcopyWith(clearX: true).dart fixcarries the renames. -
Breaking:
VoxelWorld.takeChangesisdrainChanges, the one verb for a read that empties what it reads.dart fixcarries 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.0on anyflutter3d_*package resolves against every other. -
A world of blocks, kept as a seed and the edits since.
VoxelWorldholds a byte a voxel in chunks of sixteen cubed, drawn from aVoxelTerrain: rolling ground from aGameRandomstream and nothing but+,-and*, so two machines draw it bit for bit.toJsonwrites 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.restoreEditsputs a save back over a world touching only what differs. -
A chunk's faces as greedy meshes.
meshChunkdraws 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:MeshDataper material, wound for the engine's back-face culling, with texture coordinates in metres. -
Collision as boxes, on whichever physics the run chose.
boxesOfcovers a chunk's solid voxels exactly once with greedy boxes, andVoxelCollisionkeeps aCollisionWorld'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.
VoxelNavigationbakes the boxes as brushes on a lattice fixed to the world's footprint, andfollowbakes again only the tiles an edit reaches — the same mesh as baking the edited world whole, digest for digest. -
raycastpicks 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.