Block Pack
name
Name to refer to this block by in code
Yes
String
display
Display name of the block seen in player's inventory
No
String
meta
Metadata created by React frontend (not documented)
No
Object
mesh
defMesh options for creating a prop block type. Takes precedence over faces array. The mesh must have a geometry attached. The geometry is used as the prop rather than the Object3D and its children.
No
Object
faces
Data that describes the color/texture of each of this block's faces. The array can either have 6 elements (1 for each side in the order SNX, SPX, SNY, SPY, SNZ, SPZ) or 1 element that applies to the entire block
No
Array
faces::color
The solid color to paint the block. If you want this block's color to be entirely derived from its texture, set this to "white" because the solid color and texture colors are always multiplied together.
No
Color
"white"
faces::texture
Object describing the image to paint on the block
No
Object
faces::texture::asste
sset name. The alpha (transparency) channel is ignored.
Yes
String
faces::texture::pos
The coordinates of the actual texture within the asset file. This allows putting multiple textures in the same file (called a texture atlas), decreasing download time. Note that the origin (0, 0) is the top left corner.
No
Box2
entire image
rotate*
Whether or not to rotate the paint and texture based on what direction the block was built from. For example grass would be false, because the top is always green, but wood is true, to have the lighter colored inside of the tree rotated to face whichever block side was originally selected.
No
Boolean
false
lights*
Array of defLight options
No
Object
health*
Default amount of health this block has. The percentage of remaining health determines how cracked the block appears. Health can be depleted either through coding or impact (if enabled).
No
Number
1
maxImpact
Maximum magnitude of impulse this block can sustain from an impact before becoming unsnapped. -1 for infinity (takes no impact damage)
No
Number
2000
gravity
Enum describing the effect of planet's gravity on this type of block
No
String
"disabled"
gravitySnap
Whether to allow this block to snap back to the grid if it has become unsnapped. Does not apply to RBChunks consisting of multiple blocks
No
Boolean
false
unsnapAnimation
Enum describing the physics animation that plays when the unsnaps from the grid. This will always be "ragdoll" for blocks that have gravity enabled
n* "crumble" - In addition to ragdoll, the block also crumbles into smaller pieces n* "smithereens" - A poof of dust/smoke is all that remains
No
String
"ragdoll"
material
These will only affect rigid bodies. Players, AI, and vehicles' wheels are not rigid bodies. https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/RigidBodyDynamics.html#friction-and-restitution
No
Object
material::staticFriction
No
Number
0.5
material::dynamicFriction
No
Number
0.5
material::restitution
AKA bounciness. 0 for no bounce, 1 for bouncing back to original height
No
Number
0
interactLabel
Whether or not to automatically add an "interact" label to every block of this type. This is needed because the server is unaware of whether or not the block has client-sided interact events on it.
No
Boolean
false
sound
Dictionary of defSound objects for different events
No
Object
sound::build
No
Object
[build sound from snd-default]
sound::break
No
Object
[break sound from snd-default]
sound::footstep
No
Object
footstep sound from snd-default
impact*
No
Object
Last updated