Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

StackTheBoxWithEditor Demo

 import QtQuick 2.0
 import Felgo 3.0
  // for accessing the Body.Static type

 EntityBaseDraggable {
   id: obstacle
   entityType: "obstacle"

   width: 32
   height: 32

   colliderComponent: collider

   selectionMouseArea.anchors.fill: rectangle

   // the gridSize can also be smaller than the width, then the levels do not look as blocky and it is not a real grid
   gridSize: 16
   colliderSize: width

   // this item will blink when the entity is selected
   opacityChangeItemWhileSelected: rectangle

   onEntityClicked: scene.entitySelected(obstacle)

   // if the obstacle was pressed and held, remove it
   onEntityPressAndHold: removeEntity()

   Rectangle {
     id: rectangle
     color: "grey"
     x: -width/2
     y: -height/2
     width: parent.width
     height: parent.height
   BoxCollider {
     id: collider
     x: -width/2
     y: -height/2
     // this is set automatically from BoxCollider
 //    width: parent.width
 //    height: parent.height

     // use "" to access the Body.Static type
     bodyType: Body.Static // the body shouldnt move