The Babylon Toolkit Extension is an advanced game development framework that provides modern game engine mechanics for BabylonJS.
https://doc.babylonjs.com/communityExtensions/Unity
https://github.com/BabylonJS/BabylonToolkit/tree/master/Editors https://github.com/BabylonJS/BabylonToolkit/tree/master/Runtime https://github.com/BabylonJS/BabylonToolkit/tree/master/Modules https://github.com/BabylonJS/BabylonToolkit/tree/master/Snippets
The babylon.toolkit.js runtime library must be loaded in your host environment:
<script type="text/javascript" src="scripts/babylon.toolkit.js"></script>
Or at runtime:
await BABYLON.Tools.LoadScriptAsync("scripts/babylon.toolkit.js");
Or on playgrounds:
await TOOLKIT.SceneManager.InitializePlayground(engine);
Or node package manager:
npm install babylon-toolkit
A universal runtime library packaged for UMD and ES6 projects.
https://www.npmjs.com/package/babylon-toolkit
The Unity GLTF Exporter and Unreal GLTF Exporter plugins allow you to export interactive content from the game engine editor
The Script Component is the foundation of the babylon toolkit extended framework. It was modeled after Unity's MonoBehavior class:
namespace PROJECT {
export class SampleScript extends TOOLKIT.ScriptComponent {
constructor(transform:BABYLON.TransformNode, scene:BABYLON.Scene, properties:any=null) {
super(transform, scene, properties, "PROJECT.SampleScript");
}
protected awake(): void {
/* Init component function */
}
protected start(): void {
/* Start component function */
}
protected ready(): void {
/* Execute when ready function */
}
protected update(): void {
/* Update render loop function */
}
protected late(): void {
/* Late update render loop function */
}
protected step(): void {
/* Before physics step function (remove empty function for performance) */
}
protected fixed(): void {
/* After physics step function (remove empty function for performance) */
}
protected after(): void {
/* After update render loop function */
}
protected reset(): void {
/* Reset component function */
}
protected destroy(): void {
/* Destroy component function */
}
}
}
Your First TypeScript Playground (TS)
Your First JavaScript Playground (JS)
TypeScript Starter Playground (TS)
JavaScript Starter Playground (JS)
The TOOLKIT.SceneManager class provides runtime life cycle management for game objects. The extension supports a scene component application programming interface to enable the usage of modern game mechanics to ease web game development and provide a native game editor style development experience.
The TOOLKIT.WindowManager class provides DOM Level helper functions.
The TOOLKIT.InputController class provides game engine style user input functions.