Script: Bitbybit 3D Logos Spinning

Bitbybit 3D Logos Spinning picture
Type
Rete logo indicatorrete
Date Created
Aug 29, 2024, 6:38:33 AM
Last Edit Date
Jun 24, 2025, 4:08:39 PM

Project Information

This project demonstrates how latest control flow features allow you to create animations of rotations for meshes. We used bitbybit.dev logo 3D model.

View Full Project

Script Code

{
  "id": "rete-v2-json",
  "nodes": {
    "84450dfb644f988f": {
      "id": "84450dfb644f988f",
      "name": "bitbybit.asset.fetchFile",
      "customName": "fetch file",
      "async": true,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "url": "https://firebasestorage.googleapis.com/v0/b/bit-by-bit-prod.appspot.com/o/users%2FyVqNAFXmieX0iAkdP6wAz5BJ4X82%2Fprojects%2FXPeuGrTysubPnOzrlWln%2Fassets%2Fbitbybit-logo.glb?alt=media&token=dd6ac9e5-1b6e-4bcc-8f50-0006e24179bf"
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "50f146345207cca2",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        -487.4732698864309,
        642.3091896083306
      ]
    },
    "ad048c094e78c2a0": {
      "id": "ad048c094e78c2a0",
      "name": "bitbybit.babylon.io.loadAssetIntoScene",
      "customName": "load asset into scene",
      "async": true,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "hidden": false
      },
      "inputs": {
        "assetFile": {
          "connections": [
            {
              "node": "84450dfb644f988f",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "84450dfb644f988f",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        41.7325238411197,
        661.2995117911769
      ]
    },
    "6606252435f5f307": {
      "id": "6606252435f5f307",
      "name": "bitbybit.babylon.mesh.setScale",
      "customName": "set scale",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "babylonMesh": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "result",
              "data": {}
            }
          ]
        },
        "scale": {
          "connections": [
            {
              "node": "92fea753a4cc6bcb",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "92fea753a4cc6bcb",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2213.204352762479,
        835.746700965462
      ]
    },
    "92fea753a4cc6bcb": {
      "id": "92fea753a4cc6bcb",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0.1,
        "y": 0.1,
        "z": 0.1
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1642.5619346447195,
        1021.1988203719068
      ]
    },
    "bf7a8a26b8c00b91": {
      "id": "bf7a8a26b8c00b91",
      "name": "bitbybit.babylon.mesh.setPosition",
      "customName": "set position",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "position": {
          "connections": [
            {
              "node": "2ecf49a39075d855",
              "output": "result",
              "data": {}
            }
          ]
        },
        "babylonMesh": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "2ecf49a39075d855",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5122.338338863248,
        476.40285163862575
      ]
    },
    "5d50bbc257bc651c": {
      "id": "5d50bbc257bc651c",
      "name": "bitbybit.babylon.scene.drawDirectionalLight",
      "customName": "draw directional light",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "direction": [
          -100,
          -100,
          -100
        ],
        "intensity": 3,
        "diffuse": "#ffffff",
        "specular": "#ffffff",
        "shadowGeneratorMapSize": 2056,
        "enableShadows": true,
        "shadowDarkness": 0,
        "shadowUsePercentageCloserFiltering": true,
        "shadowContactHardeningLightSizeUVRatio": 0.2,
        "shadowBias": 0.0001,
        "shadowNormalBias": 0.002,
        "shadowMaxZ": 1000,
        "shadowMinZ": 0
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "d03c7e6af7f68d06",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        858.2636371876487,
        1768.3076012929353
      ]
    },
    "2ecf49a39075d855": {
      "id": "2ecf49a39075d855",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 0,
        "z": 0
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "6606252435f5f307",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2575.9779242132863,
        718.8422869845642
      ]
    },
    "d03c7e6af7f68d06": {
      "id": "d03c7e6af7f68d06",
      "name": "bitbybit.babylon.scene.enableSkybox",
      "customName": "enable skybox",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "skybox": "city",
        "size": 1000,
        "blur": 0.4,
        "environmentIntensity": 0.7
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        486.71303779744346,
        1806.9217065989028
      ]
    },
    "02528322d8bef307": {
      "id": "02528322d8bef307",
      "name": "bitbybit.flow.babylon.render",
      "customName": "render",
      "data": {},
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1034.38232672994,
        -230.13880856487302
      ]
    },
    "e70e6b395dc914be": {
      "id": "e70e6b395dc914be",
      "name": "bitbybit.flow.counters.counterMinMax",
      "customName": "counter min max",
      "data": {
        "count": 0,
        "min": 0,
        "max": 360,
        "step": 0.5,
        "pulse": false,
        "end": false
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "02528322d8bef307",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1666.6114079633905,
        -381.37404618644905
      ]
    },
    "50f146345207cca2": {
      "id": "50f146345207cca2",
      "name": "bitbybit.flow.actions.start",
      "customName": "start",
      "data": {},
      "inputs": {},
      "position": [
        -939.9901706834146,
        719.7559966985465
      ]
    },
    "870a1110ef7d8d31": {
      "id": "870a1110ef7d8d31",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 0,
        "z": 0
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "e70e6b395dc914be",
              "output": "exec",
              "data": {}
            }
          ]
        },
        "z": {
          "connections": [
            {
              "node": "b588a717b969853a",
              "output": "result",
              "data": {}
            }
          ]
        },
        "x": {
          "connections": [
            {
              "node": "bb0444aa36ba8379",
              "output": "result",
              "data": {}
            }
          ]
        },
        "y": {
          "connections": [
            {
              "node": "e70e6b395dc914be",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2942.3593101028123,
        -575.1431569027574
      ]
    },
    "a1ddaf05043c2a00": {
      "id": "a1ddaf05043c2a00",
      "name": "bitbybit.babylon.mesh.setRotation",
      "customName": "set rotation",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": true
        }
      },
      "inputs": {
        "rotation": {
          "connections": [
            {
              "node": "870a1110ef7d8d31",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "870a1110ef7d8d31",
              "output": "exec",
              "data": {}
            }
          ]
        },
        "babylonMesh": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5125.7242416892,
        -193.91687286392454
      ]
    },
    "b588a717b969853a": {
      "id": "b588a717b969853a",
      "name": "bitbybit.flow.counters.counterMinMax",
      "customName": "counter min max",
      "data": {
        "count": 0,
        "min": 0,
        "max": 360,
        "step": -1,
        "pulse": false,
        "end": false
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "02528322d8bef307",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1667.7633439759074,
        15.470432756120033
      ]
    },
    "bb0444aa36ba8379": {
      "id": "bb0444aa36ba8379",
      "name": "bitbybit.flow.counters.counterMinMax",
      "customName": "counter min max",
      "data": {
        "count": 50,
        "min": 0,
        "max": 360,
        "step": 0.2,
        "pulse": false,
        "end": false
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "02528322d8bef307",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1664.3266223334447,
        -778.2133137972944
      ]
    },
    "e2ebc5adfd5c3e61": {
      "id": "e2ebc5adfd5c3e61",
      "name": "bitbybit.babylon.mesh.setRotation",
      "customName": "set rotation",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "870a1110ef7d8d31",
              "output": "exec",
              "data": {}
            }
          ]
        },
        "rotation": {
          "connections": [
            {
              "node": "0d4e52bd9a1e5968",
              "output": "result",
              "data": {}
            }
          ]
        },
        "babylonMesh": {
          "connections": [
            {
              "node": "5ba37ed8f18fb9c0",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5125.64985209333,
        1175.190684090695
      ]
    },
    "0d4e52bd9a1e5968": {
      "id": "0d4e52bd9a1e5968",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 0,
        "z": 0
      },
      "inputs": {
        "z": {
          "connections": [
            {
              "node": "e70e6b395dc914be",
              "output": "result",
              "data": {}
            }
          ]
        },
        "x": {
          "connections": [
            {
              "node": "b588a717b969853a",
              "output": "result",
              "data": {}
            }
          ]
        },
        "y": {
          "connections": [
            {
              "node": "bb0444aa36ba8379",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "e70e6b395dc914be",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2942.0245120059135,
        -218.95101137895153
      ]
    },
    "5ba37ed8f18fb9c0": {
      "id": "5ba37ed8f18fb9c0",
      "name": "bitbybit.babylon.mesh.clone",
      "customName": "clone",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "babylonMesh": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1794.714145159468,
        1458.8967585113294
      ]
    },
    "02093b82db3a41ee": {
      "id": "02093b82db3a41ee",
      "name": "bitbybit.babylon.mesh.setScale",
      "customName": "set scale",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "scale": {
          "connections": [
            {
              "node": "2c830f2104647151",
              "output": "result",
              "data": {}
            }
          ]
        },
        "babylonMesh": {
          "connections": [
            {
              "node": "5ba37ed8f18fb9c0",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "5ba37ed8f18fb9c0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2848.9289038114107,
        1667.2421920266097
      ]
    },
    "2c830f2104647151": {
      "id": "2c830f2104647151",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0.6,
        "y": 0.6,
        "z": 0.2
      },
      "inputs": {},
      "position": [
        2327.441630993038,
        1899.32139609703
      ]
    },
    "bb2420323a531f28": {
      "id": "bb2420323a531f28",
      "name": "bitbybit.babylon.mesh.setMaterial",
      "customName": "set material",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "includeChildren": true
      },
      "inputs": {
        "babylonMesh": {
          "connections": [
            {
              "node": "5ba37ed8f18fb9c0",
              "output": "result",
              "data": {}
            },
            {
              "node": "ad048c094e78c2a0",
              "output": "result",
              "data": {}
            }
          ]
        },
        "material": {
          "connections": [
            {
              "node": "7f5fa4b5816c1a4d",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "ad048c094e78c2a0",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2436.958553767231,
        2702.0468779918965
      ]
    },
    "7f5fa4b5816c1a4d": {
      "id": "7f5fa4b5816c1a4d",
      "name": "bitbybit.babylon.material.pbrMetallicRoughness.create",
      "customName": "pbr metallic roughness",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "name": "Custom Material",
        "baseColor": "#ffbd80",
        "emissiveColor": "#000000",
        "metallic": 0.99,
        "roughness": 0.23,
        "alpha": 1,
        "backFaceCulling": false,
        "zOffset": 0
      },
      "inputs": {},
      "position": [
        1750.568166474642,
        2780.773915832213
      ]
    }
  }
}