// Standalone synthetic SDK example. No process or network access required.
float radius=30;
uint mode=0;
bool visible=true;
void on_load() {
memory_buffer@ bytes=buffer::from_bytes("SDK demo");
uint8 first=0;
if(bytes !is null && bytes.read_u8(0,first)) runtime::log("Buffered first byte: "+first);
}
void on_frame() {
render::rect(16,16,330,200,0x182028ff,true);
render::text(28,28,"Easy SDK workbench",0xff994dff);
radius=ui::slider("radius","Radius",radius,10,100,1,28,60,300,48);
mode=ui::cycle("mode","Motion mode",mode,3,28,116,300,32);
visible=ui::checkbox("visible","Show synthetic point",visible,28,160,300,32);
matrix4 view;
vec3 world(mode==0?0:0.5f,0,0);
vec2 point;
if(visible && projection::project(view,world,screen::width(),screen::height(),point)) {
render::filled_circle(point.x,point.y,radius,0xff994d80);
render::circle(point.x,point.y,radius,0xff994dff);
render::text(point.x-radius,point.y+radius+12,"Synthetic point");
}
render::text(28,230,"Radius: "+radius+" / mode: "+mode);
}
Easy Universal / Примеры и шаблоны