Script Blockly Free

Cloud Assets

Cloud Assets picture
Author
matas
Created
Jan 27, 2024, 6:45:12 AM
Last edit
Oct 2, 2025, 4:12:52 PM

Edit scriptPreview

Project

Getting Started Demos Blockly

This project contains demo scripts for Blockly based editor that are used as examples in the "Getting Started" section of the documentation.

View full project
<xml xmlns="https://developers.google.com/blockly/xml">
 <variables>
  <variable id="Y!6sh^8A[s2Qzt#~.ByR">boomBoxMesh</variable>
  <variable id="i|.i%Djvp9Cz(Y[%?sf1">drawOptions</variable>
 </variables>
 <block type="bitbybit.babylon.scene.useRightHandedSystem" id="*%}g(V@_!}8p2mZRi:UR" x="-196" y="-2019">
  <value name="Use">
   <block type="logic_boolean" id="Dofbp.%RUx);|jkCl4k9">
    <field name="BOOL">TRUE</field>
   </block>
  </value>
  <next>
   <block type="bitbybit.babylon.scene.enableSkybox" id="TwfDS:~}zEk!q7W$ggVs">
    <value name="Skybox">
     <block type="bitbybit.babylon.enums.skyboxEnum" id="LWGAw?rBe.r?~XAP`nHc">
      <field name="bitbybit.babylon.enums.skyboxEnum">'clearSky'</field>
     </block>
    </value>
    <value name="Size">
     <block type="math_number" id="~#$twzGyaGHqrwkL]*ft">
      <field name="NUM">1000</field>
     </block>
    </value>
    <value name="Blur">
     <block type="math_number" id="![!2dku`b@?A0GI5[8IS">
      <field name="NUM">0.1</field>
     </block>
    </value>
    <value name="EnvironmentIntensity">
     <block type="math_number" id="9pS9Uu10qLw$6Fp[NK9z">
      <field name="NUM">0.7</field>
     </block>
    </value>
    <next>
     <block type="bitbybit.babylon.scene.drawDirectionalLightNoReturn" id="P5s1IZb.2%|i]VM}[4dK">
      <value name="Direction">
       <block type="bitbybit.vector.vectorXYZ" id=";I]?O${=VZ5KJ%Y?6/aP">
        <value name="X">
         <block type="math_number" id="IQt/Blfr.qDt9S9Ycf8n">
          <field name="NUM">-100</field>
         </block>
        </value>
        <value name="Y">
         <block type="math_number" id="znn#JT_hze?`n+=5-ru%">
          <field name="NUM">-100</field>
         </block>
        </value>
        <value name="Z">
         <block type="math_number" id="w1BOk:[Z3YdYZ3RtWD]Q">
          <field name="NUM">-100</field>
         </block>
        </value>
       </block>
      </value>
      <value name="Intensity">
       <block type="math_number" id="E]7:*?0g0-IdV}{cmS8Y">
        <field name="NUM">0.5</field>
       </block>
      </value>
      <value name="Diffuse">
       <block type="colour_picker" id="d*;%qJ:Pj69|cs}6+D5I">
        <field name="COLOUR">#ffffff</field>
       </block>
      </value>
      <value name="Specular">
       <block type="colour_picker" id="^=Y=kVu?$9Ejwe`:5z|0">
        <field name="COLOUR">#ffffff</field>
       </block>
      </value>
      <value name="ShadowGeneratorMapSize">
       <block type="math_number" id="~MMp|,R$=Exfq%apGFQn">
        <field name="NUM">1024</field>
       </block>
      </value>
      <value name="EnableShadows">
       <block type="logic_boolean" id="W/Os)U){`+96^[;B(JM{">
        <field name="BOOL">TRUE</field>
       </block>
      </value>
      <value name="ShadowDarkness">
       <block type="math_number" id="H9Xm^3#Ul*IKh{|/y0J2">
        <field name="NUM">0</field>
       </block>
      </value>
      <value name="ShadowUsePercentageCloserFiltering">
       <block type="logic_boolean" id="}!9$L9ip8LI[2(+IuL4~">
        <field name="BOOL">TRUE</field>
       </block>
      </value>
      <value name="ShadowContactHardeningLightSizeUVRatio">
       <block type="math_number" id="[9xNV}f/1icT|Z_tbbBC">
        <field name="NUM">0.2</field>
       </block>
      </value>
      <value name="ShadowBias">
       <block type="math_number" id="PeK!4.$m!o/Hw^Z8/EyR">
        <field name="NUM">0.0001</field>
       </block>
      </value>
      <value name="ShadowNormalBias">
       <block type="math_number" id="$i%^E6=_zE%_!vud#u`-">
        <field name="NUM">0.002</field>
       </block>
      </value>
      <value name="ShadowMaxZ">
       <block type="math_number" id="+~ss?J%a)x8[FZPd*0;V">
        <field name="NUM">1000</field>
       </block>
      </value>
      <value name="ShadowMinZ">
       <block type="math_number" id="A`q/c3~-Mp1e7oszcK0U">
        <field name="NUM">0</field>
       </block>
      </value>
      <next>
       <block type="base_time_async_context" id="vA4/sP75d)H5s*DZ@Ka$">
        <statement name="Then">
         <block type="variables_set" id="CL`Z!r(eI6BAD32_I_LO">
          <field name="VAR" id="Y!6sh^8A[s2Qzt#~.ByR">boomBoxMesh</field>
          <value name="VALUE">
           <block type="base_time_await_return" id="QgP3E.$Ie]0VBzYxK;8S">
            <value name="Promise">
             <block type="bitbybit.babylon.io.loadAssetIntoScene" id="oDc^?hYP7Q4)1-2$hRf8">
              <value name="AssetFile">
               <block type="bitbybit.asset.getFile" id="OWIi^V}44zqboc49Ll?F">
                <value name="FileName">
                 <block type="text" id="IxTy[yv][aC;mMS3XKV=">
                  <field name="TEXT">BoomBox.glb</field>
                 </block>
                </value>
               </block>
              </value>
              <value name="Hidden">
               <block type="logic_boolean" id="B7eonm*tm@F~^mbxUHz*">
                <field name="BOOL">FALSE</field>
               </block>
              </value>
             </block>
            </value>
           </block>
          </value>
          <next>
           <block type="bitbybit.babylon.mesh.setPosition" id="F#7}9nS9OU_9pvb-7`Yv">
            <value name="BabylonMesh">
             <block type="variables_get" id="y7idlo@:IJZFJKdp00Df">
              <field name="VAR" id="Y!6sh^8A[s2Qzt#~.ByR">boomBoxMesh</field>
             </block>
            </value>
            <value name="Position">
             <block type="bitbybit.point.pointXYZ" id="IKng%,qE`0?3U(cn]6oM">
              <value name="X">
               <block type="math_number" id="qDj?Vy1=afFu{cj6Y)K%">
                <field name="NUM">2</field>
               </block>
              </value>
              <value name="Y">
               <block type="math_number" id="oV?*_*TyB%x)y$/x2h}-">
                <field name="NUM">0</field>
               </block>
              </value>
              <value name="Z">
               <block type="math_number" id="yWNcL$~h/Hr@diVzE$ao">
                <field name="NUM">0</field>
               </block>
              </value>
             </block>
            </value>
            <next>
             <block type="variables_set" id="bvMikKPO_w(SW#$%JG^5">
              <field name="VAR" id="i|.i%Djvp9Cz(Y[%?sf1">drawOptions</field>
              <value name="VALUE">
               <block type="bitbybit.draw.optionsOcctShapeSimple" id="P03Zb).$9[zFbE9)Ajfv">
                <value name="Precision">
                 <block type="math_number" id="KfPA!;r.+uI]zg?!HH;H">
                  <field name="NUM">0.001</field>
                 </block>
                </value>
                <value name="DrawFaces">
                 <block type="logic_boolean" id="9O25)*/RT(W#U_r^6V#Q">
                  <field name="BOOL">TRUE</field>
                 </block>
                </value>
                <value name="FaceColour">
                 <block type="colour_picker" id="Gmt8,!R}^iOkWDrayZ`7">
                  <field name="COLOUR">#ffffff</field>
                 </block>
                </value>
                <value name="DrawEdges">
                 <block type="logic_boolean" id="N^Gn8CCaZNf(0?gwQsj*">
                  <field name="BOOL">TRUE</field>
                 </block>
                </value>
                <value name="EdgeColour">
                 <block type="colour_picker" id="`nKg+)a_8[6)uX)P2@Qj">
                  <field name="COLOUR">#ffffff</field>
                 </block>
                </value>
                <value name="EdgeWidth">
                 <block type="math_number" id="#?OC|p*5(U1~Qfx%QA$C">
                  <field name="NUM">1</field>
                 </block>
                </value>
               </block>
              </value>
              <next>
               <block type="bitbybit.draw.drawAnyAsyncNoReturn" id="`B?Na-Q,cGZWRMKqZuRh">
                <value name="Entity">
                 <block type="bitbybit.occt.transforms.translate" id="Vdyvq0^~VO?3jWtGwa?w">
                  <value name="Shape">
                   <block type="bitbybit.occt.transforms.scale" id="gjh]=%naX!64_K_CY:`b">
                    <value name="Shape">
                     <block type="bitbybit.occt.io.loadSTEPorIGES" id="]U}Gc8r~WW5]~=JFYkiY">
                      <value name="AssetFile">
                       <block type="bitbybit.asset.getFile" id="f*7`(*8.F~x;a1ka?h[y">
                        <value name="FileName">
                         <block type="text" id="~lpf-J*t}p*f9zT~-Jqf">
                          <field name="TEXT">CalmCup.step</field>
                         </block>
                        </value>
                       </block>
                      </value>
                      <value name="AdjustZtoY">
                       <block type="logic_boolean" id="*B^Ca4:YQ0^x~~8;8bx6">
                        <field name="BOOL">FALSE</field>
                       </block>
                      </value>
                     </block>
                    </value>
                    <value name="Factor">
                     <block type="math_number" id="+$$bZt8].tTdL87E1R:f">
                      <field name="NUM">0.3</field>
                     </block>
                    </value>
                   </block>
                  </value>
                  <value name="Translation">
                   <block type="bitbybit.vector.vectorXYZ" id="TSN:$y:,24]%h[jdNI[2">
                    <value name="X">
                     <block type="math_number" id="3k?me84Ye@y(LRXoK~HK">
                      <field name="NUM">-2</field>
                     </block>
                    </value>
                    <value name="Y">
                     <block type="math_number" id="N(EeRJ+M8slPp9y^!%{B">
                      <field name="NUM">0</field>
                     </block>
                    </value>
                    <value name="Z">
                     <block type="math_number" id="6[ngV-bGqL413L~YA=9E">
                      <field name="NUM">0</field>
                     </block>
                    </value>
                   </block>
                  </value>
                 </block>
                </value>
                <value name="Options">
                 <block type="variables_get" id=",lvO2M^[LY)N7Q?W8{yW">
                  <field name="VAR" id="i|.i%Djvp9Cz(Y[%?sf1">drawOptions</field>
                 </block>
                </value>
                <next>
                 <block type="bitbybit.draw.drawAnyAsyncNoReturn" id="pm8|sO;i*tTrQ~PJ_dfZ">
                  <value name="Entity">
                   <block type="bitbybit.occt.shapes.face.createCircleFace" id="mcf)7iLG*kv/m8|ta0C4">
                    <value name="Radius">
                     <block type="math_number" id="GM=yI3b~xr0@3ezrH$w{">
                      <field name="NUM">7</field>
                     </block>
                    </value>
                    <value name="Center">
                     <block type="bitbybit.point.pointXYZ" id="2hB1wNYFKcc:y5c$?spG">
                      <value name="X">
                       <block type="math_number" id=":~_{Kt^gE[Pc=Rc@yp{G">
                        <field name="NUM">0</field>
                       </block>
                      </value>
                      <value name="Y">
                       <block type="math_number" id="QdOV^^QfN?gD%;P#O^Rh">
                        <field name="NUM">0</field>
                       </block>
                      </value>
                      <value name="Z">
                       <block type="math_number" id="gx$kg#X`U.dM=;Ko=|L#">
                        <field name="NUM">0</field>
                       </block>
                      </value>
                     </block>
                    </value>
                    <value name="Direction">
                     <block type="bitbybit.vector.vectorXYZ" id="^JJC-r5sh,uCVY+;{[0g">
                      <value name="X">
                       <block type="math_number" id="O,s,oV%Z@+/w_080^JU%">
                        <field name="NUM">0</field>
                       </block>
                      </value>
                      <value name="Y">
                       <block type="math_number" id="S9wx6H*M5q28Is#s3jwZ">
                        <field name="NUM">1</field>
                       </block>
                      </value>
                      <value name="Z">
                       <block type="math_number" id="B:4r1~E,!v{kfA!8PJ;=">
                        <field name="NUM">0</field>
                       </block>
                      </value>
                     </block>
                    </value>
                   </block>
                  </value>
                  <value name="Options">
                   <block type="variables_get" id="qWmDOwJ`MAh~nCp99flC">
                    <field name="VAR" id="i|.i%Djvp9Cz(Y[%?sf1">drawOptions</field>
                   </block>
                  </value>
                 </block>
                </next>
               </block>
              </next>
             </block>
            </next>
           </block>
          </next>
         </block>
        </statement>
       </block>
      </next>
     </block>
    </next>
   </block>
  </next>
 </block>
</xml>

Plans and pricing

Choose your plan

Editor plans for 3D development, API keys for server-side CAD algorithms

EnterpriseB2BCustompricing

Custom software development, dedicated servers and CAD automation at scale.

Learn moreContact us

CAD automation and software
  • Custom software development
  • Cloud CAD automation pipelines
  • 3D configurators (STEP & GLTF)
  • Batch export jobs
  • Custom algorithms & deployment
Infrastructure and support
  • Custom compute allocation
  • Dedicated / VPS server tenants
  • Long-running computation jobs
  • Custom upload limits & overage
  • SLA & premium support

All prices exclude applicable taxesView all plan details

Contact

Talk to us

Tell us what you are building or what is blocking you, through whichever channel suits you.