BaseFactory class abstract

Factory that turns parsed DragonBonesData into runnable Armatures.

Engine-agnostic: the three _build* hooks are abstract, so a binding (a renderer, a headless test harness, ...) supplies how an armature, a slot and a texture atlas are actually represented.

Ported from .ref/dragonBones-ts/factory/BaseFactory.ts. The upstream object pool is deliberately not ported — Dart's GC handles that — so objects are constructed directly.

Implementers

Constructors

BaseFactory([DataParser? dataParser])

Properties

autoSearch ↔ bool
When true, lookups search every cached data set, not just the named one.
getter/setter pair
dragonBones ↔ DragonBones
The DragonBones instance driving this factory's clock and object pool.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDragonBonesData(DragonBonesData data, [String? name]) → void
Caches a DragonBonesData under name (defaults to the data's own name).
addTextureAtlasData(TextureAtlasData data, [String? name]) → void
Caches a TextureAtlasData under name (defaults to the atlas' own name).
buildArmature(String armatureName, [String dragonBonesName = '', String skinName = '', String textureAtlasName = '']) → Armature?
Builds a runnable Armature from cached data.
getArmatureData(String name, [String dragonBonesName = '']) → ArmatureData?
Looks up armature data by name.
getDragonBonesData(String name) → DragonBonesData?
@internal
getTextureAtlasData(String name) → List<TextureAtlasData>?
Returns the cached texture atlases registered under name, or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseDragonBonesData(dynamic rawData, [String? name, double scale = 1.0]) → DragonBonesData?
Parses raw DragonBones data (a decoded JSON Map) and caches it.
parseTextureAtlasData(dynamic rawData, Object? textureAtlas, [String? name, double scale = 1.0]) → TextureAtlasData
Parses a texture atlas (*_tex.json) and caches it.
replaceDisplay(Slot slot, DisplayData? displayData, [int displayIndex = -1]) → void
Replaces the display data of a slot.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited