flutter3d_bridge 0.6.0
flutter3d_bridge: ^0.6.0 copied to clipboard
The binding between flutter3d and flutter3d_game: level geometry to mesh nodes, actors to visuals, weapons to view models.
0.6.0 #
- Floors, and no code. Level geometry to mesh nodes, an actor to its visual,
a fixture to the light it drives — byte for byte 0.5.1's. What moved are the
floors on the two halves this package exists to join,
flutter3dandflutter3d_game, plusflutter3d_particles, and the two dev floors onflutter3d_hardwareandflutter3d_cpu: all^0.6.0. - It is still the one package allowed to depend on both halves, and the direction of that dependency did not change.
0.5.1 #
meshDataOfis public, inlib/src/surface_mesh.dart. It wasLevelLoader._toMeshData, a private helper of the one thing that had brush surfaces to draw. A genre that builds its own ground —HeightfieldGeometryemits the sameBrushSurface— has triangles and no level loader, and the only ways left were to load a level it does not have or to write the interleave again. A second copy is the real cost. The doc on those twenty lines is a note about a GPU failure that reports nothing: flutter_gpu takes the vertex layout from the shader'sindeclarations,mesh.vertdeclares position, normal, texcoord, tangent and colour — sixteen floats — and supplying eight does not fail. The GPU keeps reading at the stride the shader expects, assembles each vertex out of two of the ones actually written, and draws a convincing field of garbage triangles with no error anywhere. A copy of that warning is a copy that stops being updated.
0.5.0 #
Breaking. The two readers take one object, and the level's issues are unmodifiable.
AssetBytesandDocumentTexttake anAssetRequest— the engine's, not one of their own: a game reading a texture and a decoder reading a sibling file are the same question one level apart, and two request types would be two places to add the same field to.LoadedLevel.issuesis unmodifiable. It is built by a load and read afterwards.
0.4.2 #
- A rebuilt wall keeps its baked light, and its shadow mode.
LevelLoader.rebuildBrushestakesorigins—Breaches.origins— and with it handsBrushGeometrythe atlas the level loaded with, kept onLoadedLevel.lightmapLayout. One rocket used to take the bake off every wall in the level; now it takes it off nothing but the surfaces the blast itself made. Withoutoriginsthe rebuild passes no layout at all, which is what it did before: a face reading a stranger's texels looks like light, and a missing bake looks like a limit. Brush batches are also given the document'sshadowCastingrather than its boolean, so a wall that asked to cast from both faces does. - A level's brushes are filtered anisotropically, as far as the device
goes.
LevelLoader.tilingSamplerForis the tiling sampler every wall had withmin(8, maxAnisotropy)taps, decided once per level and handed tomaterialFromthrough its newtilingargument by the loader and the fixture visuals alike. Eight rather than sixteen because that is where a corridor floor stops visibly improving; clamped here rather than left to the backend because the renderer's own setting respects a sampler that already carries a level, and the level it carries should be a true one. ActorVisuals.layerMask. The layers every actor's mesh is drawn on, capsule and model alike, set on each mesh node because a render list asks the node it draws and not its parents. The default layer alone unless a game says otherwise — and the reason one would isRenderSettings.xray, which names a layer to draw silhouettes for.- A level's probes are built with its lights.
LevelLoader.buildturns everyreflection_probeentity into a keptReflectionProbeNodeat the entity's position, with the document's numbers where it gave any and the probe's own defaults where it did not;LoadedLevel.probeskeeps them andrebuildBrushesinvalidates every one, since a kept probe holds the wall a rocket went through. - The culler waits for the probes.
LoadedLevel.cullis the way to apply the visibility table now: a kept probe is captured on the first frame it is seen, and a culler applied from the player's cell before that has already hidden every room but the player's — the probe in the vault would capture its walls with nothing behind them. Until every probe stands every batch shows, which costs a frame or two of the whole level; a device that builds no probe is not waited for.probesCapturedis the question on its own.
0.4.1 #
- A level's sidecars are read beside it.
LevelLoaderlooks for<level>.visibility.jsonand<level>.lightmap.binnext to the document, refuses either with a word when its hash no longer matches the level, and otherwise hands the batches to aVisibilityCullerand every brush vertex its place in the lightmap, uploaded as one texture the material samples. SoundOcclusion: the walls between a sound and the ear, each taking half, as a gain and a muffle forAudioScene.occlusion.LevelLoader.rebuildBrushesdraws the walls again after a breach and invalidates the static shadows;LoadedLevelkeeps its brush nodes, its culler and its lightmap so it can.- Texture uploads that are refused say why, in the level's issues.
0.4.0 #
- A level change releases what the level built. Both visuals classes kept
their models on a comment naming a shared cache that has never existed; they
now release them through the future, so a model that finishes reading after
its level ended is released the moment it arrives.
LoadedLevelremembers the brush meshes the loader uploaded and gaineddisposeto give them and the material maps back —RunSession.closeis the moment both are written for.FixtureVisualsgot the generation guard its sibling already had, so a late model no longer instantiates into a torn-down scene.
0.3.0 #
- A light fixture no longer casts a shadow into its own light. Every torch
in the crypt was drawing a black pyramid down the wall beneath it and a dark
apron across the floor: a torch's light sits a third of a metre out from the
wall, its bracket hangs in the same space, and a blocker that close to a point
light shadows everything the light reaches. Opt back in per fixture with
castsShadow: trueon the entity, for a shade whose pattern is the point. ActorVisualsdecides an animation's wrap and a model's yaw, so a death animation stops looping and a monster faces the way it moves.
0.2.0 #
- View models for a weapon held in the hands, and particle effects driven by what the simulation reported rather than by what it looks like.
- An actor is placed by its feet, which is how the level document means it.
0.1.0 #
- The binding between the two halves: level geometry to mesh nodes, actors to visuals, fixtures to the lights they drive.
- The one package allowed to know both
flutter3dandflutter3d_game.