Skip to main content

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

Water, fire and bodies on the physics core's world, stepped with no renderer: flames held to bodies, waters poured and fed, plugin elements over its fields, and their events.

1.0.0-rc.2 #

  • Breaking: Ballistics.aim(step:) is aim(dt:). The length of the step a throw is flown at is dt, as every loop names it; a number called step is a count of steps. dart fix renames the argument.

  • 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: Solid.box. The same values under the one name; serialized keys are unchanged, and dart fix renames the calls, the arguments and the overrides.

  • Breaking: a heat release is in watts. SmokePlume.virtualOrigin, centerlineSpeed, halfWidth and depth take a fire's power in W, as NativeFire.power is, and convert to the kilowatts Heskestad's and McCaffrey's correlations are written in inside; a number in kW is multiplied by 1000. A parameter named for its unit says what it is: ElementFields and NativeElementFields take addHeat(body, heat), addWater(body, mass) and setTemperature(body, temperature), with Fires.douse(body, mass) and Solid.at(temperature).

  • Breaking: the elements are heard through a subscription, and their callbacks are spelled on…. ElementsSimulation.listen(listener) answers a Registration, where the field ElementsSimulation.listener held one; listeners reads them. ElementsListener's caught, out, burntOut, wetted, burnerOut, exploded, budget, seen and lost are onCaught, onOut, onBurntOut, onWetted, onBurnerOut, onExploded, onOverBudget, onFireSeen and onFireLost; dart fix renames them.

  • Breaking: ElementsSimulation.addBody takes orientation: and angularVelocity:, where it took turn: and spin:, as every core names a simulated body's rotation and spin. dart fix renames the arguments.

  • Breaking: ElementsSimulation.open is the unnamed constructor, ElementsSimulation(). It makes a world of its own at once; open is for what waits. flutter3d_lints:migrate rewrites the calls.

  • Breaking: no public late final setter. ElementsSimulation.fires is a getter over a private field: the setter they had worked once and threw the second time, and every read compiles as it did.

  • Breaking: results that were records are final classes. ElementsSimulation 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: what a body collides with is a CollisionFilter. ElementsSimulation.addBody and follow take collides: as a CollisionFilter (new) with the same layer and mask, where it was a record, which can never gain a field: write CollisionFilter(layer: …, mask: …) where (layer: …, mask: …) was.

  • radiantFluxOn stands a flame by FireExposure.standingMiddleOf, the core package's one rule for a flame under a ceiling, which the platformer's runner now burns by too.

  • Breaking: each ElementsListener callback takes its event. caught, out, burntOut, wetted and burnerOut take the ElementCaught (and so on) the bus carries, with its body and made; exploded an ElementExploded, budget an ElementsOverBudget, seen an ElementFireSeen and lost an ElementFireLost. One object per callback can gain a field in a minor, where a list of parameters cannot.

  • Breaking: ElementsSimulationPlugin is the engine's by name, and an ElementPlugin is its author's. ElementsSimulationPlugin is flutter3d_elements by default, where it was elements: elements is an area of the engine's events, which no plugin id may take. ElementPlugin(hook, id:, world:) takes the id of the package that ships the element, and refuses one in an engine namespace, so an element from outside gets no engine rights. A bare hook id is filed in that namespace (ElementPlugin.element): frost in acme_frost runs in the phase acme_frost.frost and answers to the switch of that name. A hook whose id has a namespace runs in a phase of that name, not elements.<id>. ElementEventKinds and ElementSwitches refuse a plugin's kind or switch outside its namespace.

  • An element's followed pose is flutter3d_foundation's RigidPose, where it was a record of its own.

  • The heat on a body, from the field. ElementFields.radiantFluxOn and FieldQuantity.radiantFlux (W/m²): each fire's radiant heat, Modak's point source at the middle of its flame, on the point of the body a ray from there meets first, and nothing from a fire something else stands in front of. A flame longer than the room is high is measured from the middle of the column under the ceiling, not from above the roof. What a game's character is burnt by, read rather than worked out beside the world.

  • A burner fed what was spilt. Fires.setBurner(body, burner, fuel:) feeds a burner that many kilograms and no more: it goes out by itself when they are burnt, told as burnerOut, and Fires.fuelLeft and the snapshot keep what is left.

  • A body weighed from the catalogue. Solid.of(shape, material) makes a solid of a catalogue material, as heat sees it and as dense as the catalogue says, at its reference state or a MatterState; wall: makes it hollow, displacing all of its shape and weighing its shell. Solid.at(kelvin) puts a solid in the world at a temperature of its own — a bomb from its melt — which addBody sets.

  • A throw aimed by the core's own flight. Ballistics.aim(world, solid, from:, to:, elevation:) finds the velocity whose flight through the world's gravity, air and wind, flown by the core at the game's step, comes down on the mark: no vacuum formula and no number to make up for the drag.

  • Brands a fire lofts. Firebrands lofts a share of the fuel each fire burns as brands of a game's solid, deterministically, from the top of the flame up its plume at McCaffrey's centreline speed and with the wind, as hot as the flame; the core burns them and lets them light what they come down on. A budget (most) and what it held back (skipped), and a save.

  • ElementFields has a body for every member: what a backend does not override is refused with an UnsupportedCapabilityException naming the member, so a member added in a minor breaks no backend.

  • Fields by quantity. ElementFields.quantityOf(body, FieldQuantity) reads a field as a foundation Quantity in its unit, and addQuantity adds one in any unit of the same dimension (a UnitMismatchException otherwise). FieldQuantity is an open set — temperature, surfaceTemperature, heat and water to begin with — so humidity, pressure or a concentration arrive as a backend's own quantity, not as a new member.

  • ElementExploded mixes PlacedEvent in (with), which foundation made a base mixin class.

  • The first release: the elements' simulation, out of flutter3d_effects. ElementsSimulation, Fires, Igniter, WaterBody, Follower, TrackedBody, Solid, Bed, ElementHeightfield, ElementPose, ElementsListener, ElementsSimulationPlugin, the plugin element's hook (ElementHook, ElementStep, ElementFrame, ElementFields, NativeElementFields, ElementBody, installElement, ElementPlugin), the registries (ElementSwitches, ElementEventKinds), the switches (ElementsSteps, FireSteps, LiquidSteps) and the events (ElementEvent and the listener's eight, declareElementEvents) were declared there in 0.9 and are declared here now. flutter3d_effects does not re-export them: import this package. New in 1.0, so no 0.8 code names them.

  • A body and a water hold nothing that draws them. TrackedBody.look and WaterBody.view and WaterBody.look are gone; ElementsSimulation.track takes no look. The view keeps them: Elements.lookOf, Elements.viewOf and Elements.waterLookOf in flutter3d_effects.

  • ElementsSimulation.addWater pours a water with no view, and waters, waterAt and remove hold it, so a server steps the waters a game draws. Elements.addWater pours through it.

  • SmokePlume: the plume's virtual origin, width, centreline speed and optical depth, which seenThroughSmoke reads and FireView.plumeDepth draws with. The numbers are the ones FireView had.

0
likes
140
points
191
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Water, fire and bodies on the physics core's world, stepped with no renderer: flames held to bodies, waters poured and fed, plugin elements over its fields, and their events.

Topics

#game-development #physics #simulation #fire #water

License

MIT (license)

Dependencies

flutter3d_foundation, flutter3d_matter, flutter3d_physics_native, flutter3d_plugin_api, vector_math

More

Packages that depend on flutter3d_elements