Files
cell/tests/window.js
John Alanbrook 58cad839b6
Some checks failed
Build and Deploy / build-linux (push) Successful in 1m15s
Build and Deploy / build-windows (CLANG64) (push) Failing after 15m44s
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
fix crash
2025-03-28 14:44:57 -05:00

57 lines
1.0 KiB
JavaScript

//var draw = use('draw2d')
prosperon.win = prosperon.engine_start({
title:`Prosperon [${prosperon.version}-${prosperon.revision}]`,
width: 1280,
height: 720,
high_dpi:0,
alpha:1,
fullscreen:0,
sample_count:1,
enable_clipboard:true,
enable_dragndrop: true,
max_dropped_files: 1,
swap_interval: 1,
name: "Prosperon",
version:prosperon.version + "-" + prosperon.revision,
identifier: "world.pockle.prosperon",
creator: "Pockle World LLC",
copyright: "Copyright Pockle World 2025",
type: "game",
url: "https://prosperon.dev"
})
var ren = prosperon.win.make_renderer("vulkan")
function loop() {
ren.draw_color([1,1,1,1])
ren.clear()
ren.draw_color([0,0,0,1])
ren.fillrect({x:50,y:50,height:50,width:50})
ren.present()
$_.delay(loop, 1/60)
}
loop()
$_.delay($_.stop, 3)
var os = use('os')
var ioguy = {
__ACTORDATA__: {
id: os.ioactor()
}
}
$_.send(ioguy, {
type: "subscribe",
actor: $_
})
$_.receiver(e => {
if (e.type === 'quit')
os.exit()
else
console.log(json.encode(e))
})