if set, any movable with the same density as this diob may cross over it
how visible the diob appears; (0 to 1); 0 completely invisible, 1 completely visible, between partially visible, higher the number the more visible
default 0.5; number for both x and y anchors or an object containing both {'x': 0, 'y': 0}; determines where the icon's origin is
angle of the diob (0 to 2PI)
if set, will share animation with all other diobs with the same sync id; ex {'sync': 'water'}
name of atlas the object's icon is in
name of the lowest level parent type
data shared automatically from the server-side to clients that have a sync for this diob; changing the variable will update any clients that have this diob's sync in realtime
hex, rgb, rgba, color matrix value, or a tint object; applies color filter to diob; ex ( '#000000' ); ex ( 'rgb(10, 20, 30)' ); ex ( {'tint': 0x444444} )
string containing composite value that determines how this diob is drawn with other diobs on the same plane; possible values: normal, add, multiply, screen
determines if the object is dense or not; true or false for dense or not, or a number for value, over 1 for different densities; for example, density 3 diobs can move over density 2 and lower diobs but not anything density 3 or higher
height of the collision box of the object
name of icon inside object's icon atlas
state of the icon
unique ID of the diob
if set, diob will be invisible to all other diobs with visibility less than this value
if this diob is an Overlay type or is being used as an overlay, this will be set; if the overlay has a parent diob, this will be a reference to that diob
order of display of the diob; higher layer objects appear above lower layer objects
the tile that the diob is on
name of the map
determines if the cursor executes mouse events on this object or not; 0 to ignore mouse events, 1 for icon size to determine mouse events, 2 for physical size to determine mouse events
name of object
name of the highest level parent type
order of display of the diob; diobs with the same plane appear together with layers determining the order; a diob with a plane of 1 and layer 1000 will appear below a diob with plane 2 (default planes: Diob 0, Movable 1, Particle 2)
SERVER-ONLY; if set, the server will not update clients when changes are made; can be 'true' to prevent all clients from getting updated or can be an object containing variables and/or specific clients to ignore; possible variables 'pos', 'dir', 'icon'; ex ( {'type': ['pos', 'dir'], 'client': [someClient]} )
if set, the client will not interpolation position changes
CLIENT-ONLY; if set, the client will not update the draw layer of this diob when it changes location on the screen
the region that the diob is in
height to use when calculating y position relayering
0 for no scale or an object {'x': 2, 'y': 2} containing the information for the scale
custom string used to identify the diob
a string to be displayed as text above the diob
default 0; number of pixels to offset the text by on the y-axis
the diob's transformation matrix or transformation object; example [scaleX, skewY, 0, skewX, scaleY, 0, moveX, moveY, 1] where scaleX scales the diob's appearance on the x-axis, skewY skews on the y-axis, moveX moves on the x-axis, skewX skews on the x-axis, scaleY scales on the y-axis, moveY moves on the y-axis, and the last three are static for matrix; example {'scaleX': 2, 'skewY': 0.1} would scale by 2 on the x-axis and skew by 0.1 on the y-axis for object
name of the type of the object
all invisible diobs with invisibility levels equal to or less than this will be visible to this diob
width of the collision box of the object
position of object on the grid x-axis
how many pixels object is offset on the grid x-axis from the xCoord
x-axis offset of the icon
position on the x-axis of the origin from the left edge of the diob
position on the x-axis from left to right of the map
position of object on the grid y-axis
how many pixels object is offset on the grid y-axis from its yCoord
y-axis offset of the icon
position on the y-axis of the origin from the top edge of the diob
position on the y-axis from top to bottom of the map
adds the specified filter
name of the filter; only one name may be used at a time, using the name will remove the old filter with that name
the type of filter to add; below is the types and their specific possible pArgs values
color-based filter
adds an overlay to the object which is a visual icon that always follows the object; returns the new overlay
string of the type of object or overlay to add an overlay of or actual diob to get type from
OptionalpAppearance: number | booleanoptional; if 1 or positive, this overlay will be be treated as if it is part of the the parent's actual appearance - appearance settings such as angle and alpha of the parent will be used for this overlay and the overlay will be drawn directly on top of the parent so no other diobs that are not an overlay of the parent can appear between it and the parent (it will basically be an extension of the parent's icon); if this is false or 0, the overlay will be treated as an independent diob that just follows the parent around; if -1 or negative it will be treated like if it was 1 but it will appear under the parent instead of above it
OptionalpSkipEvent: booleanoptional; if true, the onAddOverlay event will not be called
returns the new overlay
returns an object containing the information for the diob's current animation; current variables, onFrame for the current frame the animation is on, frameCount for total number of frames in the animation, atlasName for atlas of the current animation, iconName for icon name of current animation, iconState for state of current animation; example {'onFrame': 1, 'frameCount' 20, 'atlasName': '', 'iconName': '', 'iconState': ''}
OptionalpVal: booleanoptional; string with name of specific value to get; options: 'onFrame', 'frameCount', 'atlasName', 'iconName', 'iconState'
returns an object containing the information for the diob's current animation; current variables, onFrame for the current frame the animation is on, frameCount for total number of frames in the animation, atlasName for atlas of the current animation, iconName for icon name of current animation, iconState for state of current animation; example {'onFrame': 1, 'frameCount' 20, 'atlasName': '', 'iconName': '', 'iconState': ''}
returns an array of diobs in the diob's contents using the provided arguments; if pType is not set, all diobs in the diob's contents will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs in the game will be returned
OptionalpType: stringoptional; string containing type path to return
OptionalpChild: booleanoptional; boolean that determines if child types are included
returns an array of diobs in the diob's contents using the provided arguments; if pType is not set, all diobs in the diob's contents will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs in the game will be returned
returns an array of diobs that are crossing this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
OptionalpType: stringoptional; string containing type path to return
OptionalpChild: booleanoptional; boolean that determines if child types are included
returns an array of diobs that are crossing this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
returns an array of diobs that are overlays of this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
OptionalpType: stringoptional; string containing type path to return
OptionalpChild: booleanoptional; boolean that determines if child types are included
returns an array of diobs that are overlays of this diob using the provided arguments; if pType is not set, all diobs will be returned; if pType is set but pChild is not, all diobs with the exact type of pType will be returned; if pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned; for example, if pType is set to 'Mob' with pChild undefined, all diobs with the exact type of 'Mob' will be returned, but if pChild is set, then all mobs will be returned
grabs an object with the screen x offset, y offset, width, height, settings, and either an array of pixel data or a data url depending on pType (data returned client-side only). The data can then be changed and used elsewhere or drawn onto another screen. To read the width and height you could use object.width and object.height, where object is the object returned by the function. The object data array is as follows: object.data[0] is the red value (0-255) of the pixel at 0,0, object.data[1] is the green value (0-255) of the pixel at 0,0, object.data[2] is the blue value (0-255) of the pixel at 0,0, and object.data[3] is the alpha value (0-255) of the pixel at 0,0. Then object.data[4], object.data[5], object.data[6], and object.data[7] are the respective values for the pixel at 1,0. This trend continues through the whole array for every pixel. object ex: {'x': 0, 'y': 0, 'width': 100, 'height': 100, 'data': ''}
type of data to get; 'url', 'pixels', 'canvas', or 'sprite'
returns the transformation matrix of this diob
OptionalpAsObj: unknownoptional; if set, the diob's transformation matrix will be returned as an object, for example {'scaleX': scaleX, 'skewY': skewY}
returns the transformation matrix of this diob
when pMovable attempts to cross this diob resulting in overlapping bounding boxes; this function must return 'true' in order for pMovable to cross; this event is called for both diobs if they are both movable; tiles do not have this event
movable that is attempting to cross with this diob
if set, pMovable initiated the event
when this diob changes maps; this event will be called twice if the map has not already been loaded, once before loading and once after the loading has completed (the first event will have pBefore set)
name of the old map or name of the new map if pBefore is set
if set then the map is currently loading and this is the pre-load event
called when the mouse clicks this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
the button used; 1 for left, 2 for middle, 3 for right
called when the mouse double clicks this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
the button used; 1 for left, 2 for middle
called when a mouse button has been pressed while over this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
the button used; 1 for left, 2 for middle, 3 for right
called when a mouse button is released while over this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
the button used; 1 for left, 2 for middle, 3 for right
called when a mouse wheel button is scrolled downward while over this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
called when a mouse wheel button is scrolled upward while over this object
client of the mouse
the x position of the mouse over the diob
the y position of the mouse over the diob
called when a packet is sent from this diob on the client or server using diob.sendPacket
client that sent the packet
name of packet
any data containing information for packet; ex {'a': 1, 'b': 2} or 'test'
when this diob has a transition change; if pVar, pChange, and pStart are all unset then this is the event called when all transitions have ended
a string containing the name of the variable involved in the transition
the amount changed
if this is set then this is the event called when a transition starts; this will be a reference to the transition object used
removes all overlays with the pOver type or the exact overlay matching pOver
string of the type of object or overlay to remove or actual overlay to remove
OptionalpSave: unknownoptional; if set, the overlay will not be deleted, otherwise this call will delete pOver after removing it from the overlays
sends a packet to a client or server specifically for this diob, depending on where the code is executed; client code executing this will send the packet to the server; server code executing this will send the packet to the client; this will invoke Diob/onPacket on client-side if the sendPacket is server-side and on the server-side if it is on the client-side
name of packet to send
data to be sent; ex {'a': 1, 'b': 2} or 'test'
OptionalpClient: ClientSERVER ONLY; optional; specific client or array of clients to send this packet to; if no client is specified the packet will be sent to all clients currently synced with this diob
sets this diob's icon anchor to pX and pY; default is 0.5,0.5 which is the center of the diob's icon (0,0 would be the top-left corner);
default 0.5; x value of the diob's icon anchor
OptionalpY: numberoptional; default 0.5; y value of the diob's icon anchor
changes the appearance of the diob based on the values provided by pDiob
object containing the appearance information or a diob itself; values used: atlasName, iconName, iconState, width, height, layer, scale, color, alpha, transform, anchor, angle, composite, plane, text, textStyle, animator, overlays, overScreen
sets the animation frame to pFrame and freezes for pDelay milliseconds before returning to the previous frame or continuing on if pCont is set
frame number
OptionalpDelay: numberoptional; delay in milliseconds to freeze the newly set frame for; passing in -1 will pause the animation until you unpause it by changing the diob's 'animator.isPaused' to false
OptionalpCont: booleanoptional; if true, animation will play like normal after the frame delay; false will return the animation to the frame it was at before the set after the delay
sets the diob's overlays to the array pOver
array of overlays to set this diob's overlays to
OptionalpSave: booleanoptional; if set, removed overlays will not be deleted, otherwise this call will delete removed overlays after removing them from the overlays
changes the over screen information; adding data optional
x offset of display
y offset of display
width of display
height of display
OptionalpData: unknownoptional; data to add to the screen
OptionalpSet: objectoptional; settings object; ex ( {'scaleNearest': true} );
modifies scale, angle, or alpha of the over screen
object containing mods; scale, angle, alpha; ex ( {'angle': 0.8} )
OptionalpAdd: unknownoptional; if set, the values in pMod will be added to the current mod object
turns this diob's sprite into a repeating pattern; call with no arguments to return to a normal sprite
default 0; position where the pattern starts on the x-axis
default 0; position where the pattern starts on the y-axis
OptionalpWidth: numberoptional; width of the pattern
OptionalpHeight: numberoptional; height of the pattern
sets the movable's map position to pX, pY
value to set the movable's x position on the map to
value to set the movable's y position on the map to
OptionalpMap: stringoptional; string containing name of map to set position on
sets the scale of the diob
number to scale the width of the diob by; for example 2 would be a 200% scale
OptionalpY: numberoptional; number to scale the height of the diob by; for example 2 would be a 200% scale; pX used if null
transitions this diob's pO properties from their current values to the new values over time; if pO is not set all transitions will be cancelled and all properties will automatically go to their end transition values; current allowed properties: alpha, angle, scale, xScale, yScale, xIconOffset, yIconOffset
object containing properties to transition; ex {'alpha': 0.5, 'xIconOffset': 20}
number of steps to take to transition the properties; default 1; -1 for a step every frame
number of milliseconds between each step; default 100; if pS is -1 then this is the total time
OptionalpQ: numberoptional; if set, this transition will be added to a queue and happen after the current transition finishes or the rest of the queue clears; set as -1 to merge this with the last thing in the queue
OptionalpLoop: numberoptional; if set, this transition will be added to the current loop of transitions and repeat until told to stop, if this transition is first, this can be set to a specify number to stop looping after that amount of loops; -1 to loop forever
OptionalpEase: stringoptional; use an easing equation that isn't linear; options: 'quadraticIn', 'quadraticOut', 'quadraticInOut', 'cubicIn', 'cubicOut', 'cubicInOut', 'quarticIn', 'quarticOut', 'quarticInOut', 'quinticIn', 'quinticOut', 'quinticInOut', 'sineIn', 'sineOut', 'sineInOut', 'expoIn', 'expoOut', 'expoInOut', 'circularIn', 'circularOut', 'circularInOut'
The diob object.