extend library
What packages build on Fynkel with: WorldSystems, work they hang on a world's frame. Games don't need it.
Classes
-
AssetKind<
T extends Object> -
A kind of asset Assets loads, shares and frees, as it does models
and textures: a package's, such as sounds. Load one with
Assets.load; WorldSystems.addAssetKind lets Assets.preload load
it by its extension too. One instance per kind is the rule (a
const, or astatic final): a name is loaded as one kind only. -
FrameList<
T extends Object> -
A list filled and emptied every frame that keeps its storage when
emptied. A Dart list gives its storage back on
clear()(and onlength = 0), so it's grown again, allocating, the next frame. - MovedReader
- A system's place in its world's moved log (WorldSystems.movedReader): the objects whose transform, parent or layer was set since it last read, in the order they were first set. Each is in it at least once: an object set many times is in it again only once a reader has read past it. Their world transforms changed, and so did those of every object below them; they may since have been destroyed.
- WorldSystem
-
Work a package adds to a world's frame, one of each type per world:
world.systemmakes it the first time it's asked for. Its hooks run in World.update, systems by their order, then in the order they were made; they run while the world is World.paused too. What a hook throws goes to World.errors with no object, and the frame goes on; a system whose hooks throw in turnOffAfter frames in a row is turned off (isTurnedOff), and that's reported once.
Extensions
- GameObjectSystems on GameObject
- What a system that follows objects reads of each.
- MeshVersions on Mesh
- What packages read of a Mesh (package:fynkel/extend.dart).
- WorldSystems on World
- Finding and making a world's systems.