flatworld.maplayers.MapLayerParent Class
Layer designed to hold subcontainers. But can handle objects too. Different devices graphic cards can only have specific size of bitmap drawn, and PIXI cache always draws a bitmap. Thus the default is: 4096, based on this site: http://webglstats.com/ and MAX_TEXTURE_SIZE
Constructor
flatworld.maplayers.MapLayerParent
-
options
Parameters:
-
options
Object-
name
Stringname layer property name, used for identifiying the layer, usefull in debugging, but used also otherwise too
-
coord
Objectstarting coords of layer. Relative to parent map layer.
-
x
IntegerX coordinate -
y
IntegerY coordinate
-
-
subcontainers
ObjectSubontainer size. If given activated subcontainers, otherwise not.
-
width
Integerwidth (in pixels) -
height
Integerheight (in pixels)
-
-
specialLayer
BooleanIs this special layer or not.
-
Item Index
Methods
addChild
-
displayObject
We override the PIXIs own addchild functionality. Since we need to support subcontainers in addChild. We check subcontainers and then we call the original (PIXIs) addChild
Parameters:
-
displayObject
PIXI.DisplayObjectPIXI.DisplayObject
getSubcontainerConfigs
()
Returns the configurations set for subcontainers.
getSubcontainers
()
getSubcontainersByCoordinates
-
coordinates
-
options.filter
Returns subcontainers based on the given coordinates. Can be applied through a MapDataManipulator filter also.
Parameters:
-
coordinates
Object-
x
IntegerX coordinate
-
y
IntegerY coordinate
-
-
options.filter
MapDataManipulatorFilter for selecting only certain subcontainers