Script Showing Async Await Pattern in Blockly

Script Showing Async Await Pattern in Blockly script details
Type
Blockly logo image
blockly
App Version
0.13.0
Visibility
public
Date Created
Nov 30, 2022, 6:31:02 PM
Last Edit Date
Dec 5, 2023, 5:28:38 PM

Script Details

The Code
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="6]WMOL.aXxd=my/IoX_@">ellipses</variable> <variable id="c@y5(tg*Z!xl!O;_gj}g">i</variable> <variable id=";UG9)(|sp5{7u*}ONsdP">m</variable> <variable id="XQml%98KYUSaScI]ou6[">timeElapsedFromPreviousFrame</variable> </variables> <block type="bitbybit.babylon.scene.enableSkybox" id="1_fZY]8sjyF=D[PBXm+S" x="-1190" y="-696"> <value name="Skybox"> <block type="bitbybit.babylon.enums.skyboxEnum" id=":N4oDuQwG7Fr+@Tx~*!L"> <field name="bitbybit.babylon.enums.skyboxEnum">'city'</field> </block> </value> <value name="Size"> <block type="math_number" id="s|aW~GB[eigp~Ua9?+s7"> <field name="NUM">1000</field> </block> </value> <value name="Blur"> <block type="math_number" id="$y%h)Smlr^MlCYB.+_UM"> <field name="NUM">0.4</field> </block> </value> <value name="EnvironmentIntensity"> <block type="math_number" id="+_szIOEo(Sh0F:q@F3lx"> <field name="NUM">0.5</field> </block> </value> <next> <block type="bitbybit.babylon.scene.drawDirectionalLightNoReturn" id="E?(#,Xm-Kn*.5s{+O8!1"> <value name="Direction"> <block type="bitbybit.point.pointXYZ" id="q:mr9n!WEUQbP]snFNUo"> <value name="X"> <block type="math_number" id=";[n[WldW]S86Um22d6!q"> <field name="NUM">-100</field> </block> </value> <value name="Y"> <block type="math_number" id="%!KYNv%DAZq)]AlS[dId"> <field name="NUM">-100</field> </block> </value> <value name="Z"> <block type="math_number" id="AtTM*+:KI9r5V$K*x,K5"> <field name="NUM">-100</field> </block> </value> </block> </value> <value name="Intensity"> <block type="math_number" id="=ltN=P-[_.F90.{A#qk5"> <field name="NUM">0.5</field> </block> </value> <value name="Diffuse"> <block type="colour_picker" id=";_4jnbSo3I^CkfTmp1l["> <field name="COLOUR">#ffffff</field> </block> </value> <value name="Specular"> <block type="colour_picker" id="C@dd2}?LoF6]El${cqLN"> <field name="COLOUR">#ffffff</field> </block> </value> <value name="ShadowGeneratorMapSize"> <block type="math_number" id="/Bxsp|S4|w.U,f$~qb2D"> <field name="NUM">1024</field> </block> </value> <value name="EnableShadows"> <block type="logic_boolean" id="7sp?;fs$L74P}T3i5uEu"> <field name="BOOL">TRUE</field> </block> </value> <value name="ShadowDarkness"> <block type="math_number" id="}3oE_5/=%Z-0o]h[[T]F"> <field name="NUM">0</field> </block> </value> <next> <block type="base_time_async_context" id="D`RRfo2_H#53K78gyDCf"> <statement name="Then"> <block type="variables_set" id="-C0Mf^X#~9Cw4_iZGl(c"> <field name="VAR" id="6]WMOL.aXxd=my/IoX_@">ellipses</field> <value name="VALUE"> <block type="lists_create_with" id="hzL.`l.c#]*]wA8Jo|km"> <mutation items="0"> </mutation> </block> </value> <next> <block type="controls_for" id="f8DXT]lp_94@Ec`@R=Ff"> <field name="VAR" id="c@y5(tg*Z!xl!O;_gj}g">i</field> <value name="FROM"> <block type="math_number" id="CB)?U:DG~Dsk%cBx`ud-"> <field name="NUM">-4</field> </block> </value> <value name="TO"> <block type="math_number" id="T-M26QPDcg-QR.uB+-q#"> <field name="NUM">4</field> </block> </value> <value name="BY"> <block type="math_number" id="gbmp~{!F/01(5^FlWLDg"> <field name="NUM">1</field> </block> </value> <statement name="DO"> <block type="lists_setIndex" id="L^[9$Ib9,6jc]NfJE6CF"> <mutation at="false"> </mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="bXcZbD^gv]QyN^y-[7sE"> <field name="VAR" id="6]WMOL.aXxd=my/IoX_@">ellipses</field> </block> </value> <value name="TO"> <block type="bitbybit.occt.transforms.rotate" id="v/g7EDi$4+BbjtY}r-ch"> <value name="Shape"> <block type="bitbybit.occt.operations.makeThickSolidSimple" id="0R6eqvM{3;x`^$5-Ny9S"> <value name="Shape"> <block type="bitbybit.occt.shapes.face.createEllipseFace" id="sHm1RNTU@b2I+L-#9eFI"> <value name="Center"> <block type="bitbybit.point.pointXYZ" id="ij6QL9)hu$py7|}2MZXW"> <value name="X"> <block type="math_number" id="FEQtKln5mXvZ~f9sc51#"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="g3Pr(GGSlFOj%2ceR-#N"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_arithmetic" id="4givrJgHe3cKc~1j$#^~"> <field name="OP">MULTIPLY</field> <value name="A"> <block type="math_number" id="kppK57W}DB$Xb7enX#OZ"> <field name="NUM">3.3</field> </block> </value> <value name="B"> <block type="variables_get" id="L)I@~`eT$inO+W#B0}g)"> <field name="VAR" id="c@y5(tg*Z!xl!O;_gj}g">i</field> </block> </value> </block> </value> </block> </value> <value name="Direction"> <block type="bitbybit.point.pointXYZ" id="~pto/Y8OawAv_z0M]F}s"> <value name="X"> <block type="math_number" id="A^5}3Tvrdbx{ko2FL=I3"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="9nov@Ae^/_ao(PX6NXLN"> <field name="NUM">1</field> </block> </value> <value name="Z"> <block type="math_number" id="3*8b`Q.xC!RWK-OYtlZy"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="RadiusMinor"> <block type="math_number" id="Sl4Hlp[)qw+e9?_%[tna"> <field name="NUM">2</field> </block> </value> <value name="RadiusMajor"> <block type="math_number" id="|2PacY^(*)LL/bJ4]S0Z"> <field name="NUM">3</field> </block> </value> </block> </value> <value name="Offset"> <block type="math_number" id="1:jzdRy^~z2[HdPN@A3A"> <field name="NUM">-0.5</field> </block> </value> </block> </value> <value name="Axis"> <block type="bitbybit.point.pointXYZ" id="iJn#o+{g?!`#x,a/?(Y."> <value name="X"> <block type="math_number" id="ZDQtgF`+PVK[Xds@[Wm9"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="8~544s.b3U2G;N:K+,2?"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="Azqt)6#n_RMKXn0+kN;8"> <field name="NUM">1</field> </block> </value> </block> </value> <value name="Angle"> <block type="math_arithmetic" id="S_krWy;8!Er:`QAyrV#H"> <field name="OP">MULTIPLY</field> <value name="A"> <block type="math_number" id="qnXB9fa9anAGGK@IT?gD"> <field name="NUM">35</field> </block> </value> <value name="B"> <block type="variables_get" id="/3p3T@/$XWd`er*]sGBj"> <field name="VAR" id="c@y5(tg*Z!xl!O;_gj}g">i</field> </block> </value> </block> </value> </block> </value> </block> </statement> <next> <block type="variables_set" id="[)-hf{KjZ|gJ+GT`;nQo"> <field name="VAR" id=";UG9)(|sp5{7u*}ONsdP">m</field> <value name="VALUE"> <block type="base_time_await_return" id=":QHx~2z`?8`?@VFm?2$?"> <value name="Promise"> <block type="bitbybit.draw.drawAnyAsync" id="1uN(w8YZajcN.$DWN-zQ"> <value name="Entity"> <block type="bitbybit.occt.fillets.filletEdges" id="On4QZ@pre7qdYg?cLpm)"> <value name="Shape"> <block type="bitbybit.occt.booleans.union" id="3Ak`Q!NpR6nx^X6?TzI)"> <value name="Shapes"> <block type="variables_get" id=":q?[|k%SF7KxO6Ydh?6o"> <field name="VAR" id="6]WMOL.aXxd=my/IoX_@">ellipses</field> </block> </value> <value name="KeepEdges"> <block type="logic_boolean" id="T(i7ln~!OZS*92bFHnLC"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="Radius"> <block type="math_number" id="1t)jPLS?K@(W:xL8$aCZ"> <field name="NUM">0.2</field> </block> </value> </block> </value> <value name="Options"> <block type="bitbybit.draw.optionsOcctShape" id="Uy*f`OI[5mP::r$8`-CF"> <value name="FaceOpacity"> <block type="math_number" id=")iJuMe/RpQzsQhJcfYi*"> <field name="NUM">1</field> </block> </value> <value name="EdgeOpacity"> <block type="math_number" id="#d#f`B!P7/oUwVwctLaH"> <field name="NUM">1</field> </block> </value> <value name="EdgeColour"> <block type="colour_picker" id="cSlaTx6~2~j`N(FLGU(1"> <field name="COLOUR">#bbbbff</field> </block> </value> <value name="FaceColour"> <block type="colour_picker" id=",WB=+z8sP961yu5uzalW"> <field name="COLOUR">#0000ff</field> </block> </value> <value name="EdgeWidth"> <block type="math_number" id="S2!`WJ)COCUr{tXFj~ML"> <field name="NUM">3</field> </block> </value> <value name="DrawEdges"> <block type="logic_boolean" id="J=-%hV]9vrZ~6:+hee:n"> <field name="BOOL">FALSE</field> </block> </value> <value name="DrawFaces"> <block type="logic_boolean" id="z.^lH|8-?Hf~kbFlkv/8"> <field name="BOOL">TRUE</field> </block> </value> <value name="Precision"> <block type="math_number" id="H#xTZEaVAU9lSD.g`i2t"> <field name="NUM">0.005</field> </block> </value> <value name="DrawEdgeIndexes"> <block type="logic_boolean" id="1b/GFHwm-yvL9h9`A=}E"> <field name="BOOL">FALSE</field> </block> </value> <value name="EdgeIndexHeight"> <block type="math_number" id="`k7erb_}Bw@{U*U}4ov0"> <field name="NUM">0.06</field> </block> </value> <value name="EdgeIndexColour"> <block type="colour_picker" id="~XcnC5C9!`c{La+:#hB|"> <field name="COLOUR">#bbbbff</field> </block> </value> <value name="DrawFaceIndexes"> <block type="logic_boolean" id="mQ`bzLaXhOadAf{jLq{_"> <field name="BOOL">FALSE</field> </block> </value> <value name="FaceIndexHeight"> <block type="math_number" id="%Eec!)ZjpPF4Y]]URJ6-"> <field name="NUM">0.06</field> </block> </value> <value name="FaceIndexColour"> <block type="colour_picker" id=".4n/3M:[K@qw6y~T;5+K"> <field name="COLOUR">#0000ff</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="bitbybit.babylon.mesh.setMaterial" id="6f8fCt88T6!Nbrtx--M}"> <value name="BabylonMesh"> <block type="variables_get" id="m9Xgu#Cp`rqk|_c[!Z/{"> <field name="VAR" id=";UG9)(|sp5{7u*}ONsdP">m</field> </block> </value> <value name="Material"> <block type="bitbybit.babylon.material.pbrMetallicRoughness.create" id="{ikbKV~sD4RSiI]-n@DM"> <value name="Name"> <block type="text" id=":^zJ{0CHrM(;Fa,GDhFC"> <field name="TEXT">Custom Name</field> </block> </value> <value name="BaseColor"> <block type="colour_picker" id="DNnH+|(9JIaSavhB.y7c"> <field name="COLOUR">#0000ff</field> </block> </value> <value name="Metallic"> <block type="math_number" id="r|uiCvGb_V.2+0/,WKt#"> <field name="NUM">1</field> </block> </value> <value name="Roughness"> <block type="math_number" id="o;LV?r,2(!{]Zu)?Wg~("> <field name="NUM">0.2</field> </block> </value> <value name="Alpha"> <block type="math_number" id="EN?OU@2NXa3(YZT4zm+7"> <field name="NUM">1</field> </block> </value> <value name="BackFaceCulling"> <block type="logic_boolean" id="E.kRq*$*LqG.(p+8Kg3t"> <field name="BOOL">TRUE</field> </block> </value> <value name="ZOffset"> <block type="math_number" id="-79l}O]O}Z{Du1S|${9}"> <field name="NUM">2</field> </block> </value> </block> </value> <value name="IncludeChildren"> <block type="logic_boolean" id="Ndf(QA$;]9]yd$3V+n/B"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="base_time_update" id="iTK4b}E66Bu@z_b5.Czj"> <field name="TimePassedMs" id="XQml%98KYUSaScI]ou6[">timeElapsedFromPreviousFrame</field> <statement name="Update"> <block type="bitbybit.babylon.mesh.pitch" id=",ht}JEElYsKsJ[y4c$Z_"> <value name="BabylonMesh"> <block type="variables_get" id="V){:k@e6qPZ{:}[.KAs="> <field name="VAR" id=";UG9)(|sp5{7u*}ONsdP">m</field> </block> </value> <value name="Rotate"> <block type="math_number" id="|p-fQoQnl^k`YpV}ThR}"> <field name="NUM">0.2</field> </block> </value> <next> <block type="bitbybit.babylon.mesh.yaw" id="mTs$y4E0=~yMY3~U!9iS"> <value name="BabylonMesh"> <block type="variables_get" id="VI:.kI}b]Hs@TD#i8(53"> <field name="VAR" id=";UG9)(|sp5{7u*}ONsdP">m</field> </block> </value> <value name="Rotate"> <block type="math_number" id="nC5RpGz`wM`3]cON}8kg"> <field name="NUM">0.1</field> </block> </value> <next> <block type="bitbybit.babylon.mesh.roll" id="E[;OKX;.DRKxh/r%:ina"> <value name="BabylonMesh"> <block type="variables_get" id="/)bzf)4F;=6i[AK7iFF2"> <field name="VAR" id=";UG9)(|sp5{7u*}ONsdP">m</field> </block> </value> <value name="Rotate"> <block type="math_number" id="zxdX%=z,QhSdu4i*xTis"> <field name="NUM">0.3</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </xml>