Renderable

Methods
4
Fields
5

Getting one

scene:tileAt(…):getWallObject():getRenderable1()
scene:tileAt(…):getWallObject():getRenderable2()
scene:tileAt(…):getDecorativeObject():getRenderable()

Methods

MethodReturnsDescription
getModel()Model?Its model now: the model itself (a copy) for a Model or a static loc's renderable, read when asked (in HD, the SD model rebuilt from the…
getModelHeight()numberIts height (Renderable.height): the model's height once its bounds are calculated, 1000 before.
getAnimationHeightOffset()numberHow far its animation lifts it: for an animated loc's renderable (a DynamicObject) the vertical offset of the sequence it plays now, read…
getRenderMode()numberHow the client draws it (Renderable.RENDERMODE_*), its own answer: 0 (RENDERMODE_DEFAULT) for a model, an animated or static loc's rend…

Fields

FieldTypeDescription
RENDERMODE_DEFAULTnumberRenderable.RENDERMODE_DEFAULT: 0.
RENDERMODE_SORTEDnumberRenderable.RENDERMODE_SORTED: 1.
RENDERMODE_SORTED_NO_DEPTHnumberRenderable.RENDERMODE_SORTED_NO_DEPTH: 2, what a player answers.
RENDERMODE_UNSORTEDnumberRenderable.RENDERMODE_UNSORTED: 3.
RENDERMODE_UNSORTED_NO_DEPTHnumberRenderable.RENDERMODE_UNSORTED_NO_DEPTH: 4.

Returned by

MethodReturnsDescription
DecorativeObject.getRenderableRenderable?What the scene draws for it, nil when none (or gone).
DecorativeObject.getRenderable2Renderable?What the scene draws for its second model (a diagonal decoration), nil when none.
GameObject.getRenderableRenderable?What the scene draws for it: a model, or an animated loc (getModel() reads it), nil when it is gone.
GroundObject.getRenderableRenderable?What the scene draws for it, nil when none (or gone).
WallObject.getRenderable1Renderable?What the scene draws for its first side, nil when none (or gone).
WallObject.getRenderable2Renderable?What the scene draws for its second side, nil when none (or gone).

Method details

getModel

getModel: (Renderable) -> Model?

Its model now: the model itself (a copy) for a Model or a static loc's renderable, read when asked (in HD, the SD model rebuilt from the loc); for an animated loc's (a DynamicObject) the model it poses for the current cycle, built when asked (which moves its animation on to that cycle, as the next frame would; where the table has that read on, and the SD model in HD likewise); nil once the loc is gone and its renderable with it. A renderable held by address never builds an actor's model: that is the actor's own getModel().

getModelHeight

getModelHeight: (Renderable) -> number

Its height (Renderable.height): the model's height once its bounds are calculated, 1000 before.

getAnimationHeightOffset

getAnimationHeightOffset: (Renderable) -> number

How far its animation lifts it: for an animated loc's renderable (a DynamicObject) the vertical offset of the sequence it plays now, read when asked (the client's own answer, which its draw takes off the loc's height); 0 for a model or a static loc's renderable, and while nothing plays. A model outline subtracts it from a loc's getZ().

getRenderMode

getRenderMode: (Renderable) -> number

How the client draws it (Renderable.RENDERMODE_*), its own answer: 0 (RENDERMODE_DEFAULT) for a model, an animated or static loc's renderable; for a scene renderable that is an NPC or a player, theirs (Actor:getRenderMode()).