Visually programmed heart

Visually programmed heart script details
Type
Blockly logo image
blockly
App Version
0.13.0
Visibility
public
Date Created
Feb 14, 2022, 3:50:32 PM
Last Edit Date
Dec 5, 2023, 5:41:26 PM

Script Details

The Code
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="X;HBkmH2oln#hKyZzOS=">globalNode</variable> <variable id="F7ly.FzSyLP~(U-;NH^x">half</variable> <variable id="{t*:BCmfp(im2ZN1ovn*">firstWire</variable> <variable id="wJ6#28AoOOuMM_2Y8QB/">firstFace</variable> <variable id="yZ/d9i^N+w4bJ((|t/Ki">secondFace</variable> <variable id="j|nY_s%usftcbVrUsi=M">heart</variable> <variable id="oX10]_V;$su3I/~4!=-w">result</variable> <variable id="h3_+94wT%Y|7G@shOCTx">i</variable> <variable id="%zMl#7N?caN=0s^V`NJY">count</variable> <variable id="[~ISFek/}NZx3Dp[WlUI">heartInstance</variable> <variable id="JuNv7}i-}sHoUs,#.}GW">timeElapsedFromPreviousFrame</variable> </variables> <block type="variables_set" id="`z3Bv_f}S2e!Po2D|.+E" x="4631" y="1097"> <field name="VAR" id="X;HBkmH2oln#hKyZzOS=">globalNode</field> <value name="VALUE"> <block type="bitbybit.babylon.node.createNodeFromRotation" id="*^S-472ZCR{T~^y`ZEMA"> <value name="Parent"> <block type="bitbybit.babylon.node.getRootNode" id="x%MyKEBA_Tfw=(za!(+p"> </block> </value> <value name="Origin"> <block type="bitbybit.point.pointXYZ" id="?vii[b0]mVPzFlUaRN[t"> <value name="X"> <block type="math_number" id="@T(jk+Ei+sXsKQeAhSTV"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="p6]n#.=zTg2T5^!+(%_4"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="ZMTi*cR(PZWkdZL_)r`("> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Rotation"> <block type="bitbybit.point.pointXYZ" id="*p?JjUth5@,y5~^}1UAv"> <value name="X"> <block type="math_number" id="!uT,`97}`{*s!v%2rOG?"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="NqnfcSqYsG.5aQfQg]rs"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="7$EOuX*}du?+GaY_5TrA"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="7m5cT]^Vvp0$c#bqY7xb"> <field name="VAR" id="F7ly.FzSyLP~(U-;NH^x">half</field> <value name="VALUE"> <block type="bitbybit.occt.shapes.wire.combineEdgesAndWiresIntoAWire" id="FlT+dwe|,O=0pn=LoF|u"> <value name="Shapes"> <block type="lists_create_with" id="$z1IuufKc/GG7zEX;D)["> <mutation items="2"> </mutation> <value name="ADD0"> <block type="bitbybit.occt.shapes.edge.arcThroughThreePoints" id=",El+sG]yo`fD)[P5?j3_"> <value name="Start"> <block type="bitbybit.point.pointXYZ" id="B|o4x]f4QXtH+wYv0lln"> <value name="X"> <block type="math_number" id="Q9#L76fBEV=vthk_O4-P"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="Q32Dj]wVw9LD8rxdJTN."> <field name="NUM">5</field> </block> </value> <value name="Z"> <block type="math_number" id=";iIGp{[=EQZu-`H]j6z7"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Middle"> <block type="bitbybit.point.pointXYZ" id=".z#y-.r?1Wlz=,WfiYI3"> <value name="X"> <block type="math_number" id="PHgrYB8zIUJ+1=cycxDi"> <field name="NUM">2</field> </block> </value> <value name="Y"> <block type="math_number" id="fm,()-jWC,n:-pDEh5[v"> <field name="NUM">7</field> </block> </value> <value name="Z"> <block type="math_number" id="-U!?elO#N/_@Rd;+KK.c"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="End"> <block type="bitbybit.point.pointXYZ" id="*hNW)%].qNkFNmEc#422"> <value name="X"> <block type="math_number" id="82]Q556%nvsH)/{3^oT!"> <field name="NUM">4</field> </block> </value> <value name="Y"> <block type="math_number" id="*7aJdw7{}g4@9Y;3K:K:"> <field name="NUM">3</field> </block> </value> <value name="Z"> <block type="math_number" id="}q3A,ZT@?=[q4Uw65QeC"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <value name="ADD1"> <block type="bitbybit.occt.shapes.edge.line" id="4@fdvxzr(4p{Lu.RO^^f"> <value name="Start"> <block type="bitbybit.point.pointXYZ" id="tyKWAZ2R%yR?Yp({{=Cb"> <value name="X"> <block type="math_number" id="#TkuPDaiQjq[49dW^mcS"> <field name="NUM">4</field> </block> </value> <value name="Y"> <block type="math_number" id=",52R9$UoMk2wvOf@KAi!"> <field name="NUM">3</field> </block> </value> <value name="Z"> <block type="math_number" id="C)9mb9#w)9|~[^pEN/x?"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="End"> <block type="bitbybit.point.pointXYZ" id="jk!_8:Q4+E{L=Q%*fajP"> <value name="X"> <block type="math_number" id="+n`kL^tATeQ8sPg/u$po"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="Y{Lpo:,%SS,`1d[{[mH2"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="HwK|.n)wLv#Z+F(WTb,L"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id=")gT5{6hSF#{=F0g6f3_."> <field name="VAR" id="{t*:BCmfp(im2ZN1ovn*">firstWire</field> <value name="VALUE"> <block type="bitbybit.occt.shapes.wire.combineEdgesAndWiresIntoAWire" id="$XO_z{vbCn=Dj.Lx`sb%"> <value name="Shapes"> <block type="lists_create_with" id="~t25Xh`pBEM#}^%=LERp"> <mutation items="2"> </mutation> <value name="ADD0"> <block type="variables_get" id="}.37V9d$2X5.BH_UW(zY"> <field name="VAR" id="F7ly.FzSyLP~(U-;NH^x">half</field> </block> </value> <value name="ADD1"> <block type="bitbybit.occt.transforms.mirror" id="K*pd1%!vSo));!m3sw-+"> <value name="Shape"> <block type="variables_get" id="Nj,(8L_FsSR,ngDLp_`~"> <field name="VAR" id="F7ly.FzSyLP~(U-;NH^x">half</field> </block> </value> <value name="Origin"> <block type="bitbybit.point.pointXYZ" id="?mz!;6-Q5;XC}lj$oz5?"> <value name="X"> <block type="math_number" id="kU^X}1w*E:,stC`mc6c["> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="o`099jHpykd73Ate4)e3"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="/oST!tx!QxoQqbs+B#=*"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Direction"> <block type="bitbybit.point.pointXYZ" id="q_N2Esa0E91n^ssgxs~q"> <value name="X"> <block type="math_number" id="onOO81$xb^Ap?~tyX.hd"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="uC)Wp{tqX5!BT2@,,fX:"> <field name="NUM">1</field> </block> </value> <value name="Z"> <block type="math_number" id="xxlUwrye]b!qlh.,HZ@U"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="()Sk[E4;ODQfc+4=[u}J"> <field name="VAR" id="wJ6#28AoOOuMM_2Y8QB/">firstFace</field> <value name="VALUE"> <block type="bitbybit.occt.transforms.rotate" id="?jju-V;i`@*17`yT!J}R"> <value name="Shape"> <block type="bitbybit.occt.transforms.translate" id="b|,oDSg4oF;IMW/*[r0y"> <value name="Shape"> <block type="variables_get" id=")|=A46TUzvmhX_ES8jkx"> <field name="VAR" id="{t*:BCmfp(im2ZN1ovn*">firstWire</field> </block> </value> <value name="Translation"> <block type="bitbybit.point.pointXYZ" id="l:T.pXDPC/~hkXAJd7/$"> <value name="X"> <block type="math_number" id="4zE2zJ*+!+_`TqC;6,T#"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="nMo9AJ%o_khm(nJCcU2~"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="f%]oW_kwtA+`D++|U}2*"> <field name="NUM">-1</field> </block> </value> </block> </value> </block> </value> <value name="Axis"> <block type="bitbybit.point.pointXYZ" id="rG-Hiy:|R_lr+P917VS`"> <value name="X"> <block type="math_number" id="n?|lEgWwgxHhYxK+7)vh"> <field name="NUM">1</field> </block> </value> <value name="Y"> <block type="math_number" id="IH5wZj}3yasNpxvfyeC+"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="a`M$A4Jj6D44KHW_sDR`"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Angle"> <block type="math_number" id="{j/iYS}Fb(o*f0bj(:yt"> <field name="NUM">-10</field> </block> </value> </block> </value> <next> <block type="variables_set" id="{}B,iaymuKTp2Vdz$:bH"> <field name="VAR" id="yZ/d9i^N+w4bJ((|t/Ki">secondFace</field> <value name="VALUE"> <block type="bitbybit.occt.transforms.rotate" id="ABP+250s9]PA%Nby]gUj"> <value name="Shape"> <block type="bitbybit.occt.transforms.translate" id="Zso5K{{C}#I_uNz~TTVg"> <value name="Shape"> <block type="variables_get" id="dk`e6;IZjr!bNK![dJRA"> <field name="VAR" id="{t*:BCmfp(im2ZN1ovn*">firstWire</field> </block> </value> <value name="Translation"> <block type="bitbybit.point.pointXYZ" id="~NyBs-)YKWN+r#Yj=cLB"> <value name="X"> <block type="math_number" id="+7~qp{CV)#@c~^IMi%wr"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="i9X{H$=iC4g#}!;|F[~C"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="G{GB%v!)t[S[A/GIII7X"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <value name="Axis"> <block type="bitbybit.point.pointXYZ" id="2n5Aj_zao!PIU4UHB.po"> <value name="X"> <block type="math_number" id="oK6,mU5f6La+x%h~omaK"> <field name="NUM">1</field> </block> </value> <value name="Y"> <block type="math_number" id="q]-*vv),fjP=b;T@6!N8"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id=".AVUGJXZ*=,D~_*dUNUE"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Angle"> <block type="math_number" id="E2=W(-b/7^m6BX3qsms]"> <field name="NUM">10</field> </block> </value> </block> </value> <next> <block type="variables_set" id="Z}}Qi_Qa74Ce_Sl)*U_["> <field name="VAR" id="j|nY_s%usftcbVrUsi=M">heart</field> <value name="VALUE"> <block type="bitbybit.draw.drawAnyAsync" id="56Ji5OE@gkOcTU@1f(V6"> <value name="Entity"> <block type="bitbybit.occt.fillets.filletEdges" id="u~rz]@T1rJV;HW?{?|6A"> <value name="Shape"> <block type="bitbybit.occt.operations.loft" id="0:8[0_rRp!dq[frnCFy0"> <value name="Shapes"> <block type="lists_create_with" id="D(B|D_[HIYG6arYTuk@;"> <mutation items="2"> </mutation> <value name="ADD0"> <block type="variables_get" id="i([T*bU4eqwviaPTn*gZ"> <field name="VAR" id="wJ6#28AoOOuMM_2Y8QB/">firstFace</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="NjmqGo-=LKJY(xu~%i(F"> <field name="VAR" id="yZ/d9i^N+w4bJ((|t/Ki">secondFace</field> </block> </value> </block> </value> <value name="MakeSolid"> <block type="logic_boolean" id="b2oCg@0XDpkL6XvAl^F?"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="Radius"> <block type="math_number" id="c^iy=k6O{3gXw174j{-D"> <field name="NUM">1</field> </block> </value> <value name="Indexes"> <block type="lists_create_with" id="1/K+FH:XZ]S9g:$fR(.#"> <mutation items="11"> </mutation> <value name="ADD0"> <block type="math_number" id="A7X}/MsF0T%.,t[@7J|Y"> <field name="NUM">1</field> </block> </value> <value name="ADD1"> <block type="math_number" id="GJQ]SO[G,xto)~GcRB-#"> <field name="NUM">2</field> </block> </value> <value name="ADD2"> <block type="math_number" id="/;/Q[NFd8R=tqj=a[s:O"> <field name="NUM">3</field> </block> </value> <value name="ADD3"> <block type="math_number" id="E|xqH1+5P315O]RlsG^$"> <field name="NUM">4</field> </block> </value> <value name="ADD4"> <block type="math_number" id="rI@[YpP.?w+ks*IV(H)!"> <field name="NUM">5</field> </block> </value> <value name="ADD5"> <block type="math_number" id="Xv38A9#QbioqSa!{qK0?"> <field name="NUM">7</field> </block> </value> <value name="ADD6"> <block type="math_number" id="t0;jU4J`X+,J]ISs`tTK"> <field name="NUM">8</field> </block> </value> <value name="ADD7"> <block type="math_number" id="t/Y=}G*E7tM1QVg8j21H"> <field name="NUM">9</field> </block> </value> <value name="ADD8"> <block type="math_number" id="/~OLXs=h8_#64DpQ@Kn+"> <field name="NUM">10</field> </block> </value> <value name="ADD9"> <block type="math_number" id="*i43[d^WX!fWo1O0DBh,"> <field name="NUM">11</field> </block> </value> <value name="ADD10"> <block type="math_number" id="GPDrwCYRtsZHtm%P,+9`"> <field name="NUM">12</field> </block> </value> </block> </value> </block> </value> <value name="Options"> <block type="bitbybit.draw.optionsOcctShape" id="I([e{};ppn_/e]-{.6QV"> <value name="FaceOpacity"> <block type="math_number" id="^,07[v42u`~XHIKF[D*Q"> <field name="NUM">0.15</field> </block> </value> <value name="EdgeOpacity"> <block type="math_number" id="}c,ynW}x~L6NWZBLOZ5`"> <field name="NUM">1</field> </block> </value> <value name="EdgeColour"> <block type="colour_picker" id="ux(^Y^:gO~4ntf*fAIJi"> <field name="COLOUR">#bbbbff</field> </block> </value> <value name="FaceColour"> <block type="colour_picker" id="L0_vZrLgApD0Z%:tbRr4"> <field name="COLOUR">#ff0000</field> </block> </value> <value name="EdgeWidth"> <block type="math_number" id=",=+`(vk^]4l]e$YS$32R"> <field name="NUM">0.1</field> </block> </value> <value name="DrawEdges"> <block type="logic_boolean" id="JR4c$R)T+9zsyB1l|9|)"> <field name="BOOL">FALSE</field> </block> </value> <value name="DrawFaces"> <block type="logic_boolean" id="`@#Y|;NnLM^QyVz~Kb+S"> <field name="BOOL">TRUE</field> </block> </value> <value name="Precision"> <block type="math_number" id="MeD[wzCgH:B%+ROsL?=G"> <field name="NUM">0.005</field> </block> </value> <value name="DrawEdgeIndexes"> <block type="logic_boolean" id="vht9#UR`1-u5qQMC2YbQ"> <field name="BOOL">FALSE</field> </block> </value> <value name="EdgeIndexHeight"> <block type="math_number" id="PF.CPo;(%ia$rJUqNdB{"> <field name="NUM">0.06</field> </block> </value> <value name="EdgeIndexColour"> <block type="colour_picker" id="}rtF8$v|i^+C@=@MIsAG"> <field name="COLOUR">#bbbbff</field> </block> </value> <value name="DrawFaceIndexes"> <block type="logic_boolean" id="p-gU%Jw6d-sX2Q7gf|%!"> <field name="BOOL">FALSE</field> </block> </value> <value name="FaceIndexHeight"> <block type="math_number" id="s}H+!+)ap!)/!G;2I*2C"> <field name="NUM">0.06</field> </block> </value> <value name="FaceIndexColour"> <block type="colour_picker" id="L%.s5:AM,,m:xDy2fd9/"> <field name="COLOUR">#0000ff</field> </block> </value> </block> </value> </block> </value> <next> <block type="base_time_then" id="PRItTKPG@ge{Tf/zO8{Z"> <field name="Result" id="oX10]_V;$su3I/~4!=-w">result</field> <value name="Promise"> <block type="variables_get" id="x,-BgxYw[uex|#}4|7Kz"> <field name="VAR" id="j|nY_s%usftcbVrUsi=M">heart</field> </block> </value> <statement name="Then"> <block type="controls_for" id="s/,;9.;582zTRu:buwOI"> <field name="VAR" id="h3_+94wT%Y|7G@shOCTx">i</field> <value name="FROM"> <block type="math_number" id="7-s9MYJ=THteKC6psIWp"> <field name="NUM">0.05</field> </block> </value> <value name="TO"> <block type="math_number" id=".=Z@I6,1NK2sJ7jvoGJc"> <field name="NUM">1</field> </block> </value> <value name="BY"> <block type="math_number" id="~8FGm|ajL_Q3Rf|,|wMl"> <field name="NUM">0.05</field> </block> </value> <statement name="DO"> <block type="variables_set" id="a!kQ4|r^[Zp4;|d)%-V*"> <field name="VAR" id="[~ISFek/}NZx3Dp[WlUI">heartInstance</field> <value name="VALUE"> <block type="bitbybit.babylon.mesh.createMeshInstance" id=";95Y`0jS`Ykr(rM]scV,"> <value name="Mesh"> <block type="variables_get" id="prRe(sFfIcBb!9rEZ:A#"> <field name="VAR" id="oX10]_V;$su3I/~4!=-w">result</field> </block> </value> </block> </value> <next> <block type="bitbybit.babylon.mesh.setScale" id="Qvii:@:FhN:)YjXOeSGA"> <value name="BabylonMesh"> <block type="variables_get" id="0FX|q.RvqBxz8^_[6?l)"> <field name="VAR" id="[~ISFek/}NZx3Dp[WlUI">heartInstance</field> </block> </value> <value name="Scale"> <block type="bitbybit.point.pointXYZ" id="Gok$a1jF|ilIxm%zPP|4"> <value name="X"> <block type="variables_get" id="_M/D9+;O{_}YrAl*.nQ$"> <field name="VAR" id="h3_+94wT%Y|7G@shOCTx">i</field> </block> </value> <value name="Y"> <block type="variables_get" id="A(_YR4X@UtNKJYp8,fIH"> <field name="VAR" id="h3_+94wT%Y|7G@shOCTx">i</field> </block> </value> <value name="Z"> <block type="variables_get" id="Nq.H}_9{[41VxpBOE%I]"> <field name="VAR" id="h3_+94wT%Y|7G@shOCTx">i</field> </block> </value> </block> </value> <next> <block type="bitbybit.babylon.mesh.setParent" id="fst[(bkpm;)+GI7qiT}Z"> <value name="BabylonMesh"> <block type="variables_get" id=".Ob1UR;(Fm/v]3=e1q4V"> <field name="VAR" id="[~ISFek/}NZx3Dp[WlUI">heartInstance</field> </block> </value> <value name="ParentMesh"> <block type="variables_get" id="?M%jOGfVrh5IC)7RGdK)"> <field name="VAR" id="X;HBkmH2oln#hKyZzOS=">globalNode</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="bitbybit.babylon.mesh.setParent" id="1.2$}T);qqck{T=D*c2-"> <value name="BabylonMesh"> <block type="variables_get" id="AS@bRV.Oc.=@C:8T/Pnw"> <field name="VAR" id="oX10]_V;$su3I/~4!=-w">result</field> </block> </value> <value name="ParentMesh"> <block type="variables_get" id="p8J[_%jgY3{J!.N!AZS?"> <field name="VAR" id="X;HBkmH2oln#hKyZzOS=">globalNode</field> </block> </value> </block> </next> </block> </statement> <next> <block type="variables_set" id="`a?p:k;5G4XEuKuQbx$g"> <field name="VAR" id="%zMl#7N?caN=0s^V`NJY">count</field> <value name="VALUE"> <block type="math_number" id="@L0lEw4l?B[U^}cekDWK"> <field name="NUM">0</field> </block> </value> <next> <block type="base_time_update" id="ucl/RdZbkKP/EVaTVxbZ"> <field name="TimePassedMs" id="JuNv7}i-}sHoUs,#.}GW">timeElapsedFromPreviousFrame</field> <statement name="Update"> <block type="math_change" id="Vh*$WyB)bAF[zJpmhslR"> <field name="VAR" id="%zMl#7N?caN=0s^V`NJY">count</field> <value name="DELTA"> <shadow type="math_number" id="j%`e7,pmOm%o[hRqs#U`"> <field name="NUM">0.1</field> </shadow> </value> <next> <block type="bitbybit.babylon.mesh.setRotation" id="(8%m1(6iK#ktXHZw+skY"> <value name="BabylonMesh"> <block type="variables_get" id="NM%EXD^{_{qIAM*yr)Lb"> <field name="VAR" id="X;HBkmH2oln#hKyZzOS=">globalNode</field> </block> </value> <value name="Rotation"> <block type="bitbybit.point.pointXYZ" id="Nopx.eFBYrBWU{3wP~Yp"> <value name="X"> <block type="math_number" id="[`I8Vz1^YVDrDxsQpi|h"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="variables_get" id="rK[,?1I,$tnM$?I]3gDm"> <field name="VAR" id="%zMl#7N?caN=0s^V`NJY">count</field> </block> </value> <value name="Z"> <block type="math_number" id="Ld-O%UQk!nQ{T?Jtvd4V"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>