Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

22 lines (17 sloc) 554 Bytes
import {Carryable, CarryableSystem} from 'carryable';
// Make a box.
let box = new Entity();
box.addComponent(new BoxShape());
box.addComponent(new Transform({
position: new Vector3(8, 0.5, 8)
// Add the Carryable Component to the box.
let carryable = new Carryable();
// Set up toggling of the carry state via clicking.
box.addComponent(new OnClick(() => {
// Create a CarryableSystem to update our Carryable object.
engine.addSystem(new CarryableSystem());
You can’t perform that action at this time.