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:
-
optionsObject-
nameStringname layer property name, used for identifiying the layer, usefull in debugging, but used also otherwise too
-
coordObjectstarting coords of layer. Relative to parent map layer.
-
xIntegerX coordinate -
yIntegerY coordinate
-
-
subcontainersObjectSubontainer size. If given activated subcontainers, otherwise not.
-
widthIntegerwidth (in pixels) -
heightIntegerheight (in pixels)
-
-
specialLayerBooleanIs 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:
-
displayObjectPIXI.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:
-
coordinatesObject-
xIntegerX coordinate
-
yIntegerY coordinate
-
-
options.filterMapDataManipulatorFilter for selecting only certain subcontainers
