Package | dragonBones.factorys |
Class | public class StarlingFactory |
Inheritance | StarlingFactory BaseFactory flash.events.EventDispatcher |
Create an instance of the StarlingFactory class that way:
import flash.events.Event; import dragonBones.factorys.BaseFactory; [Embed(source = "../assets/Dragon2.png", mimeType = "application/octet-stream")] private static const ResourcesData:Class; var factory:StarlingFactory = new StarlingFactory(); factory.addEventListener(Event.COMPLETE, textureCompleteHandler); factory.parseData(new ResourcesData());
See also
Property | Defined By | ||
---|---|---|---|
generateMipMaps : Boolean
Whether to generate mapmaps (true) or not (false). | StarlingFactory | ||
optimizeForRenderToTexture : Boolean
Whether to optimize for rendering (true) or not (false). | StarlingFactory | ||
scaleForTexture : Number
Apply a scale for SWF specific texture. | StarlingFactory |
Method | Defined By | ||
---|---|---|---|
Creates a new StarlingFactory instance. | StarlingFactory | ||
addSkeletonData(skeletonData:SkeletonData, name:String = null):void
Add a SkeletonData instance to this BaseFactory instance. | BaseFactory | ||
addTextureAtlas(textureAtlas:Object, name:String = null):void
Add a textureAtlas to this BaseFactory instance. | BaseFactory | ||
buildArmature(armatureName:String, animationName:String = null, skeletonName:String = null, textureAtlasName:String = null):Armature
Build and returns a new Armature instance. | BaseFactory | ||
dispose(disposeData:Boolean = true):void
Cleans up resources used by this BaseFactory instance. | BaseFactory | ||
getSkeletonData(name:String):SkeletonData
Returns a SkeletonData instance. | BaseFactory | ||
getTextureAtlas(name:String):Object
Return the TextureAtlas by that name. | BaseFactory | ||
getTextureDisplay(textureName:String, textureAtlasName:String = null, pivotX:Number, pivotY:Number):Object
Return the TextureDisplay. | BaseFactory | ||
parseData(bytes:ByteArray, skeletonName:String = null):SkeletonData
Parses the raw data and returns a SkeletonData instance. | BaseFactory | ||
removeSkeletonData(name:String):void
Remove a SkeletonData instance from this BaseFactory instance. | BaseFactory | ||
removeTextureAtlas(name:String):void
Remove a textureAtlas from this baseFactory instance. | BaseFactory |
Method | Defined By | ||
---|---|---|---|
[override]
Generates an Armature instance. | StarlingFactory | ||
[override]
Generates a Bone instance. | StarlingFactory | ||
generateTextureAtlas(content:Object, textureAtlasXML:XML):Object [override] | StarlingFactory | ||
generateTextureDisplay(textureAtlas:Object, fullName:String, pivotX:Number, pivotY:Number):Object [override]
Generates a starling DisplayObject
| StarlingFactory |
generateMipMaps | property |
public var generateMipMaps:Boolean
Whether to generate mapmaps (true) or not (false).
optimizeForRenderToTexture | property |
public var optimizeForRenderToTexture:Boolean
Whether to optimize for rendering (true) or not (false).
scaleForTexture | property |
public var scaleForTexture:Number
Apply a scale for SWF specific texture. Use 1 for no scale.
StarlingFactory | () | Constructor |
public function StarlingFactory()
Creates a new StarlingFactory instance.
generateArmature | () | method |
override protected function generateArmature():Armature
Generates an Armature instance.
ReturnsArmature — Armature An Armature instance.
|
generateBone | () | method |
override protected function generateBone():Bone
Generates a Bone instance.
ReturnsBone — Bone A Bone instance.
|
generateTextureAtlas | () | method |
override protected function generateTextureAtlas(content:Object, textureAtlasXML:XML):Object
Parameters
content:Object | |
textureAtlasXML:XML |
Object |
generateTextureDisplay | () | method |
override protected function generateTextureDisplay(textureAtlas:Object, fullName:String, pivotX:Number, pivotY:Number):Object
Generates a starling DisplayObject
Parameters
textureAtlas:Object — The TextureAtlas.
| |
fullName:String — A qualified name.
| |
pivotX:Number — A pivot x based value.
| |
pivotY:Number — A pivot y based value.
|
Object —
|