Cloned from user: vlucena
The showcase player uses a modified version of Processing.js in combination with jsweet to let students program their apps in Java code while still allowing for browser support.
Content created by students is scaled to fit the showcase frame while maintaining aspect ratio and cursor position. This is why some projects may appear blurry in fullscreen, or why some small details may not be visible on a small screen
<iframe width='500px' height='400px' src='https://nest.ktbyte.cn/nest#399571' allowfullscreen></iframe>
<xml xmlns="https://developers.google.com/blockly/xml"><block type="global_variables" id="!tzg-]VbB9*$I0m+`}Wt" x="244" y="17"><next><block type="variable_declaration" id="ZpqjLSv#^|qr0]j,CAl`"><field name="var_type">Sprite</field><field name="var_name">background</field><value name="value"><block type="sprite_newSprite" id="N2u.al4ma*DcHNh.lYE`"><value name="p0"><block type="value" id="I,Q~WIvs`ECD]w=YB@vk"><field name="TEXT">"https://www.blendswap.com/blend_previews/2037/0/0"</field></block></value><value name="p1"><block type="value" id="BPc%S[FD28@^+`q^W?e4"><field name="TEXT">320</field></block></value><value name="p2"><block type="value" id="I9)DULq.@gLlNo!Pq2/y"><field name="TEXT">240</field></block></value><value name="p3"><block type="value" id="_SsRYi+7y,v]1x|S24nJ"><field name="TEXT">640</field></block></value><value name="p4"><block type="value" id="eK5`wV/uV*p=_s{VlYCS"><field name="TEXT">480</field></block></value></block></value><next><block type="variable_declaration" id="16URn%iIO?a-KqNA,a3,"><field name="var_type">Sprite</field><field name="var_name">hammer</field><value name="value"><block type="sprite_newSprite" id="*kF=.da#$avG4yyH1+[j"><value name="p0"><block type="value" id="vlIH}G3nP+oxzCU`MIl="><field name="TEXT">"https://www.pinclipart.com/picdir/big/495-4957113_hammer-hammer-emoji-clipart.png"</field></block></value><value name="p1"><block type="value" id="dwDWhF1/{05RO5=;sHux"><field name="TEXT">320</field></block></value><value name="p2"><block type="value" id="O[Ws~Sv8.74%KRUgb)F)"><field name="TEXT">240</field></block></value><value name="p3"><block type="value" id="y:3UKC^:j?KTeh(QHQye"><field name="TEXT">100 * 1.5</field></block></value><value name="p4"><block type="value" id="L0r,e$IHY|5cL8iQxVkg"><field name="TEXT">100 * 1.5</field></block></value></block></value><next><block type="variable_declaration" id="jL_kd]uXx*nrqQ?jY_n6"><field name="var_type">Sprite</field><field name="var_name">mole</field><value name="value"><block type="sprite_newSprite" id="lA[n{e%uTLIjAXl83V|s"><value name="p0"><block type="value" id="ND?,BbQ-@q?6use0Lw;T"><field name="TEXT">"https://cdn.pixabay.com/photo/2013/07/13/10/12/mole-156762_960_720.png"</field></block></value><value name="p1"><block type="value" id="tY1n}dXpe;LfM(/m37NY"><field name="TEXT">320</field></block></value><value name="p2"><block type="value" id="HfDNE4el#%UQALhqP^Mf"><field name="TEXT">240</field></block></value><value name="p3"><block type="value" id="n4Q7]/jt}]7QT0EomHd]"><field name="TEXT">100 * 1.5</field></block></value><value name="p4"><block type="value" id="FekIU^-|8X|yo}-rt{N,"><field name="TEXT">70 * 1.5</field></block></value></block></value><next><block type="variable_declaration" id="XGl8fph]/m]/pDM$A4|~"><field name="var_type">Integer</field><field name="var_name">score</field><value name="value"><block type="value" id="M65cSEPKvhf-}TlUE8N0"><field name="TEXT">0</field></block></value><next><block type="variable_declaration" id="WAJaGtR.Xx~Xd1#8PJ(G"><field name="var_type">Integer</field><field name="var_name">timer</field><value name="value"><block type="value" id="~W)v7#:uX.^|/w4indzG"><field name="TEXT">120</field></block></value><next><block type="variable_declaration" id="?SyUJBO,/bt_c]ISac9|"><field name="var_type">Integer</field><field name="var_name">hp</field><value name="value"><block type="value" id="5`-[3=M,}FUaHoJ.}Izk"><field name="TEXT">5</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block><block type="global_function_setup" id="/nP+kV_ONRIs5%3phf5d" x="689" y="335"><statement name="statements"><block type="command_size" id="^j.w,uVhHrc_*T/kA];!"><value name="p0"><block type="value" id="Z|1D?8Qs~F[N?u?L`y:p"><field name="TEXT">640</field></block></value><value name="p1"><block type="value" id="2bK7m:LA~8iTt$Dn8d3{"><field name="TEXT">480</field></block></value><next><block type="sprite_turn" id="^5T;Wx2IppzDMt]iqn.T"><field name="var_name">hammer</field><value name="p0"><block type="value" id="c0}oyP%Vdi@Oo:N49/Yz"><field name="TEXT">-20</field></block></value></block></next></block></statement></block><block type="global_function_draw" id="1Lrhf_bn][06@A{.I,ph" x="250" y="384"><statement name="statements"><block type="sprite_display" id="F`=.kz|;:Q}qv~JsyEuJ"><field name="var_name">background</field><next><block type="sprite_moveToPoint" id="F-+q(FmzmcHI-.W`a_-U"><field name="var_name">hammer</field><value name="p0"><block type="value" id="~7^qneCMX2STXp5X;~w;"><field name="TEXT">mouseX</field></block></value><value name="p1"><block type="value" id="VaC3^I]$~Y*jW0/Pg[in"><field name="TEXT">mouseY</field></block></value><next><block type="sprite_display" id="B]7OjnP8eC:2waUzzdNZ"><field name="var_name">mole</field><next><block type="global_function_call_user_defined_no_input" id="1W*5#K?0^rmFy32~PKUC"><field name="name">healthBar</field><next><block type="sprite_display" id="#-aG~d0{T~$%;]s-kIX*"><field name="var_name">hammer</field><next><block type="command_fill" id="fmxUha@@xaK]N|W?#*xn"><value name="p0"><block type="value" id="=OZbvHfpZeibzdQ#BN/H"><field name="TEXT">0</field></block></value><value name="p1"><block type="value" id="*bfr7pUS#|_n%DJ8N8S)"><field name="TEXT">0</field></block></value><value name="p2"><block type="value" id="$s*q:~%iX*H5RF;XYr?o"><field name="TEXT">0</field></block></value><next><block type="command_textSize" id="]-czd?Eyx/Nq~aRny7PU"><value name="p0"><block type="value" id="IG#L||MW/gi*cdKtaShE"><field name="TEXT">40</field></block></value><next><block type="command_text" id=";EJps:}D66Q{+@z~vfRX"><value name="p0"><block type="value" id="3Qcqv(qez{4`4Yc*Iv`c"><field name="TEXT">"Score: " + score</field></block></value><value name="p1"><block type="value" id="SL8h252}J{U[ep:VrZl;"><field name="TEXT">200</field></block></value><value name="p2"><block type="value" id="Q:?]yqvXC!x9_Ma9~@(D"><field name="TEXT">100</field></block></value><next><block type="variable_set_value" id="xEDh.LLpyVMWGJVMehE."><field name="var_name">timer</field><value name="value"><block type="value" id="J]u/+$*+k#~W}tjc!]g1"><field name="TEXT">timer - 1</field></block></value><next><block type="conditionals_if" id="3ZpuYeg*uXt.~09G@am?"><value name="IF0"><block type="conditionals_compare" id="Vmm|}8%mV0BH83J6a~{("><field name="OP">EQ</field><value name="A"><block type="value" id="GX=8MG53[u9`]ayQYkd}"><field name="TEXT">timer</field></block></value><value name="B"><block type="value" id="Y*tQWR0$$(baUV8%1P9)"><field name="TEXT">0</field></block></value></block></value><statement name="DO0"><block type="sprite_moveToPoint" id="9:,[L6xV2}t--tiFY!V!"><field name="var_name">mole</field><value name="p0"><block type="math_random" id="{zH*JnU|@/NW6G-mLu;^"><value name="p0"><block type="value" id="5nPBKn]G/`MqG`Wadq*!"><field name="TEXT">0</field></block></value><value name="p1"><block type="value" id="|1b:lS#A`R9-jUK-gH}u"><field name="TEXT">640</field></block></value></block></value><value name="p1"><block type="math_random" id="`,p])BgWo#4Uh.H!7]uY"><value name="p0"><block type="value" id="?|ha0=}B3{As-ok2S:oj"><field name="TEXT">250</field></block></value><value name="p1"><block type="value" id="utlz6Q7-@Ko{FENuJY#F"><field name="TEXT">480</field></block></value></block></value><next><block type="conditionals_if" id="D:$kf~.CLq8J=am4glUw"><value name="IF0"><block type="conditionals_compare" id="[rZ,XO,!e*jP,(@wH+rJ"><field name="OP">GT</field><value name="A"><block type="value" id="kSD*0N0ct`y)lX%1I2_@"><field name="TEXT">score</field></block></value><value name="B"><block type="value" id=",zD.=}2+N~J(*D3B7h2("><field name="TEXT">0</field></block></value></block></value><statement name="DO0"><block type="variable_set_value" id="q}90-GMBL#pmnXrF3;|u"><field name="var_name">score</field><value name="value"><block type="value" id="`S$(*46PE#0?LM|iSd#5"><field name="TEXT">score - 1</field></block></value></block></statement><next><block type="variable_set_value" id="Y-XHyY,.`(P/SW.U5!gV"><field name="var_name">timer</field><value name="value"><block type="value" id="Ba6$61j~Pw@2fBKs8dl("><field name="TEXT">120</field></block></value><next><block type="variable_set_value" id="J%R_fFMl?]sJY^FLuBD#"><field name="var_name">hp</field><value name="value"><block type="value" id="H~Wrom,T?rZ=$fvr!_4M"><field name="TEXT">5</field></block></value></block></next></block></next></block></next></block></statement><next><block type="conditionals_if" id="Nyd{C!S^(}NJp-Zc8_so"><value name="IF0"><block type="conditionals_compare" id="^pL51kpqnWgH~_Zq`k|)"><field name="OP">EQ</field><value name="A"><block type="value" id="15g-x^?Nz2ESN*pB+lal"><field name="TEXT">hp</field></block></value><value name="B"><block type="value" id="`*L+4_Qh{0a[DR@*6}R*"><field name="TEXT">0</field></block></value></block></value><statement name="DO0"><block type="sprite_moveToPoint" id="O.g|B)*nYAWv5*ynakOH"><field name="var_name">mole</field><value name="p0"><block type="math_random" id="?0T|gO}gPQ$}I0y+qc=v"><value name="p0"><block type="value" id="-qH:bj;63Rsp?I`/$Cd5"><field name="TEXT">0</field></block></value><value name="p1"><block type="value" id="jUpUJo4xHy0oT+sE=^8t"><field name="TEXT">640</field></block></value></block></value><value name="p1"><block type="math_random" id="x%=U#;HW@ygQm``%hlxB"><value name="p0"><block type="value" id="+z-yyWeY265(1:W=I[[1"><field name="TEXT">250</field></block></value><value name="p1"><block type="value" id="IY4@{eGr*hVHiN|]?#{9"><field name="TEXT">480</field></block></value></block></value><next><block type="variable_set_value" id="xQ*zihpQ:G]vjU33fu,c"><field name="var_name">score</field><value name="value"><block type="value" id="(;PSD=5IiY|Z**o~*3_."><field name="TEXT">score + 1</field></block></value><next><block type="variable_set_value" id="-0ga.Ks=R;t#U^(366P="><field name="var_name">timer</field><value name="value"><block type="value" id="(BG[-K!RP/d7a2cm3sI]"><field name="TEXT">90</field></block></value><next><block type="variable_set_value" id="v|dT~|HX@r/b/YQF8[G}"><field name="var_name">hp</field><value name="value"><block type="value" id="9q0%Sj!C,vKlP+DIK}Y$"><field name="TEXT">5</field></block></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="global_function_mouseReleased" id="-|Ur.XfZo`,jKdt[^pLx" x="694" y="504"><statement name="statements"><block type="sprite_turn" id="a7EG6!}oT%iJ0%vvDGVv"><field name="var_name">hammer</field><value name="p0"><block type="value" id="cq32SXk][b`%DPjSYdzv"><field name="TEXT">20</field></block></value></block></statement></block><block type="global_function_user_defined_no_input" id="1W%IpNeMxJTWY^pN(:c?" x="963" y="665"><field name="name">healthBar</field><statement name="statements"><block type="command_fill" id="9D`uJlX*lI:!2=[N;M=;"><value name="p0"><block type="value" id="]_Q;Dw{duMznca5+S6;U"><field name="TEXT">255</field></block></value><value name="p1"><block type="value" id="./CXj${gZob7?2E(u:v="><field name="TEXT">0</field></block></value><value name="p2"><block type="value" id="%TRggA/fj4xzn6M|1r*8"><field name="TEXT">0</field></block></value><next><block type="command_rect" id="DEA^l#KXo=~:b+0-.Cp."><value name="p0"><block type="sprite_getX" id="Gk3q1pN+d(BvC+pwf^.K"><field name="var_name">mole</field></block></value><value name="p1"><block type="math_add" id="3G;$Y),I!U4-~iwR;U,Q"><value name="p0"><block type="sprite_getY" id="+PI`MsX:!=|]tHF43~w("><field name="var_name">mole</field></block></value><value name="p1"><block type="value" id="8mTVW)EffiJnTI5Qk0I:"><field name="TEXT">-50</field></block></value></block></value><value name="p2"><block type="value" id="rb/Dzt{qEY;hK/hbioRV"><field name="TEXT">50</field></block></value><value name="p3"><block type="value" id="J}JM_-]3#sG{S#B6`sxz"><field name="TEXT">10</field></block></value><next><block type="command_fill" id="jb6cipP|p`Bh5T+}iKuO"><value name="p0"><block type="value" id="MX8L`1O^V:1um$CyzN4L"><field name="TEXT">0</field></block></value><value name="p1"><block type="value" id="09GB%H6hKVm2UPQn=nTE"><field name="TEXT">255</field></block></value><value name="p2"><block type="value" id="FW(kEgwSW$T8C3@Y7abi"><field name="TEXT">0</field></block></value><next><block type="command_rect" id="AbS%h8MU,a=aR?-nxlvp"><value name="p0"><block type="sprite_getX" id="8JVlkTO.an4$Ul!LR_3o"><field name="var_name">mole</field></block></value><value name="p1"><block type="math_add" id="paaT6?pB4zCDbq+8_h7h"><value name="p0"><block type="sprite_getY" id="l#OG=S%.d]Q7)(||*xfK"><field name="var_name">mole</field></block></value><value name="p1"><block type="value" id="!1$M-jb8=BG]`vi,[Y6$"><field name="TEXT">-50</field></block></value></block></value><value name="p2"><block type="value" id="Yc_!rT8PE#YL6]]|,t#{"><field name="TEXT">hp*10</field></block></value><value name="p3"><block type="value" id="ji36_N%G@!5Clo`2QpW_"><field name="TEXT">10</field></block></value></block></next></block></next></block></next></block></statement></block><block type="global_function_mousePressed" id="p6{?vifq0h4J6F2VZRQO" x="493" y="1014"><statement name="statements"><block type="sprite_turn" id="GXm%#eg($J=(w7f33^CQ"><field name="var_name">hammer</field><value name="p0"><block type="value" id="1%cOAgb,|$|ZJ{Do~mzZ"><field name="TEXT">-20</field></block></value><next><block type="conditionals_if" id="YhzMt+iCQk9Mb/hwmB0B"><value name="IF0"><block type="sprite_touchingSprite" id="w4iK0XGqc9{Rc!#pg;2e"><field name="var_name">hammer</field><value name="p0"><block type="value" id=")V#=`Wa10?AEUk[-2b=V"><field name="TEXT">mole</field></block></value></block></value><statement name="DO0"><block type="variable_set_value" id="Cc#6vu=R*:BG2p53%u@P"><field name="var_name">hp</field><value name="value"><block type="value" id="yu)+l_rOml=;[EK=iobL"><field name="TEXT">hp - 1</field></block></value></block></statement></block></next></block></statement></block></xml>