What’s new in Buildbox 3.2 JS API

What’s New in 3.2.2

New Features

Feature Description
Sound Node Sound nodes now have JS API support for volume control.
LevelSector The LevelSector represents the level in which an Entity exists. It can be used as a parent when creating new Entities.

New Functions

Location Function Description
 

Entity


id() Returns the Entity’s unique id. Each instance of the Entity in the Scene will have a different id.
level() Returns the LevelSector that the Entity exists in. This refers to the Scene Selector “level” at the bottom of the screen in a 2D/3D World.
setWorldPosition(x, y, z) Sets the world position of the Entity, not relative to any parent.

What’s New in 3.2.1

New Functions

Location Function Description
 Node name() Returns the name of the node.
Sub Scene setColor(r, g, b, a) Sets the RGB color of the Sub Scene. Alpha is optional.
meshComponents() Returns an array containing all the 3D Models associated with the Sub Scene.
Scene currentLevelName() Returns the name of the current level.

What’s New in 3.2.0

New Features

Feature Description
Sub Scene Contains the model and skeleton of an FBX asset.
Keyframe Animation Contains animation data for FBX assets.
Settings Setting variables can now be accessed in Xcode (iOS Export) for A/B testing and SDK integration.

New Functions

Location Function Description
Camera followForce() Returns the follow force of the camera. This determines how much ‘force’ the camera follows an object with.
setFollowForce(x, y, z) Sets the follow force of the camera. This determines how much ‘force’ the camera follows an object with.
followOffset() Returns the follow offset of the camera. The camera will follow the object from this many units away.
setFollowOffset(x, y, z) Sets the follow offset of the camera. The camera will follow the object from this many units away.
followThreshold() Returns the follow threshold of the camera. This determines how far the followed object can get from the camera before it starts moving.
Animation Node color() Returns the color of the Animation node.
setColor(r, g, b, a) Set the color of the Animation node.
depth() Returns the depth of the Animation node.
setDepth(value) Set the depth of the Animation node.
3D Model color() Returns the color of the 3D Model.
castsShadow() Returns whether this 3D Model casts shadow.
setCastShadow(value) Enables/disables shadow casting of the 3D Model.
receivesShadows() Returns whether this 3D Model receives shadows.
setReceiveShadows(value) Enables/disables shadow receiving of the 3D Model.
Enitity forceInit() Forces a newly created Entity to initialize right away.
isCharacter() Returns if the Entity is a Character (vs an Object).
setCastShadows(value) Enables/disables shadow casting of all 3D Models within the Entity at once.
setReceiveShadows(value) Enables/disables shadow receiving of all 3D Models within the Entity at once.
 Script requested(name, value, sender) Tied to the purple circle on the right side of some nodes. It’s a way to pass information without using signals.
 System fps() Returns the Frames Per Second that the game is running currently.
 Scene entities() Returns an array of all Entities in the Scene.
findFirst(name) Returns the first Entity found in the scene with the given name. Useful if you’re sure you only have one Object in the Scene with that name. Returns null if the Entity is not found.
shadowsEnabled() Returns whether shadows are enabled in the Scene.

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.

Tell us how we can improve this post?