Render
Index
Namespaces
Renderer
Transform
Interfaces
Cache
isChangeable
model
parts
Type declaration
[key string]: ModelPart
renderId
renderer
FinalizeCallback
onFinalized
Parameters
renderer: Renderer
Returns void
FinalizeCallbackJS
Parameters
renderer: Renderer
Returns void
Model
clearAllParts
Clears all parts of the model.
Returns void
getPart
Parameters
partName: string
part name
Returns ModelPart
Part by it's name or null if part doesn't exist.
hasPart
Parameters
partName: string
part name
Returns boolean
true
if part with specified name exists in the model,false
otherwise.
reset
Resets the model
Returns void
ModelPart
addBox
Adds a new box to the part on the specified coordinates (relative to the part's coordinates) of the specified size (width, height, length).
Parameters
x: number
y: number
z: number
w: number
h: number
l: number
Returns void
addPart
Creates a new part with specified name. If a part with specified name already exists, returns the existing part.
Parameters
name: string
name of the part to create or return
Returns ModelPart
clear
Clears the contents of the part.
Returns void
getMesh
Returns RenderMesh
Mesh specified via Render.ModelPart.setMesh call or
null
, if this part doesn't contain mesh.
setMesh
Specifies RenderMesh to be used as a part.
Parameters
mesh: RenderMesh
Returns void
setOffset
Specifies part default offset.
Parameters
offsetX: number
offsetY: number
offsetZ: number
Returns void
setRotation
Specifies part rotation.
Parameters
rotationX: number
rotationY: number
rotationZ: number
Returns void
setTextureOffset
Specifies texture UV offset.
Parameters
u: number
v: number
Returns void
setTextureSize
Specifies texture size size, use the real texture file size or change it to stretch texture.
Parameters
w: number
h: number
Returns void
PartElement
Part's box description specified in Render.setPart method.
optionalchildren
Specifies child elements, using current box coordinates as base for the child boxes.
coords
Box coordinates, relative to part's coordinates.
size
Box size.
Type declaration
optionalw?: number
x: number
y: number
z: number
optionaluv
Box texture offset.
Type declaration
x: number
y: number
PartParameters
An interface of the object that is used as Render.addPart parameter.
optionaladd
If false or not specified in Render.setPart call, the part is cleared, otherwise new parts and params are applied to the existing parts.
optionalheight
Texture height, use the real texture file height or change it to stretch texture.
optionalpos
Part center position.
optionalrotation
Part rotation.
optionalu
Texture horizontal offset from left up corner.
optionalv
Texture vertical offset from left up corner.
optionalwidth
Texture width, use the real texture file width or change it to stretch texture.
RenderParameters
An interface of the object that is used as Render.constructor parameter.
optionalitem
Item ID for Item Sprite render type.
optionalname
Name of the cached Render object to be used.
optionalraw
If set to true, a humanoid render is constructed, empty otherwise.
optionalscale
Render scale multiplier.
optionalskin
Relative path to the texture used by render,
e.g. "textures/entity/zombie.png"
.
Renderer
isHumanoid
transform
addFinalizeCallback
Parameters
callback: FinalizeCallback | FinalizeCallbackJS
Returns void
getModel
Returns Model
getPointer
Returns number
getRenderType
Returns number
getScale
Returns number
release
Returns void
setFinalizeable
Parameters
finalizeable: boolean
Returns void
setScale
Parameters
scale: number
Returns void
setSkin
Parameters
skin: string
Returns void
Transform
Interface used to perform transformation on the specified render object.
clear
Clears all the transformations applied to the render.
Returns Transform
Reference to itself to be used in sequential calls.
lock
Returns Transform
Reference to itself to be used in sequential calls.
matrix
Performs arbitrary matrix transformations on the render.
Parameters
m00: number
m01: number
m02: number
m03: number
m10: number
m11: number
m12: number
m13: number
m20: number
m21: number
m22: number
m23: number
m30: number
m31: number
m32: number
m33: number
Returns Transform
Reference to itself to be used in sequential calls.
rotate
Rotates render along three axes.
Parameters
rotX: number
rotY: number
rotZ: number
Returns Transform
Reference to itself to be used in sequential calls.
scale
Scales render along the three axes.
Parameters
scaleX: number
scaleY: number
scaleZ: number
Returns Transform
Reference to itself to be used in sequential calls.
scaleLegacy
translate
Translates render along three axes.
Parameters
x: number
y: number
z: number
Returns Transform
Reference to itself to be used in sequential calls.
unlock
Returns Transform
Reference to itself to be used in sequential calls.
We're meant native renderer, it's not connected with same class here.