SpriteSheetMaterial is a material required for a SpriteSheetAnimator if you have an animation spreaded over more maps and/or have animated normalmaps, specularmaps

Constructor

@:value({ mipmap : true, repeat : false, smooth : true, speculars : null, normals : null })new(diffuses:Vector<Texture2DBase>, ?normals:Vector<Texture2DBase>, ?speculars:Vector<Texture2DBase>, smooth:Bool = true, repeat:Bool = false, mipmap:Bool = true)

Creates a new SpriteSheetMaterial required for a SpriteSheetAnimator

(the sprite sheet maps of each textures must have power of 2 sizes)

Parameters:

diffuses

Vector.<Texture2DBase> : One or more Texture2DBase representing the diffuse information of the spritesheets. Must hold at least 1 diffuse.

normals

Vector.<Texture2DBase> : One or more Texture2DBase representing the normal information of the spritesheets. Default is null. If not null, must hold same amount of textures as diffuses.

speculars

Vector.<Texture2DBase> : One or more Texture2DBase representing the specular information of the spritesheets. Default is null. If not null, must hold same amount of textures as diffuses.

smooth

Boolean : Material smoothing. Default is true.

repeat

Boolean : Material repeat. Default is false.

mipmap

Boolean : Material mipmap. Set it to false if the animation graphics have thin lines or text information in them. Default is true.

Methods

@:value({ mapID : 0 })swap(mapID:Int = 0):Bool

Inherited Variables

Inherited Methods

Defined by SinglePassMaterialBase

addMethod(method:EffectMethodBase):Void

Appends an "effect" shading method to the shader. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods added prior.

addMethodAt(method:EffectMethodBase, index:Int):Void

Adds an effect method at the specified index amongst the methods already added to the material. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods with a lower index.

getMethodAt(index:Int):EffectMethodBase

Returns the method added at the given index.

Parameters:

index

The index of the method to retrieve.

Returns:

The method at the given index.

hasMethod(method:EffectMethodBase):Bool

Queries whether a given effect method was added to the material.

Parameters:

method

The method to be queried.

Returns:

true if the method was added to the material, false otherwise.

removeMethod(method:EffectMethodBase):Void

Removes an effect method from the material.

Parameters:

method

The method to be removed.

Defined by MaterialBase

dispose():Void

Cleans up resources owned by the material, including passes. Textures are not owned by the material since they could be used by other materials and will not be disposed.

Defined by NamedAssetBase

assetPathEquals(name:String, ns:String):Bool

@:value({ overrideOriginal : true, ns : null })resetAssetPath(name:String, ?ns:String, overrideOriginal:Bool = true):Void