Some checks failed
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
42 lines
587 B
JavaScript
42 lines
587 B
JavaScript
var render = use('sdl_render')
|
|
var os = use('os')
|
|
|
|
render.initialize({
|
|
width:500,
|
|
height:500,
|
|
resolution_x:500,
|
|
resolution_y:500,
|
|
mode: "letterboxed"
|
|
})
|
|
|
|
var draw = use('draw2d')
|
|
|
|
var camera = {
|
|
transform: os.make_transform(),
|
|
zoom: 1,
|
|
surface: undefined,
|
|
viewport: {x:0,y:0,width:1,height:1}
|
|
}
|
|
|
|
var hudcam = {
|
|
x: 0,
|
|
y: 0,
|
|
mode: 'ortho',
|
|
viewport: {x:0,y:0,width:1,height:1},
|
|
surface:undefined,
|
|
}
|
|
|
|
$_.delay($_.stop, 3)
|
|
|
|
function loop()
|
|
{
|
|
render.clear()
|
|
draw.rectangle({x:50,y:-50,width:50,height:50})
|
|
render.present()
|
|
$_.delay(loop, 1/60)
|
|
}
|
|
|
|
loop()
|
|
|
|
|