From 674eb237e04514ba20267ac041ece550ec7a4cd7 Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Fri, 30 May 2025 12:07:03 -0500 Subject: [PATCH] start of rename to cell --- CLAUDE.md | 2 +- Makefile | 10 +- docs/api/modules/doc.md | 8 +- docs/tutorial.md | 2 +- meson.build | 242 ++++++---- moth/spline.js | 6 - moth/video.js | 5 - {moth => prosperon}/_sdl_video.js | 0 {moth => prosperon}/camera.js | 0 {moth => prosperon}/clay.js | 0 {moth => prosperon}/color.js | 0 {moth => prosperon}/controller.js | 0 {moth => prosperon}/device.js | 0 {moth => prosperon}/draw2d.js | 4 +- {moth => prosperon}/dull.js | 0 {moth => prosperon}/emitter.js | 0 .../examples/bunnymark/bunny.png | Bin .../examples/bunnymark/config.js | 0 .../examples/bunnymark/main.js | 0 .../examples/chess/black_bishop.png | Bin .../examples/chess/black_king.png | Bin .../examples/chess/black_knight.png | Bin .../examples/chess/black_pawn.png | Bin .../examples/chess/black_queen.png | Bin .../examples/chess/black_rook.png | Bin {moth => prosperon}/examples/chess/config.js | 0 {moth => prosperon}/examples/chess/grid.js | 0 {moth => prosperon}/examples/chess/main.js | 0 .../examples/chess/movement.js | 0 {moth => prosperon}/examples/chess/pieces.js | 0 {moth => prosperon}/examples/chess/prosperon | Bin {moth => prosperon}/examples/chess/rules.js | 0 .../examples/chess/white_bishop.png | Bin .../examples/chess/white_king.png | Bin .../examples/chess/white_knight.png | Bin .../examples/chess/white_pawn.png | Bin .../examples/chess/white_queen.png | Bin .../examples/chess/white_rook.png | Bin {moth => prosperon}/examples/pong/config.js | 0 {moth => prosperon}/examples/pong/main.js | 0 {moth => prosperon}/examples/snake/config.js | 0 {moth => prosperon}/examples/snake/main.js | 0 {moth => prosperon}/examples/steam_example.js | 0 {moth => prosperon}/examples/tetris/config.js | 0 {moth => prosperon}/examples/tetris/main.js | 0 {moth => prosperon}/fonts/c64.ttf | Bin {moth => prosperon}/fonts/dos.ttf | Bin {moth => prosperon}/fonts/teenytinypixels.ttf | Bin {moth => prosperon}/geometry.js | 50 +- {moth => prosperon}/graphics.js | 34 +- {moth => prosperon}/icons/moon.gif | Bin {moth => prosperon}/icons/no_tex.gif | Bin {moth => prosperon}/icons_dev/airplane.png | Bin {moth => prosperon}/icons_dev/ak47.png | Bin {moth => prosperon}/icons_dev/amputation.png | Bin {moth => prosperon}/icons_dev/ant.png | Bin {moth => prosperon}/icons_dev/archer.png | Bin {moth => prosperon}/icons_dev/armadillo.png | Bin {moth => prosperon}/icons_dev/atom.png | Bin {moth => prosperon}/icons_dev/banana.png | Bin {moth => prosperon}/icons_dev/bank.png | Bin {moth => prosperon}/icons_dev/banknote.png | Bin {moth => prosperon}/icons_dev/barn.png | Bin {moth => prosperon}/icons_dev/barrel.png | Bin {moth => prosperon}/icons_dev/basket.png | Bin {moth => prosperon}/icons_dev/bat.png | Bin {moth => prosperon}/icons_dev/bed.png | Bin {moth => prosperon}/icons_dev/belt.png | Bin {moth => prosperon}/icons_dev/boar.png | Bin {moth => prosperon}/icons_dev/broom.png | Bin {moth => prosperon}/icons_dev/cabin.png | Bin .../icons_dev/card-10-clubs.png | Bin .../icons_dev/card-10-diamonds.png | Bin .../icons_dev/card-10-hearts.png | Bin .../icons_dev/card-10-spades.png | Bin .../icons_dev/card-2-clubs.png | Bin .../icons_dev/card-2-diamonds.png | Bin .../icons_dev/card-2-hearts.png | Bin .../icons_dev/card-2-spades.png | Bin .../icons_dev/card-3-clubs.png | Bin .../icons_dev/card-3-diamonds.png | Bin .../icons_dev/card-3-hearts.png | Bin .../icons_dev/card-3-spades.png | Bin .../icons_dev/card-4-clubs.png | Bin .../icons_dev/card-4-diamonds.png | Bin .../icons_dev/card-4-hearts.png | Bin .../icons_dev/card-4-spades.png | Bin .../icons_dev/card-5-clubs.png | Bin .../icons_dev/card-5-diamonds.png | Bin .../icons_dev/card-5-hearts.png | Bin .../icons_dev/card-5-spades.png | Bin .../icons_dev/card-6-clubs.png | Bin .../icons_dev/card-6-diamonds.png | Bin .../icons_dev/card-6-hearts.png | Bin .../icons_dev/card-6-spades.png | Bin .../icons_dev/card-7-clubs.png | Bin .../icons_dev/card-7-diamonds.png | Bin .../icons_dev/card-7-hearts.png | Bin .../icons_dev/card-7-spades.png | Bin .../icons_dev/card-8-clubs.png | Bin .../icons_dev/card-8-diamonds.png | Bin .../icons_dev/card-8-hearts.png | Bin .../icons_dev/card-8-spades.png | Bin .../icons_dev/card-9-clubs.png | Bin .../icons_dev/card-9-diamonds.png | Bin .../icons_dev/card-9-hearts.png | Bin .../icons_dev/card-9-spades.png | Bin .../icons_dev/card-ace-clubs.png | Bin .../icons_dev/card-ace-diamonds.png | Bin .../icons_dev/card-ace-hearts.png | Bin .../icons_dev/card-ace-spades.png | Bin .../icons_dev/card-discard.png | Bin {moth => prosperon}/icons_dev/card-draw.png | Bin .../icons_dev/card-jack-clubs.png | Bin .../icons_dev/card-jack-diamonds.png | Bin .../icons_dev/card-jack-hearts.png | Bin .../icons_dev/card-jack-spades.png | Bin {moth => prosperon}/icons_dev/card-joker.png | Bin .../icons_dev/card-king-clubs.png | Bin .../icons_dev/card-king-diamonds.png | Bin .../icons_dev/card-king-hearts.png | Bin .../icons_dev/card-king-spades.png | Bin {moth => prosperon}/icons_dev/card-pick.png | Bin .../icons_dev/card-queen-clubs.png | Bin .../icons_dev/card-queen-diamonds.png | Bin .../icons_dev/card-queen-hearts.png | Bin .../icons_dev/card-queen-spades.png | Bin {moth => prosperon}/icons_dev/card-random.png | Bin .../icons_dev/chess-bishop.png | Bin {moth => prosperon}/icons_dev/chess-king.png | Bin .../icons_dev/chess-knight.png | Bin {moth => prosperon}/icons_dev/chess-pawn.png | Bin {moth => prosperon}/icons_dev/chess-queen.png | Bin {moth => prosperon}/icons_dev/chess-rook.png | Bin {moth => prosperon}/icons_dev/chicken.png | Bin {moth => prosperon}/icons_dev/clarinet.png | Bin {moth => prosperon}/icons_dev/cloak.png | Bin {moth => prosperon}/icons_dev/clown.png | Bin {moth => prosperon}/icons_dev/coins.png | Bin {moth => prosperon}/icons_dev/compass.png | Bin {moth => prosperon}/icons_dev/cow.png | Bin .../icons_dev/crossed-swords.png | Bin {moth => prosperon}/icons_dev/deer.png | Bin {moth => prosperon}/icons_dev/dice.png | Bin {moth => prosperon}/icons_dev/dodo.png | Bin {moth => prosperon}/icons_dev/donkey.png | Bin {moth => prosperon}/icons_dev/door.png | Bin {moth => prosperon}/icons_dev/duck.png | Bin {moth => prosperon}/icons_dev/dynamite.png | Bin {moth => prosperon}/icons_dev/f-clef.png | Bin {moth => prosperon}/icons_dev/fairy.png | Bin {moth => prosperon}/icons_dev/fangs.png | Bin {moth => prosperon}/icons_dev/fez.png | Bin {moth => prosperon}/icons_dev/files.png | Bin {moth => prosperon}/icons_dev/finch.png | Bin {moth => prosperon}/icons_dev/fire.png | Bin {moth => prosperon}/icons_dev/flashlight.png | Bin {moth => prosperon}/icons_dev/footsteps.png | Bin {moth => prosperon}/icons_dev/forest.png | Bin {moth => prosperon}/icons_dev/fox.png | Bin {moth => prosperon}/icons_dev/fuji.png | Bin {moth => prosperon}/icons_dev/g-clef.png | Bin {moth => prosperon}/icons_dev/gargoyle.png | Bin {moth => prosperon}/icons_dev/garlic.png | Bin {moth => prosperon}/icons_dev/gasmask.png | Bin {moth => prosperon}/icons_dev/gate.png | Bin {moth => prosperon}/icons_dev/goblin.png | Bin {moth => prosperon}/icons_dev/goose.png | Bin {moth => prosperon}/icons_dev/gorilla.png | Bin {moth => prosperon}/icons_dev/grass.png | Bin {moth => prosperon}/icons_dev/harp.png | Bin {moth => prosperon}/icons_dev/hatchet.png | Bin {moth => prosperon}/icons_dev/heart.png | Bin {moth => prosperon}/icons_dev/hedgehog.png | Bin {moth => prosperon}/icons_dev/heron.png | Bin {moth => prosperon}/icons_dev/hook.png | Bin {moth => prosperon}/icons_dev/hotdog.png | Bin {moth => prosperon}/icons_dev/info.png | Bin {moth => prosperon}/icons_dev/key.png | Bin {moth => prosperon}/icons_dev/kite.png | Bin {moth => prosperon}/icons_dev/ladder.png | Bin {moth => prosperon}/icons_dev/lambda.png | Bin {moth => prosperon}/icons_dev/led.png | Bin {moth => prosperon}/icons_dev/lemon.png | Bin {moth => prosperon}/icons_dev/log.png | Bin {moth => prosperon}/icons_dev/maracas.png | Bin {moth => prosperon}/icons_dev/moai.png | Bin {moth => prosperon}/icons_dev/mole.png | Bin {moth => prosperon}/icons_dev/mouse.png | Bin {moth => prosperon}/icons_dev/move.png | Bin {moth => prosperon}/icons_dev/necklace.png | Bin {moth => prosperon}/icons_dev/ocarina.png | Bin {moth => prosperon}/icons_dev/panflute.png | Bin {moth => prosperon}/icons_dev/pangolin.png | Bin {moth => prosperon}/icons_dev/pc.png | Bin {moth => prosperon}/icons_dev/phone.png | Bin {moth => prosperon}/icons_dev/piechart.png | Bin {moth => prosperon}/icons_dev/pin.png | Bin {moth => prosperon}/icons_dev/pizza.png | Bin {moth => prosperon}/icons_dev/poi.png | Bin {moth => prosperon}/icons_dev/polarbear.png | Bin {moth => prosperon}/icons_dev/quiver.png | Bin {moth => prosperon}/icons_dev/rabbit.png | Bin {moth => prosperon}/icons_dev/raft.png | Bin {moth => prosperon}/icons_dev/random.png | Bin {moth => prosperon}/icons_dev/rat.png | Bin {moth => prosperon}/icons_dev/rattlesnake.png | Bin {moth => prosperon}/icons_dev/resize.png | Bin {moth => prosperon}/icons_dev/revolver.png | Bin {moth => prosperon}/icons_dev/ring.png | Bin {moth => prosperon}/icons_dev/rooster.png | Bin {moth => prosperon}/icons_dev/rss.png | Bin {moth => prosperon}/icons_dev/rupee.png | Bin {moth => prosperon}/icons_dev/sausage.png | Bin {moth => prosperon}/icons_dev/scorpion.png | Bin {moth => prosperon}/icons_dev/screw.png | Bin {moth => prosperon}/icons_dev/shamrock.png | Bin {moth => prosperon}/icons_dev/sheep.png | Bin {moth => prosperon}/icons_dev/shirt.png | Bin {moth => prosperon}/icons_dev/shop.png | Bin {moth => prosperon}/icons_dev/shuriken.png | Bin {moth => prosperon}/icons_dev/sloth.png | Bin {moth => prosperon}/icons_dev/snail.png | Bin {moth => prosperon}/icons_dev/snake.png | Bin {moth => prosperon}/icons_dev/soap.png | Bin {moth => prosperon}/icons_dev/sombrero.png | Bin {moth => prosperon}/icons_dev/stairs.png | Bin {moth => prosperon}/icons_dev/steak.png | Bin {moth => prosperon}/icons_dev/tomato.png | Bin {moth => prosperon}/icons_dev/trade.png | Bin {moth => prosperon}/icons_dev/trombone.png | Bin {moth => prosperon}/icons_dev/trousers.png | Bin {moth => prosperon}/icons_dev/trumpet.png | Bin {moth => prosperon}/icons_dev/tuba.png | Bin {moth => prosperon}/icons_dev/tv.png | Bin {moth => prosperon}/icons_dev/ufo.png | Bin {moth => prosperon}/icons_dev/vial.png | Bin {moth => prosperon}/icons_dev/watch.png | Bin {moth => prosperon}/icons_dev/waterfall.png | Bin {moth => prosperon}/icons_dev/well.png | Bin {moth => prosperon}/icons_dev/windmill.png | Bin {moth => prosperon}/icons_dev/wizard.png | Bin {moth => prosperon}/icons_dev/zipper.png | Bin {moth => prosperon}/imgui.js | 186 +++---- {moth => prosperon}/lcdsprite.js | 0 {moth => prosperon}/moth.js | 0 {moth => prosperon}/nogame/config.js | 0 {moth => prosperon}/nogame/main.js | 0 {moth => prosperon}/rasterize.js | 0 {moth => prosperon}/scenetree.js | 14 +- {moth => prosperon}/sdl_gpu.js | 42 +- {moth => prosperon}/shaders/circle.frag.hlsl | 0 .../shaders/common/common.hlsl | 0 .../shaders/common/model_pixel.hlsl | 0 .../shaders/common/model_vertex.hlsl | 0 {moth => prosperon}/shaders/common/pixel.hlsl | 0 {moth => prosperon}/shaders/common/sdf.hlsl | 0 .../shaders/common/vertex.hlsl | 0 {moth => prosperon}/shaders/compile.sh | 0 {moth => prosperon}/shaders/dbgline.frag.hlsl | 0 {moth => prosperon}/shaders/dbgline.vert.hlsl | 0 .../shaders/dxil/dbgline.frag.dxil | Bin .../shaders/dxil/dbgline.vert.dxil | Bin .../shaders/dxil/model.frag.dxil | Bin .../shaders/dxil/model.vert.dxil | Bin .../shaders/dxil/model_lit.frag.dxil | Bin .../shaders/dxil/post.frag.dxil | Bin .../shaders/dxil/post.vert.dxil | Bin .../shaders/dxil/ps1.frag.dxil | 0 .../shaders/dxil/ps1.vert.dxil | Bin .../shaders/dxil/rectangle.frag.dxil | Bin .../shaders/dxil/sprite.frag.dxil | Bin .../shaders/dxil/sprite.vert.dxil | Bin {moth => prosperon}/shaders/model.frag.hlsl | 0 {moth => prosperon}/shaders/model.vert.hlsl | 0 .../shaders/model_lit.frag.hlsl | 0 .../shaders/msl/dbgline.frag.msl | 0 .../shaders/msl/dbgline.vert.msl | 0 .../shaders/msl/model.frag.msl | 0 .../shaders/msl/model.vert.msl | 0 .../shaders/msl/model_lit.frag.msl | 0 {moth => prosperon}/shaders/msl/post.frag.msl | 0 {moth => prosperon}/shaders/msl/post.vert.msl | 0 {moth => prosperon}/shaders/msl/ps1.frag.msl | 0 {moth => prosperon}/shaders/msl/ps1.vert.msl | 0 .../shaders/msl/rectangle.frag.msl | 0 .../shaders/msl/sprite.frag.msl | 0 .../shaders/msl/sprite.vert.msl | 0 {moth => prosperon}/shaders/post.frag.hlsl | 0 {moth => prosperon}/shaders/post.vert.hlsl | 0 {moth => prosperon}/shaders/ps1.frag.hlsl | 0 {moth => prosperon}/shaders/ps1.vert.hlsl | 0 .../shaders/rectangle.frag.hlsl | 0 .../shaders/reflection/dbgline.frag.json | 0 .../shaders/reflection/dbgline.vert.json | 0 .../shaders/reflection/model.frag.json | 0 .../shaders/reflection/model.vert.json | 0 .../shaders/reflection/model_lit.frag.json | 0 .../shaders/reflection/post.frag.json | 0 .../shaders/reflection/post.vert.json | 0 .../shaders/reflection/ps1.frag.json | 0 .../shaders/reflection/ps1.vert.json | 0 .../shaders/reflection/rectangle.frag.json | 0 .../shaders/reflection/sprite.frag.json | 0 .../shaders/reflection/sprite.vert.json | 0 {moth => prosperon}/shaders/sprite.frag.hlsl | 0 {moth => prosperon}/shaders/sprite.vert.hlsl | 0 .../shaders/spv/dbgline.frag.spv | Bin .../shaders/spv/dbgline.vert.spv | Bin .../shaders/spv/model.frag.spv | Bin .../shaders/spv/model.vert.spv | Bin .../shaders/spv/model_lit.frag.spv | Bin {moth => prosperon}/shaders/spv/post.frag.spv | Bin {moth => prosperon}/shaders/spv/post.vert.spv | Bin {moth => prosperon}/shaders/spv/ps1.frag.spv | Bin {moth => prosperon}/shaders/spv/ps1.vert.spv | Bin .../shaders/spv/rectangle.frag.spv | Bin .../shaders/spv/sprite.frag.spv | Bin .../shaders/spv/sprite.vert.spv | Bin {moth => prosperon}/shaders/wind.hlsl | 0 {moth => prosperon}/sound.js | 0 prosperon/spline.js | 6 + {moth => prosperon}/sprite.js | 0 {moth => prosperon}/tests/animation.js | 0 {moth => prosperon}/tests/bunny.png | Bin {moth => prosperon}/tests/bunnymark.js | 0 {moth => prosperon}/tests/camera.js | 0 .../tests/camera_colorspace.js | 0 .../tests/camera_colorspace_convert.js | 0 {moth => prosperon}/tests/camera_info.js | 0 {moth => prosperon}/tests/crab.gif | Bin {moth => prosperon}/tests/draw2d.js | 0 {moth => prosperon}/tests/prosperon.js | 0 {moth => prosperon}/tests/steam.js | 0 {moth => prosperon}/tests/surface.js | 0 .../tests/surface_colorspace.js | 0 {moth => prosperon}/tests/warrior.aseprite | Bin {moth => prosperon}/tests/webcam.js | 0 {moth => prosperon}/tests/window.js | 0 {moth => prosperon}/tween.js | 10 +- prosperon/video.js | 5 + scripts/base.js | 452 +++++++++--------- scripts/debug.js | 14 +- scripts/dmon.js | 6 +- scripts/doc.js | 26 +- scripts/docstrings.js | 396 +++++++-------- scripts/enet.js | 30 +- scripts/engine.js | 88 ++-- scripts/event.js | 4 +- scripts/http.js | 2 +- scripts/io.js | 36 +- scripts/js.js | 34 +- scripts/json.js | 4 +- scripts/math.js | 50 +- scripts/miniz.js | 4 +- scripts/nota.js | 4 +- scripts/os.js | 24 +- scripts/resources.js | 4 +- scripts/time.js | 2 +- scripts/util.js | 28 +- scripts/wota.js | 4 +- source/{prosperon.c => cell.c} | 47 +- source/{prosperon.h => cell.h} | 20 +- source/datastream.h | 2 +- source/font.h | 2 +- source/jsffi.c | 18 +- source/jsffi.h | 2 +- source/qjs_actor.c | 16 +- source/qjs_actor.h | 7 +- source/qjs_blob.c | 2 - source/qjs_blob.h | 2 +- source/qjs_common.h | 2 +- source/qjs_crypto.c | 1 - source/qjs_crypto.h | 2 +- source/qjs_debug.h | 2 +- source/qjs_dmon.c | 20 +- source/qjs_dmon.h | 2 +- source/qjs_enet.c | 5 +- source/qjs_enet.h | 2 +- source/qjs_fd.c | 3 +- source/qjs_fd.h | 2 +- source/qjs_geometry.c | 4 +- source/qjs_geometry.h | 2 +- source/qjs_http.c | 4 +- source/qjs_http.h | 2 +- source/qjs_imgui.cpp | 2 +- source/qjs_io.c | 4 +- source/qjs_io.h | 2 +- source/qjs_js.c | 6 +- source/qjs_js.h | 2 +- source/qjs_macros.h | 1 - source/qjs_math.c | 8 +- source/qjs_math.h | 2 +- source/qjs_nota.c | 6 +- source/qjs_nota.h | 2 +- source/qjs_os.c | 5 +- source/qjs_os.h | 2 +- source/qjs_qr.c | 7 +- source/qjs_qr.h | 2 +- source/qjs_renderer.c | 2 - source/qjs_renderer.h | 2 +- source/qjs_rtree.c | 2 +- source/qjs_rtree.h | 2 +- source/qjs_sdl.c | 7 +- source/qjs_sdl.h | 2 +- source/qjs_sdl_gpu.c | 4 +- source/qjs_sdl_surface.c | 3 +- source/qjs_sdl_surface.h | 2 +- source/qjs_sdl_video.c | 9 +- source/qjs_sdl_video.h | 2 +- source/qjs_soloud.c | 5 +- source/qjs_soloud.h | 2 +- source/qjs_spline.h | 2 +- source/qjs_sprite.h | 2 +- source/qjs_steam.cpp | 3 +- source/qjs_steam.h | 2 +- source/qjs_time.c | 1 - source/qjs_time.h | 2 +- source/qjs_transform.c | 2 +- source/qjs_transform.h | 2 +- source/qjs_wota.c | 5 +- source/qjs_wota.h | 2 +- source/sprite.h | 2 +- source/transform.h | 2 +- 424 files changed, 1070 insertions(+), 1061 deletions(-) delete mode 100644 moth/spline.js delete mode 100644 moth/video.js rename {moth => prosperon}/_sdl_video.js (100%) rename {moth => prosperon}/camera.js (100%) rename {moth => prosperon}/clay.js (100%) rename {moth => prosperon}/color.js (100%) rename {moth => prosperon}/controller.js (100%) rename {moth => prosperon}/device.js (100%) rename {moth => prosperon}/draw2d.js (98%) rename {moth => prosperon}/dull.js (100%) rename {moth => prosperon}/emitter.js (100%) rename {moth => prosperon}/examples/bunnymark/bunny.png (100%) rename {moth => prosperon}/examples/bunnymark/config.js (100%) rename {moth => prosperon}/examples/bunnymark/main.js (100%) rename {moth => prosperon}/examples/chess/black_bishop.png (100%) rename {moth => prosperon}/examples/chess/black_king.png (100%) rename {moth => prosperon}/examples/chess/black_knight.png (100%) rename {moth => prosperon}/examples/chess/black_pawn.png (100%) rename {moth => prosperon}/examples/chess/black_queen.png (100%) rename {moth => prosperon}/examples/chess/black_rook.png (100%) rename {moth => prosperon}/examples/chess/config.js (100%) rename {moth => prosperon}/examples/chess/grid.js (100%) rename {moth => prosperon}/examples/chess/main.js (100%) rename {moth => prosperon}/examples/chess/movement.js (100%) rename {moth => prosperon}/examples/chess/pieces.js (100%) rename {moth => prosperon}/examples/chess/prosperon (100%) rename {moth => prosperon}/examples/chess/rules.js (100%) rename {moth => prosperon}/examples/chess/white_bishop.png (100%) rename {moth => prosperon}/examples/chess/white_king.png (100%) rename {moth => prosperon}/examples/chess/white_knight.png (100%) rename {moth => prosperon}/examples/chess/white_pawn.png (100%) rename {moth => prosperon}/examples/chess/white_queen.png (100%) rename {moth => prosperon}/examples/chess/white_rook.png (100%) rename {moth => prosperon}/examples/pong/config.js (100%) rename {moth => prosperon}/examples/pong/main.js (100%) rename {moth => prosperon}/examples/snake/config.js (100%) rename {moth => prosperon}/examples/snake/main.js (100%) rename {moth => prosperon}/examples/steam_example.js (100%) rename {moth => prosperon}/examples/tetris/config.js (100%) rename {moth => prosperon}/examples/tetris/main.js (100%) rename {moth => prosperon}/fonts/c64.ttf (100%) rename {moth => prosperon}/fonts/dos.ttf (100%) rename {moth => prosperon}/fonts/teenytinypixels.ttf (100%) rename {moth => prosperon}/geometry.js (88%) rename {moth => prosperon}/graphics.js (95%) rename {moth => prosperon}/icons/moon.gif (100%) rename {moth => prosperon}/icons/no_tex.gif (100%) rename {moth => prosperon}/icons_dev/airplane.png (100%) rename {moth => prosperon}/icons_dev/ak47.png (100%) rename {moth => prosperon}/icons_dev/amputation.png (100%) rename {moth => prosperon}/icons_dev/ant.png (100%) rename {moth => prosperon}/icons_dev/archer.png (100%) rename {moth => prosperon}/icons_dev/armadillo.png (100%) rename {moth => prosperon}/icons_dev/atom.png (100%) rename {moth => prosperon}/icons_dev/banana.png (100%) rename {moth => prosperon}/icons_dev/bank.png (100%) rename {moth => prosperon}/icons_dev/banknote.png (100%) rename {moth => prosperon}/icons_dev/barn.png (100%) rename {moth => prosperon}/icons_dev/barrel.png (100%) rename {moth => prosperon}/icons_dev/basket.png (100%) rename {moth => prosperon}/icons_dev/bat.png (100%) rename {moth => prosperon}/icons_dev/bed.png (100%) rename {moth => prosperon}/icons_dev/belt.png (100%) rename {moth => prosperon}/icons_dev/boar.png (100%) rename {moth => prosperon}/icons_dev/broom.png (100%) rename {moth => prosperon}/icons_dev/cabin.png (100%) rename {moth => prosperon}/icons_dev/card-10-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-10-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-10-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-10-spades.png (100%) rename {moth => prosperon}/icons_dev/card-2-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-2-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-2-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-2-spades.png (100%) rename {moth => prosperon}/icons_dev/card-3-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-3-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-3-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-3-spades.png (100%) rename {moth => prosperon}/icons_dev/card-4-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-4-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-4-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-4-spades.png (100%) rename {moth => prosperon}/icons_dev/card-5-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-5-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-5-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-5-spades.png (100%) rename {moth => prosperon}/icons_dev/card-6-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-6-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-6-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-6-spades.png (100%) rename {moth => prosperon}/icons_dev/card-7-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-7-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-7-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-7-spades.png (100%) rename {moth => prosperon}/icons_dev/card-8-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-8-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-8-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-8-spades.png (100%) rename {moth => prosperon}/icons_dev/card-9-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-9-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-9-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-9-spades.png (100%) rename {moth => prosperon}/icons_dev/card-ace-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-ace-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-ace-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-ace-spades.png (100%) rename {moth => prosperon}/icons_dev/card-discard.png (100%) rename {moth => prosperon}/icons_dev/card-draw.png (100%) rename {moth => prosperon}/icons_dev/card-jack-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-jack-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-jack-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-jack-spades.png (100%) rename {moth => prosperon}/icons_dev/card-joker.png (100%) rename {moth => prosperon}/icons_dev/card-king-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-king-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-king-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-king-spades.png (100%) rename {moth => prosperon}/icons_dev/card-pick.png (100%) rename {moth => prosperon}/icons_dev/card-queen-clubs.png (100%) rename {moth => prosperon}/icons_dev/card-queen-diamonds.png (100%) rename {moth => prosperon}/icons_dev/card-queen-hearts.png (100%) rename {moth => prosperon}/icons_dev/card-queen-spades.png (100%) rename {moth => prosperon}/icons_dev/card-random.png (100%) rename {moth => prosperon}/icons_dev/chess-bishop.png (100%) rename {moth => prosperon}/icons_dev/chess-king.png (100%) rename {moth => prosperon}/icons_dev/chess-knight.png (100%) rename {moth => prosperon}/icons_dev/chess-pawn.png (100%) rename {moth => prosperon}/icons_dev/chess-queen.png (100%) rename {moth => prosperon}/icons_dev/chess-rook.png (100%) rename {moth => prosperon}/icons_dev/chicken.png (100%) rename {moth => prosperon}/icons_dev/clarinet.png (100%) rename {moth => prosperon}/icons_dev/cloak.png (100%) rename {moth => prosperon}/icons_dev/clown.png (100%) rename {moth => prosperon}/icons_dev/coins.png (100%) rename {moth => prosperon}/icons_dev/compass.png (100%) rename {moth => prosperon}/icons_dev/cow.png (100%) rename {moth => prosperon}/icons_dev/crossed-swords.png (100%) rename {moth => prosperon}/icons_dev/deer.png (100%) rename {moth => prosperon}/icons_dev/dice.png (100%) rename {moth => prosperon}/icons_dev/dodo.png (100%) rename {moth => prosperon}/icons_dev/donkey.png (100%) rename {moth => prosperon}/icons_dev/door.png (100%) rename {moth => prosperon}/icons_dev/duck.png (100%) rename {moth => prosperon}/icons_dev/dynamite.png (100%) rename {moth => prosperon}/icons_dev/f-clef.png (100%) rename {moth => prosperon}/icons_dev/fairy.png (100%) rename {moth => prosperon}/icons_dev/fangs.png (100%) rename {moth => prosperon}/icons_dev/fez.png (100%) rename {moth => prosperon}/icons_dev/files.png (100%) rename {moth => prosperon}/icons_dev/finch.png (100%) rename {moth => prosperon}/icons_dev/fire.png (100%) rename {moth => prosperon}/icons_dev/flashlight.png (100%) rename {moth => prosperon}/icons_dev/footsteps.png (100%) rename {moth => prosperon}/icons_dev/forest.png (100%) rename {moth => prosperon}/icons_dev/fox.png (100%) rename {moth => prosperon}/icons_dev/fuji.png (100%) rename {moth => prosperon}/icons_dev/g-clef.png (100%) rename {moth => prosperon}/icons_dev/gargoyle.png (100%) rename {moth => prosperon}/icons_dev/garlic.png (100%) rename {moth => prosperon}/icons_dev/gasmask.png (100%) rename {moth => prosperon}/icons_dev/gate.png (100%) rename {moth => prosperon}/icons_dev/goblin.png (100%) rename {moth => prosperon}/icons_dev/goose.png (100%) rename {moth => prosperon}/icons_dev/gorilla.png (100%) rename {moth => prosperon}/icons_dev/grass.png (100%) rename {moth => prosperon}/icons_dev/harp.png (100%) rename {moth => prosperon}/icons_dev/hatchet.png (100%) rename {moth => prosperon}/icons_dev/heart.png (100%) rename {moth => prosperon}/icons_dev/hedgehog.png (100%) rename {moth => prosperon}/icons_dev/heron.png (100%) rename {moth => prosperon}/icons_dev/hook.png (100%) rename {moth => prosperon}/icons_dev/hotdog.png (100%) rename {moth => prosperon}/icons_dev/info.png (100%) rename {moth => prosperon}/icons_dev/key.png (100%) rename {moth => prosperon}/icons_dev/kite.png (100%) rename {moth => prosperon}/icons_dev/ladder.png (100%) rename {moth => prosperon}/icons_dev/lambda.png (100%) rename {moth => prosperon}/icons_dev/led.png (100%) rename {moth => prosperon}/icons_dev/lemon.png (100%) rename {moth => prosperon}/icons_dev/log.png (100%) rename {moth => prosperon}/icons_dev/maracas.png (100%) rename {moth => prosperon}/icons_dev/moai.png (100%) rename {moth => prosperon}/icons_dev/mole.png (100%) rename {moth => prosperon}/icons_dev/mouse.png (100%) rename {moth => prosperon}/icons_dev/move.png (100%) rename {moth => prosperon}/icons_dev/necklace.png (100%) rename {moth => prosperon}/icons_dev/ocarina.png (100%) rename {moth => prosperon}/icons_dev/panflute.png (100%) rename {moth => prosperon}/icons_dev/pangolin.png (100%) rename {moth => prosperon}/icons_dev/pc.png (100%) rename {moth => prosperon}/icons_dev/phone.png (100%) rename {moth => prosperon}/icons_dev/piechart.png (100%) rename {moth => prosperon}/icons_dev/pin.png (100%) rename {moth => prosperon}/icons_dev/pizza.png (100%) rename {moth => prosperon}/icons_dev/poi.png (100%) rename {moth => prosperon}/icons_dev/polarbear.png (100%) rename {moth => prosperon}/icons_dev/quiver.png (100%) rename {moth => prosperon}/icons_dev/rabbit.png (100%) rename {moth => prosperon}/icons_dev/raft.png (100%) rename {moth => prosperon}/icons_dev/random.png (100%) rename {moth => prosperon}/icons_dev/rat.png (100%) rename {moth => prosperon}/icons_dev/rattlesnake.png (100%) rename {moth => prosperon}/icons_dev/resize.png (100%) rename {moth => prosperon}/icons_dev/revolver.png (100%) rename {moth => prosperon}/icons_dev/ring.png (100%) rename {moth => prosperon}/icons_dev/rooster.png (100%) rename {moth => prosperon}/icons_dev/rss.png (100%) rename {moth => prosperon}/icons_dev/rupee.png (100%) rename {moth => prosperon}/icons_dev/sausage.png (100%) rename {moth => prosperon}/icons_dev/scorpion.png (100%) rename {moth => prosperon}/icons_dev/screw.png (100%) rename {moth => prosperon}/icons_dev/shamrock.png (100%) rename {moth => prosperon}/icons_dev/sheep.png (100%) rename {moth => prosperon}/icons_dev/shirt.png (100%) rename {moth => prosperon}/icons_dev/shop.png (100%) rename {moth => prosperon}/icons_dev/shuriken.png (100%) rename {moth => prosperon}/icons_dev/sloth.png (100%) rename {moth => prosperon}/icons_dev/snail.png (100%) rename {moth => prosperon}/icons_dev/snake.png (100%) rename {moth => prosperon}/icons_dev/soap.png (100%) rename {moth => prosperon}/icons_dev/sombrero.png (100%) rename {moth => prosperon}/icons_dev/stairs.png (100%) rename {moth => prosperon}/icons_dev/steak.png (100%) rename {moth => prosperon}/icons_dev/tomato.png (100%) rename {moth => prosperon}/icons_dev/trade.png (100%) rename {moth => prosperon}/icons_dev/trombone.png (100%) rename {moth => prosperon}/icons_dev/trousers.png (100%) rename {moth => prosperon}/icons_dev/trumpet.png (100%) rename {moth => prosperon}/icons_dev/tuba.png (100%) rename {moth => prosperon}/icons_dev/tv.png (100%) rename {moth => prosperon}/icons_dev/ufo.png (100%) rename {moth => prosperon}/icons_dev/vial.png (100%) rename {moth => prosperon}/icons_dev/watch.png (100%) rename {moth => prosperon}/icons_dev/waterfall.png (100%) rename {moth => prosperon}/icons_dev/well.png (100%) rename {moth => prosperon}/icons_dev/windmill.png (100%) rename {moth => prosperon}/icons_dev/wizard.png (100%) rename {moth => prosperon}/icons_dev/zipper.png (100%) rename {moth => prosperon}/imgui.js (62%) rename {moth => prosperon}/lcdsprite.js (100%) rename {moth => prosperon}/moth.js (100%) rename {moth => prosperon}/nogame/config.js (100%) rename {moth => prosperon}/nogame/main.js (100%) rename {moth => prosperon}/rasterize.js (100%) rename {moth => prosperon}/scenetree.js (97%) rename {moth => prosperon}/sdl_gpu.js (88%) rename {moth => prosperon}/shaders/circle.frag.hlsl (100%) rename {moth => prosperon}/shaders/common/common.hlsl (100%) rename {moth => prosperon}/shaders/common/model_pixel.hlsl (100%) rename {moth => prosperon}/shaders/common/model_vertex.hlsl (100%) rename {moth => prosperon}/shaders/common/pixel.hlsl (100%) rename {moth => prosperon}/shaders/common/sdf.hlsl (100%) rename {moth => prosperon}/shaders/common/vertex.hlsl (100%) rename {moth => prosperon}/shaders/compile.sh (100%) rename {moth => prosperon}/shaders/dbgline.frag.hlsl (100%) rename {moth => prosperon}/shaders/dbgline.vert.hlsl (100%) rename {moth => prosperon}/shaders/dxil/dbgline.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/dbgline.vert.dxil (100%) rename {moth => prosperon}/shaders/dxil/model.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/model.vert.dxil (100%) rename {moth => prosperon}/shaders/dxil/model_lit.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/post.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/post.vert.dxil (100%) rename {moth => prosperon}/shaders/dxil/ps1.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/ps1.vert.dxil (100%) rename {moth => prosperon}/shaders/dxil/rectangle.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/sprite.frag.dxil (100%) rename {moth => prosperon}/shaders/dxil/sprite.vert.dxil (100%) rename {moth => prosperon}/shaders/model.frag.hlsl (100%) rename {moth => prosperon}/shaders/model.vert.hlsl (100%) rename {moth => prosperon}/shaders/model_lit.frag.hlsl (100%) rename {moth => prosperon}/shaders/msl/dbgline.frag.msl (100%) rename {moth => prosperon}/shaders/msl/dbgline.vert.msl (100%) rename {moth => prosperon}/shaders/msl/model.frag.msl (100%) rename {moth => prosperon}/shaders/msl/model.vert.msl (100%) rename {moth => prosperon}/shaders/msl/model_lit.frag.msl (100%) rename {moth => prosperon}/shaders/msl/post.frag.msl (100%) rename {moth => prosperon}/shaders/msl/post.vert.msl (100%) rename {moth => prosperon}/shaders/msl/ps1.frag.msl (100%) rename {moth => prosperon}/shaders/msl/ps1.vert.msl (100%) rename {moth => prosperon}/shaders/msl/rectangle.frag.msl (100%) rename {moth => prosperon}/shaders/msl/sprite.frag.msl (100%) rename {moth => prosperon}/shaders/msl/sprite.vert.msl (100%) rename {moth => prosperon}/shaders/post.frag.hlsl (100%) rename {moth => prosperon}/shaders/post.vert.hlsl (100%) rename {moth => prosperon}/shaders/ps1.frag.hlsl (100%) rename {moth => prosperon}/shaders/ps1.vert.hlsl (100%) rename {moth => prosperon}/shaders/rectangle.frag.hlsl (100%) rename {moth => prosperon}/shaders/reflection/dbgline.frag.json (100%) rename {moth => prosperon}/shaders/reflection/dbgline.vert.json (100%) rename {moth => prosperon}/shaders/reflection/model.frag.json (100%) rename {moth => prosperon}/shaders/reflection/model.vert.json (100%) rename {moth => prosperon}/shaders/reflection/model_lit.frag.json (100%) rename {moth => prosperon}/shaders/reflection/post.frag.json (100%) rename {moth => prosperon}/shaders/reflection/post.vert.json (100%) rename {moth => prosperon}/shaders/reflection/ps1.frag.json (100%) rename {moth => prosperon}/shaders/reflection/ps1.vert.json (100%) rename {moth => prosperon}/shaders/reflection/rectangle.frag.json (100%) rename {moth => prosperon}/shaders/reflection/sprite.frag.json (100%) rename {moth => prosperon}/shaders/reflection/sprite.vert.json (100%) rename {moth => prosperon}/shaders/sprite.frag.hlsl (100%) rename {moth => prosperon}/shaders/sprite.vert.hlsl (100%) rename {moth => prosperon}/shaders/spv/dbgline.frag.spv (100%) rename {moth => prosperon}/shaders/spv/dbgline.vert.spv (100%) rename {moth => prosperon}/shaders/spv/model.frag.spv (100%) rename {moth => prosperon}/shaders/spv/model.vert.spv (100%) rename {moth => prosperon}/shaders/spv/model_lit.frag.spv (100%) rename {moth => prosperon}/shaders/spv/post.frag.spv (100%) rename {moth => prosperon}/shaders/spv/post.vert.spv (100%) rename {moth => prosperon}/shaders/spv/ps1.frag.spv (100%) rename {moth => prosperon}/shaders/spv/ps1.vert.spv (100%) rename {moth => prosperon}/shaders/spv/rectangle.frag.spv (100%) rename {moth => prosperon}/shaders/spv/sprite.frag.spv (100%) rename {moth => prosperon}/shaders/spv/sprite.vert.spv (100%) rename {moth => prosperon}/shaders/wind.hlsl (100%) rename {moth => prosperon}/sound.js (100%) create mode 100644 prosperon/spline.js rename {moth => prosperon}/sprite.js (100%) rename {moth => prosperon}/tests/animation.js (100%) rename {moth => prosperon}/tests/bunny.png (100%) rename {moth => prosperon}/tests/bunnymark.js (100%) rename {moth => prosperon}/tests/camera.js (100%) rename {moth => prosperon}/tests/camera_colorspace.js (100%) rename {moth => prosperon}/tests/camera_colorspace_convert.js (100%) rename {moth => prosperon}/tests/camera_info.js (100%) rename {moth => prosperon}/tests/crab.gif (100%) rename {moth => prosperon}/tests/draw2d.js (100%) rename {moth => prosperon}/tests/prosperon.js (100%) rename {moth => prosperon}/tests/steam.js (100%) rename {moth => prosperon}/tests/surface.js (100%) rename {moth => prosperon}/tests/surface_colorspace.js (100%) rename {moth => prosperon}/tests/warrior.aseprite (100%) rename {moth => prosperon}/tests/webcam.js (100%) rename {moth => prosperon}/tests/window.js (100%) rename {moth => prosperon}/tween.js (98%) create mode 100644 prosperon/video.js rename source/{prosperon.c => cell.c} (97%) rename source/{prosperon.h => cell.h} (80%) diff --git a/CLAUDE.md b/CLAUDE.md index b4763cb3..a1f4d51e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -279,7 +279,7 @@ $_.receiver(msg => { - Custom formats: Aseprite animations, etc. ### Developer Tools -- Built-in documentation system with `prosperon.DOC` +- Built-in documentation system with `cell.DOC` - Tracy profiler integration for performance monitoring - Imgui debugging tools - Console logging with various severity levels diff --git a/Makefile b/Makefile index 63313c9f..203cd546 100755 --- a/Makefile +++ b/Makefile @@ -1,22 +1,22 @@ debug: FORCE meson setup build_dbg -Dbuildtype=debug - meson compile -C build_dbg + meson install -C build_dbg fast: FORCE meson setup build_fast - meson compile -C build_fast + meson install -C build_fast release: FORCE meson setup -Dbuildtype=release -Db_lto=true -Db_lto_mode=thin -Db_ndebug=true build_release - meson compile -C build_release + meson install -C build_release sanitize: FORCE meson setup -Db_sanitize=address -Db_sanitize=memory -Db_sanitize=leak -Db_sanitize=undefined build_sani - meson compile -C build_sani + meson install -C build_sani small: FORCE meson setup -Dbuildtype=minsize -Db_lto=true -Db_ndebug=true build_small - meson compile -C build_small + meson install -C build_small web: FORCE meson setup -Deditor=false -Dbuildtype=minsize -Db_lto=true -Db_ndebug=true --cross-file emscripten.cross build_web diff --git a/docs/api/modules/doc.md b/docs/api/modules/doc.md index 4b068b3e..ff7fae21 100644 --- a/docs/api/modules/doc.md +++ b/docs/api/modules/doc.md @@ -3,7 +3,7 @@ Provides a consistent way to create documentation for prosperon elements. Objects are documented by adding docstrings directly to object-like things (functions, objects, ...), or to an object's own "doc object". -Docstrings are set to the symbol `prosperon.DOC` +Docstrings are set to the symbol `cell.DOC` ```js // Suppose we have a module that returns a function @@ -24,9 +24,9 @@ var greet = { hello() { log.console('hello!') } } -greet[prosperon.DOC] = {} -greet[prosperon.DOC][prosperon.DOC] = 'An object full of different greeter functions' -greet[prosperon.DOC].hello = 'A greeter that says, "hello!"' +greet[cell.DOC] = {} +greet[cell.DOC][cell.DOC] = 'An object full of different greeter functions' +greet[cell.DOC].hello = 'A greeter that says, "hello!"' ``` diff --git a/docs/tutorial.md b/docs/tutorial.md index 74abc2be..c6657043 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -62,6 +62,6 @@ this.delay(_ => { The global object called `prosperon` has a variety of engine specific settings on it that can be set to influence how the engine behaves. For example, `prosperon.argv` contains a list of the command line arguments given to prosperon; `prosperon.PATH` is an array of paths to resolve resources such as modules and images. `prosperon` is fully documented in the API section. ## Getting help -The `prosperon` global has a 'doc' function, which can be invoked on any engine object to see a description of it and its members. For example, to learn about `prosperon`, try printing out `prosperon.doc(prosperon)` in your `main.js`. +The `prosperon` global has a 'doc' function, which can be invoked on any engine object to see a description of it and its members. For example, to learn about `prosperon`, try printing out `cell.DOC(prosperon)` in your `main.js`. Writing documentation for your own modules and game components will be explored in the chapter on actors & modules. \ No newline at end of file diff --git a/meson.build b/meson.build index b051f706..f7b985ef 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('prosperon', ['c', 'cpp'], +project('cell', ['c', 'cpp'], version: '0.9.3', meson_version: '>=1.4', default_options : [ 'cpp_std=c++11']) @@ -13,21 +13,21 @@ fs = import('fs') add_project_arguments('-pedantic', language: ['c']) git_tag_cmd = run_command('git', 'describe', '--tags', '--abbrev=0', check: false) -prosperon_version = 'unknown' +cell_version = 'unknown' if git_tag_cmd.returncode() == 0 - prosperon_version = git_tag_cmd.stdout().strip() + cell_version = git_tag_cmd.stdout().strip() endif git_commit_cmd = run_command('git', 'rev-parse', '--short', 'HEAD', check: false) -prosperon_commit = 'unknown' +cell_commit = 'unknown' if git_commit_cmd.returncode() == 0 - prosperon_commit = git_commit_cmd.stdout().strip() + cell_commit = git_commit_cmd.stdout().strip() endif # Important: pass the definitions without double-escaping quotes add_project_arguments( - '-DPROSPERON_VERSION="' + prosperon_version + '"', - '-DPROSPERON_COMMIT="' + prosperon_commit + '"', + '-DCELL_VERSION="' + cell_version + '"', + '-DCELL_COMMIT="' + cell_commit + '"', language : 'c' ) @@ -67,21 +67,31 @@ endif cmake = import('cmake') -mbedtls_opts = cmake.subproject_options() -mbedtls_opts.add_cmake_defines({ - 'ENABLE_PROGRAMS': 'OFF', # Disable Mbed TLS programs - 'ENABLE_TESTING': 'OFF', # Disable Mbed TLS tests - 'CMAKE_BUILD_TYPE': 'Release', # Optimize for release - 'MBEDTLS_FATAL_WARNINGS': 'ON', # Treat warnings as errors - 'USE_STATIC_MBEDTLS_LIBRARY': 'ON',# Build static libraries - 'USE_SHARED_MBEDTLS_LIBRARY': 'OFF'# Disable shared libraries -}) -mbedtls_proj = cmake.subproject('mbedtls', options: mbedtls_opts) -deps += [ - mbedtls_proj.dependency('mbedtls'), - mbedtls_proj.dependency('mbedx509'), - mbedtls_proj.dependency('mbedcrypto') -] +# Try to find system-installed mbedtls first +mbedtls_dep = dependency('mbedtls', static: true, required: false) +mbedx509_dep = dependency('mbedx509', static: true, required: false) +mbedcrypto_dep = dependency('mbedcrypto', static: true, required: false) + +if not mbedtls_dep.found() or not mbedx509_dep.found() or not mbedcrypto_dep.found() + message('⚙ System mbedtls not found, building subproject...') + mbedtls_opts = cmake.subproject_options() + mbedtls_opts.add_cmake_defines({ + 'ENABLE_PROGRAMS': 'OFF', # Disable Mbed TLS programs + 'ENABLE_TESTING': 'OFF', # Disable Mbed TLS tests + 'CMAKE_BUILD_TYPE': 'Release', # Optimize for release + 'MBEDTLS_FATAL_WARNINGS': 'ON', # Treat warnings as errors + 'USE_STATIC_MBEDTLS_LIBRARY': 'ON',# Build static libraries + 'USE_SHARED_MBEDTLS_LIBRARY': 'OFF'# Disable shared libraries + }) + mbedtls_proj = cmake.subproject('mbedtls', options: mbedtls_opts) + deps += [ + mbedtls_proj.dependency('mbedtls'), + mbedtls_proj.dependency('mbedx509'), + mbedtls_proj.dependency('mbedcrypto') + ] +else + deps += [mbedtls_dep, mbedx509_dep, mbedcrypto_dep] +endif sdl3_opts = cmake.subproject_options() sdl3_opts.add_cmake_defines({ @@ -130,33 +140,111 @@ if host_machine.system() == 'emscripten' method : 'pkg-config', # or 'cmake' if you prefer required : true) else - sdl3_proj = cmake.subproject('sdl3', options : sdl3_opts) - deps += sdl3_proj.dependency('SDL3-static') + # Try to find system-installed SDL3 first + sdl3_dep = dependency('sdl3', static: true, required: false) + + if not sdl3_dep.found() + message('⚙ System SDL3 not found, building subproject...') + sdl3_proj = cmake.subproject('sdl3', options : sdl3_opts) + deps += sdl3_proj.dependency('SDL3-static') + else + deps += sdl3_dep + endif endif quickjs_opts = [] - quickjs_opts += 'default_library=static' -deps += dependency('quickjs', static:true, default_options:quickjs_opts) -deps += dependency('qjs-layout', static:true) -deps += dependency('qjs-miniz', static:true) -deps += dependency('physfs', static:true) + +# Try to find system-installed quickjs first +quickjs_dep = dependency('quickjs', static: true, required: false) +if not quickjs_dep.found() + message('⚙ System quickjs not found, building subproject...') + deps += dependency('quickjs', static:true, default_options:quickjs_opts) +else + deps += quickjs_dep +endif + +# Try to find system-installed qjs-layout first +qjs_layout_dep = dependency('qjs-layout', static: true, required: false) +if not qjs_layout_dep.found() + message('⚙ System qjs-layout not found, building subproject...') + deps += dependency('qjs-layout', static:true) +else + deps += qjs_layout_dep +endif + +# Try to find system-installed qjs-miniz first +qjs_miniz_dep = dependency('qjs-miniz', static: true, required: false) +if not qjs_miniz_dep.found() + message('⚙ System qjs-miniz not found, building subproject...') + deps += dependency('qjs-miniz', static:true) +else + deps += qjs_miniz_dep +endif + +# Try to find system-installed physfs first +physfs_dep = dependency('physfs', static: true, required: false) +if not physfs_dep.found() + message('⚙ System physfs not found, building subproject...') + deps += dependency('physfs', static:true) +else + deps += physfs_dep +endif + deps += dependency('threads') -deps += dependency('chipmunk', static:true) + +# Try to find system-installed chipmunk first +chipmunk_dep = dependency('chipmunk', static: true, required: false) +if not chipmunk_dep.found() + message('⚙ System chipmunk not found, building subproject...') + deps += dependency('chipmunk', static:true) +else + deps += chipmunk_dep +endif if host_machine.system() != 'emscripten' - deps += dependency('enet', static:true) + # Try to find system-installed enet first + enet_dep = dependency('enet', static: true, required: false) + if not enet_dep.found() + message('⚙ System enet not found, building subproject...') + deps += dependency('enet', static:true) + else + deps += enet_dep + endif src += 'qjs_enet.c' tracy_opts = ['fibers=true', 'no_exit=true', 'libunwind_backtrace=true'] add_project_arguments('-DTRACY_ENABLE', language:['c','cpp']) - deps += dependency('tracy', static:true, default_options:tracy_opts) + + # Try to find system-installed tracy first + tracy_dep = dependency('tracy', static: true, required: false) + if not tracy_dep.found() + message('⚙ System tracy not found, building subproject...') + deps += dependency('tracy', static:true, default_options:tracy_opts) + else + deps += tracy_dep + endif src += 'qjs_dmon.c' endif -deps += dependency('soloud', static:true) -deps += dependency('libqrencode', static:true) +# Try to find system-installed soloud first +soloud_dep = dependency('soloud', static: true, required: false) +if not soloud_dep.found() + message('⚙ System soloud not found, building subproject...') + deps += dependency('soloud', static:true) +else + deps += soloud_dep +endif + +# Try to find system-installed qrencode first +qr_dep = dependency('qrencode', static: true, required: false) +if not qr_dep.found() + message('⚙ System qrencode not found, building subproject...') + deps += dependency('libqrencode', static:true) +else + deps += qr_dep +endif # Storefront SDK support storefront = get_option('storefront') @@ -193,7 +281,7 @@ link_args = link sources = [] src += [ 'anim.c', 'config.c', 'datastream.c','font.c','HandmadeMath.c','jsffi.c','model.c', - 'render.c','simplex.c','spline.c', 'transform.c','prosperon.c', 'wildmatch.c', + 'render.c','simplex.c','spline.c', 'transform.c','cell.c', 'wildmatch.c', 'sprite.c', 'rtree.c', 'qjs_nota.c', 'qjs_soloud.c', 'qjs_sdl.c', 'qjs_sdl_video.c', 'qjs_sdl_surface.c', 'qjs_math.c', 'qjs_geometry.c', 'qjs_transform.c', 'qjs_sprite.c', 'qjs_io.c', 'qjs_fd.c', 'qjs_os.c', 'qjs_actor.c', 'qjs_qr.c', 'qjs_wota.c', 'monocypher.c', 'qjs_blob.c', 'qjs_crypto.c', 'qjs_time.c', 'qjs_http.c', 'qjs_rtree.c', 'qjs_spline.c', 'qjs_js.c', 'qjs_debug.c' ] @@ -222,87 +310,33 @@ foreach file : src sources += files(full_path) endforeach -if get_option('editor') -# sources += 'source/qjs_imgui.cpp' -# foreach imgui : imsrc -# sources += tp / 'imgui' / imgui -# endforeach -endif - includers = [] foreach inc : includes includers += include_directories(inc) endforeach -zip_folders = ['scripts', 'fonts', 'icons'] -zip_paths = [] -foreach folder: zip_folders - zip_paths += meson.project_source_root() / folder -endforeach - -# Produce core.zip -core = custom_target('core.zip', - output : 'core.zip', - command : ['sh', '-c', - 'cd ' + meson.project_source_root() + - ' && echo "Rebuilding core.zip" && rm -f ' + meson.current_build_dir() + '/core.zip && ' + - 'zip -r ' + meson.current_build_dir() + '/core.zip scripts fonts icons' - ], - build_always_stale: true, - build_by_default: true -) - -prosperon_raw = executable('prosperon_raw', sources, - dependencies: deps, - include_directories: includers, - link_args: link, - build_rpath: '$ORIGIN', - install:false -) - -strip_enabled = ['release', 'minsize'].contains(get_option('buildtype')) - -if strip_enabled - prosperon_raw_stripped = custom_target('prosperon_raw_stripped', - input: prosperon_raw, - output: 'prosperon_raw_stripped', - command: [ - 'sh', '-c', - 'strip "$1" && cp "$1" "$2"', - 'stripper', - '@INPUT@', - '@OUTPUT@' - ], - build_by_default: true - ) - exe_for_concat = prosperon_raw_stripped -else - exe_for_concat = prosperon_raw -endif - if host_machine.system() == 'windows' exe_ext = '.exe' else exe_ext = '' endif -prosperon = custom_target('prosperon', - output: 'prosperon' + exe_ext, - input: [exe_for_concat, core], - command: [ - 'sh', '-c', - 'cat "$1" "$2" > "$3" && chmod +x "$3" >/dev/null 2>&1', - 'concat', - '@INPUT0@', - '@INPUT1@', - '@OUTPUT@' - ], - build_always_stale: true, - build_by_default: true +strip_enabled = ['release', 'minsize'].contains(get_option('buildtype')) + +if strip_enabled + add_project_link_arguments('-s', language: ['c', 'cpp']) +endif + +cell = executable('cell', sources, + dependencies: deps, + include_directories: includers, + link_args: link, + build_rpath: '$ORIGIN', + install: true ) -prosperon_dep = declare_dependency( - link_with: prosperon +cell_dep = declare_dependency( + link_with: cell ) copy_tests = custom_target( @@ -329,5 +363,5 @@ tests = [ ] foreach file : tests - test(file, prosperon_raw, args:['tests/' + file + '.js'], depends:copy_tests) + test(file, cell, args:['tests/' + file + '.js'], depends:copy_tests) endforeach diff --git a/moth/spline.js b/moth/spline.js deleted file mode 100644 index 550b7c88..00000000 --- a/moth/spline.js +++ /dev/null @@ -1,6 +0,0 @@ -var spline = this - -spline.catmull[prosperon.DOC] = "Perform Catmull-Rom spline sampling on an array of 2D points, returning an array of samples." -spline.bezier[prosperon.DOC] = "Perform a Bezier spline (or catmull) sampling on 2D points, returning an array of sampled points." - -return spline \ No newline at end of file diff --git a/moth/video.js b/moth/video.js deleted file mode 100644 index c19159e1..00000000 --- a/moth/video.js +++ /dev/null @@ -1,5 +0,0 @@ -var video = this - -video.make_video[prosperon.DOC] = "Decode a video file (MPEG, etc.) from an ArrayBuffer, returning a datastream object." - -return video \ No newline at end of file diff --git a/moth/_sdl_video.js b/prosperon/_sdl_video.js similarity index 100% rename from moth/_sdl_video.js rename to prosperon/_sdl_video.js diff --git a/moth/camera.js b/prosperon/camera.js similarity index 100% rename from moth/camera.js rename to prosperon/camera.js diff --git a/moth/clay.js b/prosperon/clay.js similarity index 100% rename from moth/clay.js rename to prosperon/clay.js diff --git a/moth/color.js b/prosperon/color.js similarity index 100% rename from moth/color.js rename to prosperon/color.js diff --git a/moth/controller.js b/prosperon/controller.js similarity index 100% rename from moth/controller.js rename to prosperon/controller.js diff --git a/moth/device.js b/prosperon/device.js similarity index 100% rename from moth/device.js rename to prosperon/device.js diff --git a/moth/draw2d.js b/prosperon/draw2d.js similarity index 98% rename from moth/draw2d.js rename to prosperon/draw2d.js index 0beab38b..a1b8fec5 100644 --- a/moth/draw2d.js +++ b/prosperon/draw2d.js @@ -2,7 +2,7 @@ var math = use('math') var color = use('color') var draw = {} -draw[prosperon.DOC] = ` +draw[cell.DOC] = ` A collection of 2D drawing functions that create drawing command lists. These are pure functions that return plain JavaScript objects representing drawing operations. No rendering or actor communication happens here. @@ -115,7 +115,7 @@ draw.point = function(pos, size, opt = {}, material) { material: material }) } -draw.point[prosperon.DOC] = ` +draw.point[cell.DOC] = ` :param pos: A 2D position ([x, y]) where the point should be drawn. :param size: The size of the point. :param opt: Optional geometry properties. diff --git a/moth/dull.js b/prosperon/dull.js similarity index 100% rename from moth/dull.js rename to prosperon/dull.js diff --git a/moth/emitter.js b/prosperon/emitter.js similarity index 100% rename from moth/emitter.js rename to prosperon/emitter.js diff --git a/moth/examples/bunnymark/bunny.png b/prosperon/examples/bunnymark/bunny.png similarity index 100% rename from moth/examples/bunnymark/bunny.png rename to prosperon/examples/bunnymark/bunny.png diff --git a/moth/examples/bunnymark/config.js b/prosperon/examples/bunnymark/config.js similarity index 100% rename from moth/examples/bunnymark/config.js rename to prosperon/examples/bunnymark/config.js diff --git a/moth/examples/bunnymark/main.js b/prosperon/examples/bunnymark/main.js similarity index 100% rename from moth/examples/bunnymark/main.js rename to prosperon/examples/bunnymark/main.js diff --git a/moth/examples/chess/black_bishop.png b/prosperon/examples/chess/black_bishop.png similarity index 100% rename from moth/examples/chess/black_bishop.png rename to prosperon/examples/chess/black_bishop.png diff --git a/moth/examples/chess/black_king.png b/prosperon/examples/chess/black_king.png similarity index 100% rename from moth/examples/chess/black_king.png rename to prosperon/examples/chess/black_king.png diff --git a/moth/examples/chess/black_knight.png b/prosperon/examples/chess/black_knight.png similarity index 100% rename from moth/examples/chess/black_knight.png rename to prosperon/examples/chess/black_knight.png diff --git a/moth/examples/chess/black_pawn.png b/prosperon/examples/chess/black_pawn.png similarity index 100% rename from moth/examples/chess/black_pawn.png rename to prosperon/examples/chess/black_pawn.png diff --git a/moth/examples/chess/black_queen.png b/prosperon/examples/chess/black_queen.png similarity index 100% rename from moth/examples/chess/black_queen.png rename to prosperon/examples/chess/black_queen.png diff --git a/moth/examples/chess/black_rook.png b/prosperon/examples/chess/black_rook.png similarity index 100% rename from moth/examples/chess/black_rook.png rename to prosperon/examples/chess/black_rook.png diff --git a/moth/examples/chess/config.js b/prosperon/examples/chess/config.js similarity index 100% rename from moth/examples/chess/config.js rename to prosperon/examples/chess/config.js diff --git a/moth/examples/chess/grid.js b/prosperon/examples/chess/grid.js similarity index 100% rename from moth/examples/chess/grid.js rename to prosperon/examples/chess/grid.js diff --git a/moth/examples/chess/main.js b/prosperon/examples/chess/main.js similarity index 100% rename from moth/examples/chess/main.js rename to prosperon/examples/chess/main.js diff --git a/moth/examples/chess/movement.js b/prosperon/examples/chess/movement.js similarity index 100% rename from moth/examples/chess/movement.js rename to prosperon/examples/chess/movement.js diff --git a/moth/examples/chess/pieces.js b/prosperon/examples/chess/pieces.js similarity index 100% rename from moth/examples/chess/pieces.js rename to prosperon/examples/chess/pieces.js diff --git a/moth/examples/chess/prosperon b/prosperon/examples/chess/prosperon similarity index 100% rename from moth/examples/chess/prosperon rename to prosperon/examples/chess/prosperon diff --git a/moth/examples/chess/rules.js b/prosperon/examples/chess/rules.js similarity index 100% rename from moth/examples/chess/rules.js rename to prosperon/examples/chess/rules.js diff --git a/moth/examples/chess/white_bishop.png b/prosperon/examples/chess/white_bishop.png similarity index 100% rename from moth/examples/chess/white_bishop.png rename to prosperon/examples/chess/white_bishop.png diff --git a/moth/examples/chess/white_king.png b/prosperon/examples/chess/white_king.png similarity index 100% rename from moth/examples/chess/white_king.png rename to prosperon/examples/chess/white_king.png diff --git a/moth/examples/chess/white_knight.png b/prosperon/examples/chess/white_knight.png similarity index 100% rename from moth/examples/chess/white_knight.png rename to prosperon/examples/chess/white_knight.png diff --git a/moth/examples/chess/white_pawn.png b/prosperon/examples/chess/white_pawn.png similarity index 100% rename from moth/examples/chess/white_pawn.png rename to prosperon/examples/chess/white_pawn.png diff --git a/moth/examples/chess/white_queen.png b/prosperon/examples/chess/white_queen.png similarity index 100% rename from moth/examples/chess/white_queen.png rename to prosperon/examples/chess/white_queen.png diff --git a/moth/examples/chess/white_rook.png b/prosperon/examples/chess/white_rook.png similarity index 100% rename from moth/examples/chess/white_rook.png rename to prosperon/examples/chess/white_rook.png diff --git a/moth/examples/pong/config.js b/prosperon/examples/pong/config.js similarity index 100% rename from moth/examples/pong/config.js rename to prosperon/examples/pong/config.js diff --git a/moth/examples/pong/main.js b/prosperon/examples/pong/main.js similarity index 100% rename from moth/examples/pong/main.js rename to prosperon/examples/pong/main.js diff --git a/moth/examples/snake/config.js b/prosperon/examples/snake/config.js similarity index 100% rename from moth/examples/snake/config.js rename to prosperon/examples/snake/config.js diff --git a/moth/examples/snake/main.js b/prosperon/examples/snake/main.js similarity index 100% rename from moth/examples/snake/main.js rename to prosperon/examples/snake/main.js diff --git a/moth/examples/steam_example.js b/prosperon/examples/steam_example.js similarity index 100% rename from moth/examples/steam_example.js rename to prosperon/examples/steam_example.js diff --git a/moth/examples/tetris/config.js b/prosperon/examples/tetris/config.js similarity index 100% rename from moth/examples/tetris/config.js rename to prosperon/examples/tetris/config.js diff --git a/moth/examples/tetris/main.js b/prosperon/examples/tetris/main.js similarity index 100% rename from moth/examples/tetris/main.js rename to prosperon/examples/tetris/main.js diff --git a/moth/fonts/c64.ttf b/prosperon/fonts/c64.ttf similarity index 100% rename from moth/fonts/c64.ttf rename to prosperon/fonts/c64.ttf diff --git a/moth/fonts/dos.ttf b/prosperon/fonts/dos.ttf similarity index 100% rename from moth/fonts/dos.ttf rename to prosperon/fonts/dos.ttf diff --git a/moth/fonts/teenytinypixels.ttf b/prosperon/fonts/teenytinypixels.ttf similarity index 100% rename from moth/fonts/teenytinypixels.ttf rename to prosperon/fonts/teenytinypixels.ttf diff --git a/moth/geometry.js b/prosperon/geometry.js similarity index 88% rename from moth/geometry.js rename to prosperon/geometry.js index 47447397..8640ab50 100644 --- a/moth/geometry.js +++ b/prosperon/geometry.js @@ -1,5 +1,5 @@ var geometry = this -geometry[prosperon.DOC] = ` +geometry[cell.DOC] = ` A collection of geometry-related functions for circles, spheres, boxes, polygons, and rectangle utilities. Some functionality is implemented in C and exposed here. ` @@ -7,7 +7,7 @@ and rectangle utilities. Some functionality is implemented in C and exposed here var math = use('math') geometry.box = {} -geometry.box[prosperon.DOC] = ` +geometry.box[cell.DOC] = ` An object for box-related operations. Overridden later by a function definition, so its direct usage is overshadowed. Contains: - points(ll, ur): Return an array of four 2D points for a box from ll (lower-left) to ur (upper-right). @@ -16,7 +16,7 @@ its direct usage is overshadowed. Contains: geometry.box.points = function (ll, ur) { return [ll, ll.add([ur.x - ll.x, 0]), ur, ll.add([0, ur.y - ll.y])] } -geometry.box.points[prosperon.DOC] = ` +geometry.box.points[cell.DOC] = ` :param ll: Lower-left coordinate as a 2D vector (x,y). :param ur: Upper-right coordinate as a 2D vector (x,y). :return: An array of four points forming the corners of the box in order [ll, lower-right, ur, upper-left]. @@ -24,14 +24,14 @@ Compute the four corners of a box given lower-left and upper-right corners. ` geometry.sphere = {} -geometry.sphere[prosperon.DOC] = ` +geometry.sphere[cell.DOC] = ` Sphere-related geometry functions: - volume(r): Return the volume of a sphere with radius r. - random(r, theta, phi): Return a random point on or inside a sphere. ` geometry.circle = {} -geometry.circle[prosperon.DOC] = ` +geometry.circle[cell.DOC] = ` Circle-related geometry functions: - area(r): Return the area of a circle with radius r. - random(r, theta): Return a random 2D point on a circle; uses sphere.random internally and extracts x,z. @@ -40,7 +40,7 @@ Circle-related geometry functions: geometry.sphere.volume = function (r) { return (Math.pi * r * r * r * 4) / 3 } -geometry.sphere.volume[prosperon.DOC] = ` +geometry.sphere.volume[cell.DOC] = ` :param r: The sphere radius. :return: The volume of the sphere, calculated as (4/3) * pi * r^3. ` @@ -55,7 +55,7 @@ geometry.sphere.random = function (r, theta = [0, 1], phi = [-0.5, 0.5]) { var pa = Math.turn2rad(Math.random_range(phi[0], phi[1])) return [ra * Math.sin(ta) * Math.cos(pa), ra * Math.sin(ta) * Math.sin(pa), ra * Math.cos(ta)] } -geometry.sphere.random[prosperon.DOC] = ` +geometry.sphere.random[cell.DOC] = ` :param r: A single number (radius) or a 2-element array [minRadius, maxRadius]. :param theta: A single number or 2-element array defining the range in turns for the theta angle, default [0,1]. :param phi: A single number or 2-element array defining the range in turns for the phi angle, default [-0.5,0.5]. @@ -66,7 +66,7 @@ Generate a random point inside a sphere of variable radius, distributing angles geometry.circle.area = function (r) { return Math.pi * r * r } -geometry.circle.area[prosperon.DOC] = ` +geometry.circle.area[cell.DOC] = ` :param r: Radius of the circle. :return: The area, pi * r^2. ` @@ -74,7 +74,7 @@ geometry.circle.area[prosperon.DOC] = ` geometry.circle.random = function (r, theta) { return geometry.sphere.random(r, theta).xz } -geometry.circle.random[prosperon.DOC] = ` +geometry.circle.random[cell.DOC] = ` :param r: A radius or [minRadius, maxRadius]. :param theta: Angle range in turns (single number or [min,max]). :return: A 2D point (x,z) in the circle, using the sphere random generator and ignoring y. @@ -91,7 +91,7 @@ geometry.box = function (w, h) { ] return points } -geometry.box[prosperon.DOC] = ` +geometry.box[cell.DOC] = ` :param w: The width of the box. :param h: The height of the box. :return: An array of four 2D points representing the corners of a rectangle centered at [0,0]. @@ -101,7 +101,7 @@ Construct a box centered at the origin with the given width and height. This ove geometry.ngon = function (radius, n) { return geometry.arc(radius, 360, n) } -geometry.ngon[prosperon.DOC] = ` +geometry.ngon[cell.DOC] = ` :param radius: The radius of the n-gon from center to each vertex. :param n: Number of sides/vertices. :return: An array of 2D points forming a regular n-gon. @@ -118,7 +118,7 @@ geometry.arc = function (radius, angle, n, start = 0) { for (var i = 0; i < n; i++) points.push(math.rotate([radius, 0], start + arclen * i)) return points } -geometry.arc[prosperon.DOC] = ` +geometry.arc[cell.DOC] = ` :param radius: The distance from center to the arc points. :param angle: The total angle (in degrees) over which points are generated, capped at 360. :param n: Number of segments (if <=1, empty array is returned). @@ -131,7 +131,7 @@ geometry.circle.points = function (radius, n) { if (n <= 1) return [] return geometry.arc(radius, 360, n) } -geometry.circle.points[prosperon.DOC] = ` +geometry.circle.points[cell.DOC] = ` :param radius: The circle's radius. :param n: Number of points around the circle. :return: An array of 2D points equally spaced around a full 360-degree circle. @@ -141,7 +141,7 @@ Shortcut for geometry.arc(radius, 360, n). geometry.corners2points = function (ll, ur) { return [ll, ll.add([ur.x, 0]), ur, ll.add([0, ur.y])] } -geometry.corners2points[prosperon.DOC] = ` +geometry.corners2points[cell.DOC] = ` :param ll: Lower-left 2D coordinate. :param ur: Upper-right 2D coordinate (relative offset in x,y). :return: A four-point array of corners [ll, lower-right, upper-right, upper-left]. @@ -158,7 +158,7 @@ geometry.sortpointsccw = function (points) { }) return ccw.map(function (x) { return x.add(cm) }) } -geometry.sortpointsccw[prosperon.DOC] = ` +geometry.sortpointsccw[cell.DOC] = ` :param points: An array of 2D points. :return: A new array of the same points, sorted counterclockwise around their centroid. Sort an array of points in CCW order based on their angles from the centroid. @@ -185,61 +185,61 @@ geometry.points2cm = function(points) { }) return [x / n, y / n] } -geometry.points2cm[prosperon.DOC] = ` +geometry.points2cm[cell.DOC] = ` :param points: An array of 2D points. :return: The centroid (average x,y) of the given points. ` -geometry.rect_intersection[prosperon.DOC] = ` +geometry.rect_intersection[cell.DOC] = ` :param a: The first rectangle as {x, y, w, h}. :param b: The second rectangle as {x, y, w, h}. :return: A rectangle that is the intersection of the two. May have zero width/height if no overlap. Return the intersection of two rectangles. The result may be empty if no intersection. ` -geometry.rect_intersects[prosperon.DOC] = ` +geometry.rect_intersects[cell.DOC] = ` :param a: Rectangle {x,y,w,h}. :param b: Rectangle {x,y,w,h}. :return: A boolean indicating whether the two rectangles overlap. ` -geometry.rect_expand[prosperon.DOC] = ` +geometry.rect_expand[cell.DOC] = ` :param a: Rectangle {x,y,w,h}. :param b: Rectangle {x,y,w,h}. :return: A new rectangle that covers the bounds of both input rectangles. Merge or combine two rectangles, returning their bounding rectangle. ` -geometry.rect_inside[prosperon.DOC] = ` +geometry.rect_inside[cell.DOC] = ` :param inner: A rectangle to test. :param outer: A rectangle that may contain 'inner'. :return: True if 'inner' is completely inside 'outer', otherwise false. ` -geometry.rect_random[prosperon.DOC] = ` +geometry.rect_random[cell.DOC] = ` :param rect: A rectangle {x,y,w,h}. :return: A random point within the rectangle (uniform distribution). ` -geometry.cwh2rect[prosperon.DOC] = ` +geometry.cwh2rect[cell.DOC] = ` :param center: A 2D point [cx, cy]. :param wh: A 2D size [width, height]. :return: A rectangle {x, y, w, h} with x,y set to center and w,h set to the given size. Helper: convert a center point and width/height vector to a rect object. ` -geometry.rect_point_inside[prosperon.DOC] = ` +geometry.rect_point_inside[cell.DOC] = ` :param rect: A rectangle {x,y,w,h}. :param point: A 2D point [px, py]. :return: True if the point lies inside the rectangle, otherwise false. ` -geometry.rect_pos[prosperon.DOC] = ` +geometry.rect_pos[cell.DOC] = ` :param rect: A rectangle {x,y,w,h}. :return: A 2D vector [x,y] giving the rectangle's position. ` -geometry.rect_move[prosperon.DOC] = ` +geometry.rect_move[cell.DOC] = ` :param rect: A rectangle {x,y,w,h}. :param offset: A 2D vector to add to the rectangle's position. :return: A new rectangle with updated x,y offset. diff --git a/moth/graphics.js b/prosperon/graphics.js similarity index 95% rename from moth/graphics.js rename to prosperon/graphics.js index 6ae12690..fa18e88b 100644 --- a/moth/graphics.js +++ b/prosperon/graphics.js @@ -1,6 +1,6 @@ var graphics = this -graphics[prosperon.DOC] = ` +graphics[cell.DOC] = ` Provides functionality for loading and managing images, fonts, textures, and sprite meshes. Includes both JavaScript and C-implemented routines for creating geometry buffers, performing rectangle packing, etc. @@ -197,7 +197,7 @@ var image = {} image.dimensions = function() { return [this.texture.width, this.texture.height].scale([this.rect[2], this.rect[3]]) } -image.dimensions[prosperon.DOC] = ` +image.dimensions[cell.DOC] = ` :return: A 2D array [width, height] that is the scaled size of this image (texture size * rect size). ` @@ -218,7 +218,7 @@ function pack_into_sheet(images) { graphics.is_image = function(obj) { if (obj.texture && obj.rect) return true } -graphics.is_image[prosperon.DOC] = ` +graphics.is_image[cell.DOC] = ` :param obj: An object to check. :return: True if 'obj' has a .texture and a .rect property, indicating it's an image object. ` @@ -266,7 +266,7 @@ graphics.texture = function texture(path) { cache.set(id, image) return image } -graphics.texture[prosperon.DOC] = ` +graphics.texture[cell.DOC] = ` :param path: A string path to an image file or an already-loaded image object. :return: An image object with {surface, texture, frames?, etc.} depending on the format. Load or retrieve a cached image, converting it into a GPU texture. If 'path' is already an object, it’s returned directly. @@ -280,7 +280,7 @@ graphics.texture.total_size = function() { // Not yet implemented, presumably sum of (texture.width * texture.height * 4) for images in RAM return size } -graphics.texture.total_size[prosperon.DOC] = ` +graphics.texture.total_size[cell.DOC] = ` :return: The total estimated memory size of all cached textures in RAM, in bytes. (Not yet implemented.) ` @@ -289,7 +289,7 @@ graphics.texture.total_vram = function() { // Not yet implemented, presumably sum of GPU memory usage return vram } -graphics.texture.total_vram[prosperon.DOC] = ` +graphics.texture.total_vram[cell.DOC] = ` :return: The total estimated GPU memory usage of all cached textures, in bytes. (Not yet implemented.) ` @@ -305,7 +305,7 @@ graphics.tex_hotreload = function tex_hotreload(file) { merge_objects(oldimg, img, ['surface', 'texture', 'loop', 'time']) } -graphics.tex_hotreload[prosperon.DOC] = ` +graphics.tex_hotreload[cell.DOC] = ` :param file: The file path that was changed on disk. :return: None Reload the image for the given file, updating the cached copy in memory and GPU. @@ -364,7 +364,7 @@ graphics.get_font = function get_font(path, size) { return font } -graphics.get_font[prosperon.DOC] = ` +graphics.get_font[cell.DOC] = ` :param path: A string path to a font file, optionally with ".size" appended. :param size: Pixel size of the font, if not included in 'path'. :return: A font object with .surface and .texture for rendering text. @@ -382,14 +382,14 @@ graphics.queue_sprite_mesh = function(queue) { } return [mesh.pos, mesh.uv, mesh.color, mesh.indices] } -graphics.queue_sprite_mesh[prosperon.DOC] = ` +graphics.queue_sprite_mesh[cell.DOC] = ` :param queue: An array of draw commands, some of which are {type:'sprite'} objects. :return: An array of references to GPU buffers [pos,uv,color,indices]. Builds a single geometry mesh for all sprite-type commands in the queue, storing first_index/num_indices so they can be rendered in one draw call. ` -graphics.make_text_buffer[prosperon.DOC] = ` +graphics.make_text_buffer[cell.DOC] = ` :param text: The string to render. :param rect: A rectangle specifying position and possibly wrapping. :param angle: Rotation angle (unused or optional). @@ -400,7 +400,7 @@ graphics.make_text_buffer[prosperon.DOC] = ` Generate a GPU buffer mesh of text quads for rendering with a font, etc. ` -graphics.rectpack[prosperon.DOC] = ` +graphics.rectpack[cell.DOC] = ` :param width: The width of the area to pack into. :param height: The height of the area to pack into. :param sizes: An array of [w,h] pairs for the rectangles to pack. @@ -408,39 +408,39 @@ graphics.rectpack[prosperon.DOC] = ` Perform a rectangle packing using the stbrp library. Return positions for each rect. ` -graphics.make_texture[prosperon.DOC] = ` +graphics.make_texture[cell.DOC] = ` :param data: Raw image bytes (PNG, JPG, etc.) as an ArrayBuffer. :return: An SDL_Surface object representing the decoded image in RAM, for use with GPU or software rendering. Convert raw image bytes into an SDL_Surface object. ` -graphics.make_gif[prosperon.DOC] = ` +graphics.make_gif[cell.DOC] = ` :param data: An ArrayBuffer containing GIF data. :return: An object with frames[], each frame having its own .surface. Some also have a .texture for GPU use. Load a GIF, returning its frames. If it's a single-frame GIF, the result may have .surface only. ` -graphics.make_aseprite[prosperon.DOC] = ` +graphics.make_aseprite[cell.DOC] = ` :param data: An ArrayBuffer containing Aseprite (ASE) file data. :return: An object containing frames or animations, each with .surface. May also have top-level .surface for a single-layer case. Load an Aseprite/ASE file from an array of bytes, returning frames or animations. ` -graphics.cull_sprites[prosperon.DOC] = ` +graphics.cull_sprites[cell.DOC] = ` :param sprites: An array of sprite objects (each has rect or transform). :param camera: A camera or bounding rectangle defining the view area. :return: A new array of sprites that are visible in the camera's view. Filter an array of sprites to only those visible in the provided camera’s view. ` -graphics.make_font[prosperon.DOC] = ` +graphics.make_font[cell.DOC] = ` :param data: TTF/OTF file data as an ArrayBuffer. :param size: Pixel size for rendering glyphs. :return: A font object with surface, texture, and glyph data, for text rendering with make_text_buffer. Load a font from TTF/OTF data at the given size. ` -graphics.make_line_prim[prosperon.DOC] = ` +graphics.make_line_prim[cell.DOC] = ` :param points: An array of [x,y] points forming the line. :param thickness: The thickness (width) of the polyline. :param startCap: (Unused) Possibly the type of cap for the start. diff --git a/moth/icons/moon.gif b/prosperon/icons/moon.gif similarity index 100% rename from moth/icons/moon.gif rename to prosperon/icons/moon.gif diff --git a/moth/icons/no_tex.gif b/prosperon/icons/no_tex.gif similarity index 100% rename from moth/icons/no_tex.gif rename to prosperon/icons/no_tex.gif diff --git a/moth/icons_dev/airplane.png b/prosperon/icons_dev/airplane.png similarity index 100% rename from moth/icons_dev/airplane.png rename to prosperon/icons_dev/airplane.png diff --git a/moth/icons_dev/ak47.png b/prosperon/icons_dev/ak47.png similarity index 100% rename from moth/icons_dev/ak47.png rename to prosperon/icons_dev/ak47.png diff --git a/moth/icons_dev/amputation.png b/prosperon/icons_dev/amputation.png similarity index 100% rename from moth/icons_dev/amputation.png rename to prosperon/icons_dev/amputation.png diff --git a/moth/icons_dev/ant.png b/prosperon/icons_dev/ant.png similarity index 100% rename from moth/icons_dev/ant.png rename to prosperon/icons_dev/ant.png diff --git a/moth/icons_dev/archer.png b/prosperon/icons_dev/archer.png similarity index 100% rename from moth/icons_dev/archer.png rename to prosperon/icons_dev/archer.png diff --git a/moth/icons_dev/armadillo.png b/prosperon/icons_dev/armadillo.png similarity index 100% rename from moth/icons_dev/armadillo.png rename to prosperon/icons_dev/armadillo.png diff --git a/moth/icons_dev/atom.png b/prosperon/icons_dev/atom.png similarity index 100% rename from moth/icons_dev/atom.png rename to prosperon/icons_dev/atom.png diff --git a/moth/icons_dev/banana.png b/prosperon/icons_dev/banana.png similarity index 100% rename from moth/icons_dev/banana.png rename to prosperon/icons_dev/banana.png diff --git a/moth/icons_dev/bank.png b/prosperon/icons_dev/bank.png similarity index 100% rename from moth/icons_dev/bank.png rename to prosperon/icons_dev/bank.png diff --git a/moth/icons_dev/banknote.png b/prosperon/icons_dev/banknote.png similarity index 100% rename from moth/icons_dev/banknote.png rename to prosperon/icons_dev/banknote.png diff --git a/moth/icons_dev/barn.png b/prosperon/icons_dev/barn.png similarity index 100% rename from moth/icons_dev/barn.png rename to prosperon/icons_dev/barn.png diff --git a/moth/icons_dev/barrel.png b/prosperon/icons_dev/barrel.png similarity index 100% rename from moth/icons_dev/barrel.png rename to prosperon/icons_dev/barrel.png diff --git a/moth/icons_dev/basket.png b/prosperon/icons_dev/basket.png similarity index 100% rename from moth/icons_dev/basket.png rename to prosperon/icons_dev/basket.png diff --git a/moth/icons_dev/bat.png b/prosperon/icons_dev/bat.png similarity index 100% rename from moth/icons_dev/bat.png rename to prosperon/icons_dev/bat.png diff --git a/moth/icons_dev/bed.png b/prosperon/icons_dev/bed.png similarity index 100% rename from moth/icons_dev/bed.png rename to prosperon/icons_dev/bed.png diff --git a/moth/icons_dev/belt.png b/prosperon/icons_dev/belt.png similarity index 100% rename from moth/icons_dev/belt.png rename to prosperon/icons_dev/belt.png diff --git a/moth/icons_dev/boar.png b/prosperon/icons_dev/boar.png similarity index 100% rename from moth/icons_dev/boar.png rename to prosperon/icons_dev/boar.png diff --git a/moth/icons_dev/broom.png b/prosperon/icons_dev/broom.png similarity index 100% rename from moth/icons_dev/broom.png rename to prosperon/icons_dev/broom.png diff --git a/moth/icons_dev/cabin.png b/prosperon/icons_dev/cabin.png similarity index 100% rename from moth/icons_dev/cabin.png rename to prosperon/icons_dev/cabin.png diff --git a/moth/icons_dev/card-10-clubs.png b/prosperon/icons_dev/card-10-clubs.png similarity index 100% rename from moth/icons_dev/card-10-clubs.png rename to prosperon/icons_dev/card-10-clubs.png diff --git a/moth/icons_dev/card-10-diamonds.png b/prosperon/icons_dev/card-10-diamonds.png similarity index 100% rename from moth/icons_dev/card-10-diamonds.png rename to prosperon/icons_dev/card-10-diamonds.png diff --git a/moth/icons_dev/card-10-hearts.png b/prosperon/icons_dev/card-10-hearts.png similarity index 100% rename from moth/icons_dev/card-10-hearts.png rename to prosperon/icons_dev/card-10-hearts.png diff --git a/moth/icons_dev/card-10-spades.png b/prosperon/icons_dev/card-10-spades.png similarity index 100% rename from moth/icons_dev/card-10-spades.png rename to prosperon/icons_dev/card-10-spades.png diff --git a/moth/icons_dev/card-2-clubs.png b/prosperon/icons_dev/card-2-clubs.png similarity index 100% rename from moth/icons_dev/card-2-clubs.png rename to prosperon/icons_dev/card-2-clubs.png diff --git a/moth/icons_dev/card-2-diamonds.png b/prosperon/icons_dev/card-2-diamonds.png similarity index 100% rename from moth/icons_dev/card-2-diamonds.png rename to prosperon/icons_dev/card-2-diamonds.png diff --git a/moth/icons_dev/card-2-hearts.png b/prosperon/icons_dev/card-2-hearts.png similarity index 100% rename from moth/icons_dev/card-2-hearts.png rename to prosperon/icons_dev/card-2-hearts.png diff --git a/moth/icons_dev/card-2-spades.png b/prosperon/icons_dev/card-2-spades.png similarity index 100% rename from moth/icons_dev/card-2-spades.png rename to prosperon/icons_dev/card-2-spades.png diff --git a/moth/icons_dev/card-3-clubs.png b/prosperon/icons_dev/card-3-clubs.png similarity index 100% rename from moth/icons_dev/card-3-clubs.png rename to prosperon/icons_dev/card-3-clubs.png diff --git a/moth/icons_dev/card-3-diamonds.png b/prosperon/icons_dev/card-3-diamonds.png similarity index 100% rename from moth/icons_dev/card-3-diamonds.png rename to prosperon/icons_dev/card-3-diamonds.png diff --git a/moth/icons_dev/card-3-hearts.png b/prosperon/icons_dev/card-3-hearts.png similarity index 100% rename from moth/icons_dev/card-3-hearts.png rename to prosperon/icons_dev/card-3-hearts.png diff --git a/moth/icons_dev/card-3-spades.png b/prosperon/icons_dev/card-3-spades.png similarity index 100% rename from moth/icons_dev/card-3-spades.png rename to prosperon/icons_dev/card-3-spades.png diff --git a/moth/icons_dev/card-4-clubs.png b/prosperon/icons_dev/card-4-clubs.png similarity index 100% rename from moth/icons_dev/card-4-clubs.png rename to prosperon/icons_dev/card-4-clubs.png diff --git a/moth/icons_dev/card-4-diamonds.png b/prosperon/icons_dev/card-4-diamonds.png similarity index 100% rename from moth/icons_dev/card-4-diamonds.png rename to prosperon/icons_dev/card-4-diamonds.png diff --git a/moth/icons_dev/card-4-hearts.png b/prosperon/icons_dev/card-4-hearts.png similarity index 100% rename from moth/icons_dev/card-4-hearts.png rename to prosperon/icons_dev/card-4-hearts.png diff --git a/moth/icons_dev/card-4-spades.png b/prosperon/icons_dev/card-4-spades.png similarity index 100% rename from moth/icons_dev/card-4-spades.png rename to prosperon/icons_dev/card-4-spades.png diff --git a/moth/icons_dev/card-5-clubs.png b/prosperon/icons_dev/card-5-clubs.png similarity index 100% rename from moth/icons_dev/card-5-clubs.png rename to prosperon/icons_dev/card-5-clubs.png diff --git a/moth/icons_dev/card-5-diamonds.png b/prosperon/icons_dev/card-5-diamonds.png similarity index 100% rename from moth/icons_dev/card-5-diamonds.png rename to prosperon/icons_dev/card-5-diamonds.png diff --git a/moth/icons_dev/card-5-hearts.png b/prosperon/icons_dev/card-5-hearts.png similarity index 100% rename from moth/icons_dev/card-5-hearts.png rename to prosperon/icons_dev/card-5-hearts.png diff --git a/moth/icons_dev/card-5-spades.png b/prosperon/icons_dev/card-5-spades.png similarity index 100% rename from moth/icons_dev/card-5-spades.png rename to prosperon/icons_dev/card-5-spades.png diff --git a/moth/icons_dev/card-6-clubs.png b/prosperon/icons_dev/card-6-clubs.png similarity index 100% rename from moth/icons_dev/card-6-clubs.png rename to prosperon/icons_dev/card-6-clubs.png diff --git a/moth/icons_dev/card-6-diamonds.png b/prosperon/icons_dev/card-6-diamonds.png similarity index 100% rename from moth/icons_dev/card-6-diamonds.png rename to prosperon/icons_dev/card-6-diamonds.png diff --git a/moth/icons_dev/card-6-hearts.png b/prosperon/icons_dev/card-6-hearts.png similarity index 100% rename from moth/icons_dev/card-6-hearts.png rename to prosperon/icons_dev/card-6-hearts.png diff --git a/moth/icons_dev/card-6-spades.png b/prosperon/icons_dev/card-6-spades.png similarity index 100% rename from moth/icons_dev/card-6-spades.png rename to prosperon/icons_dev/card-6-spades.png diff --git a/moth/icons_dev/card-7-clubs.png b/prosperon/icons_dev/card-7-clubs.png similarity index 100% rename from moth/icons_dev/card-7-clubs.png rename to prosperon/icons_dev/card-7-clubs.png diff --git a/moth/icons_dev/card-7-diamonds.png b/prosperon/icons_dev/card-7-diamonds.png similarity index 100% rename from moth/icons_dev/card-7-diamonds.png rename to prosperon/icons_dev/card-7-diamonds.png diff --git a/moth/icons_dev/card-7-hearts.png b/prosperon/icons_dev/card-7-hearts.png similarity index 100% rename from moth/icons_dev/card-7-hearts.png rename to prosperon/icons_dev/card-7-hearts.png diff --git a/moth/icons_dev/card-7-spades.png b/prosperon/icons_dev/card-7-spades.png similarity index 100% rename from moth/icons_dev/card-7-spades.png rename to prosperon/icons_dev/card-7-spades.png diff --git a/moth/icons_dev/card-8-clubs.png b/prosperon/icons_dev/card-8-clubs.png similarity index 100% rename from moth/icons_dev/card-8-clubs.png rename to prosperon/icons_dev/card-8-clubs.png diff --git a/moth/icons_dev/card-8-diamonds.png b/prosperon/icons_dev/card-8-diamonds.png similarity index 100% rename from moth/icons_dev/card-8-diamonds.png rename to prosperon/icons_dev/card-8-diamonds.png diff --git a/moth/icons_dev/card-8-hearts.png b/prosperon/icons_dev/card-8-hearts.png similarity index 100% rename from moth/icons_dev/card-8-hearts.png rename to prosperon/icons_dev/card-8-hearts.png diff --git a/moth/icons_dev/card-8-spades.png b/prosperon/icons_dev/card-8-spades.png similarity index 100% rename from moth/icons_dev/card-8-spades.png rename to prosperon/icons_dev/card-8-spades.png diff --git a/moth/icons_dev/card-9-clubs.png b/prosperon/icons_dev/card-9-clubs.png similarity index 100% rename from moth/icons_dev/card-9-clubs.png rename to prosperon/icons_dev/card-9-clubs.png diff --git a/moth/icons_dev/card-9-diamonds.png b/prosperon/icons_dev/card-9-diamonds.png similarity index 100% rename from moth/icons_dev/card-9-diamonds.png rename to prosperon/icons_dev/card-9-diamonds.png diff --git a/moth/icons_dev/card-9-hearts.png b/prosperon/icons_dev/card-9-hearts.png similarity index 100% rename from moth/icons_dev/card-9-hearts.png rename to prosperon/icons_dev/card-9-hearts.png diff --git a/moth/icons_dev/card-9-spades.png b/prosperon/icons_dev/card-9-spades.png similarity index 100% rename from moth/icons_dev/card-9-spades.png rename to prosperon/icons_dev/card-9-spades.png diff --git a/moth/icons_dev/card-ace-clubs.png b/prosperon/icons_dev/card-ace-clubs.png similarity index 100% rename from moth/icons_dev/card-ace-clubs.png rename to prosperon/icons_dev/card-ace-clubs.png diff --git a/moth/icons_dev/card-ace-diamonds.png b/prosperon/icons_dev/card-ace-diamonds.png similarity index 100% rename from moth/icons_dev/card-ace-diamonds.png rename to prosperon/icons_dev/card-ace-diamonds.png diff --git a/moth/icons_dev/card-ace-hearts.png b/prosperon/icons_dev/card-ace-hearts.png similarity index 100% rename from moth/icons_dev/card-ace-hearts.png rename to prosperon/icons_dev/card-ace-hearts.png diff --git a/moth/icons_dev/card-ace-spades.png b/prosperon/icons_dev/card-ace-spades.png similarity index 100% rename from moth/icons_dev/card-ace-spades.png rename to prosperon/icons_dev/card-ace-spades.png diff --git a/moth/icons_dev/card-discard.png b/prosperon/icons_dev/card-discard.png similarity index 100% rename from moth/icons_dev/card-discard.png rename to prosperon/icons_dev/card-discard.png diff --git a/moth/icons_dev/card-draw.png b/prosperon/icons_dev/card-draw.png similarity index 100% rename from moth/icons_dev/card-draw.png rename to prosperon/icons_dev/card-draw.png diff --git a/moth/icons_dev/card-jack-clubs.png b/prosperon/icons_dev/card-jack-clubs.png similarity index 100% rename from moth/icons_dev/card-jack-clubs.png rename to prosperon/icons_dev/card-jack-clubs.png diff --git a/moth/icons_dev/card-jack-diamonds.png b/prosperon/icons_dev/card-jack-diamonds.png similarity index 100% rename from moth/icons_dev/card-jack-diamonds.png rename to prosperon/icons_dev/card-jack-diamonds.png diff --git a/moth/icons_dev/card-jack-hearts.png b/prosperon/icons_dev/card-jack-hearts.png similarity index 100% rename from moth/icons_dev/card-jack-hearts.png rename to prosperon/icons_dev/card-jack-hearts.png diff --git a/moth/icons_dev/card-jack-spades.png b/prosperon/icons_dev/card-jack-spades.png similarity index 100% rename from moth/icons_dev/card-jack-spades.png rename to prosperon/icons_dev/card-jack-spades.png diff --git a/moth/icons_dev/card-joker.png b/prosperon/icons_dev/card-joker.png similarity index 100% rename from moth/icons_dev/card-joker.png rename to prosperon/icons_dev/card-joker.png diff --git a/moth/icons_dev/card-king-clubs.png b/prosperon/icons_dev/card-king-clubs.png similarity index 100% rename from moth/icons_dev/card-king-clubs.png rename to prosperon/icons_dev/card-king-clubs.png diff --git a/moth/icons_dev/card-king-diamonds.png b/prosperon/icons_dev/card-king-diamonds.png similarity index 100% rename from moth/icons_dev/card-king-diamonds.png rename to prosperon/icons_dev/card-king-diamonds.png diff --git a/moth/icons_dev/card-king-hearts.png b/prosperon/icons_dev/card-king-hearts.png similarity index 100% rename from moth/icons_dev/card-king-hearts.png rename to prosperon/icons_dev/card-king-hearts.png diff --git a/moth/icons_dev/card-king-spades.png b/prosperon/icons_dev/card-king-spades.png similarity index 100% rename from moth/icons_dev/card-king-spades.png rename to prosperon/icons_dev/card-king-spades.png diff --git a/moth/icons_dev/card-pick.png b/prosperon/icons_dev/card-pick.png similarity index 100% rename from moth/icons_dev/card-pick.png rename to prosperon/icons_dev/card-pick.png diff --git a/moth/icons_dev/card-queen-clubs.png b/prosperon/icons_dev/card-queen-clubs.png similarity index 100% rename from moth/icons_dev/card-queen-clubs.png rename to prosperon/icons_dev/card-queen-clubs.png diff --git a/moth/icons_dev/card-queen-diamonds.png b/prosperon/icons_dev/card-queen-diamonds.png similarity index 100% rename from moth/icons_dev/card-queen-diamonds.png rename to prosperon/icons_dev/card-queen-diamonds.png diff --git a/moth/icons_dev/card-queen-hearts.png b/prosperon/icons_dev/card-queen-hearts.png similarity index 100% rename from moth/icons_dev/card-queen-hearts.png rename to prosperon/icons_dev/card-queen-hearts.png diff --git a/moth/icons_dev/card-queen-spades.png b/prosperon/icons_dev/card-queen-spades.png similarity index 100% rename from moth/icons_dev/card-queen-spades.png rename to prosperon/icons_dev/card-queen-spades.png diff --git a/moth/icons_dev/card-random.png b/prosperon/icons_dev/card-random.png similarity index 100% rename from moth/icons_dev/card-random.png rename to prosperon/icons_dev/card-random.png diff --git a/moth/icons_dev/chess-bishop.png b/prosperon/icons_dev/chess-bishop.png similarity index 100% rename from moth/icons_dev/chess-bishop.png rename to prosperon/icons_dev/chess-bishop.png diff --git a/moth/icons_dev/chess-king.png b/prosperon/icons_dev/chess-king.png similarity index 100% rename from moth/icons_dev/chess-king.png rename to prosperon/icons_dev/chess-king.png diff --git a/moth/icons_dev/chess-knight.png b/prosperon/icons_dev/chess-knight.png similarity index 100% rename from moth/icons_dev/chess-knight.png rename to prosperon/icons_dev/chess-knight.png diff --git a/moth/icons_dev/chess-pawn.png b/prosperon/icons_dev/chess-pawn.png similarity index 100% rename from moth/icons_dev/chess-pawn.png rename to prosperon/icons_dev/chess-pawn.png diff --git a/moth/icons_dev/chess-queen.png b/prosperon/icons_dev/chess-queen.png similarity index 100% rename from moth/icons_dev/chess-queen.png rename to prosperon/icons_dev/chess-queen.png diff --git a/moth/icons_dev/chess-rook.png b/prosperon/icons_dev/chess-rook.png similarity index 100% rename from moth/icons_dev/chess-rook.png rename to prosperon/icons_dev/chess-rook.png diff --git a/moth/icons_dev/chicken.png b/prosperon/icons_dev/chicken.png similarity index 100% rename from moth/icons_dev/chicken.png rename to prosperon/icons_dev/chicken.png diff --git a/moth/icons_dev/clarinet.png b/prosperon/icons_dev/clarinet.png similarity index 100% rename from moth/icons_dev/clarinet.png rename to prosperon/icons_dev/clarinet.png diff --git a/moth/icons_dev/cloak.png b/prosperon/icons_dev/cloak.png similarity index 100% rename from moth/icons_dev/cloak.png rename to prosperon/icons_dev/cloak.png diff --git a/moth/icons_dev/clown.png b/prosperon/icons_dev/clown.png similarity index 100% rename from moth/icons_dev/clown.png rename to prosperon/icons_dev/clown.png diff --git a/moth/icons_dev/coins.png b/prosperon/icons_dev/coins.png similarity index 100% rename from moth/icons_dev/coins.png rename to prosperon/icons_dev/coins.png diff --git a/moth/icons_dev/compass.png b/prosperon/icons_dev/compass.png similarity index 100% rename from moth/icons_dev/compass.png rename to prosperon/icons_dev/compass.png diff --git a/moth/icons_dev/cow.png b/prosperon/icons_dev/cow.png similarity index 100% rename from moth/icons_dev/cow.png rename to prosperon/icons_dev/cow.png diff --git a/moth/icons_dev/crossed-swords.png b/prosperon/icons_dev/crossed-swords.png similarity index 100% rename from moth/icons_dev/crossed-swords.png rename to prosperon/icons_dev/crossed-swords.png diff --git a/moth/icons_dev/deer.png b/prosperon/icons_dev/deer.png similarity index 100% rename from moth/icons_dev/deer.png rename to prosperon/icons_dev/deer.png diff --git a/moth/icons_dev/dice.png b/prosperon/icons_dev/dice.png similarity index 100% rename from moth/icons_dev/dice.png rename to prosperon/icons_dev/dice.png diff --git a/moth/icons_dev/dodo.png b/prosperon/icons_dev/dodo.png similarity index 100% rename from moth/icons_dev/dodo.png rename to prosperon/icons_dev/dodo.png diff --git a/moth/icons_dev/donkey.png b/prosperon/icons_dev/donkey.png similarity index 100% rename from moth/icons_dev/donkey.png rename to prosperon/icons_dev/donkey.png diff --git a/moth/icons_dev/door.png b/prosperon/icons_dev/door.png similarity index 100% rename from moth/icons_dev/door.png rename to prosperon/icons_dev/door.png diff --git a/moth/icons_dev/duck.png b/prosperon/icons_dev/duck.png similarity index 100% rename from moth/icons_dev/duck.png rename to prosperon/icons_dev/duck.png diff --git a/moth/icons_dev/dynamite.png b/prosperon/icons_dev/dynamite.png similarity index 100% rename from moth/icons_dev/dynamite.png rename to prosperon/icons_dev/dynamite.png diff --git a/moth/icons_dev/f-clef.png b/prosperon/icons_dev/f-clef.png similarity index 100% rename from moth/icons_dev/f-clef.png rename to prosperon/icons_dev/f-clef.png diff --git a/moth/icons_dev/fairy.png b/prosperon/icons_dev/fairy.png similarity index 100% rename from moth/icons_dev/fairy.png rename to prosperon/icons_dev/fairy.png diff --git a/moth/icons_dev/fangs.png b/prosperon/icons_dev/fangs.png similarity index 100% rename from moth/icons_dev/fangs.png rename to prosperon/icons_dev/fangs.png diff --git a/moth/icons_dev/fez.png b/prosperon/icons_dev/fez.png similarity index 100% rename from moth/icons_dev/fez.png rename to prosperon/icons_dev/fez.png diff --git a/moth/icons_dev/files.png b/prosperon/icons_dev/files.png similarity index 100% rename from moth/icons_dev/files.png rename to prosperon/icons_dev/files.png diff --git a/moth/icons_dev/finch.png b/prosperon/icons_dev/finch.png similarity index 100% rename from moth/icons_dev/finch.png rename to prosperon/icons_dev/finch.png diff --git a/moth/icons_dev/fire.png b/prosperon/icons_dev/fire.png similarity index 100% rename from moth/icons_dev/fire.png rename to prosperon/icons_dev/fire.png diff --git a/moth/icons_dev/flashlight.png b/prosperon/icons_dev/flashlight.png similarity index 100% rename from moth/icons_dev/flashlight.png rename to prosperon/icons_dev/flashlight.png diff --git a/moth/icons_dev/footsteps.png b/prosperon/icons_dev/footsteps.png similarity index 100% rename from moth/icons_dev/footsteps.png rename to prosperon/icons_dev/footsteps.png diff --git a/moth/icons_dev/forest.png b/prosperon/icons_dev/forest.png similarity index 100% rename from moth/icons_dev/forest.png rename to prosperon/icons_dev/forest.png diff --git a/moth/icons_dev/fox.png b/prosperon/icons_dev/fox.png similarity index 100% rename from moth/icons_dev/fox.png rename to prosperon/icons_dev/fox.png diff --git a/moth/icons_dev/fuji.png b/prosperon/icons_dev/fuji.png similarity index 100% rename from moth/icons_dev/fuji.png rename to prosperon/icons_dev/fuji.png diff --git a/moth/icons_dev/g-clef.png b/prosperon/icons_dev/g-clef.png similarity index 100% rename from moth/icons_dev/g-clef.png rename to prosperon/icons_dev/g-clef.png diff --git a/moth/icons_dev/gargoyle.png b/prosperon/icons_dev/gargoyle.png similarity index 100% rename from moth/icons_dev/gargoyle.png rename to prosperon/icons_dev/gargoyle.png diff --git a/moth/icons_dev/garlic.png b/prosperon/icons_dev/garlic.png similarity index 100% rename from moth/icons_dev/garlic.png rename to prosperon/icons_dev/garlic.png diff --git a/moth/icons_dev/gasmask.png b/prosperon/icons_dev/gasmask.png similarity index 100% rename from moth/icons_dev/gasmask.png rename to prosperon/icons_dev/gasmask.png diff --git a/moth/icons_dev/gate.png b/prosperon/icons_dev/gate.png similarity index 100% rename from moth/icons_dev/gate.png rename to prosperon/icons_dev/gate.png diff --git a/moth/icons_dev/goblin.png b/prosperon/icons_dev/goblin.png similarity index 100% rename from moth/icons_dev/goblin.png rename to prosperon/icons_dev/goblin.png diff --git a/moth/icons_dev/goose.png b/prosperon/icons_dev/goose.png similarity index 100% rename from moth/icons_dev/goose.png rename to prosperon/icons_dev/goose.png diff --git a/moth/icons_dev/gorilla.png b/prosperon/icons_dev/gorilla.png similarity index 100% rename from moth/icons_dev/gorilla.png rename to prosperon/icons_dev/gorilla.png diff --git a/moth/icons_dev/grass.png b/prosperon/icons_dev/grass.png similarity index 100% rename from moth/icons_dev/grass.png rename to prosperon/icons_dev/grass.png diff --git a/moth/icons_dev/harp.png b/prosperon/icons_dev/harp.png similarity index 100% rename from moth/icons_dev/harp.png rename to prosperon/icons_dev/harp.png diff --git a/moth/icons_dev/hatchet.png b/prosperon/icons_dev/hatchet.png similarity index 100% rename from moth/icons_dev/hatchet.png rename to prosperon/icons_dev/hatchet.png diff --git a/moth/icons_dev/heart.png b/prosperon/icons_dev/heart.png similarity index 100% rename from moth/icons_dev/heart.png rename to prosperon/icons_dev/heart.png diff --git a/moth/icons_dev/hedgehog.png b/prosperon/icons_dev/hedgehog.png similarity index 100% rename from moth/icons_dev/hedgehog.png rename to prosperon/icons_dev/hedgehog.png diff --git a/moth/icons_dev/heron.png b/prosperon/icons_dev/heron.png similarity index 100% rename from moth/icons_dev/heron.png rename to prosperon/icons_dev/heron.png diff --git a/moth/icons_dev/hook.png b/prosperon/icons_dev/hook.png similarity index 100% rename from moth/icons_dev/hook.png rename to prosperon/icons_dev/hook.png diff --git a/moth/icons_dev/hotdog.png b/prosperon/icons_dev/hotdog.png similarity index 100% rename from moth/icons_dev/hotdog.png rename to prosperon/icons_dev/hotdog.png diff --git a/moth/icons_dev/info.png b/prosperon/icons_dev/info.png similarity index 100% rename from moth/icons_dev/info.png rename to prosperon/icons_dev/info.png diff --git a/moth/icons_dev/key.png b/prosperon/icons_dev/key.png similarity index 100% rename from moth/icons_dev/key.png rename to prosperon/icons_dev/key.png diff --git a/moth/icons_dev/kite.png b/prosperon/icons_dev/kite.png similarity index 100% rename from moth/icons_dev/kite.png rename to prosperon/icons_dev/kite.png diff --git a/moth/icons_dev/ladder.png b/prosperon/icons_dev/ladder.png similarity index 100% rename from moth/icons_dev/ladder.png rename to prosperon/icons_dev/ladder.png diff --git a/moth/icons_dev/lambda.png b/prosperon/icons_dev/lambda.png similarity index 100% rename from moth/icons_dev/lambda.png rename to prosperon/icons_dev/lambda.png diff --git a/moth/icons_dev/led.png b/prosperon/icons_dev/led.png similarity index 100% rename from moth/icons_dev/led.png rename to prosperon/icons_dev/led.png diff --git a/moth/icons_dev/lemon.png b/prosperon/icons_dev/lemon.png similarity index 100% rename from moth/icons_dev/lemon.png rename to prosperon/icons_dev/lemon.png diff --git a/moth/icons_dev/log.png b/prosperon/icons_dev/log.png similarity index 100% rename from moth/icons_dev/log.png rename to prosperon/icons_dev/log.png diff --git a/moth/icons_dev/maracas.png b/prosperon/icons_dev/maracas.png similarity index 100% rename from moth/icons_dev/maracas.png rename to prosperon/icons_dev/maracas.png diff --git a/moth/icons_dev/moai.png b/prosperon/icons_dev/moai.png similarity index 100% rename from moth/icons_dev/moai.png rename to prosperon/icons_dev/moai.png diff --git a/moth/icons_dev/mole.png b/prosperon/icons_dev/mole.png similarity index 100% rename from moth/icons_dev/mole.png rename to prosperon/icons_dev/mole.png diff --git a/moth/icons_dev/mouse.png b/prosperon/icons_dev/mouse.png similarity index 100% rename from moth/icons_dev/mouse.png rename to prosperon/icons_dev/mouse.png diff --git a/moth/icons_dev/move.png b/prosperon/icons_dev/move.png similarity index 100% rename from moth/icons_dev/move.png rename to prosperon/icons_dev/move.png diff --git a/moth/icons_dev/necklace.png b/prosperon/icons_dev/necklace.png similarity index 100% rename from moth/icons_dev/necklace.png rename to prosperon/icons_dev/necklace.png diff --git a/moth/icons_dev/ocarina.png b/prosperon/icons_dev/ocarina.png similarity index 100% rename from moth/icons_dev/ocarina.png rename to prosperon/icons_dev/ocarina.png diff --git a/moth/icons_dev/panflute.png b/prosperon/icons_dev/panflute.png similarity index 100% rename from moth/icons_dev/panflute.png rename to prosperon/icons_dev/panflute.png diff --git a/moth/icons_dev/pangolin.png b/prosperon/icons_dev/pangolin.png similarity index 100% rename from moth/icons_dev/pangolin.png rename to prosperon/icons_dev/pangolin.png diff --git a/moth/icons_dev/pc.png b/prosperon/icons_dev/pc.png similarity index 100% rename from moth/icons_dev/pc.png rename to prosperon/icons_dev/pc.png diff --git a/moth/icons_dev/phone.png b/prosperon/icons_dev/phone.png similarity index 100% rename from moth/icons_dev/phone.png rename to prosperon/icons_dev/phone.png diff --git a/moth/icons_dev/piechart.png b/prosperon/icons_dev/piechart.png similarity index 100% rename from moth/icons_dev/piechart.png rename to prosperon/icons_dev/piechart.png diff --git a/moth/icons_dev/pin.png b/prosperon/icons_dev/pin.png similarity index 100% rename from moth/icons_dev/pin.png rename to prosperon/icons_dev/pin.png diff --git a/moth/icons_dev/pizza.png b/prosperon/icons_dev/pizza.png similarity index 100% rename from moth/icons_dev/pizza.png rename to prosperon/icons_dev/pizza.png diff --git a/moth/icons_dev/poi.png b/prosperon/icons_dev/poi.png similarity index 100% rename from moth/icons_dev/poi.png rename to prosperon/icons_dev/poi.png diff --git a/moth/icons_dev/polarbear.png b/prosperon/icons_dev/polarbear.png similarity index 100% rename from moth/icons_dev/polarbear.png rename to prosperon/icons_dev/polarbear.png diff --git a/moth/icons_dev/quiver.png b/prosperon/icons_dev/quiver.png similarity index 100% rename from moth/icons_dev/quiver.png rename to prosperon/icons_dev/quiver.png diff --git a/moth/icons_dev/rabbit.png b/prosperon/icons_dev/rabbit.png similarity index 100% rename from moth/icons_dev/rabbit.png rename to prosperon/icons_dev/rabbit.png diff --git a/moth/icons_dev/raft.png b/prosperon/icons_dev/raft.png similarity index 100% rename from moth/icons_dev/raft.png rename to prosperon/icons_dev/raft.png diff --git a/moth/icons_dev/random.png b/prosperon/icons_dev/random.png similarity index 100% rename from moth/icons_dev/random.png rename to prosperon/icons_dev/random.png diff --git a/moth/icons_dev/rat.png b/prosperon/icons_dev/rat.png similarity index 100% rename from moth/icons_dev/rat.png rename to prosperon/icons_dev/rat.png diff --git a/moth/icons_dev/rattlesnake.png b/prosperon/icons_dev/rattlesnake.png similarity index 100% rename from moth/icons_dev/rattlesnake.png rename to prosperon/icons_dev/rattlesnake.png diff --git a/moth/icons_dev/resize.png b/prosperon/icons_dev/resize.png similarity index 100% rename from moth/icons_dev/resize.png rename to prosperon/icons_dev/resize.png diff --git a/moth/icons_dev/revolver.png b/prosperon/icons_dev/revolver.png similarity index 100% rename from moth/icons_dev/revolver.png rename to prosperon/icons_dev/revolver.png diff --git a/moth/icons_dev/ring.png b/prosperon/icons_dev/ring.png similarity index 100% rename from moth/icons_dev/ring.png rename to prosperon/icons_dev/ring.png diff --git a/moth/icons_dev/rooster.png b/prosperon/icons_dev/rooster.png similarity index 100% rename from moth/icons_dev/rooster.png rename to prosperon/icons_dev/rooster.png diff --git a/moth/icons_dev/rss.png b/prosperon/icons_dev/rss.png similarity index 100% rename from moth/icons_dev/rss.png rename to prosperon/icons_dev/rss.png diff --git a/moth/icons_dev/rupee.png b/prosperon/icons_dev/rupee.png similarity index 100% rename from moth/icons_dev/rupee.png rename to prosperon/icons_dev/rupee.png diff --git a/moth/icons_dev/sausage.png b/prosperon/icons_dev/sausage.png similarity index 100% rename from moth/icons_dev/sausage.png rename to prosperon/icons_dev/sausage.png diff --git a/moth/icons_dev/scorpion.png b/prosperon/icons_dev/scorpion.png similarity index 100% rename from moth/icons_dev/scorpion.png rename to prosperon/icons_dev/scorpion.png diff --git a/moth/icons_dev/screw.png b/prosperon/icons_dev/screw.png similarity index 100% rename from moth/icons_dev/screw.png rename to prosperon/icons_dev/screw.png diff --git a/moth/icons_dev/shamrock.png b/prosperon/icons_dev/shamrock.png similarity index 100% rename from moth/icons_dev/shamrock.png rename to prosperon/icons_dev/shamrock.png diff --git a/moth/icons_dev/sheep.png b/prosperon/icons_dev/sheep.png similarity index 100% rename from moth/icons_dev/sheep.png rename to prosperon/icons_dev/sheep.png diff --git a/moth/icons_dev/shirt.png b/prosperon/icons_dev/shirt.png similarity index 100% rename from moth/icons_dev/shirt.png rename to prosperon/icons_dev/shirt.png diff --git a/moth/icons_dev/shop.png b/prosperon/icons_dev/shop.png similarity index 100% rename from moth/icons_dev/shop.png rename to prosperon/icons_dev/shop.png diff --git a/moth/icons_dev/shuriken.png b/prosperon/icons_dev/shuriken.png similarity index 100% rename from moth/icons_dev/shuriken.png rename to prosperon/icons_dev/shuriken.png diff --git a/moth/icons_dev/sloth.png b/prosperon/icons_dev/sloth.png similarity index 100% rename from moth/icons_dev/sloth.png rename to prosperon/icons_dev/sloth.png diff --git a/moth/icons_dev/snail.png b/prosperon/icons_dev/snail.png similarity index 100% rename from moth/icons_dev/snail.png rename to prosperon/icons_dev/snail.png diff --git a/moth/icons_dev/snake.png b/prosperon/icons_dev/snake.png similarity index 100% rename from moth/icons_dev/snake.png rename to prosperon/icons_dev/snake.png diff --git a/moth/icons_dev/soap.png b/prosperon/icons_dev/soap.png similarity index 100% rename from moth/icons_dev/soap.png rename to prosperon/icons_dev/soap.png diff --git a/moth/icons_dev/sombrero.png b/prosperon/icons_dev/sombrero.png similarity index 100% rename from moth/icons_dev/sombrero.png rename to prosperon/icons_dev/sombrero.png diff --git a/moth/icons_dev/stairs.png b/prosperon/icons_dev/stairs.png similarity index 100% rename from moth/icons_dev/stairs.png rename to prosperon/icons_dev/stairs.png diff --git a/moth/icons_dev/steak.png b/prosperon/icons_dev/steak.png similarity index 100% rename from moth/icons_dev/steak.png rename to prosperon/icons_dev/steak.png diff --git a/moth/icons_dev/tomato.png b/prosperon/icons_dev/tomato.png similarity index 100% rename from moth/icons_dev/tomato.png rename to prosperon/icons_dev/tomato.png diff --git a/moth/icons_dev/trade.png b/prosperon/icons_dev/trade.png similarity index 100% rename from moth/icons_dev/trade.png rename to prosperon/icons_dev/trade.png diff --git a/moth/icons_dev/trombone.png b/prosperon/icons_dev/trombone.png similarity index 100% rename from moth/icons_dev/trombone.png rename to prosperon/icons_dev/trombone.png diff --git a/moth/icons_dev/trousers.png b/prosperon/icons_dev/trousers.png similarity index 100% rename from moth/icons_dev/trousers.png rename to prosperon/icons_dev/trousers.png diff --git a/moth/icons_dev/trumpet.png b/prosperon/icons_dev/trumpet.png similarity index 100% rename from moth/icons_dev/trumpet.png rename to prosperon/icons_dev/trumpet.png diff --git a/moth/icons_dev/tuba.png b/prosperon/icons_dev/tuba.png similarity index 100% rename from moth/icons_dev/tuba.png rename to prosperon/icons_dev/tuba.png diff --git a/moth/icons_dev/tv.png b/prosperon/icons_dev/tv.png similarity index 100% rename from moth/icons_dev/tv.png rename to prosperon/icons_dev/tv.png diff --git a/moth/icons_dev/ufo.png b/prosperon/icons_dev/ufo.png similarity index 100% rename from moth/icons_dev/ufo.png rename to prosperon/icons_dev/ufo.png diff --git a/moth/icons_dev/vial.png b/prosperon/icons_dev/vial.png similarity index 100% rename from moth/icons_dev/vial.png rename to prosperon/icons_dev/vial.png diff --git a/moth/icons_dev/watch.png b/prosperon/icons_dev/watch.png similarity index 100% rename from moth/icons_dev/watch.png rename to prosperon/icons_dev/watch.png diff --git a/moth/icons_dev/waterfall.png b/prosperon/icons_dev/waterfall.png similarity index 100% rename from moth/icons_dev/waterfall.png rename to prosperon/icons_dev/waterfall.png diff --git a/moth/icons_dev/well.png b/prosperon/icons_dev/well.png similarity index 100% rename from moth/icons_dev/well.png rename to prosperon/icons_dev/well.png diff --git a/moth/icons_dev/windmill.png b/prosperon/icons_dev/windmill.png similarity index 100% rename from moth/icons_dev/windmill.png rename to prosperon/icons_dev/windmill.png diff --git a/moth/icons_dev/wizard.png b/prosperon/icons_dev/wizard.png similarity index 100% rename from moth/icons_dev/wizard.png rename to prosperon/icons_dev/wizard.png diff --git a/moth/icons_dev/zipper.png b/prosperon/icons_dev/zipper.png similarity index 100% rename from moth/icons_dev/zipper.png rename to prosperon/icons_dev/zipper.png diff --git a/moth/imgui.js b/prosperon/imgui.js similarity index 62% rename from moth/imgui.js rename to prosperon/imgui.js index f4cc8dae..34e5a192 100644 --- a/moth/imgui.js +++ b/prosperon/imgui.js @@ -101,85 +101,85 @@ if (render_menu) { prosperon.imgui(); }; -imgui.windowpos[prosperon.DOC] = `Return the position of the current ImGui window as an ImVec2. +imgui.windowpos[cell.DOC] = `Return the position of the current ImGui window as an ImVec2. :return: A 2-element array [x, y] representing the top-left corner of the current window in screen coordinates. `; -imgui.plot2pixels[prosperon.DOC] = `Convert a point from plot coordinates to pixel coordinates in the current ImPlot. +imgui.plot2pixels[cell.DOC] = `Convert a point from plot coordinates to pixel coordinates in the current ImPlot. :param coords: A 2-element array [x, y] in plot coordinates. :return: A 2-element array [x, y] in pixel coordinates, mapped from the current ImPlot. `; -imgui.plotpos[prosperon.DOC] = `Return the top-left corner of the current ImPlot region in screen (pixel) coordinates. +imgui.plotpos[cell.DOC] = `Return the top-left corner of the current ImPlot region in screen (pixel) coordinates. :return: A 2-element array [x, y] representing the position of the current ImPlot in screen coordinates. `; -imgui.plotlimits[prosperon.DOC] = `Retrieve the current plot’s axis limits (min/max) for both X and Y axes. +imgui.plotlimits[cell.DOC] = `Retrieve the current plot’s axis limits (min/max) for both X and Y axes. :return: An object { x: { min, max }, y: { min, max } } describing the current plot’s visible axis ranges. `; -imgui.setaxes[prosperon.DOC] = `Switch the active axes in ImPlot (useful if multiple axes exist). +imgui.setaxes[cell.DOC] = `Switch the active axes in ImPlot (useful if multiple axes exist). :param xAxis: The x-axis index (0..2). :param yAxis: The y-axis index (0..2). :return: None `; -imgui.setupaxis[prosperon.DOC] = `Setup the specified axis in the current ImPlot (e.g., for customizing tick labels). +imgui.setupaxis[cell.DOC] = `Setup the specified axis in the current ImPlot (e.g., for customizing tick labels). :param axis: The numeric index of the axis (0..2). :return: None `; -imgui.inplot[prosperon.DOC] = `Check if the given point is within the current ImPlot's visible region. +imgui.inplot[cell.DOC] = `Check if the given point is within the current ImPlot's visible region. :param coords: A 2-element array [x, y] in plot coordinates. :return: True if the point is within the visible plot region, otherwise false. `; -imgui.window[prosperon.DOC] = `Create a new ImGui window with the given title and invoke the callback to render inside it. +imgui.window[cell.DOC] = `Create a new ImGui window with the given title and invoke the callback to render inside it. :param title: The text displayed as the window title. :param callback: A function called to render the contents of the window. :return: A boolean indicating if the window is still active (open) after rendering. `; -imgui.menu[prosperon.DOC] = `Create a new menu entry in a menu bar or menu. The callback is invoked to populate the menu if opened. +imgui.menu[cell.DOC] = `Create a new menu entry in a menu bar or menu. The callback is invoked to populate the menu if opened. :param label: The label of the menu (visible in the menubar). :param callback: A function called to render menu items when the menu is open. :return: None `; -imgui.sameline[prosperon.DOC] = `Place the next widget on the same line, optionally specifying a horizontal offset. +imgui.sameline[cell.DOC] = `Place the next widget on the same line, optionally specifying a horizontal offset. :param offset: A float offset from the current cursor position. If omitted, defaults to 0. :return: None `; -imgui.int[prosperon.DOC] = `Display an integer input box with a label. +imgui.int[cell.DOC] = `Display an integer input box with a label. :param label: The label text for the input. :param value: The initial integer value. :return: The updated integer value after user edits. `; -imgui.pushid[prosperon.DOC] = `Push an integer ID onto the ImGui ID stack. +imgui.pushid[cell.DOC] = `Push an integer ID onto the ImGui ID stack. :param id: An integer used to differentiate widgets/items with the same label. :return: None `; -imgui.popid[prosperon.DOC] = `Pop an ID off the ImGui ID stack. +imgui.popid[cell.DOC] = `Pop an ID off the ImGui ID stack. :return: None `; -imgui.slider[prosperon.DOC] = `Create a float slider (or multi-float sliders if given an array) within the specified range. +imgui.slider[cell.DOC] = `Create a float slider (or multi-float sliders if given an array) within the specified range. :param label: The slider label text. :param value: A single float or an array of floats (e.g., [r,g,b,a]). @@ -188,7 +188,7 @@ imgui.slider[prosperon.DOC] = `Create a float slider (or multi-float sliders if :return: The updated float or array of floats after user adjustment. `; -imgui.intslider[prosperon.DOC] = `Create an integer slider (or multiple integer sliders if given a typed array) in the specified range. +imgui.intslider[cell.DOC] = `Create an integer slider (or multiple integer sliders if given a typed array) in the specified range. :param label: The slider label text. :param value: A single integer or a typed array of integers (for multi-component sliders). @@ -197,19 +197,19 @@ imgui.intslider[prosperon.DOC] = `Create an integer slider (or multiple integer :return: The updated integer or array of integers after user adjustment. `; -imgui.menubar[prosperon.DOC] = `Begin rendering a menubar. The callback is invoked to create menu items. Ends automatically. +imgui.menubar[cell.DOC] = `Begin rendering a menubar. The callback is invoked to create menu items. Ends automatically. :param callback: A function that creates menu items within the menubar. :return: None `; -imgui.mainmenubar[prosperon.DOC] = `Create the main menu bar at the top of the screen. The callback is invoked for populating it. +imgui.mainmenubar[cell.DOC] = `Create the main menu bar at the top of the screen. The callback is invoked for populating it. :param callback: A function to render items in the main menu bar. :return: None `; -imgui.menuitem[prosperon.DOC] = `Create a menu item that can optionally be toggled. If selected, calls the provided callback. +imgui.menuitem[cell.DOC] = `Create a menu item that can optionally be toggled. If selected, calls the provided callback. :param label: The text label of the menu item. :param shortcut: An optional shortcut text to display (e.g. "Ctrl+S"). @@ -218,20 +218,20 @@ imgui.menuitem[prosperon.DOC] = `Create a menu item that can optionally be toggl :return: A boolean reflecting the toggled state. `; -imgui.radio[prosperon.DOC] = `Create a radio button. +imgui.radio[cell.DOC] = `Create a radio button. :param label: The text label for the radio button. :param active: Whether this radio button is currently selected. :return: True if this radio button is now selected by the user, otherwise false. `; -imgui.image[prosperon.DOC] = `Render a texture as an image at a default size (100x100). +imgui.image[cell.DOC] = `Render a texture as an image at a default size (100x100). :param texture: The GPU texture to display. :return: None `; -imgui.imagebutton[prosperon.DOC] = `Create an ImageButton widget which displays a texture; calls the callback when clicked. +imgui.imagebutton[cell.DOC] = `Create an ImageButton widget which displays a texture; calls the callback when clicked. :param label: A string identifier (not visually used). :param texture: The GPU texture to display on the button. @@ -239,48 +239,48 @@ imgui.imagebutton[prosperon.DOC] = `Create an ImageButton widget which displays :return: None `; -imgui.textinput[prosperon.DOC] = `Show a single-line text input widget. +imgui.textinput[cell.DOC] = `Show a single-line text input widget. :param label: The label text next to the input box. :param text: The current text. If undefined, the box starts empty. :return: The updated text string after user editing. `; -imgui.textbox[prosperon.DOC] = `Show a multi-line text input widget. +imgui.textbox[cell.DOC] = `Show a multi-line text input widget. :param label: The label text next to the input box. :param text: The current multi-line text. If undefined, starts empty. :return: The updated text after user editing. `; -imgui.button[prosperon.DOC] = `Create a button. The callback fires if the user clicks it. +imgui.button[cell.DOC] = `Create a button. The callback fires if the user clicks it. :param label: The text displayed on the button. :param callback: The function called on click. :return: None `; -imgui.checkbox[prosperon.DOC] = `Create a checkbox to toggle a boolean value. +imgui.checkbox[cell.DOC] = `Create a checkbox to toggle a boolean value. :param label: The text label for the checkbox. :param checked: The current boolean state. :return: The updated boolean state after user toggle. `; -imgui.text[prosperon.DOC] = `Render a line of text in the ImGui window. +imgui.text[cell.DOC] = `Render a line of text in the ImGui window. :param text: The string to display. :return: None `; -imgui.plot[prosperon.DOC] = `Begin a new ImPlot region with the specified title. Calls the callback to render plot contents. +imgui.plot[cell.DOC] = `Begin a new ImPlot region with the specified title. Calls the callback to render plot contents. :param title: The title (label) of the plot. :param callback: A function that sets up and draws within the ImPlot region. :return: None `; -imgui.lineplot[prosperon.DOC] = `Plot a line graph in the current ImPlot. +imgui.lineplot[cell.DOC] = `Plot a line graph in the current ImPlot. :param label: The label for the line plot. :param data: An array of [x,y] points or a single array of y-values. @@ -289,7 +289,7 @@ imgui.lineplot[prosperon.DOC] = `Plot a line graph in the current ImPlot. :return: None `; -imgui.scatterplot[prosperon.DOC] = `Plot a scatter graph in the current ImPlot. +imgui.scatterplot[cell.DOC] = `Plot a scatter graph in the current ImPlot. :param label: The label for the scatter plot. :param data: An array of [x,y] points or a single array of y-values. @@ -298,7 +298,7 @@ imgui.scatterplot[prosperon.DOC] = `Plot a scatter graph in the current ImPlot. :return: None `; -imgui.stairplot[prosperon.DOC] = `Plot a stair-step graph in the current ImPlot. +imgui.stairplot[cell.DOC] = `Plot a stair-step graph in the current ImPlot. :param label: The label for the stair plot. :param data: An array of [x,y] points or a single array of y-values. @@ -307,7 +307,7 @@ imgui.stairplot[prosperon.DOC] = `Plot a stair-step graph in the current ImPlot. :return: None `; -imgui.digitalplot[prosperon.DOC] = `Plot a digital (step-like) graph in the current ImPlot. +imgui.digitalplot[cell.DOC] = `Plot a digital (step-like) graph in the current ImPlot. :param label: The label for the digital plot. :param data: An array of [x,y] points or a single array of y-values. @@ -316,7 +316,7 @@ imgui.digitalplot[prosperon.DOC] = `Plot a digital (step-like) graph in the curr :return: None `; -imgui.barplot[prosperon.DOC] = `Plot a bar chart in the current ImPlot. +imgui.barplot[cell.DOC] = `Plot a bar chart in the current ImPlot. :param label: The label for the bar series. :param data: An array of [x,y] points or just an array of y-values. @@ -324,38 +324,38 @@ imgui.barplot[prosperon.DOC] = `Plot a bar chart in the current ImPlot. :return: None `; -imgui.textplot[prosperon.DOC] = `Render text at the specified coordinates in plot space. +imgui.textplot[cell.DOC] = `Render text at the specified coordinates in plot space. :param text: The string to render. :param coords: A 2-element array [x, y] in plot coordinates. :return: None `; -imgui.histogramplot[prosperon.DOC] = `Plot a histogram from the given data array/typed array in the current ImPlot. +imgui.histogramplot[cell.DOC] = `Plot a histogram from the given data array/typed array in the current ImPlot. :param label: The label for the histogram. :param data: A typed array (or numeric array) containing the values to bin/display. :return: None `; -imgui.plotaxes[prosperon.DOC] = `Set up labels for the X and Y axes of the current ImPlot. +imgui.plotaxes[cell.DOC] = `Set up labels for the X and Y axes of the current ImPlot. :param xLabel: The label for the x-axis. :param yLabel: The label for the y-axis. :return: None `; -imgui.plotmousepos[prosperon.DOC] = `Get the mouse cursor’s position in the current plot’s coordinate system. +imgui.plotmousepos[cell.DOC] = `Get the mouse cursor’s position in the current plot’s coordinate system. :return: A 2-element array [x, y] representing the mouse position in plot coordinates. `; -imgui.plothovered[prosperon.DOC] = `Check if the mouse is hovering over the current ImPlot. +imgui.plothovered[cell.DOC] = `Check if the mouse is hovering over the current ImPlot. :return: True if the plot area is hovered, otherwise false. `; -imgui.axeslimits[prosperon.DOC] = `Set up the visible axis limits in the current ImPlot. +imgui.axeslimits[cell.DOC] = `Set up the visible axis limits in the current ImPlot. :param xMin: The left (min) bound of the x-axis. :param xMax: The right (max) bound of the x-axis. @@ -364,43 +364,43 @@ imgui.axeslimits[prosperon.DOC] = `Set up the visible axis limits in the current :return: None `; -imgui.prepend[prosperon.DOC] = `Prepare ImGui draw data for rendering, typically called after ImGui::Render(). +imgui.prepend[cell.DOC] = `Prepare ImGui draw data for rendering, typically called after ImGui::Render(). :param commandBuffer: The SDL GPU command buffer where draw data will be queued. :return: None `; -imgui.fitaxis[prosperon.DOC] = `Fit either the x-axis or y-axis to its data range on the next plot frame. +imgui.fitaxis[cell.DOC] = `Fit either the x-axis or y-axis to its data range on the next plot frame. :param axis: 0 for X-axis, 1 for Y-axis. :return: None `; -imgui.columns[prosperon.DOC] = `Switch the layout to use a specified number of columns. +imgui.columns[cell.DOC] = `Switch the layout to use a specified number of columns. :param count: The number of columns to layout in the current region. :return: None `; -imgui.nextcolumn[prosperon.DOC] = `Advance to the next column in a multi-column layout. +imgui.nextcolumn[cell.DOC] = `Advance to the next column in a multi-column layout. :return: None `; -imgui.collapsingheader[prosperon.DOC] = `Create a collapsible header. Returns true if it is open (expanded). +imgui.collapsingheader[cell.DOC] = `Create a collapsible header. Returns true if it is open (expanded). :param label: The text label of the header. :return: True if the header is expanded, otherwise false. `; -imgui.tree[prosperon.DOC] = `Create a tree node. If opened, calls the callback for nested content. +imgui.tree[cell.DOC] = `Create a tree node. If opened, calls the callback for nested content. :param label: The label for the tree node. :param callback: A function called if the node is expanded. :return: None `; -imgui.listbox[prosperon.DOC] = `Create a list box widget to select from a list of strings. +imgui.listbox[cell.DOC] = `Create a list box widget to select from a list of strings. :param label: The label next to the list box. :param items: An array of strings to display. @@ -408,60 +408,60 @@ imgui.listbox[prosperon.DOC] = `Create a list box widget to select from a list o :return: The updated selected index after user selection. `; -imgui.axisfmt[prosperon.DOC] = `Set a custom formatter for a specified y-axis in ImPlot. +imgui.axisfmt[cell.DOC] = `Set a custom formatter for a specified y-axis in ImPlot. :param axis: The y-axis index (0..2) to format. :param callback: A function(value) => string that converts axis values to text. :return: None `; -imgui.tabbar[prosperon.DOC] = `Begin a tab bar container. The callback is invoked to create tabs. +imgui.tabbar[cell.DOC] = `Begin a tab bar container. The callback is invoked to create tabs. :param label: The identifier label of the tab bar. :param callback: A function that creates tab items. :return: None `; -imgui.tab[prosperon.DOC] = `Create a tab item. If selected, calls the callback for tab content. +imgui.tab[cell.DOC] = `Create a tab item. If selected, calls the callback for tab content. :param label: The name of the tab. :param callback: A function to render the tab’s content if active. :return: None `; -imgui.open_popup[prosperon.DOC] = `Open a popup by its identifier. +imgui.open_popup[cell.DOC] = `Open a popup by its identifier. :param label: The identifier of the popup to open. :return: None `; -imgui.modal[prosperon.DOC] = `Begin a modal popup. The callback is invoked to display contents if the modal is open. +imgui.modal[cell.DOC] = `Begin a modal popup. The callback is invoked to display contents if the modal is open. :param label: The identifier of the modal popup. :param callback: A function for rendering the modal’s UI if open. :return: None `; -imgui.popup[prosperon.DOC] = `Begin a popup. The callback is invoked if the popup is open. +imgui.popup[cell.DOC] = `Begin a popup. The callback is invoked if the popup is open. :param label: The identifier of the popup. :param callback: A function for rendering the popup’s UI. :return: None `; -imgui.close_popup[prosperon.DOC] = `Close the current popup. +imgui.close_popup[cell.DOC] = `Close the current popup. :return: None `; -imgui.context[prosperon.DOC] = `Create a popup context menu. The callback is invoked if the menu opens. +imgui.context[cell.DOC] = `Create a popup context menu. The callback is invoked if the menu opens. :param label: The identifier for the context menu. :param callback: A function that renders menu items in the context. :return: None `; -imgui.table[prosperon.DOC] = `Create a table with multiple columns. Optionally enable sorting and pass a sort callback. +imgui.table[cell.DOC] = `Create a table with multiple columns. Optionally enable sorting and pass a sort callback. :param label: The identifier for the table. :param columns: The number of columns. @@ -470,33 +470,33 @@ imgui.table[prosperon.DOC] = `Create a table with multiple columns. Optionally e :return: None `; -imgui.tablenextcolumn[prosperon.DOC] = `Move to the next column in a table row. +imgui.tablenextcolumn[cell.DOC] = `Move to the next column in a table row. :return: None `; -imgui.tablenextrow[prosperon.DOC] = `Move to the next row in a table. +imgui.tablenextrow[cell.DOC] = `Move to the next row in a table. :return: None `; -imgui.tableheadersrow[prosperon.DOC] = `Create a row of headers in the current table (should be called once after column setup). +imgui.tableheadersrow[cell.DOC] = `Create a row of headers in the current table (should be called once after column setup). :return: None `; -imgui.tableangledheadersrow[prosperon.DOC] = `Create an angled header row (for advanced usage). Typically not used as often. +imgui.tableangledheadersrow[cell.DOC] = `Create an angled header row (for advanced usage). Typically not used as often. :return: None `; -imgui.tablesetupcolumn[prosperon.DOC] = `Setup configuration for a single column in the table. +imgui.tablesetupcolumn[cell.DOC] = `Setup configuration for a single column in the table. :param label: The label/header text for this column. :return: None `; -imgui.dnd[prosperon.DOC] = `Begin a drag source for custom data payload. +imgui.dnd[cell.DOC] = `Begin a drag source for custom data payload. :param type: A string identifier for the drag-drop payload type. :param payload: A numeric payload stored in the drag-drop. @@ -504,21 +504,21 @@ imgui.dnd[prosperon.DOC] = `Begin a drag source for custom data payload. :return: None `; -imgui.dndtarget[prosperon.DOC] = `Create a drop target for matching drag-drop payload type. Invokes callback on drop. +imgui.dndtarget[cell.DOC] = `Create a drop target for matching drag-drop payload type. Invokes callback on drop. :param type: A string identifier for the drag-drop payload type to accept. :param callback: A function(payloadNumber) called when a matching payload is dropped. :return: None `; -imgui.color[prosperon.DOC] = `Create a color editor (3 or 4 floats). Returns the updated color. +imgui.color[cell.DOC] = `Create a color editor (3 or 4 floats). Returns the updated color. :param label: The label for the color editor. :param color: An array [r,g,b] or [r,g,b,a]. :return: Updated color array after user input. `; -imgui.startnode[prosperon.DOC] = `Begin a node editor session with ImNodes. The callback defines nodes. +imgui.startnode[cell.DOC] = `Begin a node editor session with ImNodes. The callback defines nodes. Additional callbacks handle link creation and hover events. :param callback: A function to define node editor contents (adding nodes, etc). @@ -528,28 +528,28 @@ Additional callbacks handle link creation and hover events. :return: None `; -imgui.node[prosperon.DOC] = `Begin a node with a unique ID, then call the callback to define its contents. +imgui.node[cell.DOC] = `Begin a node with a unique ID, then call the callback to define its contents. :param nodeId: A unique integer ID for this node. :param callback: A function that populates the node’s UI. :return: None `; -imgui.nodein[prosperon.DOC] = `Create an input attribute in the current node. +imgui.nodein[cell.DOC] = `Create an input attribute in the current node. :param attributeId: The attribute ID for this input. :param callback: A function that defines the UI within the input attribute. :return: None `; -imgui.nodeout[prosperon.DOC] = `Create an output attribute in the current node. +imgui.nodeout[cell.DOC] = `Create an output attribute in the current node. :param attributeId: The attribute ID for this output. :param callback: A function that defines the UI within the output attribute. :return: None `; -imgui.nodelink[prosperon.DOC] = `Link two node attributes by their IDs. +imgui.nodelink[cell.DOC] = `Link two node attributes by their IDs. :param linkId: A unique integer ID for this link. :param startAttributeId: The attribute ID where the link starts. @@ -557,49 +557,49 @@ imgui.nodelink[prosperon.DOC] = `Link two node attributes by their IDs. :return: None `; -imgui.nodemini[prosperon.DOC] = `Show a minimap for the current node editor. +imgui.nodemini[cell.DOC] = `Show a minimap for the current node editor. :param size: A float controlling the minimap size ratio. :return: None `; -imgui.mousehoveringrect[prosperon.DOC] = `Check if the mouse is hovering within the given rectangle. +imgui.mousehoveringrect[cell.DOC] = `Check if the mouse is hovering within the given rectangle. :param min: A 2-element array [x, y] for the top-left corner. :param max: A 2-element array [x, y] for the bottom-right corner. :return: True if the mouse is within that rectangle, otherwise false. `; -imgui.mouseclicked[prosperon.DOC] = `Check if a specific mouse button was clicked (went from up to down) this frame. +imgui.mouseclicked[cell.DOC] = `Check if a specific mouse button was clicked (went from up to down) this frame. :param button: An integer for the mouse button index (0 = left, 1 = right, etc). :return: True if the button was clicked, otherwise false. `; -imgui.mousedown[prosperon.DOC] = `Check if the specified mouse button is currently held down. +imgui.mousedown[cell.DOC] = `Check if the specified mouse button is currently held down. :param button: The mouse button index. :return: True if the button is down, otherwise false. `; -imgui.mousereleased[prosperon.DOC] = `Check if the specified mouse button was released this frame. +imgui.mousereleased[cell.DOC] = `Check if the specified mouse button was released this frame. :param button: The mouse button index. :return: True if the button was released, otherwise false. `; -imgui.mousedragging[prosperon.DOC] = `Check if the mouse is being dragged with the specified button. +imgui.mousedragging[cell.DOC] = `Check if the mouse is being dragged with the specified button. :param button: The mouse button index. :return: True if the mouse is dragging, otherwise false. `; -imgui.mousedelta[prosperon.DOC] = `Get the mouse movement delta (difference) for the current frame. +imgui.mousedelta[cell.DOC] = `Get the mouse movement delta (difference) for the current frame. :return: A 2-element array [dx, dy] representing the mouse movement. `; -imgui.rect[prosperon.DOC] = `Draw a rectangle outline in the current window’s draw list. +imgui.rect[cell.DOC] = `Draw a rectangle outline in the current window’s draw list. :param pMin: A 2-element array [x, y] for the top-left corner. :param pMax: A 2-element array [x, y] for the bottom-right corner. @@ -607,7 +607,7 @@ imgui.rect[prosperon.DOC] = `Draw a rectangle outline in the current window’s :return: None `; -imgui.rectfilled[prosperon.DOC] = `Draw a filled rectangle in the current window’s draw list. +imgui.rectfilled[cell.DOC] = `Draw a filled rectangle in the current window’s draw list. :param pMin: [x, y] for the top-left corner. :param pMax: [x, y] for the bottom-right corner. @@ -615,7 +615,7 @@ imgui.rectfilled[prosperon.DOC] = `Draw a filled rectangle in the current window :return: None `; -imgui.line[prosperon.DOC] = `Draw a line between two points in the current window’s draw list. +imgui.line[cell.DOC] = `Draw a line between two points in the current window’s draw list. :param p1: [x, y] start position. :param p2: [x, y] end position. @@ -623,7 +623,7 @@ imgui.line[prosperon.DOC] = `Draw a line between two points in the current windo :return: None `; -imgui.bezierquad[prosperon.DOC] = `Draw a quadratic bezier curve. +imgui.bezierquad[cell.DOC] = `Draw a quadratic bezier curve. :param p1: [x, y] start point. :param p2: [x, y] control point. @@ -633,7 +633,7 @@ imgui.bezierquad[prosperon.DOC] = `Draw a quadratic bezier curve. :return: None `; -imgui.beziercubic[prosperon.DOC] = `Draw a cubic bezier curve. +imgui.beziercubic[cell.DOC] = `Draw a cubic bezier curve. :param p1: [x, y] start point. :param p2: [x, y] first control point. @@ -644,7 +644,7 @@ imgui.beziercubic[prosperon.DOC] = `Draw a cubic bezier curve. :return: None `; -imgui.point[prosperon.DOC] = `Draw a filled circle (point) in the current window’s draw list. +imgui.point[cell.DOC] = `Draw a filled circle (point) in the current window’s draw list. :param center: [x, y] center of the circle. :param radius: The radius of the circle. @@ -652,7 +652,7 @@ imgui.point[prosperon.DOC] = `Draw a filled circle (point) in the current window :return: None `; -imgui.drawtext[prosperon.DOC] = `Draw text at the given screen position with a specified color. +imgui.drawtext[cell.DOC] = `Draw text at the given screen position with a specified color. :param text: The string to draw. :param position: [x, y] in screen coordinates. @@ -660,70 +660,70 @@ imgui.drawtext[prosperon.DOC] = `Draw text at the given screen position with a s :return: None `; -imgui.cursorscreenpos[prosperon.DOC] = `Get the current ImGui cursor screen position. +imgui.cursorscreenpos[cell.DOC] = `Get the current ImGui cursor screen position. :return: A 2-element array [x, y] in screen coordinates. `; -imgui.setcursorscreenpos[prosperon.DOC] = `Set the ImGui cursor screen position. +imgui.setcursorscreenpos[cell.DOC] = `Set the ImGui cursor screen position. :param position: A 2-element array [x, y] in screen coordinates. :return: None `; -imgui.contentregionavail[prosperon.DOC] = `Return the available space in the current window’s content region. +imgui.contentregionavail[cell.DOC] = `Return the available space in the current window’s content region. :return: A 2-element array [width, height] of available space. `; -imgui.dummy[prosperon.DOC] = `Add a dummy item (invisible) of the specified size to the layout. +imgui.dummy[cell.DOC] = `Add a dummy item (invisible) of the specified size to the layout. :param size: A 2-element array [width, height]. :return: None `; -imgui.invisiblebutton[prosperon.DOC] = `Create an invisible button that occupies a given size and can catch clicks. +imgui.invisiblebutton[cell.DOC] = `Create an invisible button that occupies a given size and can catch clicks. :param label: The identifier for the button. :param size: [width, height] specifying the button area. :return: None `; -imgui.width[prosperon.DOC] = `Set the width of the next item in the layout. +imgui.width[cell.DOC] = `Set the width of the next item in the layout. :param width: The width (in pixels) for the next item. :return: None `; -imgui.setclipboard[prosperon.DOC] = `Set the system clipboard text. +imgui.setclipboard[cell.DOC] = `Set the system clipboard text. :param text: The string to put into the clipboard. :return: None `; -imgui.newframe[prosperon.DOC] = `Start a new ImGui frame. Should be called once per frame before rendering UI elements. +imgui.newframe[cell.DOC] = `Start a new ImGui frame. Should be called once per frame before rendering UI elements. :return: None `; -imgui.endframe[prosperon.DOC] = `Finalize and render the ImGui draw data to the specified command buffer and render pass. +imgui.endframe[cell.DOC] = `Finalize and render the ImGui draw data to the specified command buffer and render pass. :param commandBuffer: The SDL GPU command buffer to render into. :param renderPass: The SDL GPU render pass used to draw ImGui data. :return: None `; -imgui.wantmouse[prosperon.DOC] = `Check if ImGui wants to capture the mouse (e.g., if a window or widget needs mouse events). +imgui.wantmouse[cell.DOC] = `Check if ImGui wants to capture the mouse (e.g., if a window or widget needs mouse events). :return: True if ImGui is capturing the mouse, otherwise false. `; -imgui.wantkeys[prosperon.DOC] = `Check if ImGui wants to capture the keyboard (e.g., if a text input is active). +imgui.wantkeys[cell.DOC] = `Check if ImGui wants to capture the keyboard (e.g., if a text input is active). :return: True if ImGui is capturing the keyboard, otherwise false. `; -imgui.init[prosperon.DOC] = `Initialize ImGui with SDL and SDL_gpu, creating the ImGui context and configuring it. +imgui.init[cell.DOC] = `Initialize ImGui with SDL and SDL_gpu, creating the ImGui context and configuring it. :param gpuDevice: The SDL_GPUDevice object. :param window: The SDL_Window object to attach ImGui onto. diff --git a/moth/lcdsprite.js b/prosperon/lcdsprite.js similarity index 100% rename from moth/lcdsprite.js rename to prosperon/lcdsprite.js diff --git a/moth/moth.js b/prosperon/moth.js similarity index 100% rename from moth/moth.js rename to prosperon/moth.js diff --git a/moth/nogame/config.js b/prosperon/nogame/config.js similarity index 100% rename from moth/nogame/config.js rename to prosperon/nogame/config.js diff --git a/moth/nogame/main.js b/prosperon/nogame/main.js similarity index 100% rename from moth/nogame/main.js rename to prosperon/nogame/main.js diff --git a/moth/rasterize.js b/prosperon/rasterize.js similarity index 100% rename from moth/rasterize.js rename to prosperon/rasterize.js diff --git a/moth/scenetree.js b/prosperon/scenetree.js similarity index 97% rename from moth/scenetree.js rename to prosperon/scenetree.js index 78003672..11db13df 100644 --- a/moth/scenetree.js +++ b/prosperon/scenetree.js @@ -254,7 +254,7 @@ actor.delay.doc = `Call 'fn' after 'seconds' with 'this' set to the actor.` actor[UNDERLINGS] = new Set() -ex[prosperon.DOC] = ` +ex[cell.DOC] = ` A set of utilities for iterating over a hierarchy of actor-like objects, as well as managing tag-based lookups. Objects are assumed to have a "objects" property, pointing to children or sub-objects, forming a tree. @@ -273,7 +273,7 @@ function eachobj(obj, fn) { ex.all_objects = function (fn, startobj = world) { return eachobj(startobj, fn) } -ex.all_objects[prosperon.DOC] = ` +ex.all_objects[cell.DOC] = ` :param fn: A callback function that receives each object. If it returns a truthy value, iteration stops and that value is returned. :param startobj: The root object at which iteration begins, default is the global "world". :return: The first truthy value returned by fn, or undefined if none. @@ -281,7 +281,7 @@ Iterate over each object (and its sub-objects) in the hierarchy, calling fn for ` ex.find_object = function (fn, startobj = world) {} -ex.find_object[prosperon.DOC] = ` +ex.find_object[cell.DOC] = ` :param fn: A callback or criteria to locate a particular object. :param startobj: The root object at which search begins, default "world". :return: Not yet implemented. @@ -294,7 +294,7 @@ ex.tag_add = function (tag, obj) { gtags[tag] ??= new Set() gtags[tag].add(obj) } -ex.tag_add[prosperon.DOC] = ` +ex.tag_add[cell.DOC] = ` :param tag: A string tag to associate with the object. :param obj: The object to add under this tag. :return: None @@ -304,7 +304,7 @@ Associate the given object with the specified tag. Creates a new tag set if it d ex.tag_rm = function (tag, obj) { delete gtags[tag].delete(obj) } -ex.tag_rm[prosperon.DOC] = ` +ex.tag_rm[cell.DOC] = ` :param tag: The tag to remove the object from. :param obj: The object to remove from the tag set. :return: None @@ -314,7 +314,7 @@ Remove the given object from the specified tag’s set, if it exists. ex.tag_clear_guid = function (obj) { for (var tag in gtags) gtags[tag].delete(obj) } -ex.tag_clear_guid[prosperon.DOC] = ` +ex.tag_clear_guid[cell.DOC] = ` :param obj: The object whose tags should be cleared. :return: None Remove the object from all tag sets. @@ -324,7 +324,7 @@ ex.objects_with_tag = function (tag) { if (!gtags[tag]) return [] return Array.from(gtags[tag]) } -ex.objects_with_tag[prosperon.DOC] = ` +ex.objects_with_tag[cell.DOC] = ` :param tag: A string tag to look up. :return: An array of objects associated with the given tag. Retrieve all objects currently tagged with the specified tag. diff --git a/moth/sdl_gpu.js b/prosperon/sdl_gpu.js similarity index 88% rename from moth/sdl_gpu.js rename to prosperon/sdl_gpu.js index 9b524eae..cc6042b1 100644 --- a/moth/sdl_gpu.js +++ b/prosperon/sdl_gpu.js @@ -108,7 +108,7 @@ function full_upload(buffers) { cmds.submit(); } -full_upload[prosperon.DOC] = `Acquire a command buffer and upload the provided data buffers to the GPU, then submit. +full_upload[cell.DOC] = `Acquire a command buffer and upload the provided data buffers to the GPU, then submit. :param buffers: An array of data buffers to be uploaded. :return: None @@ -120,7 +120,7 @@ function bind_pipeline(pass, pipeline) { pass.pipeline = pipeline; } -bind_pipeline[prosperon.DOC] = `Ensure the specified pipeline is created on the GPU and bind it to the given render pass. +bind_pipeline[cell.DOC] = `Ensure the specified pipeline is created on the GPU and bind it to the given render pass. :param pass: The current render pass to bind the pipeline to. :param pipeline: The pipeline object containing shader and state info. @@ -141,7 +141,7 @@ function get_pipeline_ubo_slot(pipeline, name) { return undefined; } -get_pipeline_ubo_slot[prosperon.DOC] = `Return the index of a uniform buffer block within the pipeline's vertex reflection data by name suffix. +get_pipeline_ubo_slot[cell.DOC] = `Return the index of a uniform buffer block within the pipeline's vertex reflection data by name suffix. :param pipeline: The pipeline whose vertex reflection is inspected. :param name: A string suffix to match against the uniform buffer block name. @@ -157,7 +157,7 @@ function transpose4x4(val) { return out; } -transpose4x4[prosperon.DOC] = `Return a new 4x4 matrix array that is the transpose of the passed matrix. +transpose4x4[cell.DOC] = `Return a new 4x4 matrix array that is the transpose of the passed matrix. :param val: An array of length 16 representing a 4x4 matrix in row-major format. :return: A new array of length 16 representing the transposed matrix. @@ -190,7 +190,7 @@ function ubo_obj_to_array(pipeline, name, obj) { return buf; } -ubo_obj_to_array[prosperon.DOC] = `Construct an ArrayBuffer containing UBO data from the provided object, matching the pipeline's reflection info. +ubo_obj_to_array[cell.DOC] = `Construct an ArrayBuffer containing UBO data from the provided object, matching the pipeline's reflection info. :param pipeline: The pipeline whose vertex reflection is read for UBO structure. :param name: The name suffix that identifies the target UBO in the reflection data. @@ -209,7 +209,7 @@ function type_to_byte_count(type) { } } -type_to_byte_count[prosperon.DOC] = `Return the byte size for known float-based types. +type_to_byte_count[cell.DOC] = `Return the byte size for known float-based types. :param type: A string type identifier (e.g., 'float', 'vec2', 'vec3', 'vec4', 'mat4'). :return: Integer number of bytes. @@ -288,7 +288,7 @@ function make_pipeline(pipeline) { pipeline.gpu = context.make_pipeline(pipeline); } -make_pipeline[prosperon.DOC] = `Create and store a GPU pipeline object if it has not already been created. +make_pipeline[cell.DOC] = `Create and store a GPU pipeline object if it has not already been created. :param pipeline: An object describing the pipeline state, shaders, and reflection data. :return: None @@ -319,7 +319,7 @@ function make_shader(sh_file) { return shader } -make_shader[prosperon.DOC] = `Load and compile a shader from disk, caching the result. Reflective metadata is also loaded. +make_shader[cell.DOC] = `Load and compile a shader from disk, caching the result. Reflective metadata is also loaded. :param sh_file: The base filename (without extension) of the shader to compile. :return: A shader object with GPU and reflection data attached. @@ -355,7 +355,7 @@ function upload_model(model) { context.upload(this, bufs); } -upload_model[prosperon.DOC] = `Upload all buffer-like properties of the given model to the GPU. +upload_model[cell.DOC] = `Upload all buffer-like properties of the given model to the GPU. :param model: An object whose buffer properties are to be uploaded. :return: None @@ -373,7 +373,7 @@ function bind_model(pass, pipeline, model) { pass.bind_index_buffer(model.indices); } -bind_model[prosperon.DOC] = `Bind the model's vertex and index buffers for the given pipeline and render pass. +bind_model[cell.DOC] = `Bind the model's vertex and index buffers for the given pipeline and render pass. :param pass: The current render pass. :param pipeline: The pipeline object with vertex buffer descriptions. @@ -396,7 +396,7 @@ function bind_mat(pass, pipeline, mat) { } } -bind_mat[prosperon.DOC] = `Bind the material images and samplers needed by the pipeline's fragment shader. +bind_mat[cell.DOC] = `Bind the material images and samplers needed by the pipeline's fragment shader. :param pass: The current render pass. :param pipeline: The pipeline whose fragment shader reflection indicates required textures. @@ -433,7 +433,7 @@ function group_sprites_by_texture(sprites, mesh) { */ } -group_sprites_by_texture[prosperon.DOC] = `Assign each sprite to the provided mesh, generating index data as needed. +group_sprites_by_texture[cell.DOC] = `Assign each sprite to the provided mesh, generating index data as needed. :param sprites: An array of sprite objects. :param mesh: A mesh object (pos, color, uv, indices, etc.) to link to each sprite. @@ -562,7 +562,7 @@ function render_camera(cmds, camera) { hud_queue = []; } -render_camera[prosperon.DOC] = `Render a scene using the provided camera, drawing both render queue and HUD queue items. +render_camera[cell.DOC] = `Render a scene using the provided camera, drawing both render queue and HUD queue items. :param cmds: A command buffer obtained from the GPU context. :param camera: The camera object (with size, optional target, etc.). @@ -602,7 +602,7 @@ render.present = function() { } } -render.present[prosperon.DOC] = `Perform the per-frame rendering and present the final swapchain image, including imgui pass if available. +render.present[cell.DOC] = `Perform the per-frame rendering and present the final swapchain image, including imgui pass if available. :return: None ` @@ -637,7 +637,7 @@ function fillmask(ref) { render.draw(shape.quad); } -render.fillmask[prosperon.DOC] = `Draw a fullscreen shape using a 'screenfill' shader to populate the stencil buffer with a given reference. +render.fillmask[cell.DOC] = `Draw a fullscreen shape using a 'screenfill' shader to populate the stencil buffer with a given reference. :param ref: The stencil reference value to write. :return: None @@ -671,7 +671,7 @@ function mask(image, pos, scale, rotation = 0, ref = 1) { render.draw(shape.quad); } -render.mask[prosperon.DOC] = `Draw an image to the stencil buffer, marking its area with a specified reference value. +render.mask[cell.DOC] = `Draw an image to the stencil buffer, marking its area with a specified reference value. :param image: A texture or string path (which is converted to a texture). :param pos: The translation (x, y) for the image placement. @@ -685,7 +685,7 @@ render.viewport = function(rect) { context.viewport(rect); } -render.viewport[prosperon.DOC] = `Set the GPU viewport to the specified rectangle. +render.viewport[cell.DOC] = `Set the GPU viewport to the specified rectangle. :param rect: A rectangle [x, y, width, height]. :return: None @@ -695,7 +695,7 @@ render.scissor = function(rect) { render.viewport(rect) } -render.scissor[prosperon.DOC] = `Set the GPU scissor region to the specified rectangle (alias of render.viewport). +render.scissor[cell.DOC] = `Set the GPU scissor region to the specified rectangle (alias of render.viewport). :param rect: A rectangle [x, y, width, height]. :return: None @@ -712,7 +712,7 @@ render.queue = function(cmd) { current_queue.push(cmd) } -render.queue[prosperon.DOC] = `Enqueue one or more draw commands. These commands are batched until render_camera is called. +render.queue[cell.DOC] = `Enqueue one or more draw commands. These commands are batched until render_camera is called. :param cmd: Either a single command object or an array of command objects. :return: None @@ -723,7 +723,7 @@ render.setup_draw = function() { prosperon.draw(); } -render.setup_draw[prosperon.DOC] = `Switch the current queue to the primary scene render queue, then invoke 'prosperon.draw' if defined. +render.setup_draw[cell.DOC] = `Switch the current queue to the primary scene render queue, then invoke 'prosperon.draw' if defined. :return: None ` @@ -733,7 +733,7 @@ render.setup_hud = function() { prosperon.hud(); } -render.setup_hud[prosperon.DOC] = `Switch the current queue to the HUD render queue, then invoke 'prosperon.hud' if defined. +render.setup_hud[cell.DOC] = `Switch the current queue to the HUD render queue, then invoke 'prosperon.hud' if defined. :return: None ` diff --git a/moth/shaders/circle.frag.hlsl b/prosperon/shaders/circle.frag.hlsl similarity index 100% rename from moth/shaders/circle.frag.hlsl rename to prosperon/shaders/circle.frag.hlsl diff --git a/moth/shaders/common/common.hlsl b/prosperon/shaders/common/common.hlsl similarity index 100% rename from moth/shaders/common/common.hlsl rename to prosperon/shaders/common/common.hlsl diff --git a/moth/shaders/common/model_pixel.hlsl b/prosperon/shaders/common/model_pixel.hlsl similarity index 100% rename from moth/shaders/common/model_pixel.hlsl rename to prosperon/shaders/common/model_pixel.hlsl diff --git a/moth/shaders/common/model_vertex.hlsl b/prosperon/shaders/common/model_vertex.hlsl similarity index 100% rename from moth/shaders/common/model_vertex.hlsl rename to prosperon/shaders/common/model_vertex.hlsl diff --git a/moth/shaders/common/pixel.hlsl b/prosperon/shaders/common/pixel.hlsl similarity index 100% rename from moth/shaders/common/pixel.hlsl rename to prosperon/shaders/common/pixel.hlsl diff --git a/moth/shaders/common/sdf.hlsl b/prosperon/shaders/common/sdf.hlsl similarity index 100% rename from moth/shaders/common/sdf.hlsl rename to prosperon/shaders/common/sdf.hlsl diff --git a/moth/shaders/common/vertex.hlsl b/prosperon/shaders/common/vertex.hlsl similarity index 100% rename from moth/shaders/common/vertex.hlsl rename to prosperon/shaders/common/vertex.hlsl diff --git a/moth/shaders/compile.sh b/prosperon/shaders/compile.sh similarity index 100% rename from moth/shaders/compile.sh rename to prosperon/shaders/compile.sh diff --git a/moth/shaders/dbgline.frag.hlsl b/prosperon/shaders/dbgline.frag.hlsl similarity index 100% rename from moth/shaders/dbgline.frag.hlsl rename to prosperon/shaders/dbgline.frag.hlsl diff --git a/moth/shaders/dbgline.vert.hlsl b/prosperon/shaders/dbgline.vert.hlsl similarity index 100% rename from moth/shaders/dbgline.vert.hlsl rename to prosperon/shaders/dbgline.vert.hlsl diff --git a/moth/shaders/dxil/dbgline.frag.dxil b/prosperon/shaders/dxil/dbgline.frag.dxil similarity index 100% rename from moth/shaders/dxil/dbgline.frag.dxil rename to prosperon/shaders/dxil/dbgline.frag.dxil diff --git a/moth/shaders/dxil/dbgline.vert.dxil b/prosperon/shaders/dxil/dbgline.vert.dxil similarity index 100% rename from moth/shaders/dxil/dbgline.vert.dxil rename to prosperon/shaders/dxil/dbgline.vert.dxil diff --git a/moth/shaders/dxil/model.frag.dxil b/prosperon/shaders/dxil/model.frag.dxil similarity index 100% rename from moth/shaders/dxil/model.frag.dxil rename to prosperon/shaders/dxil/model.frag.dxil diff --git a/moth/shaders/dxil/model.vert.dxil b/prosperon/shaders/dxil/model.vert.dxil similarity index 100% rename from moth/shaders/dxil/model.vert.dxil rename to prosperon/shaders/dxil/model.vert.dxil diff --git a/moth/shaders/dxil/model_lit.frag.dxil b/prosperon/shaders/dxil/model_lit.frag.dxil similarity index 100% rename from moth/shaders/dxil/model_lit.frag.dxil rename to prosperon/shaders/dxil/model_lit.frag.dxil diff --git a/moth/shaders/dxil/post.frag.dxil b/prosperon/shaders/dxil/post.frag.dxil similarity index 100% rename from moth/shaders/dxil/post.frag.dxil rename to prosperon/shaders/dxil/post.frag.dxil diff --git a/moth/shaders/dxil/post.vert.dxil b/prosperon/shaders/dxil/post.vert.dxil similarity index 100% rename from moth/shaders/dxil/post.vert.dxil rename to prosperon/shaders/dxil/post.vert.dxil diff --git a/moth/shaders/dxil/ps1.frag.dxil b/prosperon/shaders/dxil/ps1.frag.dxil similarity index 100% rename from moth/shaders/dxil/ps1.frag.dxil rename to prosperon/shaders/dxil/ps1.frag.dxil diff --git a/moth/shaders/dxil/ps1.vert.dxil b/prosperon/shaders/dxil/ps1.vert.dxil similarity index 100% rename from moth/shaders/dxil/ps1.vert.dxil rename to prosperon/shaders/dxil/ps1.vert.dxil diff --git a/moth/shaders/dxil/rectangle.frag.dxil b/prosperon/shaders/dxil/rectangle.frag.dxil similarity index 100% rename from moth/shaders/dxil/rectangle.frag.dxil rename to prosperon/shaders/dxil/rectangle.frag.dxil diff --git a/moth/shaders/dxil/sprite.frag.dxil b/prosperon/shaders/dxil/sprite.frag.dxil similarity index 100% rename from moth/shaders/dxil/sprite.frag.dxil rename to prosperon/shaders/dxil/sprite.frag.dxil diff --git a/moth/shaders/dxil/sprite.vert.dxil b/prosperon/shaders/dxil/sprite.vert.dxil similarity index 100% rename from moth/shaders/dxil/sprite.vert.dxil rename to prosperon/shaders/dxil/sprite.vert.dxil diff --git a/moth/shaders/model.frag.hlsl b/prosperon/shaders/model.frag.hlsl similarity index 100% rename from moth/shaders/model.frag.hlsl rename to prosperon/shaders/model.frag.hlsl diff --git a/moth/shaders/model.vert.hlsl b/prosperon/shaders/model.vert.hlsl similarity index 100% rename from moth/shaders/model.vert.hlsl rename to prosperon/shaders/model.vert.hlsl diff --git a/moth/shaders/model_lit.frag.hlsl b/prosperon/shaders/model_lit.frag.hlsl similarity index 100% rename from moth/shaders/model_lit.frag.hlsl rename to prosperon/shaders/model_lit.frag.hlsl diff --git a/moth/shaders/msl/dbgline.frag.msl b/prosperon/shaders/msl/dbgline.frag.msl similarity index 100% rename from moth/shaders/msl/dbgline.frag.msl rename to prosperon/shaders/msl/dbgline.frag.msl diff --git a/moth/shaders/msl/dbgline.vert.msl b/prosperon/shaders/msl/dbgline.vert.msl similarity index 100% rename from moth/shaders/msl/dbgline.vert.msl rename to prosperon/shaders/msl/dbgline.vert.msl diff --git a/moth/shaders/msl/model.frag.msl b/prosperon/shaders/msl/model.frag.msl similarity index 100% rename from moth/shaders/msl/model.frag.msl rename to prosperon/shaders/msl/model.frag.msl diff --git a/moth/shaders/msl/model.vert.msl b/prosperon/shaders/msl/model.vert.msl similarity index 100% rename from moth/shaders/msl/model.vert.msl rename to prosperon/shaders/msl/model.vert.msl diff --git a/moth/shaders/msl/model_lit.frag.msl b/prosperon/shaders/msl/model_lit.frag.msl similarity index 100% rename from moth/shaders/msl/model_lit.frag.msl rename to prosperon/shaders/msl/model_lit.frag.msl diff --git a/moth/shaders/msl/post.frag.msl b/prosperon/shaders/msl/post.frag.msl similarity index 100% rename from moth/shaders/msl/post.frag.msl rename to prosperon/shaders/msl/post.frag.msl diff --git a/moth/shaders/msl/post.vert.msl b/prosperon/shaders/msl/post.vert.msl similarity index 100% rename from moth/shaders/msl/post.vert.msl rename to prosperon/shaders/msl/post.vert.msl diff --git a/moth/shaders/msl/ps1.frag.msl b/prosperon/shaders/msl/ps1.frag.msl similarity index 100% rename from moth/shaders/msl/ps1.frag.msl rename to prosperon/shaders/msl/ps1.frag.msl diff --git a/moth/shaders/msl/ps1.vert.msl b/prosperon/shaders/msl/ps1.vert.msl similarity index 100% rename from moth/shaders/msl/ps1.vert.msl rename to prosperon/shaders/msl/ps1.vert.msl diff --git a/moth/shaders/msl/rectangle.frag.msl b/prosperon/shaders/msl/rectangle.frag.msl similarity index 100% rename from moth/shaders/msl/rectangle.frag.msl rename to prosperon/shaders/msl/rectangle.frag.msl diff --git a/moth/shaders/msl/sprite.frag.msl b/prosperon/shaders/msl/sprite.frag.msl similarity index 100% rename from moth/shaders/msl/sprite.frag.msl rename to prosperon/shaders/msl/sprite.frag.msl diff --git a/moth/shaders/msl/sprite.vert.msl b/prosperon/shaders/msl/sprite.vert.msl similarity index 100% rename from moth/shaders/msl/sprite.vert.msl rename to prosperon/shaders/msl/sprite.vert.msl diff --git a/moth/shaders/post.frag.hlsl b/prosperon/shaders/post.frag.hlsl similarity index 100% rename from moth/shaders/post.frag.hlsl rename to prosperon/shaders/post.frag.hlsl diff --git a/moth/shaders/post.vert.hlsl b/prosperon/shaders/post.vert.hlsl similarity index 100% rename from moth/shaders/post.vert.hlsl rename to prosperon/shaders/post.vert.hlsl diff --git a/moth/shaders/ps1.frag.hlsl b/prosperon/shaders/ps1.frag.hlsl similarity index 100% rename from moth/shaders/ps1.frag.hlsl rename to prosperon/shaders/ps1.frag.hlsl diff --git a/moth/shaders/ps1.vert.hlsl b/prosperon/shaders/ps1.vert.hlsl similarity index 100% rename from moth/shaders/ps1.vert.hlsl rename to prosperon/shaders/ps1.vert.hlsl diff --git a/moth/shaders/rectangle.frag.hlsl b/prosperon/shaders/rectangle.frag.hlsl similarity index 100% rename from moth/shaders/rectangle.frag.hlsl rename to prosperon/shaders/rectangle.frag.hlsl diff --git a/moth/shaders/reflection/dbgline.frag.json b/prosperon/shaders/reflection/dbgline.frag.json similarity index 100% rename from moth/shaders/reflection/dbgline.frag.json rename to prosperon/shaders/reflection/dbgline.frag.json diff --git a/moth/shaders/reflection/dbgline.vert.json b/prosperon/shaders/reflection/dbgline.vert.json similarity index 100% rename from moth/shaders/reflection/dbgline.vert.json rename to prosperon/shaders/reflection/dbgline.vert.json diff --git a/moth/shaders/reflection/model.frag.json b/prosperon/shaders/reflection/model.frag.json similarity index 100% rename from moth/shaders/reflection/model.frag.json rename to prosperon/shaders/reflection/model.frag.json diff --git a/moth/shaders/reflection/model.vert.json b/prosperon/shaders/reflection/model.vert.json similarity index 100% rename from moth/shaders/reflection/model.vert.json rename to prosperon/shaders/reflection/model.vert.json diff --git a/moth/shaders/reflection/model_lit.frag.json b/prosperon/shaders/reflection/model_lit.frag.json similarity index 100% rename from moth/shaders/reflection/model_lit.frag.json rename to prosperon/shaders/reflection/model_lit.frag.json diff --git a/moth/shaders/reflection/post.frag.json b/prosperon/shaders/reflection/post.frag.json similarity index 100% rename from moth/shaders/reflection/post.frag.json rename to prosperon/shaders/reflection/post.frag.json diff --git a/moth/shaders/reflection/post.vert.json b/prosperon/shaders/reflection/post.vert.json similarity index 100% rename from moth/shaders/reflection/post.vert.json rename to prosperon/shaders/reflection/post.vert.json diff --git a/moth/shaders/reflection/ps1.frag.json b/prosperon/shaders/reflection/ps1.frag.json similarity index 100% rename from moth/shaders/reflection/ps1.frag.json rename to prosperon/shaders/reflection/ps1.frag.json diff --git a/moth/shaders/reflection/ps1.vert.json b/prosperon/shaders/reflection/ps1.vert.json similarity index 100% rename from moth/shaders/reflection/ps1.vert.json rename to prosperon/shaders/reflection/ps1.vert.json diff --git a/moth/shaders/reflection/rectangle.frag.json b/prosperon/shaders/reflection/rectangle.frag.json similarity index 100% rename from moth/shaders/reflection/rectangle.frag.json rename to prosperon/shaders/reflection/rectangle.frag.json diff --git a/moth/shaders/reflection/sprite.frag.json b/prosperon/shaders/reflection/sprite.frag.json similarity index 100% rename from moth/shaders/reflection/sprite.frag.json rename to prosperon/shaders/reflection/sprite.frag.json diff --git a/moth/shaders/reflection/sprite.vert.json b/prosperon/shaders/reflection/sprite.vert.json similarity index 100% rename from moth/shaders/reflection/sprite.vert.json rename to prosperon/shaders/reflection/sprite.vert.json diff --git a/moth/shaders/sprite.frag.hlsl b/prosperon/shaders/sprite.frag.hlsl similarity index 100% rename from moth/shaders/sprite.frag.hlsl rename to prosperon/shaders/sprite.frag.hlsl diff --git a/moth/shaders/sprite.vert.hlsl b/prosperon/shaders/sprite.vert.hlsl similarity index 100% rename from moth/shaders/sprite.vert.hlsl rename to prosperon/shaders/sprite.vert.hlsl diff --git a/moth/shaders/spv/dbgline.frag.spv b/prosperon/shaders/spv/dbgline.frag.spv similarity index 100% rename from moth/shaders/spv/dbgline.frag.spv rename to prosperon/shaders/spv/dbgline.frag.spv diff --git a/moth/shaders/spv/dbgline.vert.spv b/prosperon/shaders/spv/dbgline.vert.spv similarity index 100% rename from moth/shaders/spv/dbgline.vert.spv rename to prosperon/shaders/spv/dbgline.vert.spv diff --git a/moth/shaders/spv/model.frag.spv b/prosperon/shaders/spv/model.frag.spv similarity index 100% rename from moth/shaders/spv/model.frag.spv rename to prosperon/shaders/spv/model.frag.spv diff --git a/moth/shaders/spv/model.vert.spv b/prosperon/shaders/spv/model.vert.spv similarity index 100% rename from moth/shaders/spv/model.vert.spv rename to prosperon/shaders/spv/model.vert.spv diff --git a/moth/shaders/spv/model_lit.frag.spv b/prosperon/shaders/spv/model_lit.frag.spv similarity index 100% rename from moth/shaders/spv/model_lit.frag.spv rename to prosperon/shaders/spv/model_lit.frag.spv diff --git a/moth/shaders/spv/post.frag.spv b/prosperon/shaders/spv/post.frag.spv similarity index 100% rename from moth/shaders/spv/post.frag.spv rename to prosperon/shaders/spv/post.frag.spv diff --git a/moth/shaders/spv/post.vert.spv b/prosperon/shaders/spv/post.vert.spv similarity index 100% rename from moth/shaders/spv/post.vert.spv rename to prosperon/shaders/spv/post.vert.spv diff --git a/moth/shaders/spv/ps1.frag.spv b/prosperon/shaders/spv/ps1.frag.spv similarity index 100% rename from moth/shaders/spv/ps1.frag.spv rename to prosperon/shaders/spv/ps1.frag.spv diff --git a/moth/shaders/spv/ps1.vert.spv b/prosperon/shaders/spv/ps1.vert.spv similarity index 100% rename from moth/shaders/spv/ps1.vert.spv rename to prosperon/shaders/spv/ps1.vert.spv diff --git a/moth/shaders/spv/rectangle.frag.spv b/prosperon/shaders/spv/rectangle.frag.spv similarity index 100% rename from moth/shaders/spv/rectangle.frag.spv rename to prosperon/shaders/spv/rectangle.frag.spv diff --git a/moth/shaders/spv/sprite.frag.spv b/prosperon/shaders/spv/sprite.frag.spv similarity index 100% rename from moth/shaders/spv/sprite.frag.spv rename to prosperon/shaders/spv/sprite.frag.spv diff --git a/moth/shaders/spv/sprite.vert.spv b/prosperon/shaders/spv/sprite.vert.spv similarity index 100% rename from moth/shaders/spv/sprite.vert.spv rename to prosperon/shaders/spv/sprite.vert.spv diff --git a/moth/shaders/wind.hlsl b/prosperon/shaders/wind.hlsl similarity index 100% rename from moth/shaders/wind.hlsl rename to prosperon/shaders/wind.hlsl diff --git a/moth/sound.js b/prosperon/sound.js similarity index 100% rename from moth/sound.js rename to prosperon/sound.js diff --git a/prosperon/spline.js b/prosperon/spline.js new file mode 100644 index 00000000..524e63c5 --- /dev/null +++ b/prosperon/spline.js @@ -0,0 +1,6 @@ +var spline = this + +spline.catmull[cell.DOC] = "Perform Catmull-Rom spline sampling on an array of 2D points, returning an array of samples." +spline.bezier[cell.DOC] = "Perform a Bezier spline (or catmull) sampling on 2D points, returning an array of sampled points." + +return spline \ No newline at end of file diff --git a/moth/sprite.js b/prosperon/sprite.js similarity index 100% rename from moth/sprite.js rename to prosperon/sprite.js diff --git a/moth/tests/animation.js b/prosperon/tests/animation.js similarity index 100% rename from moth/tests/animation.js rename to prosperon/tests/animation.js diff --git a/moth/tests/bunny.png b/prosperon/tests/bunny.png similarity index 100% rename from moth/tests/bunny.png rename to prosperon/tests/bunny.png diff --git a/moth/tests/bunnymark.js b/prosperon/tests/bunnymark.js similarity index 100% rename from moth/tests/bunnymark.js rename to prosperon/tests/bunnymark.js diff --git a/moth/tests/camera.js b/prosperon/tests/camera.js similarity index 100% rename from moth/tests/camera.js rename to prosperon/tests/camera.js diff --git a/moth/tests/camera_colorspace.js b/prosperon/tests/camera_colorspace.js similarity index 100% rename from moth/tests/camera_colorspace.js rename to prosperon/tests/camera_colorspace.js diff --git a/moth/tests/camera_colorspace_convert.js b/prosperon/tests/camera_colorspace_convert.js similarity index 100% rename from moth/tests/camera_colorspace_convert.js rename to prosperon/tests/camera_colorspace_convert.js diff --git a/moth/tests/camera_info.js b/prosperon/tests/camera_info.js similarity index 100% rename from moth/tests/camera_info.js rename to prosperon/tests/camera_info.js diff --git a/moth/tests/crab.gif b/prosperon/tests/crab.gif similarity index 100% rename from moth/tests/crab.gif rename to prosperon/tests/crab.gif diff --git a/moth/tests/draw2d.js b/prosperon/tests/draw2d.js similarity index 100% rename from moth/tests/draw2d.js rename to prosperon/tests/draw2d.js diff --git a/moth/tests/prosperon.js b/prosperon/tests/prosperon.js similarity index 100% rename from moth/tests/prosperon.js rename to prosperon/tests/prosperon.js diff --git a/moth/tests/steam.js b/prosperon/tests/steam.js similarity index 100% rename from moth/tests/steam.js rename to prosperon/tests/steam.js diff --git a/moth/tests/surface.js b/prosperon/tests/surface.js similarity index 100% rename from moth/tests/surface.js rename to prosperon/tests/surface.js diff --git a/moth/tests/surface_colorspace.js b/prosperon/tests/surface_colorspace.js similarity index 100% rename from moth/tests/surface_colorspace.js rename to prosperon/tests/surface_colorspace.js diff --git a/moth/tests/warrior.aseprite b/prosperon/tests/warrior.aseprite similarity index 100% rename from moth/tests/warrior.aseprite rename to prosperon/tests/warrior.aseprite diff --git a/moth/tests/webcam.js b/prosperon/tests/webcam.js similarity index 100% rename from moth/tests/webcam.js rename to prosperon/tests/webcam.js diff --git a/moth/tests/window.js b/prosperon/tests/window.js similarity index 100% rename from moth/tests/window.js rename to prosperon/tests/window.js diff --git a/moth/tween.js b/prosperon/tween.js similarity index 98% rename from moth/tween.js rename to prosperon/tween.js index f79c85c6..2a2d08f6 100644 --- a/moth/tween.js +++ b/prosperon/tween.js @@ -219,7 +219,7 @@ var Tween = { Tween.make = Tween.start -Ease[prosperon.DOC] = ` +Ease[cell.DOC] = ` This object provides multiple easing functions that remap a 0..1 input to produce a smoothed or non-linear output. They can be used standalone or inside tweens. @@ -238,7 +238,7 @@ Available functions: All easing functions expect t in [0..1] and return a remapped value in [0..1]. ` -tween[prosperon.DOC] = ` +tween[cell.DOC] = ` :param from: The starting object or value to interpolate from. :param to: The ending object or value to interpolate to. :param time: The total duration of the tween in milliseconds or some time unit. @@ -251,7 +251,7 @@ and calls "fn" with each interpolated value. Once finished, "fn" is called with then "cb" is invoked if provided, and the tween is cleaned up. ` -Tween[prosperon.DOC] = ` +Tween[cell.DOC] = ` An object providing methods to create and control tweens with additional features like looping, custom easing, multiple stages, etc. @@ -262,7 +262,7 @@ Methods: - make: Alias of start. ` -Tween.start[prosperon.DOC] = ` +Tween.start[cell.DOC] = ` :param obj: The object whose property is being tweened, or context for the callback. :param target: A string property name in obj or a callback function receiving interpolated values. :param tvals: An array of values to tween through (each must support .lerp()). @@ -274,7 +274,7 @@ time is the total duration, and "ease" can be any function from Ease. Once start every frame until completion or stop/pause is called. ` -Tween.make[prosperon.DOC] = ` +Tween.make[cell.DOC] = ` Alias of Tween.start. See Tween.start for usage details. ` diff --git a/prosperon/video.js b/prosperon/video.js new file mode 100644 index 00000000..e4e63464 --- /dev/null +++ b/prosperon/video.js @@ -0,0 +1,5 @@ +var video = this + +video.make_video[cell.DOC] = "Decode a video file (MPEG, etc.) from an ArrayBuffer, returning a datastream object." + +return video \ No newline at end of file diff --git a/scripts/base.js b/scripts/base.js index 072b16b8..ac0322eb 100644 --- a/scripts/base.js +++ b/scripts/base.js @@ -4,7 +4,7 @@ Object.mixin = function (target, source) { return target; }; -Object.mixin[prosperon.DOC] = `Copy all property descriptors from 'source' into 'target'. +Object.mixin[cell.DOC] = `Copy all property descriptors from 'source' into 'target'. :param target: The object that will receive properties. :param source: The object whose properties are to be copied. @@ -18,7 +18,7 @@ Object.defineProperty(Object.prototype, "mixin", { }, }); -(Object.prototype.mixin)[prosperon.DOC] = `Mix properties from 'obj' into the current object. If 'obj' is a string, +(Object.prototype.mixin)[cell.DOC] = `Mix properties from 'obj' into the current object. If 'obj' is a string, it first calls 'use(obj)' to retrieve the object. :param obj: The object (or string reference to an object) to mix in. @@ -32,7 +32,7 @@ Object.defineProperty(String.prototype, "rm", { }, }); -(String.prototype.rm)[prosperon.DOC] = `Remove characters from this string between 'index' (inclusive) +(String.prototype.rm)[cell.DOC] = `Remove characters from this string between 'index' (inclusive) and 'endidx' (exclusive). If 'endidx' is omitted, it defaults to 'index + 1'. :param index: The starting index to remove. @@ -48,7 +48,7 @@ Object.defineProperty(String.prototype, "tolast", { }, }); -(String.prototype.tolast)[prosperon.DOC] = `Return the substring of this string up to the last occurrence of 'val'. +(String.prototype.tolast)[cell.DOC] = `Return the substring of this string up to the last occurrence of 'val'. If 'val' is not found, the entire string is returned. :param val: The substring to locate from the end. @@ -62,7 +62,7 @@ Object.defineProperty(String.prototype, "dir", { }, }); -(String.prototype.dir)[prosperon.DOC] = `Return everything before the last slash ('/') in the string. +(String.prototype.dir)[cell.DOC] = `Return everything before the last slash ('/') in the string. If no slash is found, return an empty string. :return: The directory portion of the path. @@ -89,7 +89,7 @@ Object.defineProperty(String.prototype, "next", { }, }); -(String.prototype.next)[prosperon.DOC] = `Search for the next occurrence of 'char' in this string, starting at 'from'. +(String.prototype.next)[cell.DOC] = `Search for the next occurrence of 'char' in this string, starting at 'from'. If 'char' is an array, any of those characters qualifies. Return the matching index, or -1 if none is found. @@ -115,7 +115,7 @@ Object.defineProperty(String.prototype, "prev", { }, }); -(String.prototype.prev)[prosperon.DOC] = `Search for the previous occurrence of 'char' before index 'from'. +(String.prototype.prev)[cell.DOC] = `Search for the previous occurrence of 'char' before index 'from'. If 'count' is greater than 1, skip multiple occurrences going backward. Return the found index or 0 if not found. @@ -131,7 +131,7 @@ Object.defineProperty(String.prototype, "strip_ext", { }, }); -(String.prototype.strip_ext)[prosperon.DOC] = `Return the string up to (but not including) the last '.' character. +(String.prototype.strip_ext)[cell.DOC] = `Return the string up to (but not including) the last '.' character. If '.' is not found, the entire string is returned. :return: The string without its last extension. @@ -143,7 +143,7 @@ Object.defineProperty(String.prototype, "ext", { }, }); -(String.prototype.ext)[prosperon.DOC] = `Return the substring after the last '.' in this string. +(String.prototype.ext)[cell.DOC] = `Return the substring after the last '.' in this string. If '.' is not found, return an empty string. :return: The file extension or an empty string. @@ -158,7 +158,7 @@ Object.defineProperty(String.prototype, "up_path", { }, }); -(String.prototype.up_path)[prosperon.DOC] = `Go up one directory level from the current path, preserving the file name at the end. +(String.prototype.up_path)[cell.DOC] = `Go up one directory level from the current path, preserving the file name at the end. :return: A new path string one directory up, with the base filename preserved. `; @@ -171,7 +171,7 @@ Object.defineProperty(String.prototype, "fromlast", { }, }); -(String.prototype.fromlast)[prosperon.DOC] = `Return the substring that appears after the last occurrence of 'val'. +(String.prototype.fromlast)[cell.DOC] = `Return the substring that appears after the last occurrence of 'val'. If 'val' is not found, an empty string is returned. :param val: The substring to locate. @@ -186,7 +186,7 @@ Object.defineProperty(String.prototype, "tofirst", { }, }); -(String.prototype.tofirst)[prosperon.DOC] = `Return the substring from the start of this string up to the first occurrence +(String.prototype.tofirst)[cell.DOC] = `Return the substring from the start of this string up to the first occurrence of 'val' (excluded). If 'val' is not found, the entire string is returned. :param val: The substring to locate. @@ -201,7 +201,7 @@ Object.defineProperty(String.prototype, "fromfirst", { }, }); -(String.prototype.fromfirst)[prosperon.DOC] = `Return the substring after the first occurrence of 'val'. +(String.prototype.fromfirst)[cell.DOC] = `Return the substring after the first occurrence of 'val'. If 'val' is not found, the entire string is returned. :param val: The substring to locate. @@ -216,7 +216,7 @@ Object.defineProperty(String.prototype, "name", { }, }); -(String.prototype.name)[prosperon.DOC] = `Return the "name" portion of the path without extension. +(String.prototype.name)[cell.DOC] = `Return the "name" portion of the path without extension. If no slash is found, it's up to the last '.' in the entire string. If there is a slash, it's from the last slash up to (but not including) the last '.'. @@ -230,7 +230,7 @@ Object.defineProperty(String.prototype, "set_name", { }, }); -(String.prototype.set_name)[prosperon.DOC] = `Set the base name (excluding extension) of the path to 'name', preserving +(String.prototype.set_name)[cell.DOC] = `Set the base name (excluding extension) of the path to 'name', preserving the original directory and extension. :param name: The new name to use. @@ -243,7 +243,7 @@ Object.defineProperty(String.prototype, "base", { }, }); -(String.prototype.base)[prosperon.DOC] = `Return the portion of this string after the last '/' character. +(String.prototype.base)[cell.DOC] = `Return the portion of this string after the last '/' character. If no '/' is present, the entire string is returned. :return: The base name of the path. @@ -257,7 +257,7 @@ Object.defineProperty(String.prototype, "updir", { }, }); -(String.prototype.updir)[prosperon.DOC] = `Go up one directory from the current path, removing the last directory name. +(String.prototype.updir)[cell.DOC] = `Go up one directory from the current path, removing the last directory name. If the path ends with a slash, remove it first. Then remove the final directory. :return: A new string representing one directory level up. @@ -276,7 +276,7 @@ Object.defineProperty(Array.prototype, "filter!", { }, }); -(Array.prototype["filter!"])[prosperon.DOC] = `Perform an in-place filter of this array using the provided callback 'fn'. +(Array.prototype["filter!"])[cell.DOC] = `Perform an in-place filter of this array using the provided callback 'fn'. Any element for which 'fn' returns a falsy value is removed. The array is modified and then returned. @@ -292,7 +292,7 @@ Object.defineProperty(Array.prototype, "delete", { } }); -(Array.prototype.delete)[prosperon.DOC] = `Remove the first occurrence of 'item' from the array, if it exists. +(Array.prototype.delete)[cell.DOC] = `Remove the first occurrence of 'item' from the array, if it exists. Returns undefined. :param item: The item to remove. @@ -309,7 +309,7 @@ Object.defineProperty(Array.prototype, "copy", { }, }); -(Array.prototype.copy)[prosperon.DOC] = `Return a deep copy of this array by applying 'deep_copy' to each element. +(Array.prototype.copy)[cell.DOC] = `Return a deep copy of this array by applying 'deep_copy' to each element. The resulting array is entirely new. :return: A new array that is a deep copy of the original. @@ -329,7 +329,7 @@ Object.defineProperty(Array.prototype, "equal", { }, }); -(Array.prototype.equal)[prosperon.DOC] = `Check if this array and array 'b' have the same elements in the same order. +(Array.prototype.equal)[cell.DOC] = `Check if this array and array 'b' have the same elements in the same order. If they are of different lengths, return false. Otherwise compare them via JSON. :param b: Another array to compare against. @@ -342,7 +342,7 @@ Object.defineProperty(Array.prototype, "last", { }, }); -(Array.prototype.last)[prosperon.DOC] = `Return the last element of this array. If the array is empty, returns undefined. +(Array.prototype.last)[cell.DOC] = `Return the last element of this array. If the array is empty, returns undefined. :return: The last element of the array, or undefined if empty. `; @@ -355,7 +355,7 @@ Object.defineProperty(Array.prototype, "wrapped", { }, }); -(Array.prototype.wrapped)[prosperon.DOC] = `Return a copy of the array with the first 'x' elements appended to the end. +(Array.prototype.wrapped)[cell.DOC] = `Return a copy of the array with the first 'x' elements appended to the end. Does not modify the original array. :param x: The number of leading elements to re-append. @@ -371,7 +371,7 @@ Object.defineProperty(Array.prototype, "wrap_idx", { }, }); -(Array.prototype.wrap_idx)[prosperon.DOC] = `Wrap the integer 'x' around this array's length, ensuring the resulting index +(Array.prototype.wrap_idx)[cell.DOC] = `Wrap the integer 'x' around this array's length, ensuring the resulting index lies within [0, this.length - 1]. :param x: The index to wrap. @@ -387,7 +387,7 @@ Object.defineProperty(Array.prototype, "mirrored", { }, }); -(Array.prototype.mirrored)[prosperon.DOC] = `Return a new array that appends a reversed copy (excluding the last element) +(Array.prototype.mirrored)[cell.DOC] = `Return a new array that appends a reversed copy (excluding the last element) of itself to the end. For example, [1,2,3] -> [1,2,3,2,1]. If the array has length <= 1, a copy of it is returned directly. @@ -397,7 +397,7 @@ of itself to the end. For example, [1,2,3] -> [1,2,3,2,1]. If the array has leng /// doc for builtin string -(String.prototype.at)[prosperon.DOC] = `Return the character (or surrogate pair) at the specified index, with support +(String.prototype.at)[cell.DOC] = `Return the character (or surrogate pair) at the specified index, with support for negative indices (counting from the end). If the index is out of range, returns undefined. @@ -405,28 +405,28 @@ returns undefined. :return: A string of length 1 representing the character, or undefined if out of range. `; -(String.prototype.charCodeAt)[prosperon.DOC] = `Return a number indicating the UTF-16 code unit value at the given index. +(String.prototype.charCodeAt)[cell.DOC] = `Return a number indicating the UTF-16 code unit value at the given index. If the index is out of range, returns NaN. :param index: An integer between 0 and string length - 1. :return: An integer in the range [0, 65535] or NaN if out of range. `; -(String.prototype.charAt)[prosperon.DOC] = `Return a string consisting of the single UTF-16 code unit at the given index. +(String.prototype.charAt)[cell.DOC] = `Return a string consisting of the single UTF-16 code unit at the given index. If the index is out of range, returns an empty string. :param index: The zero-based index of the desired character. :return: The single-character string at the specified index, or '' if out of range. `; -(String.prototype.concat)[prosperon.DOC] = `Concatenate the provided string arguments to the current string and return a +(String.prototype.concat)[cell.DOC] = `Concatenate the provided string arguments to the current string and return a new string. :param stringN: One or more strings to concatenate. :return: A new string formed by joining the caller with the provided arguments. `; -(String.prototype.codePointAt)[prosperon.DOC] = `Return a non-negative integer that is the Unicode code point value at the +(String.prototype.codePointAt)[cell.DOC] = `Return a non-negative integer that is the Unicode code point value at the given position. Supports code points above 0xFFFF. Returns undefined if index is out of range. @@ -434,19 +434,19 @@ is out of range. :return: The code point value, or undefined if out of range. `; -(String.prototype.isWellFormed)[prosperon.DOC] = `Return a boolean indicating whether the string is valid Unicode. +(String.prototype.isWellFormed)[cell.DOC] = `Return a boolean indicating whether the string is valid Unicode. If it contains unpaired surrogate code points, return false. :return: True if the string is well-formed UTF-16, otherwise false. `; -(String.prototype.toWellFormed)[prosperon.DOC] = `Return a new string in which any unpaired surrogate code points have been +(String.prototype.toWellFormed)[cell.DOC] = `Return a new string in which any unpaired surrogate code points have been replaced by the Unicode replacement character U+FFFD. :return: A well-formed UTF-16 version of the string. `; -(String.prototype.indexOf)[prosperon.DOC] = `Return the zero-based index of the first occurrence of 'searchValue' in the +(String.prototype.indexOf)[cell.DOC] = `Return the zero-based index of the first occurrence of 'searchValue' in the string, starting at 'fromIndex'. If not found, return -1. :param searchValue: The substring to search for. @@ -454,7 +454,7 @@ string, starting at 'fromIndex'. If not found, return -1. :return: The index of the first match, or -1 if not found. `; -(String.prototype.lastIndexOf)[prosperon.DOC] = `Return the zero-based index of the last occurrence of 'searchValue' in the +(String.prototype.lastIndexOf)[cell.DOC] = `Return the zero-based index of the last occurrence of 'searchValue' in the string, searching backwards from 'fromIndex'. If not found, return -1. :param searchValue: The substring to search for. @@ -462,7 +462,7 @@ string, searching backwards from 'fromIndex'. If not found, return -1. :return: The index of the last match, or -1 if not found. `; -(String.prototype.includes)[prosperon.DOC] = `Return a boolean indicating whether 'searchString' appears within this string. +(String.prototype.includes)[cell.DOC] = `Return a boolean indicating whether 'searchString' appears within this string. An optional position can be provided to start searching. :param searchString: The substring to search for. @@ -470,7 +470,7 @@ An optional position can be provided to start searching. :return: True if the substring is found, otherwise false. `; -(String.prototype.endsWith)[prosperon.DOC] = `Return a boolean indicating whether the string ends with 'searchString'. +(String.prototype.endsWith)[cell.DOC] = `Return a boolean indicating whether the string ends with 'searchString'. An optional 'length' can be provided to treat the string as if it were only that long. @@ -479,7 +479,7 @@ that long. :return: True if the string ends with 'searchString', otherwise false. `; -(String.prototype.startsWith)[prosperon.DOC] = `Return a boolean indicating whether the string begins with 'searchString'. +(String.prototype.startsWith)[cell.DOC] = `Return a boolean indicating whether the string begins with 'searchString'. An optional position can be provided to start checking at that index. :param searchString: The substring to search for at the start. @@ -487,28 +487,28 @@ An optional position can be provided to start checking at that index. :return: True if the string starts with 'searchString', otherwise false. `; -(String.prototype.match)[prosperon.DOC] = `Use a regular expression to match the string. If 'regexp' is not a RegExp, it +(String.prototype.match)[cell.DOC] = `Use a regular expression to match the string. If 'regexp' is not a RegExp, it is converted to one. Return an array of matches or null if none found. :param regexp: The pattern to match (RegExp or string). :return: An array of matches or null. `; -(String.prototype.matchAll)[prosperon.DOC] = `Return an iterator of all RegExp match objects found within the string. +(String.prototype.matchAll)[cell.DOC] = `Return an iterator of all RegExp match objects found within the string. If 'regexp' is not a global or sticky RegExp, a TypeError is thrown. :param regexp: The global/sticky RegExp to match over this string. :return: An iterator of match arrays. `; -(String.prototype.search)[prosperon.DOC] = `Use a regular expression to search for a match within the string. Return the +(String.prototype.search)[cell.DOC] = `Use a regular expression to search for a match within the string. Return the index of the first match, or -1 if no match is found. :param regexp: A RegExp or string. If a string, it is converted to RegExp. :return: The index of the first match, or -1 if not found. `; -(String.prototype.split)[prosperon.DOC] = `Split the string into an array of substrings using 'separator' (RegExp or +(String.prototype.split)[cell.DOC] = `Split the string into an array of substrings using 'separator' (RegExp or string). An optional 'limit' can be provided to limit the number of splits. :param separator: A string or RegExp used to divide the string. @@ -516,7 +516,7 @@ string). An optional 'limit' can be provided to limit the number of splits. :return: An array of the split substrings. `; -(String.prototype.substring)[prosperon.DOC] = `Return the substring between 'start' and 'end'. Indices outside the range +(String.prototype.substring)[cell.DOC] = `Return the substring between 'start' and 'end'. Indices outside the range are clamped. If 'end' < 'start', they swap. :param start: The starting index (0-based). @@ -524,7 +524,7 @@ are clamped. If 'end' < 'start', they swap. :return: The extracted substring. `; -(String.prototype.substr)[prosperon.DOC] = `Return the substring from 'start' for 'length' characters. Negative 'start' +(String.prototype.substr)[cell.DOC] = `Return the substring from 'start' for 'length' characters. Negative 'start' counts from the end. This method is deprecated but still supported in many engines. @@ -533,7 +533,7 @@ engines. :return: The extracted substring. `; -(String.prototype.slice)[prosperon.DOC] = `Extract a section of the string from 'start' up to (but not including) 'end', +(String.prototype.slice)[cell.DOC] = `Extract a section of the string from 'start' up to (but not including) 'end', and return it as a new string. Supports negative indices. :param start: The starting index. Negative values count from the end. @@ -541,14 +541,14 @@ and return it as a new string. Supports negative indices. :return: The extracted slice. `; -(String.prototype.repeat)[prosperon.DOC] = `Construct and return a new string which contains the specified number of copies +(String.prototype.repeat)[cell.DOC] = `Construct and return a new string which contains the specified number of copies of the calling string, concatenated together. :param count: The number of times to repeat the string (must be >= 0). :return: A new repeated string. `; -(String.prototype.replace)[prosperon.DOC] = `Return a new string where the first match (or all matches if 'searchValue' +(String.prototype.replace)[cell.DOC] = `Return a new string where the first match (or all matches if 'searchValue' is a global RegExp) of 'searchValue' is replaced by 'replaceValue'. If 'searchValue' is a string, only the first occurrence is replaced. @@ -557,7 +557,7 @@ If 'searchValue' is a string, only the first occurrence is replaced. :return: A new string with the matched substring(s) replaced. `; -(String.prototype.replaceAll)[prosperon.DOC] = `Return a new string where all (non-overlapping) occurrences of 'searchValue' +(String.prototype.replaceAll)[cell.DOC] = `Return a new string where all (non-overlapping) occurrences of 'searchValue' are replaced by 'replaceValue'. If 'searchValue' is a string, each exact match is replaced. @@ -566,7 +566,7 @@ is replaced. :return: A new string with all matches replaced. `; -(String.prototype.padEnd)[prosperon.DOC] = `Pad the string from the end with the given 'padString' so its length reaches +(String.prototype.padEnd)[cell.DOC] = `Pad the string from the end with the given 'padString' so its length reaches 'maxLength'. The result is a new string. :param maxLength: The desired length of the resulting string. @@ -574,7 +574,7 @@ is replaced. :return: A new string padded at the end. `; -(String.prototype.padStart)[prosperon.DOC] = `Pad the string from the start with the given 'padString' so its length reaches +(String.prototype.padStart)[cell.DOC] = `Pad the string from the start with the given 'padString' so its length reaches 'maxLength'. The result is a new string. :param maxLength: The desired length of the resulting string. @@ -582,148 +582,148 @@ is replaced. :return: A new string padded at the start. `; -(String.prototype.trim)[prosperon.DOC] = `Return a new string with whitespace trimmed from the start and end of this +(String.prototype.trim)[cell.DOC] = `Return a new string with whitespace trimmed from the start and end of this string. :return: The trimmed string. `; -(String.prototype.trimEnd)[prosperon.DOC] = `Return a new string with trailing whitespace removed. Alias: trimRight(). +(String.prototype.trimEnd)[cell.DOC] = `Return a new string with trailing whitespace removed. Alias: trimRight(). :return: The string without trailing whitespace. `; -(String.prototype.trimRight)[prosperon.DOC] = `Alias for trimEnd(). Remove trailing whitespace from the string. +(String.prototype.trimRight)[cell.DOC] = `Alias for trimEnd(). Remove trailing whitespace from the string. :return: The string without trailing whitespace. `; -(String.prototype.trimStart)[prosperon.DOC] = `Return a new string with leading whitespace removed. Alias: trimLeft(). +(String.prototype.trimStart)[cell.DOC] = `Return a new string with leading whitespace removed. Alias: trimLeft(). :return: The string without leading whitespace. `; -(String.prototype.trimLeft)[prosperon.DOC] = `Alias for trimStart(). Remove leading whitespace from the string. +(String.prototype.trimLeft)[cell.DOC] = `Alias for trimStart(). Remove leading whitespace from the string. :return: The string without leading whitespace. `; -(String.prototype.toString)[prosperon.DOC] = `Return a string representing the specified object (itself). Usually called +(String.prototype.toString)[cell.DOC] = `Return a string representing the specified object (itself). Usually called implicitly. Overrides Object.prototype.toString. :return: The string itself. `; -(String.prototype.valueOf)[prosperon.DOC] = `Return the primitive string value of this String object. +(String.prototype.valueOf)[cell.DOC] = `Return the primitive string value of this String object. :return: The primitive string value. `; -(String.prototype.__quote)[prosperon.DOC] = `(Non-standard) Return a quoted representation of the string, typically for +(String.prototype.__quote)[cell.DOC] = `(Non-standard) Return a quoted representation of the string, typically for debug or serialization. Implementation details may vary. :return: A quoted version of the string. `; -(String.prototype.toLowerCase)[prosperon.DOC] = `Return a new string with all alphabetic characters converted to lowercase. +(String.prototype.toLowerCase)[cell.DOC] = `Return a new string with all alphabetic characters converted to lowercase. :return: The lowercase version of this string. `; -(String.prototype.toUpperCase)[prosperon.DOC] = `Return a new string with all alphabetic characters converted to uppercase. +(String.prototype.toUpperCase)[cell.DOC] = `Return a new string with all alphabetic characters converted to uppercase. :return: The uppercase version of this string. `; -(String.prototype.toLocaleLowerCase)[prosperon.DOC] = `Return a locale-aware lowercase version of this string, using the host's +(String.prototype.toLocaleLowerCase)[cell.DOC] = `Return a locale-aware lowercase version of this string, using the host's current locale or the specified locale if supported. :return: The locale-sensitive lowercase string. `; -(String.prototype.toLocaleUpperCase)[prosperon.DOC] = `Return a locale-aware uppercase version of this string, using the host's +(String.prototype.toLocaleUpperCase)[cell.DOC] = `Return a locale-aware uppercase version of this string, using the host's current locale or the specified locale if supported. :return: The locale-sensitive uppercase string. `; -(String.prototype.anchor)[prosperon.DOC] = `Return a string representing an HTML element with a 'name' attribute +(String.prototype.anchor)[cell.DOC] = `Return a string representing an HTML element with a 'name' attribute set to the current string. :param name: The name attribute for the anchor. :return: An HTML ... string. `; -(String.prototype.big)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.big)[cell.DOC] = `Return a string representing an HTML element containing the current string. :return: An HTML ... string. `; -(String.prototype.blink)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.blink)[cell.DOC] = `Return a string representing an HTML element containing the current string (historical, not recommended). :return: An HTML ... string. `; -(String.prototype.bold)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.bold)[cell.DOC] = `Return a string representing an HTML element containing the current string in bold. :return: An HTML ... string. `; -(String.prototype.fixed)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.fixed)[cell.DOC] = `Return a string representing an HTML element containing the current string in fixed-width font. :return: An HTML ... string. `; -(String.prototype.fontcolor)[prosperon.DOC] = `Return a string representing an HTML element with a 'color' attribute, +(String.prototype.fontcolor)[cell.DOC] = `Return a string representing an HTML element with a 'color' attribute, containing the current string. :param color: The color value for the 'font' element. :return: An HTML ... string. `; -(String.prototype.fontsize)[prosperon.DOC] = `Return a string representing an HTML element with a 'size' attribute, +(String.prototype.fontsize)[cell.DOC] = `Return a string representing an HTML element with a 'size' attribute, containing the current string. :param size: The size value for the 'font' element. :return: An HTML ... string. `; -(String.prototype.italics)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.italics)[cell.DOC] = `Return a string representing an HTML element containing the current string in italics. :return: An HTML ... string. `; -(String.prototype.link)[prosperon.DOC] = `Return a string representing an HTML element with an 'href' attribute set +(String.prototype.link)[cell.DOC] = `Return a string representing an HTML element with an 'href' attribute set to the current string. :param url: The URL for the 'href' attribute. :return: An HTML ... string. `; -(String.prototype.small)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.small)[cell.DOC] = `Return a string representing an HTML element containing the current string. :return: An HTML ... string. `; -(String.prototype.strike)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.strike)[cell.DOC] = `Return a string representing an HTML element containing the current string with strike-through. :return: An HTML ... string. `; -(String.prototype.sub)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.sub)[cell.DOC] = `Return a string representing an HTML element containing the current string as subscript. :return: An HTML ... string. `; -(String.prototype.sup)[prosperon.DOC] = `Return a string representing an HTML element containing the current +(String.prototype.sup)[cell.DOC] = `Return a string representing an HTML element containing the current string as superscript. :return: An HTML ... string. @@ -731,14 +731,14 @@ string as superscript. // builtin array -(Array.prototype.at)[prosperon.DOC] = `Return the item at index 'index', supporting negative indices to count from +(Array.prototype.at)[cell.DOC] = `Return the item at index 'index', supporting negative indices to count from the end. If 'index' is out of range, returns undefined. :param index: The index of the element to return (can be negative). :return: The element at the given index, or undefined. `; -(Array.prototype.with)[prosperon.DOC] = `Return a shallow copy of the array, but with the element at 'index' replaced +(Array.prototype.with)[cell.DOC] = `Return a shallow copy of the array, but with the element at 'index' replaced by 'value'. If 'index' is negative, it counts from the end. Throws if out of range. :param index: The zero-based index (can be negative) to replace. @@ -746,14 +746,14 @@ by 'value'. If 'index' is negative, it counts from the end. Throws if out of ran :return: A new array with the updated element. `; -(Array.prototype.concat)[prosperon.DOC] = `Return a new array that is the result of concatenating this array with +(Array.prototype.concat)[cell.DOC] = `Return a new array that is the result of concatenating this array with any additional arrays or values provided. :param items: One or more arrays or values to concatenate. :return: A new array with the items appended. `; -(Array.prototype.every)[prosperon.DOC] = `Return true if the provided callback function returns a truthy value for +(Array.prototype.every)[cell.DOC] = `Return true if the provided callback function returns a truthy value for every element in the array; otherwise false. :param callback: A function(element, index, array) => boolean. @@ -761,7 +761,7 @@ every element in the array; otherwise false. :return: True if all elements pass the test, otherwise false. `; -(Array.prototype.some)[prosperon.DOC] = `Return true if the provided callback function returns a truthy value for at +(Array.prototype.some)[cell.DOC] = `Return true if the provided callback function returns a truthy value for at least one element in the array; otherwise false. :param callback: A function(element, index, array) => boolean. @@ -769,7 +769,7 @@ least one element in the array; otherwise false. :return: True if at least one element passes the test, otherwise false. `; -(Array.prototype.forEach)[prosperon.DOC] = `Call the provided callback function once for each element in the array. +(Array.prototype.forEach)[cell.DOC] = `Call the provided callback function once for each element in the array. Does not produce a return value. :param callback: A function(element, index, array). @@ -777,7 +777,7 @@ Does not produce a return value. :return: None `; -(Array.prototype.map)[prosperon.DOC] = `Create a new array with the results of calling a provided callback function +(Array.prototype.map)[cell.DOC] = `Create a new array with the results of calling a provided callback function on every element in this array. :param callback: A function(element, index, array) => newElement. @@ -785,7 +785,7 @@ on every element in this array. :return: A new array of transformed elements. `; -(Array.prototype.filter)[prosperon.DOC] = `Create a new array containing all elements for which the provided callback +(Array.prototype.filter)[cell.DOC] = `Create a new array containing all elements for which the provided callback function returns a truthy value. :param callback: A function(element, index, array) => boolean. @@ -793,7 +793,7 @@ function returns a truthy value. :return: A new array of elements that passed the test. `; -(Array.prototype.reduce)[prosperon.DOC] = `Apply a callback function against an accumulator and each element in the +(Array.prototype.reduce)[cell.DOC] = `Apply a callback function against an accumulator and each element in the array (from left to right) to reduce it to a single value. :param callback: A function(accumulator, element, index, array) => newAccumulator. @@ -801,14 +801,14 @@ array (from left to right) to reduce it to a single value. :return: The single resulting value. `; -(Array.prototype.reduceRight)[prosperon.DOC] = `Similar to reduce(), except it processes elements from right to left. +(Array.prototype.reduceRight)[cell.DOC] = `Similar to reduce(), except it processes elements from right to left. :param callback: A function(accumulator, element, index, array) => newAccumulator. :param initialValue: Optional. The initial value for the accumulator. :return: The single resulting value. `; -(Array.prototype.fill)[prosperon.DOC] = `Fill the array with a static value from 'start' index up to (but not including) +(Array.prototype.fill)[cell.DOC] = `Fill the array with a static value from 'start' index up to (but not including) 'end' index. Modifies the original array. :param value: The value to fill. @@ -817,7 +817,7 @@ array (from left to right) to reduce it to a single value. :return: The modified array (with filled values). `; -(Array.prototype.find)[prosperon.DOC] = `Return the first element in the array that satisfies the provided callback +(Array.prototype.find)[cell.DOC] = `Return the first element in the array that satisfies the provided callback function. If none is found, return undefined. :param callback: A function(element, index, array) => boolean. @@ -825,7 +825,7 @@ function. If none is found, return undefined. :return: The first matching element, or undefined if not found. `; -(Array.prototype.findIndex)[prosperon.DOC] = `Return the index of the first element in the array that satisfies the +(Array.prototype.findIndex)[cell.DOC] = `Return the index of the first element in the array that satisfies the provided callback function. If none is found, return -1. :param callback: A function(element, index, array) => boolean. @@ -833,7 +833,7 @@ provided callback function. If none is found, return -1. :return: The index of the first matching element, or -1 if not found. `; -(Array.prototype.findLast)[prosperon.DOC] = `Return the last element in the array that satisfies the provided callback +(Array.prototype.findLast)[cell.DOC] = `Return the last element in the array that satisfies the provided callback function, searching from right to left. If none is found, return undefined. :param callback: A function(element, index, array) => boolean. @@ -841,7 +841,7 @@ function, searching from right to left. If none is found, return undefined. :return: The last matching element, or undefined if not found. `; -(Array.prototype.findLastIndex)[prosperon.DOC] = `Return the index of the last element in the array that satisfies the +(Array.prototype.findLastIndex)[cell.DOC] = `Return the index of the last element in the array that satisfies the provided callback function, searching from right to left. If none is found, return -1. @@ -850,7 +850,7 @@ return -1. :return: The index of the last matching element, or -1 if not found. `; -(Array.prototype.indexOf)[prosperon.DOC] = `Return the first index at which a given element can be found. If not present, +(Array.prototype.indexOf)[cell.DOC] = `Return the first index at which a given element can be found. If not present, return -1. :param searchElement: The item to locate in the array. @@ -858,7 +858,7 @@ return -1. :return: The index of the found element, or -1 if not found. `; -(Array.prototype.lastIndexOf)[prosperon.DOC] = `Return the last index at which a given element can be found, or -1 if not +(Array.prototype.lastIndexOf)[cell.DOC] = `Return the last index at which a given element can be found, or -1 if not present. Searches backward from 'fromIndex'. :param searchElement: The item to locate in the array. @@ -866,7 +866,7 @@ present. Searches backward from 'fromIndex'. :return: The last index of the found element, or -1 if not found. `; -(Array.prototype.includes)[prosperon.DOC] = `Return a boolean indicating whether the array contains the given element, +(Array.prototype.includes)[cell.DOC] = `Return a boolean indicating whether the array contains the given element, comparing elements using the SameValueZero algorithm. :param searchElement: The value to search for. @@ -874,81 +874,81 @@ comparing elements using the SameValueZero algorithm. :return: True if the element is found, otherwise false. `; -(Array.prototype.join)[prosperon.DOC] = `Join all elements of the array into a string, separated by 'separator'. +(Array.prototype.join)[cell.DOC] = `Join all elements of the array into a string, separated by 'separator'. :param separator: The delimiter string to separate elements (default ','). :return: A string of array elements joined by the separator. `; -(Array.prototype.toString)[prosperon.DOC] = `Return a string representing the elements of the array, separated by commas. +(Array.prototype.toString)[cell.DOC] = `Return a string representing the elements of the array, separated by commas. Overrides Object.prototype.toString. :return: A comma-separated string of array elements. `; -(Array.prototype.toLocaleString)[prosperon.DOC] = `Return a localized string representing the array and its elements, calling +(Array.prototype.toLocaleString)[cell.DOC] = `Return a localized string representing the array and its elements, calling each element's toLocaleString if available. :return: A locale-sensitive, comma-separated string of array elements. `; -(Array.prototype.pop)[prosperon.DOC] = `Remove the last element from the array and return it. This changes the length +(Array.prototype.pop)[cell.DOC] = `Remove the last element from the array and return it. This changes the length of the array. :return: The removed element, or undefined if the array is empty. `; -(Array.prototype.push)[prosperon.DOC] = `Append one or more elements to the end of the array and return the new length +(Array.prototype.push)[cell.DOC] = `Append one or more elements to the end of the array and return the new length of the array. :param items: One or more items to append. :return: The new length of the array. `; -(Array.prototype.shift)[prosperon.DOC] = `Remove the first element from the array and return it. This changes the length +(Array.prototype.shift)[cell.DOC] = `Remove the first element from the array and return it. This changes the length of the array. :return: The removed element, or undefined if the array is empty. `; -(Array.prototype.unshift)[prosperon.DOC] = `Insert one or more elements at the start of the array and return the new +(Array.prototype.unshift)[cell.DOC] = `Insert one or more elements at the start of the array and return the new length of the array. :param items: One or more elements to insert at the start. :return: The new length of the array. `; -(Array.prototype.reverse)[prosperon.DOC] = `Reverse the elements of the array in place and return the modified array. +(Array.prototype.reverse)[cell.DOC] = `Reverse the elements of the array in place and return the modified array. :return: The reversed array. `; -(Array.prototype.toReversed)[prosperon.DOC] = `Return a shallow copy of the array in reverse order, without modifying the original array. +(Array.prototype.toReversed)[cell.DOC] = `Return a shallow copy of the array in reverse order, without modifying the original array. :return: A new reversed array. `; -(Array.prototype.sort)[prosperon.DOC] = `Sort the array in place, returning it. By default, sorts elements as strings in ascending order. An optional compareFunction may be used for custom sorting. +(Array.prototype.sort)[cell.DOC] = `Sort the array in place, returning it. By default, sorts elements as strings in ascending order. An optional compareFunction may be used for custom sorting. :param compareFunction: A function(a, b) => number, defining sort order. :return: The sorted array. `; -(Array.prototype.toSorted)[prosperon.DOC] = `Return a shallow copy of the array, sorted according to the optional compare +(Array.prototype.toSorted)[cell.DOC] = `Return a shallow copy of the array, sorted according to the optional compare function, without modifying the original array. :param compareFunction: A function(a, b) => number, defining sort order. :return: A new sorted array. `; -(Array.prototype.slice)[prosperon.DOC] = `Return a shallow copy of a portion of the array into a new array object, selected from 'start' to 'end' (end not included). +(Array.prototype.slice)[cell.DOC] = `Return a shallow copy of a portion of the array into a new array object, selected from 'start' to 'end' (end not included). :param start: The beginning index (0-based). Negative values count from the end. :param end: The end index (exclusive). Negative values count from the end. :return: A new array containing the extracted elements. `; -(Array.prototype.splice)[prosperon.DOC] = `Change the contents of the array by removing or replacing existing elements and/or adding new elements in place. Returns an array of removed elements. +(Array.prototype.splice)[cell.DOC] = `Change the contents of the array by removing or replacing existing elements and/or adding new elements in place. Returns an array of removed elements. :param start: The index at which to start changing the array. :param deleteCount: Number of elements to remove. @@ -956,7 +956,7 @@ function, without modifying the original array. :return: An array containing the removed elements (if any). `; -(Array.prototype.toSpliced)[prosperon.DOC] = `Return a shallow copy of the array, with a splice-like operation applied at 'start' removing 'deleteCount' elements and adding 'items'. Does not mutate the original array. +(Array.prototype.toSpliced)[cell.DOC] = `Return a shallow copy of the array, with a splice-like operation applied at 'start' removing 'deleteCount' elements and adding 'items'. Does not mutate the original array. :param start: The index at which to start the splice operation. :param deleteCount: Number of elements to remove. @@ -964,7 +964,7 @@ function, without modifying the original array. :return: A new array with the splice applied. `; -(Array.prototype.copyWithin)[prosperon.DOC] = `Copy a sequence of array elements within the array, overwriting existing values. This operation is performed in place and returns the modified array. +(Array.prototype.copyWithin)[cell.DOC] = `Copy a sequence of array elements within the array, overwriting existing values. This operation is performed in place and returns the modified array. :param target: The index at which to copy the sequence to. :param start: The beginning index of the sequence to copy. @@ -972,107 +972,107 @@ function, without modifying the original array. :return: The modified array. `; -(Array.prototype.flatMap)[prosperon.DOC] = `Return a new array formed by applying a callback function to each element and then flattening the result by one level. +(Array.prototype.flatMap)[cell.DOC] = `Return a new array formed by applying a callback function to each element and then flattening the result by one level. :param callback: A function(element, index, array) => array or value. :param thisArg: Optional. A value to use as 'this' within the callback. :return: A new array with the flattened results. `; -(Array.prototype.flat)[prosperon.DOC] = `Return a new array with all sub-array elements concatenated into it recursively up to the specified depth. +(Array.prototype.flat)[cell.DOC] = `Return a new array with all sub-array elements concatenated into it recursively up to the specified depth. :param depth: The maximum depth to flatten (default 1). :return: A new flattened array. `; -(Array.prototype.values)[prosperon.DOC] = `Return a new Array Iterator object that contains the values for each index in the array. +(Array.prototype.values)[cell.DOC] = `Return a new Array Iterator object that contains the values for each index in the array. :return: An iterator over the array's elements. `; -(Array.prototype.keys)[prosperon.DOC] = `Return a new Array Iterator object that contains the keys (indexes) for each index in the array. +(Array.prototype.keys)[cell.DOC] = `Return a new Array Iterator object that contains the keys (indexes) for each index in the array. :return: An iterator over the array's indices. `; -(Array.prototype.entries)[prosperon.DOC] = `Return a new Array Iterator object that contains key/value pairs for each index in the array. Each entry is [index, value]. +(Array.prototype.entries)[cell.DOC] = `Return a new Array Iterator object that contains key/value pairs for each index in the array. Each entry is [index, value]. :return: An iterator over [index, value] pairs. `; -(Array.prototype.add)[prosperon.DOC] = `Non-standard. Add corresponding elements of the current array and 'other' element-wise, returning a new array. Behavior depends on data types. +(Array.prototype.add)[cell.DOC] = `Non-standard. Add corresponding elements of the current array and 'other' element-wise, returning a new array. Behavior depends on data types. :param other: Another array or scalar to add to each element. :return: A new array with element-wise sum results. `; -(Array.prototype.sub)[prosperon.DOC] = `Non-standard. Subtract corresponding elements of 'other' from the current array element-wise, returning a new array. Behavior depends on data types. +(Array.prototype.sub)[cell.DOC] = `Non-standard. Subtract corresponding elements of 'other' from the current array element-wise, returning a new array. Behavior depends on data types. :param other: Another array or scalar to subtract from each element. :return: A new array with element-wise difference results. `; -(Array.prototype.div)[prosperon.DOC] = `Non-standard. Divide each element of the current array by the corresponding element of 'other' (or a scalar) element-wise, returning a new array. Behavior depends on data types. +(Array.prototype.div)[cell.DOC] = `Non-standard. Divide each element of the current array by the corresponding element of 'other' (or a scalar) element-wise, returning a new array. Behavior depends on data types. :param other: Another array or scalar for the division. :return: A new array with element-wise division results. `; // Object -(Object.prototype.toString)[prosperon.DOC] = `Return a string representing this object. By default, it returns a string of the form '[object ]', where is the object's class. +(Object.prototype.toString)[cell.DOC] = `Return a string representing this object. By default, it returns a string of the form '[object ]', where is the object's class. :return: A string that describes the object. `; -(Object.prototype.toLocaleString)[prosperon.DOC] = `Return a localized string representation of this object, calling toString() by default or a locale-specific override if defined. +(Object.prototype.toLocaleString)[cell.DOC] = `Return a localized string representation of this object, calling toString() by default or a locale-specific override if defined. :return: A locale-sensitive string representation of the object. `; -(Object.prototype.valueOf)[prosperon.DOC] = `Return the primitive value of this object if one exists. Typically, an object returns itself, while a wrapped type (e.g. Number, String) may return the underlying primitive value. +(Object.prototype.valueOf)[cell.DOC] = `Return the primitive value of this object if one exists. Typically, an object returns itself, while a wrapped type (e.g. Number, String) may return the underlying primitive value. :return: The primitive value of the object, or the object itself. `; -(Object.prototype.hasOwnProperty)[prosperon.DOC] = `Return a boolean indicating whether the object has a property with the specified name (key) as its own direct property, as opposed to inheriting it. It does not check the prototype chain. +(Object.prototype.hasOwnProperty)[cell.DOC] = `Return a boolean indicating whether the object has a property with the specified name (key) as its own direct property, as opposed to inheriting it. It does not check the prototype chain. :param prop: The name or Symbol of the property to test. :return: True if the property is found directly on the object, otherwise false. `; -(Object.prototype.isPrototypeOf)[prosperon.DOC] = `Return true if the object appears anywhere in the prototype chain of the specified object, otherwise false. +(Object.prototype.isPrototypeOf)[cell.DOC] = `Return true if the object appears anywhere in the prototype chain of the specified object, otherwise false. :param obj: The object whose prototype chain will be checked. :return: True if this object is in 'obj's prototype chain, otherwise false. `; -(Object.prototype.propertyIsEnumerable)[prosperon.DOC] = `Return a boolean indicating whether the specified property is enumerable, i.e., whether it shows up in a for...in loop or Object.keys() on the object. +(Object.prototype.propertyIsEnumerable)[cell.DOC] = `Return a boolean indicating whether the specified property is enumerable, i.e., whether it shows up in a for...in loop or Object.keys() on the object. :param prop: The name or Symbol of the property to test. :return: True if the property is found and enumerable, otherwise false. `; -(Object.create)[prosperon.DOC] = `Create a new object, using the specified prototype object and optional property descriptors. +(Object.create)[cell.DOC] = `Create a new object, using the specified prototype object and optional property descriptors. :param proto: The object to be used as the prototype. :param propertiesObject: Optional. An object specifying properties to be added. :return: A new object with the given prototype and properties. `; -(Object.getPrototypeOf)[prosperon.DOC] = `Return the prototype of the specified object. If no prototype is found (e.g. the object has null as its prototype), return null. +(Object.getPrototypeOf)[cell.DOC] = `Return the prototype of the specified object. If no prototype is found (e.g. the object has null as its prototype), return null. :param obj: The object whose prototype is to be returned. :return: The prototype of 'obj', or null. `; -(Object.setPrototypeOf)[prosperon.DOC] = `Set the prototype of the specified object to the provided value. Throws a TypeError if the object is non-extensible and the prototype is changed. +(Object.setPrototypeOf)[cell.DOC] = `Set the prototype of the specified object to the provided value. Throws a TypeError if the object is non-extensible and the prototype is changed. :param obj: The object whose prototype is set. :param proto: The new prototype or null. :return: The object 'obj' after setting its prototype. `; -(Object.defineProperty)[prosperon.DOC] = `Define or modify a property on an object using a property descriptor, returning the object. Throws a TypeError if the descriptor is invalid. +(Object.defineProperty)[cell.DOC] = `Define or modify a property on an object using a property descriptor, returning the object. Throws a TypeError if the descriptor is invalid. :param obj: The object on which to define or modify a property. :param prop: The name or Symbol of the property. @@ -1080,140 +1080,140 @@ function, without modifying the original array. :return: The object with the newly defined or updated property. `; -(Object.defineProperties)[prosperon.DOC] = `Define new or modify existing properties on an object, given an object of property descriptors. Returns the modified object. +(Object.defineProperties)[cell.DOC] = `Define new or modify existing properties on an object, given an object of property descriptors. Returns the modified object. :param obj: The object on which to define or modify properties. :param props: An object mapping property names to property descriptors. :return: The modified object. `; -(Object.getOwnPropertyNames)[prosperon.DOC] = `Return an array of all own (non-Symbol) property names found directly on the given object, in the same order as a for...in loop would return. +(Object.getOwnPropertyNames)[cell.DOC] = `Return an array of all own (non-Symbol) property names found directly on the given object, in the same order as a for...in loop would return. :param obj: The object whose own property names are returned. :return: An array of strings that correspond to the properties. `; -(Object.getOwnPropertySymbols)[prosperon.DOC] = `Return an array of all own Symbol properties found directly on the given object. +(Object.getOwnPropertySymbols)[cell.DOC] = `Return an array of all own Symbol properties found directly on the given object. :param obj: The object to retrieve Symbol keys from. :return: An array of Symbol keys. `; -(Object.groupBy)[prosperon.DOC] = `Non-standard / Proposed. Group the own properties of an object according to the return value of a grouping function. Typically returns a new object whose keys are the group identifiers. +(Object.groupBy)[cell.DOC] = `Non-standard / Proposed. Group the own properties of an object according to the return value of a grouping function. Typically returns a new object whose keys are the group identifiers. :param obj: The object to group. :param fn: A function(key, value) => groupingKey, applied to each property. :return: An object where properties are grouped by the returned keys. `; -(Object.keys)[prosperon.DOC] = `Return an array of the object's own enumerable (non-Symbol) property names, in the same order that a normal loop would. +(Object.keys)[cell.DOC] = `Return an array of the object's own enumerable (non-Symbol) property names, in the same order that a normal loop would. :param obj: The object whose property names are to be returned. :return: An array of property names. `; -(Object.values)[prosperon.DOC] = `Return an array of the object's own enumerable (non-Symbol) property values, in the same order as Object.keys(). +(Object.values)[cell.DOC] = `Return an array of the object's own enumerable (non-Symbol) property values, in the same order as Object.keys(). :param obj: The object whose property values are to be returned. :return: An array of property values. `; -(Object.entries)[prosperon.DOC] = `Return an array of [key, value] pairs for the object's own enumerable (non-Symbol) properties, in the same order as Object.keys(). +(Object.entries)[cell.DOC] = `Return an array of [key, value] pairs for the object's own enumerable (non-Symbol) properties, in the same order as Object.keys(). :param obj: The object whose [key, value] pairs are to be returned. :return: An array of [key, value] pairs. `; -(Object.isExtensible)[prosperon.DOC] = `Return a boolean indicating whether new properties can be added to the specified object. +(Object.isExtensible)[cell.DOC] = `Return a boolean indicating whether new properties can be added to the specified object. :param obj: The object to test. :return: True if the object is extensible, otherwise false. `; -(Object.preventExtensions)[prosperon.DOC] = `Prevent new properties from ever being added to an object. Existing properties are not affected. +(Object.preventExtensions)[cell.DOC] = `Prevent new properties from ever being added to an object. Existing properties are not affected. :param obj: The object to mark as non-extensible. :return: The non-extensible object. `; -(Object.getOwnPropertyDescriptor)[prosperon.DOC] = `Return the property descriptor for a named property on the specified object, if it exists, otherwise undefined. +(Object.getOwnPropertyDescriptor)[cell.DOC] = `Return the property descriptor for a named property on the specified object, if it exists, otherwise undefined. :param obj: The object in which to look for the property. :param prop: The name or Symbol of the property. :return: The property descriptor, or undefined if not found. `; -(Object.getOwnPropertyDescriptors)[prosperon.DOC] = `Return an object containing all own property descriptors for the given object, keyed by property names (and Symbols). +(Object.getOwnPropertyDescriptors)[cell.DOC] = `Return an object containing all own property descriptors for the given object, keyed by property names (and Symbols). :param obj: The object to retrieve property descriptors from. :return: An object mapping property keys to property descriptors. `; -(Object.is)[prosperon.DOC] = `Compare two values for strict equality, like '===' but without special treatment for +0 and -0, and treating NaN as equal to NaN. +(Object.is)[cell.DOC] = `Compare two values for strict equality, like '===' but without special treatment for +0 and -0, and treating NaN as equal to NaN. :param value1: A value to compare. :param value2: Another value to compare. :return: True if both values are the same, otherwise false. `; -(Object.assign)[prosperon.DOC] = `Copy all enumerable own properties from one or more source objects to a target object, returning the modified target. +(Object.assign)[cell.DOC] = `Copy all enumerable own properties from one or more source objects to a target object, returning the modified target. :param target: The object to receive properties. :param sources: One or more objects containing properties to copy. :return: The updated target object. `; -(Object.seal)[prosperon.DOC] = `Seal an object, preventing new properties from being added and marking all existing properties as non-configurable. Values of present properties can still be changed if they are writable. +(Object.seal)[cell.DOC] = `Seal an object, preventing new properties from being added and marking all existing properties as non-configurable. Values of present properties can still be changed if they are writable. :param obj: The object to seal. :return: The sealed object. `; -(Object.freeze)[prosperon.DOC] = `Freeze an object, preventing new properties from being added, existing properties from being removed, or current properties from being changed (to the extent permitted by property descriptors). +(Object.freeze)[cell.DOC] = `Freeze an object, preventing new properties from being added, existing properties from being removed, or current properties from being changed (to the extent permitted by property descriptors). :param obj: The object to freeze. :return: The frozen object. `; -(Object.isSealed)[prosperon.DOC] = `Check if an object is sealed. A sealed object has no configurable properties and is non-extensible. +(Object.isSealed)[cell.DOC] = `Check if an object is sealed. A sealed object has no configurable properties and is non-extensible. :param obj: The object to test. :return: True if the object is sealed, otherwise false. `; -(Object.isFrozen)[prosperon.DOC] = `Check if an object is frozen. A frozen object is sealed and all data properties are non-writable. +(Object.isFrozen)[cell.DOC] = `Check if an object is frozen. A frozen object is sealed and all data properties are non-writable. :param obj: The object to test. :return: True if the object is frozen, otherwise false. `; -(Object.fromEntries)[prosperon.DOC] = `Transform a list of key-value pairs into an object. The iterable argument should yield pairs [key, value], which become properties on the resulting object. +(Object.fromEntries)[cell.DOC] = `Transform a list of key-value pairs into an object. The iterable argument should yield pairs [key, value], which become properties on the resulting object. :param entries: An iterable of [key, value] pairs. :return: A new object formed from the given entries. `; -(Object.hasOwn)[prosperon.DOC] = `Return a boolean indicating whether the specified property exists on the object as a direct own property (similar to hasOwnProperty, but directly on Object). +(Object.hasOwn)[cell.DOC] = `Return a boolean indicating whether the specified property exists on the object as a direct own property (similar to hasOwnProperty, but directly on Object). :param obj: The object on which to check the property. :param prop: The name or Symbol of the property to check. :return: True if the property is found on 'obj', otherwise false. `; -(Object.id)[prosperon.DOC] = `Non-standard. Return a unique identifier for the given object, assigning one if necessary. The same object will always yield the same ID. +(Object.id)[cell.DOC] = `Non-standard. Return a unique identifier for the given object, assigning one if necessary. The same object will always yield the same ID. :param obj: The object to retrieve or assign a unique ID. :return: A unique identifier (string or number) associated with the object. `; -(String.fromCharCode)[prosperon.DOC] = `Return a string created from the specified sequence of UTF-16 code units. +(String.fromCharCode)[cell.DOC] = `Return a string created from the specified sequence of UTF-16 code units. Each argument is treated as a code unit in the range [0, 65535]. :param codeUnits: A series of numbers representing UTF-16 code units. :return: A string constructed by mapping each code unit to a character. `; -(String.fromCodePoint)[prosperon.DOC] = `Return a string created from the specified sequence of code points, +(String.fromCodePoint)[cell.DOC] = `Return a string created from the specified sequence of code points, including those above U+FFFF (which will become surrogate pairs). Throws a RangeError for invalid code points. @@ -1221,7 +1221,7 @@ Throws a RangeError for invalid code points. :return: A string constructed from the given code points. `; -(String.raw)[prosperon.DOC] = `A tag function of template literals that returns a raw where escape sequences (e.g., '\\n', '\\u00A9') are not processed. +(String.raw)[cell.DOC] = `A tag function of template literals that returns a raw where escape sequences (e.g., '\\n', '\\u00A9') are not processed. Commonly used to retrieve the unprocessed text of a template. :param template: A template literal, or an object with a 'raw' property. @@ -1229,70 +1229,70 @@ Commonly used to retrieve the unprocessed text of a template. :return: The combined raw string from the template. `; -(Math.min)[prosperon.DOC] = `Return the smallest of the zero or more given numbers. If no arguments are provided, the result is Infinity. If any value is NaN, the result is NaN. +(Math.min)[cell.DOC] = `Return the smallest of the zero or more given numbers. If no arguments are provided, the result is Infinity. If any value is NaN, the result is NaN. :param values: One or more numeric values. :return: The smallest numeric value, Infinity if no arguments, or NaN if any argument cannot be converted to a number. `; -(Math.max)[prosperon.DOC] = `Return the largest of the zero or more given numbers. If no arguments are provided, the result is -Infinity. If any value is NaN, the result is NaN. +(Math.max)[cell.DOC] = `Return the largest of the zero or more given numbers. If no arguments are provided, the result is -Infinity. If any value is NaN, the result is NaN. :param values: One or more numeric values. :return: The largest numeric value, -Infinity if no arguments, or NaN if any argument cannot be converted to a number. `; -(Math.abs)[prosperon.DOC] = `Return the absolute value of the given number. For example, -5 becomes 5. +(Math.abs)[cell.DOC] = `Return the absolute value of the given number. For example, -5 becomes 5. :param x: A numeric value. :return: The absolute value of x. `; -(Math.floor)[prosperon.DOC] = `Return the greatest integer less than or equal to x, effectively rounding down to the nearest integer. +(Math.floor)[cell.DOC] = `Return the greatest integer less than or equal to x, effectively rounding down to the nearest integer. :param x: A numeric value. :return: The largest integer <= x. `; -(Math.ceil)[prosperon.DOC] = `Return the smallest integer greater than or equal to x, effectively rounding up to the nearest integer. +(Math.ceil)[cell.DOC] = `Return the smallest integer greater than or equal to x, effectively rounding up to the nearest integer. :param x: A numeric value. :return: The smallest integer >= x. `; -(Math.round)[prosperon.DOC] = `Return x rounded to the nearest integer. If the fractional portion is 0.5 or +(Math.round)[cell.DOC] = `Return x rounded to the nearest integer. If the fractional portion is 0.5 or greater, rounds up; otherwise, rounds down. Ties away from zero in modern ECMAScript. :param x: A numeric value. :return: x rounded to the nearest integer. `; -(Math.sqrt)[prosperon.DOC] = `Return the positive square root of x. If x is negative, the result is NaN. +(Math.sqrt)[cell.DOC] = `Return the positive square root of x. If x is negative, the result is NaN. :param x: A non-negative numeric value. :return: The positive square root of x, or NaN if x is negative. `; -(Math.acos)[prosperon.DOC] = `Return the arccosine (in radians) of x, in the range [0, π]. If x is outside +(Math.acos)[cell.DOC] = `Return the arccosine (in radians) of x, in the range [0, π]. If x is outside the range [-1, 1], the result is NaN. :param x: A numeric value in [-1, 1]. :return: The arccosine of x in radians, or NaN if out of range. `; -(Math.asin)[prosperon.DOC] = `Return the arcsine (in radians) of x, in the range [-π/2, π/2]. If x is +(Math.asin)[cell.DOC] = `Return the arcsine (in radians) of x, in the range [-π/2, π/2]. If x is outside [-1, 1], the result is NaN. :param x: A numeric value in [-1, 1]. :return: The arcsine of x in radians, or NaN if out of range. `; -(Math.atan)[prosperon.DOC] = `Return the arctangent (in radians) of x, in the range [-π/2, π/2]. +(Math.atan)[cell.DOC] = `Return the arctangent (in radians) of x, in the range [-π/2, π/2]. :param x: A numeric value. :return: The arctangent of x in radians. `; -(Math.atan2)[prosperon.DOC] = `Return the arctangent of the quotient of its arguments (y / x), in the range +(Math.atan2)[cell.DOC] = `Return the arctangent of the quotient of its arguments (y / x), in the range (-π, π]. This takes into account the signs of both x and y to determine the correct quadrant. @@ -1301,25 +1301,25 @@ the correct quadrant. :return: The angle in radians between the positive x-axis and the point (x, y). `; -(Math.cos)[prosperon.DOC] = `Return the cosine of x, where x is in radians. +(Math.cos)[cell.DOC] = `Return the cosine of x, where x is in radians. :param x: A numeric value in radians. :return: The cosine of x, in the range [-1, 1]. `; -(Math.exp)[prosperon.DOC] = `Return e^x, where e is Euler's number (approximately 2.71828). +(Math.exp)[cell.DOC] = `Return e^x, where e is Euler's number (approximately 2.71828). :param x: A numeric exponent. :return: The value of e raised to x. `; -(Math.log)[prosperon.DOC] = `Return the natural logarithm (base e) of x. If x is <= 0, the result is NaN. +(Math.log)[cell.DOC] = `Return the natural logarithm (base e) of x. If x is <= 0, the result is NaN. :param x: A positive numeric value. :return: The natural logarithm of x. `; -(Math.pow)[prosperon.DOC] = `Return base raised to the power exponent, i.e. base^exponent. If base is +(Math.pow)[cell.DOC] = `Return base raised to the power exponent, i.e. base^exponent. If base is negative and exponent is not an integer, result is NaN. :param base: The base number. @@ -1327,104 +1327,104 @@ negative and exponent is not an integer, result is NaN. :return: base raised to exponent. `; -(Math.sin)[prosperon.DOC] = `Return the sine of x, where x is in radians. +(Math.sin)[cell.DOC] = `Return the sine of x, where x is in radians. :param x: A numeric value in radians. :return: The sine of x, in the range [-1, 1]. `; -(Math.tan)[prosperon.DOC] = `Return the tangent of x, where x is in radians. If x is (π/2 + nπ), the +(Math.tan)[cell.DOC] = `Return the tangent of x, where x is in radians. If x is (π/2 + nπ), the result is ±Infinity or NaN. :param x: A numeric value in radians. :return: The tangent of x. `; -(Math.trunc)[prosperon.DOC] = `Return the integer part of x by removing any fractional digits. Does not +(Math.trunc)[cell.DOC] = `Return the integer part of x by removing any fractional digits. Does not round, just truncates. :param x: A numeric value. :return: x truncated toward zero. `; -(Math.sign)[prosperon.DOC] = `Return the sign of x, indicating whether x is positive, negative, or zero. +(Math.sign)[cell.DOC] = `Return the sign of x, indicating whether x is positive, negative, or zero. Returns 1 if x > 0, -1 if x < 0, 0 if x is 0, and NaN if x is NaN. :param x: A numeric value. :return: 1, -1, 0, -0, or NaN, depending on x. `; -(Math.cosh)[prosperon.DOC] = `Return the hyperbolic cosine of x, (e^x + e^-x) / 2. +(Math.cosh)[cell.DOC] = `Return the hyperbolic cosine of x, (e^x + e^-x) / 2. :param x: A numeric value. :return: The hyperbolic cosine of x. `; -(Math.sinh)[prosperon.DOC] = `Return the hyperbolic sine of x, (e^x - e^-x) / 2. +(Math.sinh)[cell.DOC] = `Return the hyperbolic sine of x, (e^x - e^-x) / 2. :param x: A numeric value. :return: The hyperbolic sine of x. `; -(Math.tanh)[prosperon.DOC] = `Return the hyperbolic tangent of x, (e^x - e^-x) / (e^x + e^-x). +(Math.tanh)[cell.DOC] = `Return the hyperbolic tangent of x, (e^x - e^-x) / (e^x + e^-x). :param x: A numeric value. :return: The hyperbolic tangent of x. `; -(Math.acosh)[prosperon.DOC] = `Return the inverse hyperbolic cosine of x, defined as ln(x + sqrt(x^2 - 1)). +(Math.acosh)[cell.DOC] = `Return the inverse hyperbolic cosine of x, defined as ln(x + sqrt(x^2 - 1)). If x < 1, the result is NaN. :param x: A numeric value >= 1. :return: The inverse hyperbolic cosine of x. `; -(Math.asinh)[prosperon.DOC] = `Return the inverse hyperbolic sine of x, defined as ln(x + sqrt(x^2 + 1)). +(Math.asinh)[cell.DOC] = `Return the inverse hyperbolic sine of x, defined as ln(x + sqrt(x^2 + 1)). :param x: A numeric value. :return: The inverse hyperbolic sine of x. `; -(Math.atanh)[prosperon.DOC] = `Return the inverse hyperbolic tangent of x, defined as 1/2 * ln((1 + x) / (1 - x)). +(Math.atanh)[cell.DOC] = `Return the inverse hyperbolic tangent of x, defined as 1/2 * ln((1 + x) / (1 - x)). If |x| >= 1, the result is NaN. :param x: A numeric value in the range (-1, 1). :return: The inverse hyperbolic tangent of x. `; -(Math.expm1)[prosperon.DOC] = `Return e^x - 1, for small values of x this provides higher precision than +(Math.expm1)[cell.DOC] = `Return e^x - 1, for small values of x this provides higher precision than Math.exp(x) - 1. :param x: A numeric exponent. :return: e^x - 1. `; -(Math.log1p)[prosperon.DOC] = `Return the natural logarithm of (1 + x). More accurate than Math.log(1 + x) +(Math.log1p)[cell.DOC] = `Return the natural logarithm of (1 + x). More accurate than Math.log(1 + x) for small x. :param x: A numeric value > -1. :return: ln(1 + x). `; -(Math.log2)[prosperon.DOC] = `Return the base-2 logarithm of x. If x <= 0, the result is NaN. +(Math.log2)[cell.DOC] = `Return the base-2 logarithm of x. If x <= 0, the result is NaN. :param x: A positive numeric value. :return: The base-2 logarithm of x. `; -(Math.log10)[prosperon.DOC] = `Return the base-10 logarithm of x. If x <= 0, the result is NaN. +(Math.log10)[cell.DOC] = `Return the base-10 logarithm of x. If x <= 0, the result is NaN. :param x: A positive numeric value. :return: The base-10 logarithm of x. `; -(Math.cbrt)[prosperon.DOC] = `Return the cube root of x, including negative values. +(Math.cbrt)[cell.DOC] = `Return the cube root of x, including negative values. :param x: A numeric value (can be negative). :return: The cube root of x. `; -(Math.hypot)[prosperon.DOC] = `Return the square root of the sum of squares of its arguments, i.e. +(Math.hypot)[cell.DOC] = `Return the square root of the sum of squares of its arguments, i.e. sqrt(x1^2 + x2^2 + ...). If any value is ±Infinity, returns Infinity. If any value is NaN, returns NaN. @@ -1432,19 +1432,19 @@ any value is NaN, returns NaN. :return: The square root of the sum of squares of the arguments. `; -(Math.random)[prosperon.DOC] = `Return a pseudo-random floating-point number in the range [0, 1). +(Math.random)[cell.DOC] = `Return a pseudo-random floating-point number in the range [0, 1). The result is usually seeded by an engine-defined source of randomness. :return: A number >= 0 and < 1. `; -(Math.fround)[prosperon.DOC] = `Return the nearest 32-bit single-precision float representation of x. +(Math.fround)[cell.DOC] = `Return the nearest 32-bit single-precision float representation of x. :param x: A numeric value. :return: The 32-bit float representation of x. `; -(Math.imul)[prosperon.DOC] = `Return the result of a 32-bit integer multiplication of two values. +(Math.imul)[cell.DOC] = `Return the result of a 32-bit integer multiplication of two values. Effectively (a * b) | 0 in many implementations. :param a: A numeric value. @@ -1452,14 +1452,14 @@ Effectively (a * b) | 0 in many implementations. :return: The 32-bit integer result of multiplying a by b. `; -(Math.clz32)[prosperon.DOC] = `Return the number of leading zero bits in the 32-bit binary representation +(Math.clz32)[cell.DOC] = `Return the number of leading zero bits in the 32-bit binary representation of x. If x is 0, returns 32. :param x: A numeric value, treated as a 32-bit unsigned integer. :return: The count of leading zero bits, in the range [0, 32]. `; -(Number.parseInt)[prosperon.DOC] = `Parse a string argument and return an integer of the specified radix (base). +(Number.parseInt)[cell.DOC] = `Parse a string argument and return an integer of the specified radix (base). If the string does not start with a valid integer, return NaN. Leading whitespace is ignored. @@ -1468,43 +1468,43 @@ whitespace is ignored. :return: The parsed integer, or NaN if the input is not a valid integer. `; -(Number.parseFloat)[prosperon.DOC] = `Parse a string argument and return a floating-point number. If the string does not represent a valid number, return NaN. Leading whitespace is ignored, and the string can include a decimal point or exponent. +(Number.parseFloat)[cell.DOC] = `Parse a string argument and return a floating-point number. If the string does not represent a valid number, return NaN. Leading whitespace is ignored, and the string can include a decimal point or exponent. :param string: The string to parse as a floating-point number. :return: The parsed number, or NaN if invalid. `; -(Number.isNaN)[prosperon.DOC] = `Determine if a value is the special numeric value NaN, without converting the argument. Unlike the global isNaN(), this returns false for non-numeric values. +(Number.isNaN)[cell.DOC] = `Determine if a value is the special numeric value NaN, without converting the argument. Unlike the global isNaN(), this returns false for non-numeric values. :param value: The value to test. :return: True if the value is NaN, otherwise false. `; -(Number.isFinite)[prosperon.DOC] = `Determine if a value is a finite number. Unlike the global isFinite(), this returns false for non-numeric values without attempting to convert them. +(Number.isFinite)[cell.DOC] = `Determine if a value is a finite number. Unlike the global isFinite(), this returns false for non-numeric values without attempting to convert them. :param value: The value to test. :return: True if the value is a finite number, otherwise false. `; -(Number.isInteger)[prosperon.DOC] = `Check if the given value is a finite number and also an integer (no fractional part). Returns false for non-numeric values or NaN. +(Number.isInteger)[cell.DOC] = `Check if the given value is a finite number and also an integer (no fractional part). Returns false for non-numeric values or NaN. :param value: The value to test. :return: True if value is an integer, otherwise false. `; -(Number.isSafeInteger)[prosperon.DOC] = `Check if the given value is a safe integer. A safe integer is one that can be exactly represented as an IEEE-754 double-precision number (i.e., between -9007199254740991 and 9007199254740991 inclusive). +(Number.isSafeInteger)[cell.DOC] = `Check if the given value is a safe integer. A safe integer is one that can be exactly represented as an IEEE-754 double-precision number (i.e., between -9007199254740991 and 9007199254740991 inclusive). :param value: The value to test. :return: True if value is an integer within the safe range, otherwise false. `; -(Array.isArray)[prosperon.DOC] = `Determine if the given value is an Array. Returns true if the argument is an array, otherwise false. +(Array.isArray)[cell.DOC] = `Determine if the given value is an Array. Returns true if the argument is an array, otherwise false. :param value: The value to be checked. :return: True if 'value' is an array, otherwise false. `; -(Array.from)[prosperon.DOC] = `Create a new array from an array-like or iterable object. An optional map function can be invoked on each element before it is added to the new array. +(Array.from)[cell.DOC] = `Create a new array from an array-like or iterable object. An optional map function can be invoked on each element before it is added to the new array. :param arrayLike: An array-like or iterable object to convert. :param mapFn: Optional. A function to call on every element of the new array. @@ -1512,19 +1512,19 @@ whitespace is ignored. :return: A new array populated with elements processed from arrayLike. `; -(Array.of)[prosperon.DOC] = `Create a new array with a variable number of arguments, regardless of the number or type of the arguments. Unlike the Array constructor, there is no special treatment for a single numeric argument. +(Array.of)[cell.DOC] = `Create a new array with a variable number of arguments, regardless of the number or type of the arguments. Unlike the Array constructor, there is no special treatment for a single numeric argument. :param elements: A variable number of arguments which become array elements. :return: A new array containing the provided arguments. `; -(Symbol.for)[prosperon.DOC] = `Search the global symbol registry for a symbol with the given key. If found, return that symbol; otherwise, create a new symbol with that key and add it to the registry, then return the new symbol. +(Symbol.for)[cell.DOC] = `Search the global symbol registry for a symbol with the given key. If found, return that symbol; otherwise, create a new symbol with that key and add it to the registry, then return the new symbol. :param key: A string key used to identify the symbol in the global registry. :return: A symbol associated with the given key in the global registry. `; -(Symbol.keyFor)[prosperon.DOC] = `Retrieve a shared symbol’s key from the global symbol registry. If the symbol is not in the global registry, return undefined. +(Symbol.keyFor)[cell.DOC] = `Retrieve a shared symbol’s key from the global symbol registry. If the symbol is not in the global registry, return undefined. :param sym: The symbol to find the key for. :return: The string key if 'sym' is a global symbol, otherwise undefined. @@ -1533,47 +1533,47 @@ whitespace is ignored. // ------------------------------------------ // MAP // ------------------------------------------ -Map.prototype[prosperon.DOC] = {} -Map.prototype[prosperon.DOC][prosperon.DOC] = `A Map object holds key-value pairs, where any value (both objects and primitive values) may be used as either a key or a value. Insertion order is remembered, which allows iteration in that order.`; +Map.prototype[cell.DOC] = {} +Map.prototype[cell.DOC][cell.DOC] = `A Map object holds key-value pairs, where any value (both objects and primitive values) may be used as either a key or a value. Insertion order is remembered, which allows iteration in that order.`; -Map.prototype[prosperon.DOC].size = `A read-only property returning the number of key-value pairs in the Map. +Map.prototype[cell.DOC].size = `A read-only property returning the number of key-value pairs in the Map. :return: The number of entries in the Map. `; -(Map.prototype.set)[prosperon.DOC] = `Add or update an entry in the Map with the specified key and value. +(Map.prototype.set)[cell.DOC] = `Add or update an entry in the Map with the specified key and value. :param key: The key of the element to add or update. :param value: The value associated with the key. :return: The Map object (for chaining). `; -(Map.prototype.get)[prosperon.DOC] = `Return the value associated with the specified key, or undefined if no +(Map.prototype.get)[cell.DOC] = `Return the value associated with the specified key, or undefined if no such key exists. :param key: The key of the element to retrieve. :return: The value associated with the key, or undefined if not found. `; -(Map.prototype.has)[prosperon.DOC] = `Return a boolean indicating whether the Map contains an element with the +(Map.prototype.has)[cell.DOC] = `Return a boolean indicating whether the Map contains an element with the specified key. :param key: The key to test for presence in the Map. :return: True if the key is found, otherwise false. `; -(Map.prototype.delete)[prosperon.DOC] = `Remove the specified key and its associated value from the Map, if it exists. +(Map.prototype.delete)[cell.DOC] = `Remove the specified key and its associated value from the Map, if it exists. :param key: The key to remove. :return: True if an element was removed, otherwise false. `; -(Map.prototype.clear)[prosperon.DOC] = `Remove all entries from the Map, leaving it empty. +(Map.prototype.clear)[cell.DOC] = `Remove all entries from the Map, leaving it empty. :return: None `; -(Map.prototype.forEach)[prosperon.DOC] = `Execute a provided callback function once per each key-value pair in the Map, +(Map.prototype.forEach)[cell.DOC] = `Execute a provided callback function once per each key-value pair in the Map, in insertion order. :param callbackFn: A function(value, key, map) to execute on each entry. @@ -1581,19 +1581,19 @@ in insertion order. :return: None `; -(Map.prototype.values)[prosperon.DOC] = `Return a new Iterator object that contains the values for each element +(Map.prototype.values)[cell.DOC] = `Return a new Iterator object that contains the values for each element in the Map, in insertion order. :return: An iterator of the Map's values. `; -(Map.prototype.keys)[prosperon.DOC] = `Return a new Iterator object that contains the keys for each element in +(Map.prototype.keys)[cell.DOC] = `Return a new Iterator object that contains the keys for each element in the Map, in insertion order. :return: An iterator of the Map's keys. `; -(Map.prototype.entries)[prosperon.DOC] = `Return a new Iterator object that contains the [key, value] pairs for +(Map.prototype.entries)[cell.DOC] = `Return a new Iterator object that contains the [key, value] pairs for each element in the Map, in insertion order. :return: An iterator of [key, value] pairs. @@ -1603,38 +1603,38 @@ each element in the Map, in insertion order. // ------------------------------------------ // SET // ------------------------------------------ -Set.prototype[prosperon.DOC] = {} -Set.prototype[prosperon.DOC][prosperon.DOC] = `A Set object lets you store unique values of any type, whether primitive values or object references. It remembers insertion order for iteration.`; +Set.prototype[cell.DOC] = {} +Set.prototype[cell.DOC][cell.DOC] = `A Set object lets you store unique values of any type, whether primitive values or object references. It remembers insertion order for iteration.`; -Set.prototype[prosperon.DOC].size = `A read-only property returning the number of elements in the Set. +Set.prototype[cell.DOC].size = `A read-only property returning the number of elements in the Set. :return: The number of unique values in the Set. `; -(Set.prototype.add)[prosperon.DOC] = `Add a new element with the given value to the Set, if it’s not already present. +(Set.prototype.add)[cell.DOC] = `Add a new element with the given value to the Set, if it’s not already present. :param value: The value to add. :return: The Set object (for chaining). `; -(Set.prototype.has)[prosperon.DOC] = `Return a boolean indicating whether the Set contains the specified value. +(Set.prototype.has)[cell.DOC] = `Return a boolean indicating whether the Set contains the specified value. :param value: The value to check for presence in the Set. :return: True if the value is found, otherwise false. `; -(Set.prototype.delete)[prosperon.DOC] = `Remove the specified value from the Set if it exists. +(Set.prototype.delete)[cell.DOC] = `Remove the specified value from the Set if it exists. :param value: The value to remove. :return: True if the value was present and removed, otherwise false. `; -(Set.prototype.clear)[prosperon.DOC] = `Remove all elements from the Set, leaving it empty. +(Set.prototype.clear)[cell.DOC] = `Remove all elements from the Set, leaving it empty. :return: None `; -(Set.prototype.forEach)[prosperon.DOC] = `Execute a provided callback function once for each value in the Set, +(Set.prototype.forEach)[cell.DOC] = `Execute a provided callback function once for each value in the Set, in insertion order. :param callbackFn: A function(value, valueAgain, set) to execute on each element. @@ -1642,19 +1642,19 @@ in insertion order. :return: None `; -(Set.prototype.values)[prosperon.DOC] = `Return a new Iterator object containing all the values in the Set, +(Set.prototype.values)[cell.DOC] = `Return a new Iterator object containing all the values in the Set, in insertion order. :return: An iterator of the Set's values. `; -(Set.prototype.keys)[prosperon.DOC] = `Alias for values() in a Set. Return a new Iterator object containing all +(Set.prototype.keys)[cell.DOC] = `Alias for values() in a Set. Return a new Iterator object containing all the values (as keys) in the Set, in insertion order. :return: An iterator of the Set's values. `; -(Set.prototype.entries)[prosperon.DOC] = `Return a new Iterator object containing [value, value] pairs for each value +(Set.prototype.entries)[cell.DOC] = `Return a new Iterator object containing [value, value] pairs for each value in the Set, in insertion order. This maintains API consistency with Map objects. :return: An iterator of [value, value] pairs. @@ -1664,33 +1664,33 @@ in the Set, in insertion order. This maintains API consistency with Map objects. // ------------------------------------------ // WEAKMAP // ------------------------------------------ -WeakMap.prototype[prosperon.DOC] = `A WeakMap object is a collection of key/value pairs in which keys must be +WeakMap.prototype[cell.DOC] = `A WeakMap object is a collection of key/value pairs in which keys must be objects. References to key objects in a WeakMap are held weakly, meaning they do not prevent garbage collection if there are no other references to the object. WeakMap keys are not iterable.`; -(WeakMap.prototype.set)[prosperon.DOC] = `Set the value for the specified key in the WeakMap. The key must be an object. +(WeakMap.prototype.set)[cell.DOC] = `Set the value for the specified key in the WeakMap. The key must be an object. :param key: The object key. :param value: The value associated with the key. :return: The WeakMap object (for chaining). `; -(WeakMap.prototype.get)[prosperon.DOC] = `Return the value associated with 'key' in the WeakMap, or undefined if +(WeakMap.prototype.get)[cell.DOC] = `Return the value associated with 'key' in the WeakMap, or undefined if no such key exists. The key must be an object. :param key: The object key. :return: The value associated with the key, or undefined if not present. `; -(WeakMap.prototype.has)[prosperon.DOC] = `Return a boolean indicating whether an element with the specified key +(WeakMap.prototype.has)[cell.DOC] = `Return a boolean indicating whether an element with the specified key exists in the WeakMap. The key must be an object. :param key: The object key to check. :return: True if the key is found, otherwise false. `; -(WeakMap.prototype.delete)[prosperon.DOC] = `Remove the specified key and its associated value from the WeakMap, +(WeakMap.prototype.delete)[cell.DOC] = `Remove the specified key and its associated value from the WeakMap, if it exists. :param key: The object key to remove. @@ -1701,25 +1701,25 @@ if it exists. // ------------------------------------------ // WEAKSET // ------------------------------------------ -WeakSet.prototype[prosperon.DOC] = `A WeakSet object is a collection of unique objects (no primitive values). +WeakSet.prototype[cell.DOC] = `A WeakSet object is a collection of unique objects (no primitive values). References to objects in a WeakSet are held weakly, so they do not prevent garbage collection if there are no other references to the object. WeakSet elements are not iterable.`; -(WeakSet.prototype.add)[prosperon.DOC] = `Add a new object to the WeakSet if it is not already present. The value +(WeakSet.prototype.add)[cell.DOC] = `Add a new object to the WeakSet if it is not already present. The value must be an object. :param value: The object to add. :return: The WeakSet object (for chaining). `; -(WeakSet.prototype.has)[prosperon.DOC] = `Return a boolean indicating whether an object is present in the WeakSet. +(WeakSet.prototype.has)[cell.DOC] = `Return a boolean indicating whether an object is present in the WeakSet. :param value: The object to check. :return: True if the object is in the WeakSet, otherwise false. `; -(WeakSet.prototype.delete)[prosperon.DOC] = `Remove the specified object from the WeakSet, if it exists. +(WeakSet.prototype.delete)[cell.DOC] = `Remove the specified object from the WeakSet, if it exists. :param value: The object to remove. :return: True if the object was present and removed, otherwise false. diff --git a/scripts/debug.js b/scripts/debug.js index 8823fc1b..c5928d21 100644 --- a/scripts/debug.js +++ b/scripts/debug.js @@ -1,39 +1,39 @@ var debug = this -debug.stack_depth[prosperon.DOC] = `Return the current stack depth. +debug.stack_depth[cell.DOC] = `Return the current stack depth. :return: A number representing the stack depth. ` -debug.build_backtrace[prosperon.DOC] = `Build and return a backtrace of the current call stack. +debug.build_backtrace[cell.DOC] = `Build and return a backtrace of the current call stack. :return: An object representing the call stack backtrace. ` -debug.closure_vars[prosperon.DOC] = `Return the closure variables for a given function. +debug.closure_vars[cell.DOC] = `Return the closure variables for a given function. :param fn: The function object to inspect. :return: An object containing the closure variables. ` -debug.local_vars[prosperon.DOC] = `Return the local variables for a specific stack frame. +debug.local_vars[cell.DOC] = `Return the local variables for a specific stack frame. :param depth: The stack frame depth to inspect. :return: An object containing the local variables at the specified depth. ` -debug.fn_info[prosperon.DOC] = `Return metadata about a given function. +debug.fn_info[cell.DOC] = `Return metadata about a given function. :param fn: The function object to inspect. :return: An object with metadata about the function. ` -debug.backtrace_fns[prosperon.DOC] = `Return an array of functions in the current backtrace. +debug.backtrace_fns[cell.DOC] = `Return an array of functions in the current backtrace. :return: An array of function objects from the call stack. ` -debug.dump_obj[prosperon.DOC] = `Return a string representation of a given object. +debug.dump_obj[cell.DOC] = `Return a string representation of a given object. :param obj: The object to dump. :return: A string describing the object's contents. diff --git a/scripts/dmon.js b/scripts/dmon.js index 38a6ebc7..3b11d764 100644 --- a/scripts/dmon.js +++ b/scripts/dmon.js @@ -1,6 +1,6 @@ var dmon = this -dmon.watch[prosperon.DOC] = `Start watching the root directory, recursively. +dmon.watch[cell.DOC] = `Start watching the root directory, recursively. This function begins monitoring the specified directory and its subdirectories recursively for events such as file creation, deletion, modification, or movement. Events are queued and can be retrieved by calling poll. @@ -8,7 +8,7 @@ This function begins monitoring the specified directory and its subdirectories r :throws: An error if dmon is already watching. ` -dmon.unwatch[prosperon.DOC] = `Stop watching the currently monitored directory. +dmon.unwatch[cell.DOC] = `Stop watching the currently monitored directory. This function halts filesystem monitoring for the directory previously set by watch. It clears the watch state, allowing a new watch to be started. @@ -16,7 +16,7 @@ This function halts filesystem monitoring for the directory previously set by wa :throws: An error if no directory is currently being watched. ` -dmon.poll[prosperon.DOC] = `Retrieve and process queued filesystem events. +dmon.poll[cell.DOC] = `Retrieve and process queued filesystem events. This function dequeues all pending filesystem events and invokes the provided callback for each one. The callback receives an event object with properties: 'action' (string: "create", "delete", "modify", or "move"), 'root' (string: watched directory), 'file' (string: affected file path), and 'old' (string: previous file path for move events, empty if not applicable). diff --git a/scripts/doc.js b/scripts/doc.js index 29f3d2ba..8bc139f9 100644 --- a/scripts/doc.js +++ b/scripts/doc.js @@ -1,6 +1,6 @@ // doc.js function docOf(obj, prop) { - var block = obj[prosperon.DOC]; + var block = obj[cell.DOC]; if (!block) return ''; // 1) If `block` is a string, that's the entire doc for `obj`. @@ -10,7 +10,7 @@ function docOf(obj, prop) { } // 2) Otherwise, if `block` is an object: - // (a) With no `prop`, return block.doc or block[prosperon.DOC]. + // (a) With no `prop`, return block.doc or block[cell.DOC]. // (b) If `prop` is given, look for doc specifically for that property (just one level). if (typeof block === 'object') { // 2a) No property → top-level doc @@ -18,8 +18,8 @@ function docOf(obj, prop) { if (typeof block.doc === 'string') { return block.doc; } - if (typeof block[prosperon.DOC] === 'string') { - return block[prosperon.DOC]; + if (typeof block[cell.DOC] === 'string') { + return block[cell.DOC]; } return ''; } @@ -34,8 +34,8 @@ function docOf(obj, prop) { if (typeof subBlock.doc === 'string') { return subBlock.doc; } - if (typeof subBlock[prosperon.DOC] === 'string') { - return subBlock[prosperon.DOC]; + if (typeof subBlock[cell.DOC] === 'string') { + return subBlock[cell.DOC]; } return ''; } @@ -218,7 +218,7 @@ function writeProperty(lines, parentObj, prop, desc, level) { function writeMethod(lines, parentObj, prop, fn, level) { // Pull doc from the function or from the parent's doc block - var docStr = fn[prosperon.DOC] || docOf(parentObj, prop) || ''; + var docStr = fn[cell.DOC] || docOf(parentObj, prop) || ''; var paramNames = []; // Try to extract param names from the doc @@ -274,13 +274,13 @@ function writeDataProperty(lines, parentObj, prop, val, level) { } // Provide a doc string for writeDocFile -writeDocFile[prosperon.DOC] = `Return a markdown string for a given obj, with an optional title.`; +writeDocFile[cell.DOC] = `Return a markdown string for a given obj, with an optional title.`; var doc = {writeDocFile: writeDocFile} -doc[prosperon.DOC] = ` +doc[cell.DOC] = ` Provides a consistent way to create documentation for prosperon elements. Objects are documented by adding docstrings directly to object-like things (functions, objects, ...), or to an object's own "doc object". -Docstrings are set to the symbol \`prosperon.DOC\` +Docstrings are set to the symbol \`cell.DOC\` \`\`\`js // Suppose we have a module that returns a function @@ -302,9 +302,9 @@ var greet = { hello() { log.console('hello!') } } -greet[prosperon.DOC] = {} -greet[prosperon.DOC][prosperon.DOC] = 'An object full of different greeter functions' -greet[prosperon.DOC].hello = 'A greeter that says, "hello!"' +greet[cell.DOC] = {} +greet[cell.DOC][cell.DOC] = 'An object full of different greeter functions' +greet[cell.DOC].hello = 'A greeter that says, "hello!"' \`\`\` ` diff --git a/scripts/docstrings.js b/scripts/docstrings.js index 4ed49a88..eeefb89f 100644 --- a/scripts/docstrings.js +++ b/scripts/docstrings.js @@ -1,36 +1,36 @@ -prosperon.c_types.sprite[prosperon.DOC] = {} -prosperon.c_types.sprite[prosperon.DOC][prosperon.DOC] = `A 'sprite' is a simple struct for 2D drawing. It stores a rectangle (pos + size), +prosperon.c_types.sprite[cell.DOC] = {} +prosperon.c_types.sprite[cell.DOC][cell.DOC] = `A 'sprite' is a simple struct for 2D drawing. It stores a rectangle (pos + size), UV coordinates, color, and layer, as well as an associated 'image' object. The sprite can be drawn via GPU or SDL_Renderer. Freed when no JS references remain. `; -prosperon.c_types.sprite[prosperon.DOC].set_affine = `Update this sprite's position and size from a transform's pos and scale. +prosperon.c_types.sprite[cell.DOC].set_affine = `Update this sprite's position and size from a transform's pos and scale. :param transform: The transform whose pos/scale will overwrite the sprite's rect. :return: None `; -prosperon.c_types.sprite[prosperon.DOC].set_rect = `Set the sprite's rect (x, y, w, h) directly. +prosperon.c_types.sprite[cell.DOC].set_rect = `Set the sprite's rect (x, y, w, h) directly. :param rect: An object or array specifying x, y, width, and height. :return: None `; -prosperon.c_types.sprite[prosperon.DOC].set_image = `Assign or replace the sprite's underlying image. Automatically updates UV if +prosperon.c_types.sprite[cell.DOC].set_image = `Assign or replace the sprite's underlying image. Automatically updates UV if the image has a 'rect' property. :param image: A JS object representing the image (with .texture, .rect, etc.). :return: None `; -prosperon.c_types.sprite[prosperon.DOC].layer = `Get or set the sprite's z-layer integer. Sprites with higher layers typically +prosperon.c_types.sprite[cell.DOC].layer = `Get or set the sprite's z-layer integer. Sprites with higher layers typically draw on top of lower layers. :param value: (when setting) An integer specifying the layer. :return: The current layer (when getting), or None (when setting). `; -prosperon.c_types.sprite[prosperon.DOC].color = `Get or set the sprite's color tint as [r, g, b, a]. +prosperon.c_types.sprite[cell.DOC].color = `Get or set the sprite's color tint as [r, g, b, a]. :param value: (when setting) An array [r, g, b, a] in the 0.0..1.0 range. :return: The current color array (when getting), or None (when setting). @@ -40,46 +40,46 @@ prosperon.c_types.sprite[prosperon.DOC].color = `Get or set the sprite's color t // // transform // -prosperon.c_types.transform[prosperon.DOC] = {} -prosperon.c_types.transform[prosperon.DOC][prosperon.DOC] = `A hierarchical transform storing 3D or 2D position, rotation (as a quaternion), +prosperon.c_types.transform[cell.DOC] = {} +prosperon.c_types.transform[cell.DOC][cell.DOC] = `A hierarchical transform storing 3D or 2D position, rotation (as a quaternion), and scale. Can have a parent transform. Freed automatically on GC. `; -prosperon.c_types.transform[prosperon.DOC].pos = `Get or set the transform's position as a 3D vector [x, y, z]. +prosperon.c_types.transform[cell.DOC].pos = `Get or set the transform's position as a 3D vector [x, y, z]. :param value: (when setting) [x, y, z]. :return: The current position vector (when getting), or None (when setting). `; -prosperon.c_types.transform[prosperon.DOC].scale = `Get or set the transform's scale as a 3D vector [x, y, z]. +prosperon.c_types.transform[cell.DOC].scale = `Get or set the transform's scale as a 3D vector [x, y, z]. For 2D usage, z is often 1. :param value: (when setting) [sx, sy, sz]. :return: The current scale (when getting), or None (when setting). `; -prosperon.c_types.transform[prosperon.DOC].rotation = `Get or set the transform's rotation as a quaternion [x, y, z, w]. +prosperon.c_types.transform[cell.DOC].rotation = `Get or set the transform's rotation as a quaternion [x, y, z, w]. Angles in degrees or radians must first be converted prior to making a quaternion. :param value: (when setting) [qx, qy, qz, qw]. :return: The current quaternion (when getting), or None (when setting). `; -prosperon.c_types.transform[prosperon.DOC].parent = `Get or set the transform's parent. If set, this transform becomes a child of +prosperon.c_types.transform[cell.DOC].parent = `Get or set the transform's parent. If set, this transform becomes a child of the parent (re-parenting). Must be another transform object or undefined. :param value: (when setting) Another transform or undefined. :return: The current parent transform (when getting), or None (when setting). `; -prosperon.c_types.transform[prosperon.DOC].change_hook = `A user-supplied function that's called whenever the transform's local matrix changes. +prosperon.c_types.transform[cell.DOC].change_hook = `A user-supplied function that's called whenever the transform's local matrix changes. If undefined, no hook is called. :param value: (when setting) A function. :return: The current function or undefined. `; -prosperon.c_types.transform[prosperon.DOC].trs = `Set the transform's position, rotation, and scale in one call. +prosperon.c_types.transform[cell.DOC].trs = `Set the transform's position, rotation, and scale in one call. :param pos: [x,y,z] for position, or undefined to keep existing. :param quat: [qx,qy,qz,qw] for rotation, or undefined. @@ -87,7 +87,7 @@ prosperon.c_types.transform[prosperon.DOC].trs = `Set the transform's position, :return: None `; -prosperon.c_types.transform[prosperon.DOC].phys2d = `Apply simple 2D velocity and angular velocity to this transform. +prosperon.c_types.transform[cell.DOC].phys2d = `Apply simple 2D velocity and angular velocity to this transform. :param velocity: [vx, vy] added to 'pos' each frame. :param angularVel: A scalar for rotation in (radians/second). @@ -95,62 +95,62 @@ prosperon.c_types.transform[prosperon.DOC].phys2d = `Apply simple 2D velocity an :return: None `; -prosperon.c_types.transform[prosperon.DOC].move = `Translate this transform by the specified vector. +prosperon.c_types.transform[cell.DOC].move = `Translate this transform by the specified vector. :param delta: [dx, dy, dz] to add to .pos :return: None `; -prosperon.c_types.transform[prosperon.DOC].rotate = `Rotate this transform by an axis+angle. +prosperon.c_types.transform[cell.DOC].rotate = `Rotate this transform by an axis+angle. :param axis: [ax, ay, az] the axis of rotation. :param angle: The angle in turns or radians (depending on usage). :return: None `; -prosperon.c_types.transform[prosperon.DOC].angle = `Return the transform's rotation about a specified axis (x, y, or z). +prosperon.c_types.transform[cell.DOC].angle = `Return the transform's rotation about a specified axis (x, y, or z). For example, angle([1,0,0]) returns the roll about the X-axis. :param axis: Which axis [1,0,0] or [0,1,0] or [0,0,1]. :return: The numeric angle in 'turns' or radians, depending on usage. `; -prosperon.c_types.transform[prosperon.DOC].lookat = `Rotate this transform so it looks toward the given world position. +prosperon.c_types.transform[cell.DOC].lookat = `Rotate this transform so it looks toward the given world position. :param target: [x, y, z] position in world coords. :return: None `; -prosperon.c_types.transform[prosperon.DOC].direction = `Rotate a vector by this transform's rotation, effectively "transforming" +prosperon.c_types.transform[cell.DOC].direction = `Rotate a vector by this transform's rotation, effectively "transforming" a direction from local space to world space. :param localDir: [dx, dy, dz] in local transform coordinates. :return: [dx', dy', dz'] direction in world space. `; -prosperon.c_types.transform[prosperon.DOC].unit = `Reset position, rotation, and scale to [0,0,0], identity rotation, and [1,1,1]. +prosperon.c_types.transform[cell.DOC].unit = `Reset position, rotation, and scale to [0,0,0], identity rotation, and [1,1,1]. :return: None `; -prosperon.c_types.transform[prosperon.DOC].rect = `Set this transform's pos and scale from a 2D rect object {x, y, w, h}. +prosperon.c_types.transform[cell.DOC].rect = `Set this transform's pos and scale from a 2D rect object {x, y, w, h}. :param rect: Object with .x, .y, .w, .h :return: None `; -prosperon.c_types.transform[prosperon.DOC].array = `Return this transform's matrix as a 16-element float array in column-major order. +prosperon.c_types.transform[cell.DOC].array = `Return this transform's matrix as a 16-element float array in column-major order. :return: An array of 16 floats. `; -prosperon.c_types.transform[prosperon.DOC].torect = `Convert transform's 2D position/scale to a rect {x, y, w, h}. +prosperon.c_types.transform[cell.DOC].torect = `Convert transform's 2D position/scale to a rect {x, y, w, h}. Rotation is currently ignored. :return: A rect object {x, y, w, h}. `; -prosperon.c_types.transform[prosperon.DOC].children = `Return an array of child transforms belonging to this transform. +prosperon.c_types.transform[cell.DOC].children = `Return an array of child transforms belonging to this transform. :return: An array of transform objects. `; @@ -159,33 +159,33 @@ prosperon.c_types.transform[prosperon.DOC].children = `Return an array of child // // font // -prosperon.c_types.font[prosperon.DOC] = {} -prosperon.c_types.font[prosperon.DOC][prosperon.DOC] = `A bitmap or TTF-based font object storing glyph data. +prosperon.c_types.font[cell.DOC] = {} +prosperon.c_types.font[cell.DOC][cell.DOC] = `A bitmap or TTF-based font object storing glyph data. Used for measuring/drawing text. Freed when GC sees no references. `; -prosperon.c_types.font[prosperon.DOC].linegap = `Get or set the font's additional line spacing above the built-in metrics. +prosperon.c_types.font[cell.DOC].linegap = `Get or set the font's additional line spacing above the built-in metrics. :param value: (when setting) The new line gap. :return: The current line gap (when getting), or None (when setting). `; -prosperon.c_types.font[prosperon.DOC].height = `The baseline-to-baseline height in pixels. +prosperon.c_types.font[cell.DOC].height = `The baseline-to-baseline height in pixels. :return: The font's total height in px. `; -prosperon.c_types.font[prosperon.DOC].ascent = `How far above the baseline the font extends. +prosperon.c_types.font[cell.DOC].ascent = `How far above the baseline the font extends. :return: A scalar float for ascent. `; -prosperon.c_types.font[prosperon.DOC].descent = `How far below baseline the font extends. +prosperon.c_types.font[cell.DOC].descent = `How far below baseline the font extends. :return: A scalar float for descent. `; -prosperon.c_types.font[prosperon.DOC].text_size = `Measure a piece of text's width/height when rendered with this font. +prosperon.c_types.font[cell.DOC].text_size = `Measure a piece of text's width/height when rendered with this font. :param text: The string to measure. :param letterSpacing: Extra spacing between characters. @@ -197,38 +197,38 @@ prosperon.c_types.font[prosperon.DOC].text_size = `Measure a piece of text's wid // // datastream // -prosperon.c_types.datastream[prosperon.DOC]= {} -prosperon.c_types.datastream[prosperon.DOC][prosperon.DOC] = `A streaming media handle, typically for MPEG video. Freed automatically. +prosperon.c_types.datastream[cell.DOC]= {} +prosperon.c_types.datastream[cell.DOC][cell.DOC] = `A streaming media handle, typically for MPEG video. Freed automatically. `; -prosperon.c_types.datastream[prosperon.DOC].time = `Return the current playback time in seconds. +prosperon.c_types.datastream[cell.DOC].time = `Return the current playback time in seconds. :return: Current time as a float in seconds. `; -prosperon.c_types.datastream[prosperon.DOC].seek = `Seek to the specified time (in seconds). +prosperon.c_types.datastream[cell.DOC].seek = `Seek to the specified time (in seconds). :param seconds: The time to jump to in the stream. :return: None `; -prosperon.c_types.datastream[prosperon.DOC].advance = `Advance by a certain number of seconds, decoding video as needed. +prosperon.c_types.datastream[cell.DOC].advance = `Advance by a certain number of seconds, decoding video as needed. :param seconds: The amount of time to skip forward. :return: None `; -prosperon.c_types.datastream[prosperon.DOC].duration = `Return the total duration of the video stream, in seconds, if known. +prosperon.c_types.datastream[cell.DOC].duration = `Return the total duration of the video stream, in seconds, if known. :return: Float seconds duration, or 0 if unknown. `; -prosperon.c_types.datastream[prosperon.DOC].framerate = `Return the framerate (FPS) of the stream if known. +prosperon.c_types.datastream[cell.DOC].framerate = `Return the framerate (FPS) of the stream if known. :return: Float frames per second, or 0 if unknown. `; -prosperon.c_types.datastream[prosperon.DOC].callback = `A function to call whenever a new frame is decoded. If not set, no callback is invoked. +prosperon.c_types.datastream[cell.DOC].callback = `A function to call whenever a new frame is decoded. If not set, no callback is invoked. :param fn: (when setting) A function that receives (surface). :return: The existing function or undefined if none. @@ -238,46 +238,46 @@ prosperon.c_types.datastream[prosperon.DOC].callback = `A function to call whene // // rtree // -prosperon.c_types.rtree[prosperon.DOC] = {} -prosperon.c_types.rtree[prosperon.DOC][prosperon.DOC] = `An R-tree for spatial lookups. Insert bounding boxes, query by bounding box, etc. +prosperon.c_types.rtree[cell.DOC] = {} +prosperon.c_types.rtree[cell.DOC][cell.DOC] = `An R-tree for spatial lookups. Insert bounding boxes, query by bounding box, etc. `; -prosperon.c_types.rtree[prosperon.DOC].add = `Insert an object that has a 'rect' property {x, y, w, h} into the tree. +prosperon.c_types.rtree[cell.DOC].add = `Insert an object that has a 'rect' property {x, y, w, h} into the tree. :param obj: The object to add (must have rectAtom). :return: None `; -prosperon.c_types.rtree[prosperon.DOC].delete = `Remove an object from the tree. Must match the same rect as used when adding. +prosperon.c_types.rtree[cell.DOC].delete = `Remove an object from the tree. Must match the same rect as used when adding. :param obj: The object to remove. :return: None `; -prosperon.c_types.rtree[prosperon.DOC].query = `Return an array of objects whose bounding boxes intersect the given rect. +prosperon.c_types.rtree[cell.DOC].query = `Return an array of objects whose bounding boxes intersect the given rect. :param rect: {x, y, w, h} bounding region to query. :return: Array of objects that overlap that region. `; -prosperon.c_types.rtree[prosperon.DOC].size = `Indicates how many items are stored in the rtree. +prosperon.c_types.rtree[cell.DOC].size = `Indicates how many items are stored in the rtree. :return: Integer count of items in the tree. `; -prosperon.c_types.rtree[prosperon.DOC].forEach = `Call a function for every item in the rtree. +prosperon.c_types.rtree[cell.DOC].forEach = `Call a function for every item in the rtree. :param callback: A function called with no arguments, or possibly (item). :return: None `; -prosperon.c_types.rtree[prosperon.DOC].has = `Return true if the specified object is in the tree, false otherwise. +prosperon.c_types.rtree[cell.DOC].has = `Return true if the specified object is in the tree, false otherwise. :param obj: The object to check. :return: True if found, else false. `; -prosperon.c_types.rtree[prosperon.DOC].values = `Return an array of all items currently in the rtree. +prosperon.c_types.rtree[cell.DOC].values = `Return an array of all items currently in the rtree. :return: Array of all stored objects. `; @@ -286,33 +286,33 @@ prosperon.c_types.rtree[prosperon.DOC].values = `Return an array of all items cu // // PHYSFS_File // -prosperon.c_types.PHYSFS_File[prosperon.DOC] = {} -prosperon.c_types.PHYSFS_File[prosperon.DOC][prosperon.DOC] = `A file handle opened via PhysFS for writing or reading. Freed automatically when references go away. +prosperon.c_types.PHYSFS_File[cell.DOC] = {} +prosperon.c_types.PHYSFS_File[cell.DOC][cell.DOC] = `A file handle opened via PhysFS for writing or reading. Freed automatically when references go away. `; -prosperon.c_types.PHYSFS_File[prosperon.DOC].close = `Close this file handle. Throws on error. +prosperon.c_types.PHYSFS_File[cell.DOC].close = `Close this file handle. Throws on error. :return: None `; -prosperon.c_types.PHYSFS_File[prosperon.DOC].write = `Write data (string or ArrayBuffer) to the file. Throws on error. +prosperon.c_types.PHYSFS_File[cell.DOC].write = `Write data (string or ArrayBuffer) to the file. Throws on error. :param data: The data to write (string or ArrayBuffer). :return: None `; -prosperon.c_types.PHYSFS_File[prosperon.DOC].buffer = `Enable an internal write buffer of the given size on this file. +prosperon.c_types.PHYSFS_File[cell.DOC].buffer = `Enable an internal write buffer of the given size on this file. :param size: Size in bytes of the buffer. :return: None `; -prosperon.c_types.PHYSFS_File[prosperon.DOC].tell = `Return the current position in the file. +prosperon.c_types.PHYSFS_File[cell.DOC].tell = `Return the current position in the file. :return: A numeric offset. `; -prosperon.c_types.PHYSFS_File[prosperon.DOC].eof = `Return whether the file pointer is at end-of-file. +prosperon.c_types.PHYSFS_File[cell.DOC].eof = `Return whether the file pointer is at end-of-file. :return: True if at EOF, false otherwise. `; @@ -321,17 +321,17 @@ prosperon.c_types.PHYSFS_File[prosperon.DOC].eof = `Return whether the file poin // // SDL_Camera // -prosperon.c_types.SDL_Camera[prosperon.DOC] = {} -prosperon.c_types.SDL_Camera[prosperon.DOC][prosperon.DOC] = `A handle to a physical camera device. Freed when references drop or camera is closed. +prosperon.c_types.SDL_Camera[cell.DOC] = {} +prosperon.c_types.SDL_Camera[cell.DOC][cell.DOC] = `A handle to a physical camera device. Freed when references drop or camera is closed. `; -prosperon.c_types.SDL_Camera[prosperon.DOC].frame = `Acquire the latest camera frame (as an SDL_Surface). Returns undefined if no +prosperon.c_types.SDL_Camera[cell.DOC].frame = `Acquire the latest camera frame (as an SDL_Surface). Returns undefined if no new frame is available yet. Throws on error. :return: SDL_Surface or undefined. `; -prosperon.c_types.SDL_Camera[prosperon.DOC].release_frame = `Release a frame surface previously acquired via camera.frame(). Must be +prosperon.c_types.SDL_Camera[cell.DOC].release_frame = `Release a frame surface previously acquired via camera.frame(). Must be done for each acquired frame. :param surface: The surface to release. @@ -342,75 +342,75 @@ done for each acquired frame. // // SDL_Cursor // -prosperon.c_types.SDL_Cursor[prosperon.DOC] = {} -prosperon.c_types.SDL_Cursor[prosperon.DOC][prosperon.DOC] = `An SDL cursor handle. Freed automatically on GC. No direct methods. +prosperon.c_types.SDL_Cursor[cell.DOC] = {} +prosperon.c_types.SDL_Cursor[cell.DOC][cell.DOC] = `An SDL cursor handle. Freed automatically on GC. No direct methods. `; // // SDL_Window // -prosperon.c_types.SDL_Window[prosperon.DOC] = {} -prosperon.c_types.SDL_Window[prosperon.DOC][prosperon.DOC] = `An application window, created via prosperon.engine_start or SDL calls. Freed on GC. +prosperon.c_types.SDL_Window[cell.DOC] = {} +prosperon.c_types.SDL_Window[cell.DOC][cell.DOC] = `An application window, created via prosperon.engine_start or SDL calls. Freed on GC. `; -prosperon.c_types.SDL_Window[prosperon.DOC].fullscreen = `Toggle fullscreen mode for this window (SDL_WINDOW_FULLSCREEN). +prosperon.c_types.SDL_Window[cell.DOC].fullscreen = `Toggle fullscreen mode for this window (SDL_WINDOW_FULLSCREEN). :return: None `; -prosperon.c_types.SDL_Window[prosperon.DOC].make_renderer = `Create an SDL_Renderer for 2D rendering tied to this window. +prosperon.c_types.SDL_Window[cell.DOC].make_renderer = `Create an SDL_Renderer for 2D rendering tied to this window. :param name: The renderer driver name, e.g. "opengl" (may be optional). :return: An SDL_Renderer object. `; -prosperon.c_types.SDL_Window[prosperon.DOC].make_gpu = `Create an SDL_GPUDevice for low-level GPU rendering on this window. +prosperon.c_types.SDL_Window[cell.DOC].make_gpu = `Create an SDL_GPUDevice for low-level GPU rendering on this window. :param debug: If true, enable debugging in the GPU device. :param driverName: The GPU back-end driver, e.g. "opengl". :return: An SDL_GPUDevice. `; -prosperon.c_types.SDL_Window[prosperon.DOC].keyboard_shown = `Return whether the on-screen keyboard is visible (mobile/tablet). +prosperon.c_types.SDL_Window[cell.DOC].keyboard_shown = `Return whether the on-screen keyboard is visible (mobile/tablet). :return: True if shown, false otherwise. `; -prosperon.c_types.SDL_Window[prosperon.DOC].theme = `Currently returns undefined. Placeholder for retrieving OS window theme info. +prosperon.c_types.SDL_Window[cell.DOC].theme = `Currently returns undefined. Placeholder for retrieving OS window theme info. :return: undefined `; -prosperon.c_types.SDL_Window[prosperon.DOC].safe_area = `Return a rect describing any OS-specific "safe" region for UI, e.g. on iPhone with a notch. +prosperon.c_types.SDL_Window[cell.DOC].safe_area = `Return a rect describing any OS-specific "safe" region for UI, e.g. on iPhone with a notch. :return: A rect object {x, y, w, h}. `; -prosperon.c_types.SDL_Window[prosperon.DOC].bordered = `Enable or disable window borders. +prosperon.c_types.SDL_Window[cell.DOC].bordered = `Enable or disable window borders. :param flag: True to show borders, false to hide. :return: None `; -prosperon.c_types.SDL_Window[prosperon.DOC].set_icon = `Set the window's icon from an SDL_Surface. +prosperon.c_types.SDL_Window[cell.DOC].set_icon = `Set the window's icon from an SDL_Surface. :param surface: An SDL_Surface holding the icon. :return: None `; -prosperon.c_types.SDL_Window[prosperon.DOC].mouse_grab = `Grab or ungrab the mouse for this window (so the pointer won't leave). +prosperon.c_types.SDL_Window[cell.DOC].mouse_grab = `Grab or ungrab the mouse for this window (so the pointer won't leave). :param flag: True to grab mouse input, false to release. :return: None `; -prosperon.c_types.SDL_Window[prosperon.DOC].title = `Get or set the window's title text in the title bar. +prosperon.c_types.SDL_Window[cell.DOC].title = `Get or set the window's title text in the title bar. :param newTitle: (when setting) A string title. :return: The current title if getting, or None if setting. `; -prosperon.c_types.SDL_Window[prosperon.DOC].size = `Get or set the window's size as [width, height]. +prosperon.c_types.SDL_Window[cell.DOC].size = `Get or set the window's size as [width, height]. :param newSize: (when setting) e.g. [640, 480] :return: The current [width, height] or None if setting. @@ -420,61 +420,61 @@ prosperon.c_types.SDL_Window[prosperon.DOC].size = `Get or set the window's size // // SDL_Renderer // -prosperon.c_types.SDL_Renderer[prosperon.DOC] = {} -prosperon.c_types.SDL_Renderer[prosperon.DOC][prosperon.DOC] = `A 2D rendering context using the SDL renderer API. Freed automatically. +prosperon.c_types.SDL_Renderer[cell.DOC] = {} +prosperon.c_types.SDL_Renderer[cell.DOC][cell.DOC] = `A 2D rendering context using the SDL renderer API. Freed automatically. `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].draw_color = `Set the render draw color for subsequent primitive calls (rect, line, etc.). +prosperon.c_types.SDL_Renderer[cell.DOC].draw_color = `Set the render draw color for subsequent primitive calls (rect, line, etc.). :param color: [r, g, b, a] in 0..1. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].present = `Display whatever has been rendered (swap buffers). Must be called each frame. +prosperon.c_types.SDL_Renderer[cell.DOC].present = `Display whatever has been rendered (swap buffers). Must be called each frame. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].clear = `Clear the current render target with the renderer's draw color. +prosperon.c_types.SDL_Renderer[cell.DOC].clear = `Clear the current render target with the renderer's draw color. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].rect = `Draw one or more outlines of rectangles. +prosperon.c_types.SDL_Renderer[cell.DOC].rect = `Draw one or more outlines of rectangles. :param rectOrArray: A single rect {x,y,w,h} or an array of rects. :param color: Optional [r,g,b,a]. If provided, overrides current draw color. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].fillrect = `Fill one or more rectangles with the renderer's current color or an optional override. +prosperon.c_types.SDL_Renderer[cell.DOC].fillrect = `Fill one or more rectangles with the renderer's current color or an optional override. :param rectOrArray: A single rect {x,y,w,h} or an array of rects. :param color: Optional [r,g,b,a]. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].line = `Draw a sequence of lines connecting points in an array. +prosperon.c_types.SDL_Renderer[cell.DOC].line = `Draw a sequence of lines connecting points in an array. :param points: An array of [x,y] points. Lines connect consecutive points. :param color: Optional [r,g,b,a]. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].point = `Draw a list of points (pixels). +prosperon.c_types.SDL_Renderer[cell.DOC].point = `Draw a list of points (pixels). :param points: An array of [x,y] positions. :param color: Optional [r,g,b,a]. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].load_texture = `Create an SDL_Texture from a given SDL_Surface for use with this renderer. +prosperon.c_types.SDL_Renderer[cell.DOC].load_texture = `Create an SDL_Texture from a given SDL_Surface for use with this renderer. :param surface: An SDL_Surface. :return: An SDL_Texture object. `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].texture = `Draw a texture onto the render target. +prosperon.c_types.SDL_Renderer[cell.DOC].texture = `Draw a texture onto the render target. :param tex: The SDL_Texture to draw. :param dstRect: The destination rect {x, y, w, h}. @@ -483,7 +483,7 @@ prosperon.c_types.SDL_Renderer[prosperon.DOC].texture = `Draw a texture onto the :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].slice9 = `Draw a texture with 9-slice scaling. The argument includes edges {l, r, t, b} +prosperon.c_types.SDL_Renderer[cell.DOC].slice9 = `Draw a texture with 9-slice scaling. The argument includes edges {l, r, t, b} for the corners/borders that remain unscaled. The rest is tiled or stretched. :param tex: The SDL_Texture. @@ -493,7 +493,7 @@ for the corners/borders that remain unscaled. The rest is tiled or stretched. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].tile = `Tile a texture repeatedly within the specified region. Optionally use a srcRect. +prosperon.c_types.SDL_Renderer[cell.DOC].tile = `Tile a texture repeatedly within the specified region. Optionally use a srcRect. :param tex: The SDL_Texture to tile. :param dstRect: The region to fill {x, y, w, h}. @@ -502,13 +502,13 @@ prosperon.c_types.SDL_Renderer[prosperon.DOC].tile = `Tile a texture repeatedly :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].get_image = `Read back the rendered pixels into a new SDL_Surface. If rect is undefined, capture entire output. +prosperon.c_types.SDL_Renderer[cell.DOC].get_image = `Read back the rendered pixels into a new SDL_Surface. If rect is undefined, capture entire output. :param rect: Optional {x,y,w,h}. :return: An SDL_Surface with the requested region's pixels. `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].fasttext = `Draw debug text using an internal fast path. Typically used for quick debugging overlays. +prosperon.c_types.SDL_Renderer[cell.DOC].fasttext = `Draw debug text using an internal fast path. Typically used for quick debugging overlays. :param text: The string to draw. :param pos: The [x, y] position to draw text. @@ -516,51 +516,51 @@ prosperon.c_types.SDL_Renderer[prosperon.DOC].fasttext = `Draw debug text using :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].geometry = `Render custom geometry from a mesh object {pos, uv, color, indices, count} with an optional texture. +prosperon.c_types.SDL_Renderer[cell.DOC].geometry = `Render custom geometry from a mesh object {pos, uv, color, indices, count} with an optional texture. :param texture: The SDL_Texture or undefined. :param meshObject: The geometry data with typed arrays. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].scale = `Set a scaling factor for all subsequent rendering on this renderer. +prosperon.c_types.SDL_Renderer[cell.DOC].scale = `Set a scaling factor for all subsequent rendering on this renderer. :param scaleVec2: [sx, sy] scaling factors. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].logical_size = `Set a "logical" size that the renderer will scale to. +prosperon.c_types.SDL_Renderer[cell.DOC].logical_size = `Set a "logical" size that the renderer will scale to. For example, (320, 240) can auto-scale up to the window resolution. :param size: [width, height]. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].viewport = `Set the clipping viewport for rendering. Pass undefined to use the full render target. +prosperon.c_types.SDL_Renderer[cell.DOC].viewport = `Set the clipping viewport for rendering. Pass undefined to use the full render target. :param rect: {x, y, w, h}, or undefined. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].clip = `Set or clear the clipping rectangle for drawing. Pass undefined to clear. +prosperon.c_types.SDL_Renderer[cell.DOC].clip = `Set or clear the clipping rectangle for drawing. Pass undefined to clear. :param rect: {x, y, w, h} or undefined. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].vsync = `Enable or disable vertical sync. This may have no effect depending on the driver. +prosperon.c_types.SDL_Renderer[cell.DOC].vsync = `Enable or disable vertical sync. This may have no effect depending on the driver. :param flag: True or false. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].coords = `Convert window coordinates to this renderer's coordinate space. +prosperon.c_types.SDL_Renderer[cell.DOC].coords = `Convert window coordinates to this renderer's coordinate space. :param pos: [x, y] in window space. :return: [x, y] in renderer coordinate space. `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].camera = `Set up a basic 2D camera matrix from a given transform. If 'centered' is true, +prosperon.c_types.SDL_Renderer[cell.DOC].camera = `Set up a basic 2D camera matrix from a given transform. If 'centered' is true, the origin is the center of the viewport, else top-left. :param cameraTransform: The transform whose pos is used. @@ -568,24 +568,24 @@ the origin is the center of the viewport, else top-left. :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].get_viewport = `Return the current viewport rect. +prosperon.c_types.SDL_Renderer[cell.DOC].get_viewport = `Return the current viewport rect. :return: {x, y, w, h} `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].screen2world = `Convert a screen coordinate to world space based on the current camera transform. +prosperon.c_types.SDL_Renderer[cell.DOC].screen2world = `Convert a screen coordinate to world space based on the current camera transform. :param pos: [x, y] screen coords :return: [wx, wy] in world space `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].target = `Set or clear the current render target texture. Pass undefined to reset to the default/window. +prosperon.c_types.SDL_Renderer[cell.DOC].target = `Set or clear the current render target texture. Pass undefined to reset to the default/window. :param texture: An SDL_Texture or undefined :return: None `; -prosperon.c_types.SDL_Renderer[prosperon.DOC].make_sprite_mesh = `Generate a mesh from an array of sprite objects, combining their positions, UVs, +prosperon.c_types.SDL_Renderer[cell.DOC].make_sprite_mesh = `Generate a mesh from an array of sprite objects, combining their positions, UVs, and colors into a single geometry block. :param sprites: An array of sprite-like objects. @@ -596,11 +596,11 @@ and colors into a single geometry block. // // SDL_Texture // -prosperon.c_types.SDL_Texture[prosperon.DOC] = {} -prosperon.c_types.SDL_Texture[prosperon.DOC][prosperon.DOC] = `A 2D GPU-accelerated texture for rendering with SDL_Renderer. Freed automatically. +prosperon.c_types.SDL_Texture[cell.DOC] = {} +prosperon.c_types.SDL_Texture[cell.DOC][cell.DOC] = `A 2D GPU-accelerated texture for rendering with SDL_Renderer. Freed automatically. `; -prosperon.c_types.SDL_Texture[prosperon.DOC].mode = `Set texture scale mode or filtering mode (nearest/linear). +prosperon.c_types.SDL_Texture[cell.DOC].mode = `Set texture scale mode or filtering mode (nearest/linear). :param mode: A string or numeric mode to set (e.g., 'linear'). :return: None @@ -609,12 +609,12 @@ prosperon.c_types.SDL_Texture[prosperon.DOC].mode = `Set texture scale mode or f // // SDL_Surface // -prosperon.c_types.SDL_Surface[prosperon.DOC] = {} -prosperon.c_types.SDL_Surface[prosperon.DOC][prosperon.DOC] = `A software (CPU) image in memory. Freed when references vanish. Typically converted +prosperon.c_types.SDL_Surface[cell.DOC] = {} +prosperon.c_types.SDL_Surface[cell.DOC][cell.DOC] = `A software (CPU) image in memory. Freed when references vanish. Typically converted to SDL_Texture for drawing, or used as raw pixel data. `; -prosperon.c_types.SDL_Surface[prosperon.DOC].blit = `Blit (copy) another surface onto this surface, scaling if needed. +prosperon.c_types.SDL_Surface[cell.DOC].blit = `Blit (copy) another surface onto this surface, scaling if needed. :param dstRect: Destination {x, y, w, h} :param srcSurface: The source SDL_Surface @@ -622,26 +622,26 @@ prosperon.c_types.SDL_Surface[prosperon.DOC].blit = `Blit (copy) another surface :return: None `; -prosperon.c_types.SDL_Surface[prosperon.DOC].scale = `Return a new SDL_Surface scaled to [width, height] using linear filtering. +prosperon.c_types.SDL_Surface[cell.DOC].scale = `Return a new SDL_Surface scaled to [width, height] using linear filtering. :param newSize: [width, height] :return: A new SDL_Surface with the scaled result. `; -prosperon.c_types.SDL_Surface[prosperon.DOC].fill = `Fill the entire surface with a single color. +prosperon.c_types.SDL_Surface[cell.DOC].fill = `Fill the entire surface with a single color. :param color: [r, g, b, a] in 0..1 :return: None `; -prosperon.c_types.SDL_Surface[prosperon.DOC].rect = `Fill a sub-rectangle of the surface with a color. +prosperon.c_types.SDL_Surface[cell.DOC].rect = `Fill a sub-rectangle of the surface with a color. :param rect: {x, y, w, h} :param color: [r, g, b, a] :return: None `; -prosperon.c_types.SDL_Surface[prosperon.DOC].dup = `Make a copy of this surface in RGBA format. +prosperon.c_types.SDL_Surface[cell.DOC].dup = `Make a copy of this surface in RGBA format. :return: A new SDL_Surface copy. `; @@ -650,30 +650,30 @@ prosperon.c_types.SDL_Surface[prosperon.DOC].dup = `Make a copy of this surface // // SDL_GPUDevice // -prosperon.c_types.SDL_GPUDevice[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUDevice[prosperon.DOC][prosperon.DOC] = `A handle for low-level GPU operations via SDL GPU. Freed on GC. +prosperon.c_types.SDL_GPUDevice[cell.DOC] = {} +prosperon.c_types.SDL_GPUDevice[cell.DOC][cell.DOC] = `A handle for low-level GPU operations via SDL GPU. Freed on GC. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].claim_window = `Claim an existing SDL_Window so this GPU device can render to it. +prosperon.c_types.SDL_GPUDevice[cell.DOC].claim_window = `Claim an existing SDL_Window so this GPU device can render to it. :param window: The SDL_Window to attach. :return: None `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].make_pipeline = `Create a new graphics pipeline from a descriptor object specifying shaders, +prosperon.c_types.SDL_GPUDevice[cell.DOC].make_pipeline = `Create a new graphics pipeline from a descriptor object specifying shaders, blend states, vertex format, etc. :param pipelineDesc: An object containing pipeline fields (vertexShader, blend, etc.). :return: A SDL_GPUGraphicsPipeline handle. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].compute_pipeline = `Create a compute pipeline from a descriptor (shader code, threadgroup sizes, etc.). +prosperon.c_types.SDL_GPUDevice[cell.DOC].compute_pipeline = `Create a compute pipeline from a descriptor (shader code, threadgroup sizes, etc.). :param desc: An object with shader code, thread counts, etc. :return: SDL_GPUComputePipeline handle. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].set_swapchain = `Specify how the swapchain (final rendered image) is composed, e.g. 'sdr', 'hdr', +prosperon.c_types.SDL_GPUDevice[cell.DOC].set_swapchain = `Specify how the swapchain (final rendered image) is composed, e.g. 'sdr', 'hdr', and present mode like 'vsync' or 'immediate'. :param composition: E.g. 'sdr', 'linear', or 'hdr'. @@ -681,7 +681,7 @@ and present mode like 'vsync' or 'immediate'. :return: None `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].sort_sprite = `A comparator function used for sorting sprite objects by layer, y, and texture. +prosperon.c_types.SDL_GPUDevice[cell.DOC].sort_sprite = `A comparator function used for sorting sprite objects by layer, y, and texture. Usually used internally. :param a: A sprite object. @@ -689,48 +689,48 @@ Usually used internally. :return: <0, 0, or >0 for sort ordering. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].make_sampler = `Create a sampler object specifying filtering, wrapping, anisotropy, etc. +prosperon.c_types.SDL_GPUDevice[cell.DOC].make_sampler = `Create a sampler object specifying filtering, wrapping, anisotropy, etc. :param samplerDesc: An object with min_filter, mag_filter, etc. :return: SDL_GPUSampler handle. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].load_texture = `Upload an SDL_Surface into a GPU texture, optionally compressing with DXT. Freed automatically. +prosperon.c_types.SDL_GPUDevice[cell.DOC].load_texture = `Upload an SDL_Surface into a GPU texture, optionally compressing with DXT. Freed automatically. :param surface: An SDL_Surface. :param compressionLevel: 0=none, 1=DXT1 or DXT5, 2=high quality, etc. :return: SDL_GPUTexture `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].texture = `Create a GPU texture with the specified format usage. +prosperon.c_types.SDL_GPUDevice[cell.DOC].texture = `Create a GPU texture with the specified format usage. :param desc: Object with {width, height, layers, type, format, usage, etc.} :return: SDL_GPUTexture `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].make_quad = `Return a simple 2-triangle quad geometry covering [0,1]x[0,1]. +prosperon.c_types.SDL_GPUDevice[cell.DOC].make_quad = `Return a simple 2-triangle quad geometry covering [0,1]x[0,1]. Useful for post-processing passes. :return: A mesh {pos, uv, color, indices}. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].driver = `Return the name of the underlying GPU driver in use (e.g. 'OpenGL'). +prosperon.c_types.SDL_GPUDevice[cell.DOC].driver = `Return the name of the underlying GPU driver in use (e.g. 'OpenGL'). :return: A string with driver name. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].make_shader = `Compile raw shader code (vertex or fragment) in e.g. SPIR-V, MSL, or DXIL format. +prosperon.c_types.SDL_GPUDevice[cell.DOC].make_shader = `Compile raw shader code (vertex or fragment) in e.g. SPIR-V, MSL, or DXIL format. :param desc: {code:ArrayBuffer, stage:'vertex'|'fragment', format:'spv'|..., entrypoint:'main', ...} :return: SDL_GPUShader object `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].acquire_cmd_buffer = `Obtain a new command buffer for recording GPU commands. Must be submitted or canceled. +prosperon.c_types.SDL_GPUDevice[cell.DOC].acquire_cmd_buffer = `Obtain a new command buffer for recording GPU commands. Must be submitted or canceled. :return: SDL_GPUCommandBuffer handle `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].upload = `Upload CPU data into a list of GPU buffers, optionally reusing or returning a +prosperon.c_types.SDL_GPUDevice[cell.DOC].upload = `Upload CPU data into a list of GPU buffers, optionally reusing or returning a transfer buffer. Typically you provide (cmdBuf, arrayOfTypedArrays, [transferBuffer]). :param cmdBuffer: The command buffer in which to record copy commands. @@ -739,25 +739,25 @@ transfer buffer. Typically you provide (cmdBuf, arrayOfTypedArrays, [transferBuf :return: The transfer buffer used or newly created. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].wait_for_fences = `Wait on an array of GPU fence objects, optionally requiring all or any. +prosperon.c_types.SDL_GPUDevice[cell.DOC].wait_for_fences = `Wait on an array of GPU fence objects, optionally requiring all or any. :param fences: An array of SDL_GPUFence objects. :param waitAll: Boolean, true to wait for all fences, false for any. :return: True if fences signaled, false on timeout or error. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].query_fence = `Check if the given fence has been signaled yet. Non-blocking. +prosperon.c_types.SDL_GPUDevice[cell.DOC].query_fence = `Check if the given fence has been signaled yet. Non-blocking. :param fence: SDL_GPUFence handle :return: True if signaled, false if still pending `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].shader_format = `Return an array of supported GPU shader binary formats (like 'spv', 'dxbc', etc.). +prosperon.c_types.SDL_GPUDevice[cell.DOC].shader_format = `Return an array of supported GPU shader binary formats (like 'spv', 'dxbc', etc.). :return: Array of strings naming supported formats. `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].slice9 = `Generate a 9-slice tiling geometry in one shot. For advanced usage with GPU pipeline. +prosperon.c_types.SDL_GPUDevice[cell.DOC].slice9 = `Generate a 9-slice tiling geometry in one shot. For advanced usage with GPU pipeline. :param texture: An SDL_GPUTexture :param dstRect: The rectangle {x, y, w, h} @@ -765,7 +765,7 @@ prosperon.c_types.SDL_GPUDevice[prosperon.DOC].slice9 = `Generate a 9-slice tili :return: A mesh object `; -prosperon.c_types.SDL_GPUDevice[prosperon.DOC].tile = `Generate geometry to tile a texture portion inside a dest rect. +prosperon.c_types.SDL_GPUDevice[cell.DOC].tile = `Generate geometry to tile a texture portion inside a dest rect. Often used for repeating backgrounds. :param texture: The SDL_GPUTexture @@ -779,51 +779,51 @@ Often used for repeating backgrounds. // // SDL_GPUCommandBuffer // -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC][prosperon.DOC] = `A command buffer that accumulates rendering, copy, and compute operations. Freed after submission or GC. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC] = {} +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC][cell.DOC] = `A command buffer that accumulates rendering, copy, and compute operations. Freed after submission or GC. `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].render_pass = `Begin a render pass with color/depth attachments. Provide an object with +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].render_pass = `Begin a render pass with color/depth attachments. Provide an object with 'color_targets' and optional 'depth_stencil'. Returns an SDL_GPURenderPass handle. :param passDesc: {color_targets:[...], depth_stencil:...} :return: SDL_GPURenderPass `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].compute_pass = `Begin a compute pass reading/writing given arrays of textures and buffers. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].compute_pass = `Begin a compute pass reading/writing given arrays of textures and buffers. :param storageTextures: array of read/write textures :param storageBuffers: array of read/write buffers :return: SDL_GPUComputePass `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].swapchain_pass = `Begin a render pass that directly targets the swapchain (the window). Clears +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].swapchain_pass = `Begin a render pass that directly targets the swapchain (the window). Clears with the specified color. :param clearColor: [r,g,b,a] :return: SDL_GPURenderPass `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].acquire_swapchain = `Acquire the current swapchain texture from the window. Internal usage. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].acquire_swapchain = `Acquire the current swapchain texture from the window. Internal usage. :return: SDL_GPUTexture handle `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].bind_vertex_buffer = `Bind a GPU buffer as the vertex buffer at a given slot. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].bind_vertex_buffer = `Bind a GPU buffer as the vertex buffer at a given slot. :param slot: Integer slot index. :param buffer: The SDL_GPUBuffer. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].bind_index_buffer = `Bind a GPU buffer as the index buffer (16-bit or 32-bit). +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].bind_index_buffer = `Bind a GPU buffer as the index buffer (16-bit or 32-bit). :param buffer: The SDL_GPUBuffer. :param offset: Optional offset in bytes. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].bind_fragment_sampler = `Bind a texture+sampler pair to a particular fragment shader slot. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].bind_fragment_sampler = `Bind a texture+sampler pair to a particular fragment shader slot. :param slot: Index of the sampler binding. :param texture: The SDL_GPUTexture @@ -831,45 +831,45 @@ prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].bind_fragment_sampler = `B :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].push_vertex_uniform_data = `Push raw data to a vertex shader uniform block. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].push_vertex_uniform_data = `Push raw data to a vertex shader uniform block. :param slot: The uniform buffer slot. :param data: An ArrayBuffer with the data to upload. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].push_fragment_uniform_data = `Push raw data to a fragment shader uniform block. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].push_fragment_uniform_data = `Push raw data to a fragment shader uniform block. :param slot: The uniform buffer slot index. :param data: An ArrayBuffer with uniform data. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].push_compute_uniform_data = `Push raw data to a compute shader uniform buffer. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].push_compute_uniform_data = `Push raw data to a compute shader uniform buffer. :param slot: The uniform buffer slot. :param data: An ArrayBuffer with the data. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].submit = `Submit this command buffer to the GPU and return a fence for synchronization. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].submit = `Submit this command buffer to the GPU and return a fence for synchronization. :return: An SDL_GPUFence `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].cancel = `Cancel (discard) this command buffer without submitting. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].cancel = `Cancel (discard) this command buffer without submitting. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].camera = `Write a camera transform (projection/view) to a uniform slot for 3D or 2D usage. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].camera = `Write a camera transform (projection/view) to a uniform slot for 3D or 2D usage. :param cameraTransform: A camera object or transform with .pos, fov, etc. :param uniformSlot: The integer uniform buffer slot to which data is pushed. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].hud = `Write an orthographic full-screen "HUD" matrix to a uniform slot. Typically used +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].hud = `Write an orthographic full-screen "HUD" matrix to a uniform slot. Typically used for 2D overlays. :param sizeVec2: [width, height] of the viewport area. @@ -877,24 +877,24 @@ for 2D overlays. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].push_debug_group = `Push a named debug group marker onto the GPU command list (for debuggers/profilers). +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].push_debug_group = `Push a named debug group marker onto the GPU command list (for debuggers/profilers). :param name: The debug label string. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].pop_debug_group = `Pop the most recent debug group marker. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].pop_debug_group = `Pop the most recent debug group marker. :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].debug_label = `Insert a one-off debug label at the current spot in the command list. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].debug_label = `Insert a one-off debug label at the current spot in the command list. :param label: The debug label string :return: None `; -prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].blit = `Blit one GPU texture to another with optional flip mode, filter, and clear operations. +prosperon.c_types.SDL_GPUCommandBuffer[cell.DOC].blit = `Blit one GPU texture to another with optional flip mode, filter, and clear operations. :param blitDesc: { src:{texture,mip_level, etc}, dst:{texture,...}, load_op, flip, filter, clear_color:[r,g,b,a] } :return: None @@ -904,29 +904,29 @@ prosperon.c_types.SDL_GPUCommandBuffer[prosperon.DOC].blit = `Blit one GPU textu // // SDL_GPURenderPass // -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC] = {} -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC][prosperon.DOC] = `A single pass of drawing commands with color/depth attachments. Freed after end() or GC. +prosperon.c_types.SDL_GPURenderPass[cell.DOC] = {} +prosperon.c_types.SDL_GPURenderPass[cell.DOC][cell.DOC] = `A single pass of drawing commands with color/depth attachments. Freed after end() or GC. `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_pipeline = `Bind a previously created graphics pipeline (shaders, states, vertex layouts, etc.). +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_pipeline = `Bind a previously created graphics pipeline (shaders, states, vertex layouts, etc.). :param pipeline: The SDL_GPUGraphicsPipeline :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].viewport = `Set the viewport for clipping or scaling draws, in pass-local coordinates. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].viewport = `Set the viewport for clipping or scaling draws, in pass-local coordinates. :param rect: {x,y,w,h} :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].scissor = `Set a scissor rectangle for discarding pixels outside it. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].scissor = `Set a scissor rectangle for discarding pixels outside it. :param rect: {x,y,w,h} :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].draw = `Issue a non-indexed draw call. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].draw = `Issue a non-indexed draw call. :param primitiveType: e.g. SDL_GPU_PRIMITIVETYPE_TRIANGLELIST :param baseVertex: Starting vertex offset. @@ -935,7 +935,7 @@ prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].draw = `Issue a non-indexed d :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].draw_indexed = `Issue an indexed draw call from the bound index buffer. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].draw_indexed = `Issue an indexed draw call from the bound index buffer. :param primitiveType: The primitive type constant. :param baseVertex: Offset in the vertex buffer. @@ -945,26 +945,26 @@ prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].draw_indexed = `Issue an inde :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].end = `End this render pass, finalizing the draw operations. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].end = `End this render pass, finalizing the draw operations. :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_index_buffer = `Bind an index buffer inside this pass, possibly overriding the global one. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_index_buffer = `Bind an index buffer inside this pass, possibly overriding the global one. :param buffer: The SDL_GPUBuffer :param elementSize16bit: If 2, uses 16-bit indices; if 4, uses 32-bit indices :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_buffers = `Bind multiple vertex buffers at consecutive slots. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_buffers = `Bind multiple vertex buffers at consecutive slots. :param firstSlot: The starting vertex buffer slot. :param arrayOfBuffers: An array of GPUBuffer objects :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_samplers = `Bind multiple texture/sampler pairs to either vertex or fragment slots. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_samplers = `Bind multiple texture/sampler pairs to either vertex or fragment slots. :param vertexOrFragment: Boolean, true for vertex stage, false for fragment. :param firstSlot: The first sampler slot to bind. @@ -972,14 +972,14 @@ prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_samplers = `Bind multipl :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_storage_buffers = `Bind one or more storage buffers for read/write in the pipeline. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_storage_buffers = `Bind one or more storage buffers for read/write in the pipeline. :param firstSlot: Starting buffer slot index. :param buffers: An array of SDL_GPUBuffer objects. :return: None `; -prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_storage_textures = `Bind one or more storage textures for read/write in the pipeline. +prosperon.c_types.SDL_GPURenderPass[cell.DOC].bind_storage_textures = `Bind one or more storage textures for read/write in the pipeline. :param firstSlot: Starting texture slot index. :param textures: An array of SDL_GPUTexture objects. @@ -989,11 +989,11 @@ prosperon.c_types.SDL_GPURenderPass[prosperon.DOC].bind_storage_textures = `Bind // // SDL_GPUComputePass // -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC][prosperon.DOC] = `A compute pass for dispatching compute pipelines. Freed after end() or GC. +prosperon.c_types.SDL_GPUComputePass[cell.DOC] = {} +prosperon.c_types.SDL_GPUComputePass[cell.DOC][cell.DOC] = `A compute pass for dispatching compute pipelines. Freed after end() or GC. `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].dispatch = `Dispatch the compute pipeline with the specified threadgroup counts. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].dispatch = `Dispatch the compute pipeline with the specified threadgroup counts. :param x: Number of groups in X dimension :param y: Number of groups in Y dimension @@ -1001,32 +1001,32 @@ prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].dispatch = `Dispatch the com :return: None `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].end = `End this compute pass. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].end = `End this compute pass. :return: None `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].pipeline = `Bind a compute pipeline in this pass. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].pipeline = `Bind a compute pipeline in this pass. :param computePipeline: The SDL_GPUComputePipeline :return: None `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].samplers = `Bind a set of texture/sampler pairs for compute usage. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].samplers = `Bind a set of texture/sampler pairs for compute usage. :param arrayOfSamplerBindings: e.g. [ {texture, sampler}, ...] :param firstSlot: The starting sampler slot. :return: None `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].storage_buffers = `Bind an array of storage buffers for the compute shader. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].storage_buffers = `Bind an array of storage buffers for the compute shader. :param arrayOfBuffers: The buffers :param firstSlot: Starting binding slot. :return: None `; -prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].storage_textures = `Bind an array of storage textures for the compute shader. +prosperon.c_types.SDL_GPUComputePass[cell.DOC].storage_textures = `Bind an array of storage textures for the compute shader. :param arrayOfTextures: The textures :param firstSlot: Starting binding slot @@ -1037,60 +1037,60 @@ prosperon.c_types.SDL_GPUComputePass[prosperon.DOC].storage_textures = `Bind an // // SDL_GPUCopyPass // -prosperon.c_types.SDL_GPUCopyPass[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUCopyPass[prosperon.DOC][prosperon.DOC] = `A pass for CPU<->GPU or GPU<->GPU copy operations. No direct JS API besides internal usage. +prosperon.c_types.SDL_GPUCopyPass[cell.DOC] = {} +prosperon.c_types.SDL_GPUCopyPass[cell.DOC][cell.DOC] = `A pass for CPU<->GPU or GPU<->GPU copy operations. No direct JS API besides internal usage. `; // // SDL_GPUFence // -prosperon.c_types.SDL_GPUFence[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUFence[prosperon.DOC][prosperon.DOC] = `A GPU fence for synchronization. Created upon commandBuffer.submit(). +prosperon.c_types.SDL_GPUFence[cell.DOC] = {} +prosperon.c_types.SDL_GPUFence[cell.DOC][cell.DOC] = `A GPU fence for synchronization. Created upon commandBuffer.submit(). Wait or query it with device.wait_for_fences or device.query_fence. `; // // SDL_GPUTransferBuffer // -prosperon.c_types.SDL_GPUTransferBuffer[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUTransferBuffer[prosperon.DOC][prosperon.DOC] = `A staging buffer used for copying data to or from GPU buffers/textures. Typically +prosperon.c_types.SDL_GPUTransferBuffer[cell.DOC] = {} +prosperon.c_types.SDL_GPUTransferBuffer[cell.DOC][cell.DOC] = `A staging buffer used for copying data to or from GPU buffers/textures. Typically allocated/used internally by device.upload(...). `; // // SDL_GPUShader // -prosperon.c_types.SDL_GPUShader[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUShader[prosperon.DOC][prosperon.DOC] = `A single compiled shader (vertex or fragment) in a GPU-friendly format +prosperon.c_types.SDL_GPUShader[cell.DOC] = {} +prosperon.c_types.SDL_GPUShader[cell.DOC][cell.DOC] = `A single compiled shader (vertex or fragment) in a GPU-friendly format (e.g., SPIR-V, MSL). Combined into a pipeline for drawing. `; // // SDL_GPUSampler // -prosperon.c_types.SDL_GPUSampler[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUSampler[prosperon.DOC][prosperon.DOC] = `Defines how a texture is sampled (filter mode, address mode, anisotropy, compare op, etc.). +prosperon.c_types.SDL_GPUSampler[cell.DOC] = {} +prosperon.c_types.SDL_GPUSampler[cell.DOC][cell.DOC] = `Defines how a texture is sampled (filter mode, address mode, anisotropy, compare op, etc.). `; // // SDL_GPUGraphicsPipeline // -prosperon.c_types.SDL_GPUGraphicsPipeline[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUGraphicsPipeline[prosperon.DOC][prosperon.DOC] = `Encapsulates vertex+fragment shaders, blend/cull states, and vertex attribute layouts. +prosperon.c_types.SDL_GPUGraphicsPipeline[cell.DOC] = {} +prosperon.c_types.SDL_GPUGraphicsPipeline[cell.DOC][cell.DOC] = `Encapsulates vertex+fragment shaders, blend/cull states, and vertex attribute layouts. Created via device.make_pipeline(...). `; // // SDL_GPUComputePipeline // -prosperon.c_types.SDL_GPUComputePipeline[prosperon.DOC] = {} -prosperon.c_types.SDL_GPUComputePipeline[prosperon.DOC][prosperon.DOC] = `Encapsulates a compute shader program plus associated resource layouts. +prosperon.c_types.SDL_GPUComputePipeline[cell.DOC] = {} +prosperon.c_types.SDL_GPUComputePipeline[cell.DOC][cell.DOC] = `Encapsulates a compute shader program plus associated resource layouts. Created via device.compute_pipeline(...). `; // Document the main prosperon object -prosperon[prosperon.DOC] = { +prosperon[cell.DOC] = { doc: `The main prosperon object providing event dispatch, signal handling, and engine management.`, DOC: `Symbol used to store documentation references on objects.`, on: `Register a callback function for a given event type. Returns a function to remove the callback.`, @@ -1100,7 +1100,7 @@ prosperon[prosperon.DOC] = { } // Document the actor object/prototype -actor[prosperon.DOC] = { +actor[cell.DOC] = { doc: `The actor object/prototype, serving as a base for all game actors or entities.`, spawn: `Create a new actor from a script, optionally applying a config object, then call the new actor's 'awake' method.`, kill: `Destroy this actor, removing it from the game along with all underlings. Frees resources and triggers garbage if defined.`, @@ -1110,15 +1110,15 @@ actor[prosperon.DOC] = { } // Expand console.doc to document the console object and missing methods -console[prosperon.DOC] = {} -console[prosperon.DOC][prosperon.DOC] = `The console object provides various logging, debugging, and output methods.` -console[prosperon.DOC].spam = `Output a spam-level message for very verbose logging.` -console[prosperon.DOC].debug = `Output a debug-level message.` -console[prosperon.DOC].panic = `Output a panic-level message and exit the program.` -console[prosperon.DOC].assert = `If the condition is false, print an error and panic.` +console[cell.DOC] = {} +console[cell.DOC][cell.DOC] = `The console object provides various logging, debugging, and output methods.` +console[cell.DOC].spam = `Output a spam-level message for very verbose logging.` +console[cell.DOC].debug = `Output a debug-level message.` +console[cell.DOC].panic = `Output a panic-level message and exit the program.` +console[cell.DOC].assert = `If the condition is false, print an error and panic.` // Document the Register object -Register[prosperon.DOC] = { +Register[cell.DOC] = { doc: `Factory for creating and managing event registries (e.g. update, draw, etc.) within Prosperon.`, add_cb: `Create or retrieve a registry for an event type, exposing a 'register' method for callbacks.`, pull_registers: `Gather the names of all recognized event methods implemented by an object.`, @@ -1126,4 +1126,4 @@ Register[prosperon.DOC] = { check_registers: `Automatically register recognized events (like 'update', 'gui', etc.) on an object.`, } -use[prosperon.DOC] = 'Return the value from the provided path to a module.' +use[cell.DOC] = 'Return the value from the provided path to a module.' diff --git a/scripts/enet.js b/scripts/enet.js index 13603497..9df75b70 100644 --- a/scripts/enet.js +++ b/scripts/enet.js @@ -5,21 +5,21 @@ var enet = this; // Top-level ENet functions //------------------------------------------------ -enet.initialize[prosperon.DOC] = ` +enet.initialize[cell.DOC] = ` Initialize the ENet library. Must be called before using any ENet functionality. Throws an error if initialization fails. :return: None `; -enet.deinitialize[prosperon.DOC] = ` +enet.deinitialize[cell.DOC] = ` Deinitialize the ENet library, cleaning up all resources. Call this when you no longer need any ENet functionality. :return: None `; -enet.create_host[prosperon.DOC] = ` +enet.create_host[cell.DOC] = ` Create an ENet host for either a client-like unbound host or a server bound to a specific address and port: @@ -41,7 +41,7 @@ Throws an error if host creation fails for any reason. var enet_host = prosperon.c_types.enet_host; -enet_host.service[prosperon.DOC] = ` +enet_host.service[cell.DOC] = ` Poll for and process any available network events (connect, receive, disconnect, or none) from this host, calling the provided callback for each event. This function loops until no more events are available in the current timeframe. @@ -59,7 +59,7 @@ Event object properties: :return: None `; -enet_host.connect[prosperon.DOC] = ` +enet_host.connect[cell.DOC] = ` Initiate a connection from this host to a remote server. Throws an error if the connection cannot be started. @@ -68,13 +68,13 @@ connection cannot be started. :return: An ENetPeer object representing the connection. `; -enet_host.flush[prosperon.DOC] = ` +enet_host.flush[cell.DOC] = ` Flush all pending outgoing packets for this host immediately. :return: None `; -enet_host.broadcast[prosperon.DOC] = ` +enet_host.broadcast[cell.DOC] = ` Broadcast a JavaScript object to all connected peers on channel 0. The object is serialized to JSON, and the packet is sent reliably. Throws an error if serialization fails. @@ -88,7 +88,7 @@ serialized to JSON, and the packet is sent reliably. Throws an error if serializ var enet_peer = prosperon.c_types.enet_peer; -enet_peer.send[prosperon.DOC] = ` +enet_peer.send[cell.DOC] = ` Send a JavaScript object to this peer on channel 0. The object is serialized to JSON and sent reliably. Throws an error if serialization fails. @@ -96,38 +96,38 @@ sent reliably. Throws an error if serialization fails. :return: None `; -enet_peer.disconnect[prosperon.DOC] = ` +enet_peer.disconnect[cell.DOC] = ` Request a graceful disconnection from this peer. The connection will close after pending data is sent. :return: None `; -enet_peer.disconnect_now[prosperon.DOC] = ` +enet_peer.disconnect_now[cell.DOC] = ` Immediately terminate the connection to this peer, discarding any pending data. :return: None `; -enet_peer.disconnect_later[prosperon.DOC] = ` +enet_peer.disconnect_later[cell.DOC] = ` Request a disconnection from this peer after all queued packets are sent. :return: None `; -enet_peer.reset[prosperon.DOC] = ` +enet_peer.reset[cell.DOC] = ` Reset this peer's connection, immediately dropping it and clearing its internal state. :return: None `; -enet_peer.ping[prosperon.DOC] = ` +enet_peer.ping[cell.DOC] = ` Send a ping request to this peer to measure latency. :return: None `; -enet_peer.throttle_configure[prosperon.DOC] = ` +enet_peer.throttle_configure[cell.DOC] = ` Configure the throttling behavior for this peer, controlling how ENet adjusts its sending rate based on packet loss or congestion. @@ -137,7 +137,7 @@ rate based on packet loss or congestion. :return: None `; -enet_peer.timeout[prosperon.DOC] = ` +enet_peer.timeout[cell.DOC] = ` Set timeout parameters for this peer, determining how long ENet waits before considering the connection lost. diff --git a/scripts/engine.js b/scripts/engine.js index 10611d97..ab021f4f 100644 --- a/scripts/engine.js +++ b/scripts/engine.js @@ -1,5 +1,7 @@ (function engine() { - prosperon.DOC = prosperon.hidden.DOCSYM + globalThis.cell = prosperon + cell.hidden.console.print("HELLO\n") + cell.DOC = cell.hidden.DOCSYM globalThis.pi = 3.1415926535897932 @@ -22,15 +24,15 @@ function caller_data(depth = 0) } function console_rec(line, file, msg) { - return `[${prosperon.id.slice(0,5)}] [${file}:${line}]: ${msg}\n` + return `[${cell.id.slice(0,5)}] [${file}:${line}]: ${msg}\n` - var id = prosperon.name ? prosperon.name : prosperon.id + var id = cell.name ? cell.name : cell.id id = id.substring(0,6) return `[${id}] [${time.text("mb d yyyy h:nn:ss")}] ${file}:${line}: ${msg}\n` } -var console_mod = prosperon.hidden.console +var console_mod = cell.hidden.console var logs = {} logs.console = function(msg) @@ -72,8 +74,8 @@ globalThis.log = new Proxy(logs, { } }) -// Get hidden modules from prosperon.hidden before stripping it -var hidden = prosperon.hidden +// Get hidden modules from cell.hidden before stripping it +var hidden = cell.hidden var actor_mod = hidden.actor var wota = hidden.wota @@ -82,8 +84,8 @@ var use_dyn = hidden.use_dyn var enet = hidden.enet var nota = hidden.nota -// Strip hidden from prosperon so nothing else can access it -delete prosperon.hidden +// Strip hidden from cell so nothing else can access it +delete cell.hidden var os = use_embed('os') var js = use_embed('js') @@ -186,12 +188,12 @@ globalThis.use = function use(file, ...args) { inProgress[path] = true loadingStack.push(file) - // Determine the compiled file path in .prosperon directory + // Determine the compiled file path in .cell directory var compiledPath = path + '.o' - // Ensure .prosperon directory exists - if (!io.exists('.prosperon')) { - io.mkdir('.prosperon') + // Ensure .cell directory exists + if (!io.exists('.cell')) { + io.mkdir('.cell') } // Check if compiled version exists and is newer than source @@ -218,7 +220,7 @@ globalThis.use = function use(file, ...args) { var mod_script = `(function setup_${mod_name}_module(arg){${script};})` fn = js.compile(path, mod_script) - // Save compiled version to .prosperon directory + // Save compiled version to .cell directory var compiled = js.compile_blob(fn) io.slurpwrite(compiledPath, compiled) @@ -327,10 +329,10 @@ function create_actor(__ACTORDATA__ = {id:util.guid()}) { var $_ = create_actor() $_.random = crypto.random -$_.random[prosperon.DOC] = "returns a number between 0 and 1. There is a 50% chance that the result is less than 0.5." +$_.random[cell.DOC] = "returns a number between 0 and 1. There is a 50% chance that the result is less than 0.5." $_.clock = function(fn) { return os.now() } -$_.clock[prosperon.DOC] = "takes a function input value that will eventually be called with the current time in number form." +$_.clock[cell.DOC] = "takes a function input value that will eventually be called with the current time in number form." var underlings = new Set() var overling = undefined @@ -382,7 +384,7 @@ $_.connection = function(callback, actor, config) { } throw new Error(`Could not get connection information for ${actor}`) } -$_.connection[prosperon.DOC] = "The connection function takes a callback function, an actor object, and a configuration record for getting information about the status of a connection to the actor. The configuration record is used to request the sort of information that needs to be communicated. This can include latency, bandwidth, activity, congestion, cost, partitions. The callback is given a record containing the requested information." +$_.connection[cell.DOC] = "The connection function takes a callback function, an actor object, and a configuration record for getting information about the status of a connection to the actor. The configuration record is used to request the sort of information that needs to be communicated. This can include latency, bandwidth, activity, congestion, cost, partitions. The callback is given a record containing the requested information." var peers = {} var id_address = {} @@ -399,7 +401,7 @@ $_.portal = function(fn, port) { portal = enet.create_host({address: "any", port}) portal_fn = fn } -$_.portal[prosperon.DOC] = "A portal is a special actor with a public address that performs introduction services. It listens on a specified port for contacts by external actors that need to acquire an actor object. The function will receive the record containing the request. The record can have a reply sent through it. A portal can respond by beginning a new actor, or finding an existing actor, or by forwarding the contact message to another actor. This is how distributed Misty networks are bootstrapped. The portal function returns null." +$_.portal[cell.DOC] = "A portal is a special actor with a public address that performs introduction services. It listens on a specified port for contacts by external actors that need to acquire an actor object. The function will receive the record containing the request. The record can have a reply sent through it. A portal can respond by beginning a new actor, or finding an existing actor, or by forwarding the contact message to another actor. This is how distributed Misty networks are bootstrapped. The portal function returns null." function handle_host(e) { switch (e.type) { @@ -449,13 +451,13 @@ $_.contact = function(callback, record) { send(create_actor(record), record, callback) } -$_.contact[prosperon.DOC] = `The contact function sends a message to a portal on another machine to obtain an actor object. +$_.contact[cell.DOC] = `The contact function sends a message to a portal on another machine to obtain an actor object. The callback is a function with a actor input and a reason input. If successful, actor is bound to an actor object. If not successful, actor is null and reason may contain an explanation.` $_.receiver = function receiver(fn) { receive_fn = fn } -$_.receiver[prosperon.DOC] = "registers a function that will receive all messages..." +$_.receiver[cell.DOC] = "registers a function that will receive all messages..." $_.start = function start(cb, prg, arg) { if (dying) { @@ -464,13 +466,13 @@ $_.start = function start(cb, prg, arg) { } var id = util.guid() greeters[id] = cb - var argv = ["./prosperon", "spawn", "--id", id, "--overling", json.encode($_), "--root", json.encode(root)] + var argv = ["./cell", "spawn", "--id", id, "--overling", json.encode($_), "--root", json.encode(root)] if (prg) argv = argv.concat(['--program', prg]) if (arg) argv = argv.concat(cmd.encode(arg)) underlings.add(id) actor_mod.createactor(argv) } -$_.start[prosperon.DOC] = "The start function creates a new actor..." +$_.start[cell.DOC] = "The start function creates a new actor..." $_.stop = function stop(actor) { if (!actor) { @@ -482,14 +484,14 @@ $_.stop = function stop(actor) { if (!underlings.has(actor.__ACTORDATA__.id)) throw new Error('Can only call stop on an underling or self.') - actor_prep(actor, {type:"stop", id: prosperon.id}) + actor_prep(actor, {type:"stop", id: cell.id}) } -$_.stop[prosperon.DOC] = "The stop function stops an underling." +$_.stop[cell.DOC] = "The stop function stops an underling." $_.unneeded = function unneeded(fn, seconds) { actor_mod.unneeded(fn, seconds) } -$_.unneeded[prosperon.DOC] = "registers a function that is called when the actor..." +$_.unneeded[cell.DOC] = "registers a function that is called when the actor..." $_.delay = function delay(fn, seconds) { function delay_turn() { @@ -499,14 +501,14 @@ $_.delay = function delay(fn, seconds) { var id = actor_mod.delay(delay_turn, seconds) return function() { actor_mod.removetimer(id) } } -$_.delay[prosperon.DOC] = "used to schedule the invocation of a function..." +$_.delay[cell.DOC] = "used to schedule the invocation of a function..." var couplings = new Set() $_.couple = function couple(actor) { log.console(`coupled to ${actor.__ACTORDATA__.id}`) couplings.add(actor.__ACTORDATA__.id) } -$_.couple[prosperon.DOC] = "causes this actor to stop when another actor stops." +$_.couple[cell.DOC] = "causes this actor to stop when another actor stops." function actor_prep(actor, send) { message_queue.push({actor,send}); @@ -521,7 +523,7 @@ function actor_send(actor, message) { if (typeof message !== 'object') throw new Error('Must send an object record.') // message to self - if (actor.__ACTORDATA__.id === prosperon.id) { + if (actor.__ACTORDATA__.id === cell.id) { if (receive_fn) receive_fn(message.data) return } @@ -613,15 +615,15 @@ Object.defineProperty(globalThis, 'send', { }); var cmd = use('cmd') -cmd.process(prosperon.argv.slice()) +cmd.process(cell.argv.slice()) -if (!prosperon.args.id) prosperon.id = util.guid() -else prosperon.id = prosperon.args.id +if (!cell.args.id) cell.id = util.guid() +else cell.id = cell.args.id // Make remaining arguments available as global 'args' variable -globalThis.args = prosperon.args.remaining || [] +globalThis.args = cell.args.remaining || [] -$_.__ACTORDATA__.id = prosperon.id +$_.__ACTORDATA__.id = cell.id function turn(msg) { @@ -634,22 +636,22 @@ function turn(msg) } } -actor_mod.register_actor(prosperon.id, turn, prosperon.args.main) +actor_mod.register_actor(cell.id, turn, cell.args.main) -if (prosperon.args.overling) overling = json.decode(prosperon.args.overling) +if (cell.args.overling) overling = json.decode(cell.args.overling) -if (prosperon.args.root) root = json.decode(prosperon.args.root) +if (cell.args.root) root = json.decode(cell.args.root) else root = $_ if (overling) actor_prep(overling, {type:'greet', actor: $_}) -if (!prosperon.args.program) +if (!cell.args.program) os.exit(1) -if (typeof prosperon.args.program !== 'string') - prosperon.args.program = 'main.js'; +if (typeof cell.args.program !== 'string') + cell.args.program = 'main.js'; -actor_mod.setname(prosperon.args.program) +actor_mod.setname(cell.args.program) function destroyself() { log.spam(`Got the message to destroy self.`) @@ -673,7 +675,7 @@ function handle_actor_disconnect(id) { function handle_message(msg) { if (msg.target) { - if (msg.target !== prosperon.id) { + if (msg.target !== cell.id) { actor_mod.mailbox_push(msg.target, msg) return } @@ -729,10 +731,10 @@ function enet_check() //enet_check(); // Finally, run the program -var prog = resources.find_script(prosperon.args.program) +var prog = resources.find_script(cell.args.program) prog = io.slurp(prog) -var prog_script = `(function ${prosperon.args.program.name()}($_) { ${prog} })` -var val = js.eval(prosperon.args.program, prog_script)($_) +var prog_script = `(function ${cell.args.program.name()}($_) { ${prog} })` +var val = js.eval(cell.args.program, prog_script)($_) if (val) throw new Error('Program must not return anything'); diff --git a/scripts/event.js b/scripts/event.js index ef2e568d..9b597683 100644 --- a/scripts/event.js +++ b/scripts/event.js @@ -1,12 +1,12 @@ var event = this -event.push_event[prosperon.DOC] = `Push a custom user event into SDL's queue, passing a callback function. +event.push_event[cell.DOC] = `Push a custom user event into SDL's queue, passing a callback function. :param event: A function to call when this event is consumed. :return: None ` -event.engine_input[prosperon.DOC] = `Poll all system events (keyboard, mouse, etc.) and call the given function with each event object. +event.engine_input[cell.DOC] = `Poll all system events (keyboard, mouse, etc.) and call the given function with each event object. :param callback: A function that executes on each event consumed from the poll. :return: None diff --git a/scripts/http.js b/scripts/http.js index f6e13c3d..ea36c081 100644 --- a/scripts/http.js +++ b/scripts/http.js @@ -1,6 +1,6 @@ var http = this -http.fetch[prosperon.DOC] = `Initiate an asynchronous HTTP GET request. +http.fetch[cell.DOC] = `Initiate an asynchronous HTTP GET request. This function enqueues an HTTP GET request for the specified URL. It supports both buffered responses (full response collected in memory) and streaming data (processed as it arrives). The request is executed asynchronously, and its completion or streaming data is handled via callbacks provided in the options. Use 'poll' to process the results. diff --git a/scripts/io.js b/scripts/io.js index 644387fe..d3e60f34 100644 --- a/scripts/io.js +++ b/scripts/io.js @@ -1,43 +1,43 @@ var io = this -io.rm[prosperon.DOC] = `Remove the file or empty directory at the given path. +io.rm[cell.DOC] = `Remove the file or empty directory at the given path. :param path: The file or empty directory to remove. Must be empty if a directory. :return: None ` -io.mkdir[prosperon.DOC] = `Create a directory at the given path. +io.mkdir[cell.DOC] = `Create a directory at the given path. :param path: The directory path to create. :return: None ` -io.exists[prosperon.DOC] = `Return a boolean indicating whether the file or directory at the given path exists. +io.exists[cell.DOC] = `Return a boolean indicating whether the file or directory at the given path exists. :param path: The file or directory path to check. :return: True if the path exists, otherwise false. ` -io.stat[prosperon.DOC] = `Return an object describing file metadata for the given path. The object includes +io.stat[cell.DOC] = `Return an object describing file metadata for the given path. The object includes filesize, modtime, createtime, and accesstime. Throw an error if the path does not exist. :param path: The file or directory to retrieve metadata for. :return: An object with metadata (filesize, modtime, createtime, accesstime). ` -io.slurpbytes[prosperon.DOC] = `Read the entire file at the given path as a raw ArrayBuffer. Throw on error. +io.slurpbytes[cell.DOC] = `Read the entire file at the given path as a raw ArrayBuffer. Throw on error. :param path: The file path to read from. :return: An ArrayBuffer containing the file’s raw bytes. ` -io.slurp[prosperon.DOC] = `Read the entire file at the given path as a string. Throw on error. +io.slurp[cell.DOC] = `Read the entire file at the given path as a string. Throw on error. :param path: The file path to read from. :return: A string with the file’s contents. ` -io.slurpwrite[prosperon.DOC] = `Write data (string or ArrayBuffer) to the given file path. Overwrite if it exists. +io.slurpwrite[cell.DOC] = `Write data (string or ArrayBuffer) to the given file path. Overwrite if it exists. Throw on error. :param data: The data to write (string or ArrayBuffer). @@ -45,7 +45,7 @@ Throw on error. :return: None ` -io.mount[prosperon.DOC] = `Mount a directory or archive at the specified mount point. An undefined mount +io.mount[cell.DOC] = `Mount a directory or archive at the specified mount point. An undefined mount point mounts to '/'. Throw on error. :param archiveOrDir: The directory or archive to mount. @@ -53,19 +53,19 @@ point mounts to '/'. Throw on error. :return: None ` -io.unmount[prosperon.DOC] = `Unmount a previously mounted directory or archive. Throw on error. +io.unmount[cell.DOC] = `Unmount a previously mounted directory or archive. Throw on error. :param path: The directory or archive mount point to unmount. :return: None ` -io.writepath[prosperon.DOC] = `Set the write directory. Subsequent writes will go here by default. Throw on error. +io.writepath[cell.DOC] = `Set the write directory. Subsequent writes will go here by default. Throw on error. :param path: The directory path to set as writable. :return: None ` -io.match[prosperon.DOC] = `Return boolean indicating whether the given wildcard pattern matches the provided +io.match[cell.DOC] = `Return boolean indicating whether the given wildcard pattern matches the provided string. Dots must match dots. Case is not ignored. Patterns can incorporate: @@ -82,7 +82,7 @@ Patterns can incorporate: :return: True if matched, otherwise false. ` -io.globfs[prosperon.DOC] = `Return an array of files that do not match any of the provided glob patterns. It +io.globfs[cell.DOC] = `Return an array of files that do not match any of the provided glob patterns. It recursively enumerates the filesystem within PHYSFS. Each pattern is treated as an "ignore" rule, similar to .gitignore usage. @@ -90,7 +90,7 @@ recursively enumerates the filesystem within PHYSFS. Each pattern is treated as :return: An array of matching file paths. ` -io.enumerate[prosperon.DOC] = `Return an array of files within the given directory, optionally recursing into +io.enumerate[cell.DOC] = `Return an array of files within the given directory, optionally recursing into subdirectories. :param path: The directory to list. @@ -98,33 +98,33 @@ subdirectories. :return: An array of file (and directory) paths found. ` -io.basedir[prosperon.DOC] = `Return the application's base directory (where the executable is located). +io.basedir[cell.DOC] = `Return the application's base directory (where the executable is located). :return: A string with the base directory path. ` -io.prefdir[prosperon.DOC] = `Get the user-and-app-specific path where files can be written. +io.prefdir[cell.DOC] = `Get the user-and-app-specific path where files can be written. :param org: The name of your organization. :param app: The name of your application. :return: A string with the user's directory path. ` -io.open[prosperon.DOC] = `Open a file for writing, returning a file object that can be used for further +io.open[cell.DOC] = `Open a file for writing, returning a file object that can be used for further operations. Throw on error. :param path: The file path to open for writing. :return: A file object for subsequent write operations. ` -io.realdir[prosperon.DOC] = `Return the actual, real directory (on the host filesystem) that contains the given +io.realdir[cell.DOC] = `Return the actual, real directory (on the host filesystem) that contains the given file path. Return undefined if not found. :param path: The file path whose real directory is requested. :return: A string with the real directory path, or undefined. ` -io.searchpath[prosperon.DOC] = `Return an array of all directories in the current paths. +io.searchpath[cell.DOC] = `Return an array of all directories in the current paths. :return: An array of directory paths in the search path. ` diff --git a/scripts/js.js b/scripts/js.js index b4e70ebd..d47673b1 100644 --- a/scripts/js.js +++ b/scripts/js.js @@ -1,42 +1,42 @@ var js = this -js[prosperon.DOC] = ` +js[cell.DOC] = ` Provides functions for introspecting and configuring the QuickJS runtime engine. Includes debug info, memory usage, GC controls, code evaluation, etc. ` -js.rt_info[prosperon.DOC] = "Return internal QuickJS runtime info, such as object counts." +js.rt_info[cell.DOC] = "Return internal QuickJS runtime info, such as object counts." -js.dump_shapes[prosperon.DOC] = ` +js.dump_shapes[cell.DOC] = ` :return: A debug string describing the internal shape hierarchy used by QuickJS. Use this for internal debugging of object shapes. ` -js.dump_atoms[prosperon.DOC] = ` +js.dump_atoms[cell.DOC] = ` :return: A debug string listing all currently registered atoms (internal property keys/symbols) known by QuickJS. Helpful for diagnosing memory usage or potential key collisions. ` -js.dump_class[prosperon.DOC] = ` +js.dump_class[cell.DOC] = ` :return: A debug string describing the distribution of JS object classes in the QuickJS runtime. Shows how many objects of each class exist, useful for advanced memory or performance profiling. ` -js.dump_type_overheads[prosperon.DOC] = ` +js.dump_type_overheads[cell.DOC] = ` :return: A debug string describing the overheads for various JS object types in QuickJS. Displays memory usage breakdown for different internal object types. ` -js.dump_objects[prosperon.DOC] = ` +js.dump_objects[cell.DOC] = ` :return: A debug string listing certain internal QuickJS objects and their references, useful for debugging memory leaks or object lifetimes. ` -js.stack_info[prosperon.DOC] = ` +js.stack_info[cell.DOC] = ` :return: An object or string describing the runtime's current stack usage and capacity. Internal debugging utility to examine call stack details. ` -js.cycle_hook[prosperon.DOC] = ` +js.cycle_hook[cell.DOC] = ` :param callback: A function to call each time QuickJS completes a "cycle" (internal VM loop), or undefined to remove the callback. :return: None @@ -46,21 +46,21 @@ is set, it receives a single argument (an optional object/value describing the c is undefined, the hook is removed. ` -js.calc_mem[prosperon.DOC] = ` +js.calc_mem[cell.DOC] = ` :param value: A JavaScript value to analyze. :return: Approximate memory usage (in bytes) of that single value. Compute the approximate size of a single JS value in memory. This is a best-effort estimate. ` -js.mem[prosperon.DOC] = ` +js.mem[cell.DOC] = ` :return: An object containing a comprehensive snapshot of memory usage for the current QuickJS runtime, including total allocated bytes, object counts, and more. Retrieve an overview of the runtime’s memory usage. ` -js.mem_limit[prosperon.DOC] = ` +js.mem_limit[cell.DOC] = ` :param bytes: The maximum memory (in bytes) QuickJS is allowed to use. :return: None @@ -68,33 +68,33 @@ Set the upper memory limit for the QuickJS runtime. Exceeding this limit may cau fail or throw errors. ` -js.gc_threshold[prosperon.DOC] = ` +js.gc_threshold[cell.DOC] = ` :param bytes: The threshold (in bytes) at which the engine triggers automatic garbage collection. :return: None Set the threshold (in bytes) for QuickJS to perform an automatic GC pass when memory usage surpasses it. ` -js.max_stacksize[prosperon.DOC] = ` +js.max_stacksize[cell.DOC] = ` :param bytes: The maximum allowed stack size (in bytes) for QuickJS. :return: None Set the maximum stack size for QuickJS. If exceeded, the runtime may throw a stack overflow error. ` -js.memstate[prosperon.DOC] = ` +js.memstate[cell.DOC] = ` :return: A simpler memory usage object (malloc sizes, etc.) for the QuickJS runtime. Gives a quick overview of the memory usage, including malloc size and other allocations. ` -js.gc[prosperon.DOC] = ` +js.gc[cell.DOC] = ` :return: None Force an immediate, full garbage collection pass, reclaiming unreachable memory. ` -js.eval[prosperon.DOC] = ` +js.eval[cell.DOC] = ` :param src: A string of JavaScript source code to evaluate. :param filename: (Optional) A string for the filename or label, used in debugging or stack traces. :return: The result of evaluating the given source code. diff --git a/scripts/json.js b/scripts/json.js index 4a02b9e9..7c0b0b21 100644 --- a/scripts/json.js +++ b/scripts/json.js @@ -5,7 +5,7 @@ json.encode = function encode(val,replacer,space = 1,whitelist) return JSON.stringify(val, replacer, space) } -json.encode[prosperon.DOC] = `Produce a JSON text from a Javascript object. If a record value, at any level, contains a json() method, it will be called, and the value it returns (usually a simpler record) will be JSONified. +json.encode[cell.DOC] = `Produce a JSON text from a Javascript object. If a record value, at any level, contains a json() method, it will be called, and the value it returns (usually a simpler record) will be JSONified. If the record does not have a json() method, and if whitelist is a record, then only the keys that are associated with true in the whitelist are included. @@ -16,7 +16,7 @@ json.decode = function decode(text,reviver) return JSON.parse(text,reviver) } -json.decode[prosperon.DOC] = `The text text is parsed, and the resulting value (usually a record or an array) is returned. +json.decode[cell.DOC] = `The text text is parsed, and the resulting value (usually a record or an array) is returned. The optional reviver input is a method that will be called for every key and value at every level of the result. Each value will be replaced by the result of the reviver function. This can be used to reform data-only records into method-bearing records, or to transform date strings into seconds.` diff --git a/scripts/math.js b/scripts/math.js index 3d65e33c..9ce81d48 100644 --- a/scripts/math.js +++ b/scripts/math.js @@ -1,30 +1,30 @@ var math = this -math.dot[prosperon.DOC] = "Compute the dot product between two numeric arrays, returning a scalar. Extra elements are ignored." -math.project[prosperon.DOC] = "Project one vector onto another, returning a new array of the same dimension." -math.rotate[prosperon.DOC] = "Rotate a 2D point (or array of length 2) by the given angle (in turns) around an optional pivot." -math.midpoint[prosperon.DOC] = "Compute the midpoint of two arrays of numbers. Only the first two entries are used if 2D is intended." -math.reflect[prosperon.DOC] = "Reflect a vector across a plane normal. Both arguments must be numeric arrays." -math.distance[prosperon.DOC] = "Compute the Euclidean distance between two numeric arrays of matching length." -math.direction[prosperon.DOC] = "Compute the normalized direction vector from the first array to the second." -math.angle[prosperon.DOC] = "Given a 2D vector, return its angle from the X-axis in radians or some chosen units." -math.norm[prosperon.DOC] = "Return a normalized copy of the given numeric array. For 2D/3D/4D or arbitrary length." -math.angle_between[prosperon.DOC] = "Compute the angle between two vectors (2D/3D/4D)." -math.lerp[prosperon.DOC] = "Linear interpolation between two numbers: lerp(a, b, t)." -math.gcd[prosperon.DOC] = "Compute the greatest common divisor of two integers." -math.lcm[prosperon.DOC] = "Compute the least common multiple of two integers." -math.clamp[prosperon.DOC] = "Clamp a number between low and high. clamp(value, low, high)." -math.angledist[prosperon.DOC] = "Compute the signed distance between two angles in 'turn' units, e.g. 0..1 range." -math.jitter[prosperon.DOC] = "Apply a random +/- percentage noise to a number. Example: jitter(100, 0.05) -> ~95..105." -math.mean[prosperon.DOC] = "Compute the arithmetic mean of an array of numbers." -math.sum[prosperon.DOC] = "Sum all elements of an array of numbers." -math.sigma[prosperon.DOC] = "Compute standard deviation of an array of numbers." -math.median[prosperon.DOC] = "Compute the median of an array of numbers." -math.length[prosperon.DOC] = "Return the length of a vector (i.e. sqrt of sum of squares)." -math.from_to[prosperon.DOC] = "Return an array of points from a start to an end, spaced out by a certain distance." -math.rand[prosperon.DOC] = "Return a random float in [0,1)." -math.randi[prosperon.DOC] = "Return a random 32-bit integer." -math.srand[prosperon.DOC] = "Seed the random number generator with the given integer, or with current time if none." +math.dot[cell.DOC] = "Compute the dot product between two numeric arrays, returning a scalar. Extra elements are ignored." +math.project[cell.DOC] = "Project one vector onto another, returning a new array of the same dimension." +math.rotate[cell.DOC] = "Rotate a 2D point (or array of length 2) by the given angle (in turns) around an optional pivot." +math.midpoint[cell.DOC] = "Compute the midpoint of two arrays of numbers. Only the first two entries are used if 2D is intended." +math.reflect[cell.DOC] = "Reflect a vector across a plane normal. Both arguments must be numeric arrays." +math.distance[cell.DOC] = "Compute the Euclidean distance between two numeric arrays of matching length." +math.direction[cell.DOC] = "Compute the normalized direction vector from the first array to the second." +math.angle[cell.DOC] = "Given a 2D vector, return its angle from the X-axis in radians or some chosen units." +math.norm[cell.DOC] = "Return a normalized copy of the given numeric array. For 2D/3D/4D or arbitrary length." +math.angle_between[cell.DOC] = "Compute the angle between two vectors (2D/3D/4D)." +math.lerp[cell.DOC] = "Linear interpolation between two numbers: lerp(a, b, t)." +math.gcd[cell.DOC] = "Compute the greatest common divisor of two integers." +math.lcm[cell.DOC] = "Compute the least common multiple of two integers." +math.clamp[cell.DOC] = "Clamp a number between low and high. clamp(value, low, high)." +math.angledist[cell.DOC] = "Compute the signed distance between two angles in 'turn' units, e.g. 0..1 range." +math.jitter[cell.DOC] = "Apply a random +/- percentage noise to a number. Example: jitter(100, 0.05) -> ~95..105." +math.mean[cell.DOC] = "Compute the arithmetic mean of an array of numbers." +math.sum[cell.DOC] = "Sum all elements of an array of numbers." +math.sigma[cell.DOC] = "Compute standard deviation of an array of numbers." +math.median[cell.DOC] = "Compute the median of an array of numbers." +math.length[cell.DOC] = "Return the length of a vector (i.e. sqrt of sum of squares)." +math.from_to[cell.DOC] = "Return an array of points from a start to an end, spaced out by a certain distance." +math.rand[cell.DOC] = "Return a random float in [0,1)." +math.randi[cell.DOC] = "Return a random 32-bit integer." +math.srand[cell.DOC] = "Seed the random number generator with the given integer, or with current time if none." math.TAU = Math.PI * 2; diff --git a/scripts/miniz.js b/scripts/miniz.js index 1ada57be..25c821bf 100644 --- a/scripts/miniz.js +++ b/scripts/miniz.js @@ -1,13 +1,13 @@ var miniz = this -miniz.read[prosperon.DOC] = `Create a zip reader from the given ArrayBuffer containing an entire ZIP archive. +miniz.read[cell.DOC] = `Create a zip reader from the given ArrayBuffer containing an entire ZIP archive. Return undefined if the data is invalid. :param data: An ArrayBuffer with the entire ZIP file. :return: A 'zip reader' object with methods for reading from the archive (mod, exists, slurp). ` -miniz.write[prosperon.DOC] = `Create a zip writer that writes to the specified file path. Overwrites the file if +miniz.write[cell.DOC] = `Create a zip writer that writes to the specified file path. Overwrites the file if it already exists. Return undefined on error. :param path: The file path where the ZIP archive will be written. diff --git a/scripts/nota.js b/scripts/nota.js index b7f4a1cc..c7336e30 100644 --- a/scripts/nota.js +++ b/scripts/nota.js @@ -20,7 +20,7 @@ nota.encode = function(obj, replacer) return result } -nota.encode[prosperon.DOC] = `Convert a JavaScript value into a NOTA-encoded ArrayBuffer. +nota.encode[cell.DOC] = `Convert a JavaScript value into a NOTA-encoded ArrayBuffer. This function serializes JavaScript values (such as numbers, strings, booleans, arrays, objects, or ArrayBuffers) into the NOTA binary format. The resulting ArrayBuffer can be stored or transmitted and later decoded back into a JavaScript value. @@ -29,7 +29,7 @@ This function serializes JavaScript values (such as numbers, strings, booleans, :throws: An error if no argument is provided. ` -nota.decode[prosperon.DOC] = `Decode a NOTA-encoded ArrayBuffer into a JavaScript value. +nota.decode[cell.DOC] = `Decode a NOTA-encoded ArrayBuffer into a JavaScript value. This function deserializes a NOTA-formatted ArrayBuffer into its corresponding JavaScript representation, such as a number, string, boolean, array, object, or ArrayBuffer. If the input is invalid or empty, it returns undefined. diff --git a/scripts/os.js b/scripts/os.js index e3ac77ca..f5c5906a 100644 --- a/scripts/os.js +++ b/scripts/os.js @@ -1,19 +1,19 @@ var os = this -os.platform[prosperon.DOC] = "Return a string with the underlying platform name, like 'Windows', 'Linux', or 'macOS'." -os.arch[prosperon.DOC] = "Return the CPU architecture string for this system (e.g. 'x64', 'arm64')." -os.totalmem[prosperon.DOC] = "Return the total system RAM in bytes." -os.freemem[prosperon.DOC] = "Return the amount of free system RAM in bytes, if known." -os.hostname[prosperon.DOC] = "Return the system's hostname, or an empty string if not available." -os.version[prosperon.DOC] = "Return the OS or kernel version string, if the platform provides it." +os.platform[cell.DOC] = "Return a string with the underlying platform name, like 'Windows', 'Linux', or 'macOS'." +os.arch[cell.DOC] = "Return the CPU architecture string for this system (e.g. 'x64', 'arm64')." +os.totalmem[cell.DOC] = "Return the total system RAM in bytes." +os.freemem[cell.DOC] = "Return the amount of free system RAM in bytes, if known." +os.hostname[cell.DOC] = "Return the system's hostname, or an empty string if not available." +os.version[cell.DOC] = "Return the OS or kernel version string, if the platform provides it." -os.exit[prosperon.DOC] = "Exit the application with the specified exit code." -os.now[prosperon.DOC] = "Return current time (in seconds as a float) with high resolution." +os.exit[cell.DOC] = "Exit the application with the specified exit code." +os.now[cell.DOC] = "Return current time (in seconds as a float) with high resolution." -os.power_state[prosperon.DOC] = "Return a string describing power status: 'on battery', 'charging', 'charged', etc." +os.power_state[cell.DOC] = "Return a string describing power status: 'on battery', 'charging', 'charged', etc." -os.on[prosperon.DOC] = "Register a global callback for certain engine-wide or system-level events." -os.rusage[prosperon.DOC] = "Return resource usage stats for this process, if the platform supports it." -os.mallinfo[prosperon.DOC] = "Return detailed memory allocation info (arena size, free blocks, etc.) on some platforms." +os.on[cell.DOC] = "Register a global callback for certain engine-wide or system-level events." +os.rusage[cell.DOC] = "Return resource usage stats for this process, if the platform supports it." +os.mallinfo[cell.DOC] = "Return detailed memory allocation info (arena size, free blocks, etc.) on some platforms." return os diff --git a/scripts/resources.js b/scripts/resources.js index a1b43d57..70944ec2 100644 --- a/scripts/resources.js +++ b/scripts/resources.js @@ -117,7 +117,7 @@ Resources.getAllFiles = function(dir = "") { } return results } -Resources.getAllFiles[prosperon.DOC] = ` +Resources.getAllFiles[cell.DOC] = ` Return a list of recognized files in the given directory that are not matched by .prosperonignore, skipping directories. Recognized extensions include scripts, images, sounds, fonts, and libs. @@ -153,7 +153,7 @@ Resources.gatherStats = function(filePaths) { } return stats } -Resources.gatherStats[prosperon.DOC] = ` +Resources.gatherStats[cell.DOC] = ` Analyze a list of recognized files and categorize them by scripts, images, sounds, fonts, libs, or other. Return a stats object with these counts and the total. diff --git a/scripts/time.js b/scripts/time.js index 763d4fc1..3c152227 100644 --- a/scripts/time.js +++ b/scripts/time.js @@ -212,7 +212,7 @@ function text(num = now(), /* -------- docs ---------------------------------------------------------- */ -time[prosperon.DOC] = { +time[cell.DOC] = { doc : "Time utilities; epoch = 0000-01-01 00:00:00 +0000.", record : "time.record([num | rec], [zone], [dst]) → detailed record (adds .dst).", number : "time.number([rec]) → numeric seconds since epoch.", diff --git a/scripts/util.js b/scripts/util.js index 560727a4..afe0bd44 100644 --- a/scripts/util.js +++ b/scripts/util.js @@ -1,5 +1,5 @@ var util = this -util[prosperon.DOC] = ` +util[cell.DOC] = ` A collection of general-purpose utility functions for object manipulation, merging, deep copying, safe property access, etc. ` @@ -10,7 +10,7 @@ util.deepfreeze = function (obj) { } Object.freeze(obj) } -util.deepfreeze[prosperon.DOC] = ` +util.deepfreeze[cell.DOC] = ` :param obj: The object to recursively freeze. :return: None Recursively freeze an object and all of its nested objects so they cannot be modified. @@ -25,7 +25,7 @@ util.dainty_assign = function (target, source) { else target[k] = source[k] }) } -util.dainty_assign[prosperon.DOC] = ` +util.dainty_assign[cell.DOC] = ` :param target: The target object whose keys may be updated. :param source: The source object containing new values. :return: None @@ -39,7 +39,7 @@ util.get = function (obj, path, defValue) { var result = pathArray.reduce((prevObj, key) => prevObj && prevObj[key], obj) return result === undefined ? defValue : result } -util.get[prosperon.DOC] = ` +util.get[cell.DOC] = ` :param obj: The object to traverse. :param path: A string like "a.b.c" or an array of path segments. :param defValue: The default value if the property is undefined. @@ -51,7 +51,7 @@ Returns defValue if the property is undefined. util.isEmpty = function(o) { return Object.keys(o).length === 0 } -util.isEmpty[prosperon.DOC] = ` +util.isEmpty[cell.DOC] = ` :param o: The object to check. :return: Boolean indicating if the object is empty. Return true if the object has no own properties, otherwise false. @@ -65,7 +65,7 @@ util.dig = function (obj, path, def = {}) { obj[pp[pp.length - 1]] = def return def } -util.dig[prosperon.DOC] = ` +util.dig[cell.DOC] = ` :param obj: The root object to modify. :param path: A dot-string specifying nested objects to create. :param def: The value to store in the final path component, default {}. @@ -82,7 +82,7 @@ util.access = function (obj, name) { } return obj } -util.access[prosperon.DOC] = ` +util.access[cell.DOC] = ` :param obj: The object to traverse. :param name: A dot-string path (e.g. "foo.bar.baz"). :return: The value at that path, or undefined if missing. @@ -101,7 +101,7 @@ util.mergekey = function (o1, o2, k) { } } else o1[k] = o2[k] } -util.mergekey[prosperon.DOC] = ` +util.mergekey[cell.DOC] = ` :param o1: The target object. :param o2: The source object. :param k: The key to merge. @@ -114,7 +114,7 @@ util.merge = function (target, ...objs) { for (var obj of objs) for (var key of Object.keys(obj)) util.mergekey(target, obj, key) return target } -util.merge[prosperon.DOC] = ` +util.merge[cell.DOC] = ` :param target: The target object. :param objs: One or more objects to merge into target. :return: The updated target object. @@ -127,7 +127,7 @@ util.copy = function (proto, ...objs) { for (var obj of objs) Object.mixin(c, obj) return c } -util.copy[prosperon.DOC] = ` +util.copy[cell.DOC] = ` :param proto: The prototype object for the new object. :param objs: One or more objects whose properties will be mixed in. :return: The newly created object. @@ -142,7 +142,7 @@ util.obj_lerp = function(a,b,t) { }) return obj } -util.obj_lerp[prosperon.DOC] = ` +util.obj_lerp[cell.DOC] = ` :param a: The start object (its properties must have .lerp()). :param b: The end object (matching properties). :param t: Interpolation factor (0..1). @@ -166,18 +166,18 @@ util.normalizeSpacing = function normalizeSpacing(spacing) { return {l:0, r:0, t:0, b:0} } } -util.normalizeSpacing[prosperon.DOC] = ` +util.normalizeSpacing[cell.DOC] = ` :param spacing: A number, an array of length 2 or 4, or an object with l/r/t/b. :return: An object {l, r, t, b}. Normalize any spacing input into a {l, r, t, b} object. ` -util.guid[prosperon.DOC] = ` +util.guid[cell.DOC] = ` :return: A random 32-character string (hex). Return a random 32-character hexadecimal UUID-like string (not guaranteed RFC4122-compliant). ` -util.insertion_sort[prosperon.DOC] = ` +util.insertion_sort[cell.DOC] = ` :param arr: The array to be sorted in-place. :param cmp: Comparison function cmp(a,b)->Number. :return: The same array, sorted in-place. diff --git a/scripts/wota.js b/scripts/wota.js index 0b4b2b77..d90b0860 100644 --- a/scripts/wota.js +++ b/scripts/wota.js @@ -21,7 +21,7 @@ wota.encode = function(obj, replacer) return result } -wota.encode[prosperon.DOC] = `Convert a JavaScript value into a WOTA-encoded ArrayBuffer. +wota.encode[cell.DOC] = `Convert a JavaScript value into a WOTA-encoded ArrayBuffer. This function serializes JavaScript values (such as numbers, strings, booleans, arrays, objects, or ArrayBuffers) into the WOTA binary format. The resulting ArrayBuffer can be stored or transmitted and later decoded back into a JavaScript value. @@ -31,7 +31,7 @@ This function serializes JavaScript values (such as numbers, strings, booleans, :throws: An error if no argument is provided or if a cyclic object is encountered. ` -wota.decode[prosperon.DOC] = `Decode a WOTA-encoded ArrayBuffer into a JavaScript value. +wota.decode[cell.DOC] = `Decode a WOTA-encoded ArrayBuffer into a JavaScript value. This function deserializes a WOTA-formatted ArrayBuffer into its corresponding JavaScript representation, such as a number, string, boolean, array, object, or ArrayBuffer. If the input is invalid or empty, it returns undefined. diff --git a/source/prosperon.c b/source/cell.c similarity index 97% rename from source/prosperon.c rename to source/cell.c index 2ceed8d8..69c6bb8a 100644 --- a/source/prosperon.c +++ b/source/cell.c @@ -19,7 +19,7 @@ #include "physfs.h" #include "stb_ds.h" #include "jsffi.h" -#include "prosperon.h" +#include "cell.h" #ifdef TRACY_ENABLE #include @@ -40,14 +40,14 @@ int tracy_profiling_enabled = 0; -#define ENGINE "scripts/engine.js" +#define ENGINE "engine.js" -static prosperon_rt **ready_queue = NULL; -static prosperon_rt **main_ready_queue = NULL; +static cell_rt **ready_queue = NULL; +static cell_rt **main_ready_queue = NULL; static SDL_Mutex *queue_mutex = NULL; static SDL_Condition *queue_cond = NULL; static SDL_Mutex *actors_mutex = NULL; -static struct { char *key; prosperon_rt *value; } *actors = NULL; +static struct { char *key; cell_rt *value; } *actors = NULL; static unsigned char *zip_buffer_global = NULL; static char *prosperon = NULL; @@ -60,7 +60,7 @@ static Uint32 queue_event; static SDL_AtomicInt engine_shutdown; static SDL_Thread **runners = NULL; -static Uint32 actor_remove_cb(prosperon_rt *actor, Uint32 id, Uint32 interval) +static Uint32 actor_remove_cb(cell_rt *actor, Uint32 id, Uint32 interval) { if (JS_IsUndefined(actor->unneeded)) actor_free(actor); @@ -221,9 +221,9 @@ int prosperon_mount_core(void) return ret; } -prosperon_rt *create_actor(int argc, char **argv, void (*hook)(JSContext*)) +cell_rt *create_actor(int argc, char **argv, void (*hook)(JSContext*)) { - prosperon_rt *actor = calloc(sizeof(*actor), 1); + cell_rt *actor = calloc(sizeof(*actor), 1); actor->cmd.argc = argc; actor->cmd.argv = argv; actor->cycle_fn = JS_UNDEFINED; @@ -249,7 +249,7 @@ prosperon_rt *create_actor(int argc, char **argv, void (*hook)(JSContext*)) return actor; } -prosperon_rt *get_actor(char *id) +cell_rt *get_actor(char *id) { SDL_LockMutex(actors_mutex); int idx = shgeti(actors, id); @@ -257,12 +257,12 @@ prosperon_rt *get_actor(char *id) SDL_UnlockMutex(actors_mutex); return NULL; } - prosperon_rt *actor = actors[idx].value; + cell_rt *actor = actors[idx].value; SDL_UnlockMutex(actors_mutex); return actor; } -const char *register_actor(const char *id, prosperon_rt *actor, int mainthread) +const char *register_actor(const char *id, cell_rt *actor, int mainthread) { SDL_LockMutex(actors_mutex); if (shgeti(actors, id) != -1) { @@ -278,7 +278,7 @@ const char *register_actor(const char *id, prosperon_rt *actor, int mainthread) const char *send_message(const char *id, void *msg) { - prosperon_rt *target = get_actor(id); + cell_rt *target = get_actor(id); if (!target) { free(msg); return "Could not get actor from id."; @@ -298,7 +298,7 @@ const char *send_message(const char *id, void *msg) } /* set_actor_state should check if either messages or events are pending. */ -void set_actor_state(prosperon_rt *actor) +void set_actor_state(cell_rt *actor) { SDL_LockMutex(actor->msg_mutex); if (actor->need_stop) { @@ -353,7 +353,7 @@ void set_actor_state(prosperon_rt *actor) SDL_UnlockMutex(actor->msg_mutex); } -void actor_turn(prosperon_rt *actor, int greedy) +void actor_turn(cell_rt *actor, int greedy) { SDL_LockMutex(actor->turn); #ifdef TRACY_ENABLE @@ -463,7 +463,7 @@ void actor_turn(prosperon_rt *actor, int greedy) actor_free(actor); } -void actor_free(prosperon_rt *actor) +void actor_free(cell_rt *actor) { // Delete it out of actors first so it can no longer get messages SDL_LockMutex(actors_mutex); @@ -538,7 +538,7 @@ void actor_free(prosperon_rt *actor) } /* Timer callback adds an event to the queue under evt_mutex. */ -Uint32 actor_timer_cb(prosperon_rt *actor, SDL_TimerID id, Uint32 interval) +Uint32 actor_timer_cb(cell_rt *actor, SDL_TimerID id, Uint32 interval) { SDL_LockMutex(actor->msg_mutex); int idx = hmgeti(actor->timers, id); @@ -560,7 +560,7 @@ JSValue js_actor_delay(JSContext *js, JSValue self, int argc, JSValue *argv) if (!JS_IsFunction(js, argv[0])) return JS_ThrowReferenceError(js, "Argument must be a function."); - prosperon_rt *actor = JS_GetContextOpaque(js); + cell_rt *actor = JS_GetContextOpaque(js); double seconds; JS_ToFloat64(js, &seconds, argv[1]); if (seconds <= 0) { @@ -588,7 +588,7 @@ JSValue js_actor_delay(JSContext *js, JSValue self, int argc, JSValue *argv) JSValue js_actor_removetimer(JSContext *js, JSValue self, int argc, JSValue *argv) { - prosperon_rt *actor = JS_GetContextOpaque(js); + cell_rt *actor = JS_GetContextOpaque(js); Uint32 timer_id; JS_ToUint32(js, &timer_id, argv[0]); if (timer_id == -1) return JS_UNDEFINED; @@ -666,7 +666,7 @@ void tracy_end_hook(JSContext *js, JSValue fn) ___tracy_emit_zone_end(arrpop(stack->arr)); } -void script_startup(prosperon_rt *prt, void (*hook)(JSContext*)) +void script_startup(cell_rt *prt, void (*hook)(JSContext*)) { JSRuntime *rt; #ifdef TRACY_ENABLE @@ -722,7 +722,7 @@ void script_startup(prosperon_rt *prt, void (*hook)(JSContext*)) int uncaught_exception(JSContext *js, JSValue v) { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); SDL_LockMutex(rt->mutex); JS_FreeValue(js,v); @@ -757,7 +757,7 @@ int uncaught_exception(JSContext *js, JSValue v) void script_evalf(JSContext *js, const char *format, ...) { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); SDL_LockMutex(rt->mutex); va_list args; @@ -781,7 +781,7 @@ static int crank_actor(void *data) { while (!SDL_GetAtomicInt(&engine_shutdown)) { SDL_LockMutex(queue_mutex); - prosperon_rt *actor = NULL; + cell_rt *actor = NULL; if (arrlen(ready_queue) > 0) { actor = ready_queue[0]; arrdel(ready_queue, 0); @@ -1538,6 +1538,7 @@ int main(int argc, char **argv) int mounted = prosperon_mount_core(); if (!mounted) mounted = PHYSFS_mount("core.zip", NULL, 0); + if (!mounted) mounted = PHYSFS_mount("scripts", NULL, 0); if (!mounted) { printf("Could not mount core. Reason: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())); return 1; @@ -1587,7 +1588,7 @@ int main(int argc, char **argv) SDL_UnlockMutex(queue_mutex); continue; } - prosperon_rt *actor = main_ready_queue[0]; + cell_rt *actor = main_ready_queue[0]; arrdel(main_ready_queue, 0); SDL_UnlockMutex(queue_mutex); diff --git a/source/prosperon.h b/source/cell.h similarity index 80% rename from source/prosperon.h rename to source/cell.h index 48ea9d29..00dca5a3 100644 --- a/source/prosperon.h +++ b/source/cell.h @@ -3,7 +3,7 @@ #include #include "quickjs.h" -#include "qjs_blob.h" +#include "qjs_macros.h" #define STATE_VECTOR_LENGTH 624 #define STATE_VECTOR_M 397 @@ -34,7 +34,7 @@ typedef struct { char **argv; } cmdargs; -typedef struct prosperon_rt { +typedef struct cell_rt { cmdargs cmd; JSContext *context; JSValue cycle_fn; @@ -73,25 +73,25 @@ typedef struct prosperon_rt { JSValue doc_sym; const char *name; // human friendly name -} prosperon_rt; +} cell_rt; extern SDL_ThreadID main_thread; extern SDL_TLSID prosperon_id; -prosperon_rt *create_actor(int argc, char **argv, void (*hook)(JSContext*)); -const char *register_actor(const char *id, prosperon_rt *actor, int mainthread); -void actor_free(prosperon_rt *actor); +cell_rt *create_actor(int argc, char **argv, void (*hook)(JSContext*)); +const char *register_actor(const char *id, cell_rt *actor, int mainthread); +void actor_free(cell_rt *actor); const char *send_message(const char *id, void *msg); -Uint32 actor_timer_cb(prosperon_rt *actor, SDL_TimerID id, Uint32 interval); +Uint32 actor_timer_cb(cell_rt *actor, SDL_TimerID id, Uint32 interval); JSValue js_actor_delay(JSContext *js, JSValue self, int argc, JSValue *argv); JSValue js_actor_removetimer(JSContext *js, JSValue self, int argc, JSValue *argv); -void script_startup(prosperon_rt *rt, void (*hook)(JSContext*)); +void script_startup(cell_rt *rt, void (*hook)(JSContext*)); void script_evalf(JSContext *js, const char *format, ...); JSValue script_eval(JSContext *js, const char *file, const char *script); int uncaught_exception(JSContext *js, JSValue v); int actor_exists(const char *id); -prosperon_rt *get_actor(char *id); -void set_actor_state(prosperon_rt *actor); +cell_rt *get_actor(char *id); +void set_actor_state(cell_rt *actor); int prosperon_mount_core(void); diff --git a/source/datastream.h b/source/datastream.h index dc96cba5..e0a55a23 100644 --- a/source/datastream.h +++ b/source/datastream.h @@ -3,7 +3,7 @@ #include #include -#include +#include "cell.h" #include diff --git a/source/font.h b/source/font.h index fe8fc757..1bfb20df 100644 --- a/source/font.h +++ b/source/font.h @@ -3,7 +3,7 @@ #include "render.h" #include "HandmadeMath.h" -#include +#include "cell.h" #include #include "render.h" diff --git a/source/jsffi.c b/source/jsffi.c index 82ad5c7a..84f5c3fc 100644 --- a/source/jsffi.c +++ b/source/jsffi.c @@ -27,7 +27,7 @@ #include #include "cute_aseprite.h" #include "cgltf.h" -#include "prosperon.h" +#include "cell.h" #include "qjs_blob.h" #include "qjs_dmon.h" @@ -151,7 +151,7 @@ double genRand(MTRand* rand) { double rand_range(JSContext *js, double min, double max) { - MTRand *mrand = &((prosperon_rt*)JS_GetContextOpaque(js))->mrand; + MTRand *mrand = &((cell_rt*)JS_GetContextOpaque(js))->mrand; return genRand(mrand) * (max-min)+min; } @@ -286,7 +286,7 @@ void *get_gpu_buffer(JSContext *js, JSValue argv, size_t *stride, size_t *size) JSValue make_quad_indices_buffer(JSContext *js, int quads) { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); int count = quads*6; if (!JS_IsUndefined(rt->idx_buffer) && rt->idx_count >= count) return JS_DupValue(js,rt->idx_buffer); @@ -1459,7 +1459,7 @@ static const JSCFunctionListEntry js_video_funcs[] = { }; JSC_SCALL(os_use_embed, - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); ModuleEntry *module_registry = rt->module_registry; for (int i = 0; i < arrlen(module_registry); i++) { if (strcmp(str,module_registry[i].name) == 0) { @@ -1531,7 +1531,7 @@ JSC_CCALL(os_value_id, void ffi_load(JSContext *js) { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); JS_FreeValue(js, js_blob_use(js)); // juice blob @@ -1567,7 +1567,7 @@ void ffi_load(JSContext *js) arrput(rt->module_registry, MISTLINE(graphics)); arrput(rt->module_registry, MISTLINE(video)); arrput(rt->module_registry, MISTLINE(soloud)); - arrput(rt->module_registry, MISTLINE(layout)); + arrput(rt->module_registry, MISTLINE(layout)); // arrput(rt->module_registry, MISTLINE(imgui)); arrput(rt->module_registry, ((ModuleEntry){"camera", js_camera_use})); @@ -1611,8 +1611,8 @@ void ffi_load(JSContext *js) JS_SetPropertyUint32(js,args, i, JS_NewString(js,rt->cmd.argv[i])); JS_SetPropertyStr(js,prosp,"argv", args); - //JS_SetPropertyStr(js,prosp, "version", JS_NewString(js,PROSPERON_VERSION)); - //JS_SetPropertyStr(js,prosp,"revision",JS_NewString(js,PROSPERON_COMMIT)); + //JS_SetPropertyStr(js,prosp, "version", JS_NewString(js,CELL_VERSION)); + //JS_SetPropertyStr(js,prosp,"revision",JS_NewString(js,CELL_COMMIT)); JSValue hidden_fn = JS_NewObject(js); // add engine.js-only functions to hidden_fn. It should grab them and then remove so nothing else can use them. @@ -1632,7 +1632,7 @@ void ffi_load(JSContext *js) JS_FreeValue(js,globalThis); - prosperon_rt *actor = JS_GetContextOpaque(js); + cell_rt *actor = JS_GetContextOpaque(js); actor->actor_sym = JS_NewSymbol(js, "actor symbol", 0); actor->doc_sym = JS_NewSymbol(js, "+documentation+", 0); JS_SetPropertyStr(js, hidden_fn, "ACTORDATA", actor->actor_sym); diff --git a/source/jsffi.h b/source/jsffi.h index 2eb39cc5..8255e310 100644 --- a/source/jsffi.h +++ b/source/jsffi.h @@ -1,7 +1,7 @@ #ifndef FFI_H #define FFI_H -#include +#include "cell.h" #include "HandmadeMath.h" #include "render.h" #include "stb_ds.h" diff --git a/source/qjs_actor.c b/source/qjs_actor.c index efc46969..b24ca6c3 100644 --- a/source/qjs_actor.c +++ b/source/qjs_actor.c @@ -2,7 +2,7 @@ #include "jsffi.h" #include "qjs_macros.h" #include "qjs_wota.h" -#include "prosperon.h" +#include "cell.h" #include #include @@ -12,7 +12,7 @@ JSValue js_actor_delay(JSContext *js, JSValue self, int argc, JSValue *argv); JSValue js_actor_removetimer(JSContext *js, JSValue self, int argc, JSValue *argv); -prosperon_rt *js2actor(JSContext *js, JSValue v) +cell_rt *js2actor(JSContext *js, JSValue v) { if (!JS_IsObject(v)) return NULL; @@ -40,13 +40,13 @@ prosperon_rt *js2actor(JSContext *js, JSValue v) return NULL; /* Look up the actor by ID */ - prosperon_rt *actor = get_actor((char*)id); + cell_rt *actor = get_actor((char*)id); JS_FreeCString(js, id); return actor; } -JSValue actor2js(JSContext *js, prosperon_rt *actor) +JSValue actor2js(JSContext *js, cell_rt *actor) { if (!actor) return JS_NULL; @@ -112,7 +112,7 @@ JSC_CCALL(os_mailbox_push, ) JSC_CCALL(os_register_actor, - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); const char *id = JS_ToCString(js, argv[0]); const char *err = register_actor(id, rt, JS_ToBool(js, argv[2])); if (err) return JS_ThrowInternalError(js, "Could not register actor: %s", err); @@ -130,7 +130,7 @@ JSC_CCALL(os_mailbox_exist, ) JSC_CCALL(os_unneeded, - prosperon_rt *actor = JS_GetContextOpaque(js); + cell_rt *actor = JS_GetContextOpaque(js); SDL_LockMutex(actor->msg_mutex); JS_FreeValue(js, actor->unneeded); @@ -152,12 +152,12 @@ JSC_CCALL(os_unneeded, ) JSC_CCALL(os_destroy, - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); rt->need_stop = 1; ) JSC_SCALL(actor_setname, - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); rt->name = strdup(str); ) diff --git a/source/qjs_actor.h b/source/qjs_actor.h index abab657b..fc058560 100644 --- a/source/qjs_actor.h +++ b/source/qjs_actor.h @@ -1,11 +1,10 @@ #ifndef QJS_ACTOR_H #define QJS_ACTOR_H -#include -#include "prosperon.h" +#include "cell.h" JSValue js_actor_use(JSContext *js); -prosperon_rt *js2actor(JSContext *js, JSValue v); -JSValue actor2js(JSContext *js, prosperon_rt *actor); +cell_rt *js2actor(JSContext *js, JSValue v); +JSValue actor2js(JSContext *js, cell_rt *actor); #endif \ No newline at end of file diff --git a/source/qjs_blob.c b/source/qjs_blob.c index 9f5c24a2..eb97e25a 100644 --- a/source/qjs_blob.c +++ b/source/qjs_blob.c @@ -1,8 +1,6 @@ #define BLOB_IMPLEMENTATION #include "blob.h" -#include "quickjs.h" #include "qjs_blob.h" -#include "qjs_macros.h" // Get countof from macros if not defined #ifndef countof diff --git a/source/qjs_blob.h b/source/qjs_blob.h index cd1058f9..ffc656f9 100644 --- a/source/qjs_blob.h +++ b/source/qjs_blob.h @@ -1,7 +1,7 @@ #ifndef QJS_BLOB_H #define QJS_BLOB_H -#include +#include "cell.h" JSValue js_blob_use(JSContext *ctx); diff --git a/source/qjs_common.h b/source/qjs_common.h index 119b90da..053f7a2b 100644 --- a/source/qjs_common.h +++ b/source/qjs_common.h @@ -1,7 +1,7 @@ #ifndef QJS_COMMON_H #define QJS_COMMON_H -#include +#include "cell.h" #include "HandmadeMath.h" #include "render.h" #include diff --git a/source/qjs_crypto.c b/source/qjs_crypto.c index 48ae5902..b5743a56 100644 --- a/source/qjs_crypto.c +++ b/source/qjs_crypto.c @@ -1,5 +1,4 @@ #include "qjs_crypto.h" -#include "quickjs.h" #include #include #include diff --git a/source/qjs_crypto.h b/source/qjs_crypto.h index 3a2d3839..10258658 100644 --- a/source/qjs_crypto.h +++ b/source/qjs_crypto.h @@ -1,7 +1,7 @@ #ifndef QJS_CRYPTO_H #define QJS_CRYPTO_H -#include "quickjs.h" +#include "cell.h" JSValue js_crypto_use(JSContext *ctx); diff --git a/source/qjs_debug.h b/source/qjs_debug.h index 2e0c661b..ffa7e391 100644 --- a/source/qjs_debug.h +++ b/source/qjs_debug.h @@ -1,7 +1,7 @@ #ifndef QJS_DEBUG_H #define QJS_DEBUG_H -#include +#include "cell.h" JSValue js_debug_use(JSContext *ctx); diff --git a/source/qjs_dmon.c b/source/qjs_dmon.c index a45d3c78..d783acd4 100644 --- a/source/qjs_dmon.c +++ b/source/qjs_dmon.c @@ -1,4 +1,4 @@ -#include "quickjs.h" +#include "qjs_dmon.h" #define DMON_IMPL #include "dmon.h" @@ -130,21 +130,3 @@ JSValue js_dmon_use(JSContext *js) return export; } - -static int js_dmon_init(JSContext *js, JSModuleDef *m) { - JS_SetModuleExport(js, m, "default",js_dmon_use(js)); - return 0; -} - -#ifdef JS_SHARED_LIBRARY -#define JS_INIT_MODULE js_init_module -#else -#define JS_INIT_MODULE js_init_module_dmon -#endif - -JSModuleDef *JS_INIT_MODULE(JSContext *js, const char *module_name) { - JSModuleDef *m = JS_NewCModule(js, module_name, js_dmon_init); - if (!m) return NULL; - JS_AddModuleExport(js, m, "default"); - return m; -} diff --git a/source/qjs_dmon.h b/source/qjs_dmon.h index 96b617d2..bd8e20fc 100644 --- a/source/qjs_dmon.h +++ b/source/qjs_dmon.h @@ -1,7 +1,7 @@ #ifndef QJS_DMON_H #define QJS_DMON_H -#include "quickjs.h" +#include "cell.h" JSValue js_dmon_use(JSContext *js); diff --git a/source/qjs_enet.c b/source/qjs_enet.c index 3812fafe..5cbb7cf2 100644 --- a/source/qjs_enet.c +++ b/source/qjs_enet.c @@ -1,10 +1,9 @@ -// qjs_enet.c -#include "quickjs.h" +#include "qjs_enet.h" +#include "qjs_blob.h" #include #include #include #include -#include "prosperon.h" #define countof(a) (sizeof(a)/sizeof(*(a))) diff --git a/source/qjs_enet.h b/source/qjs_enet.h index f3f2cbf2..3d5de1d6 100644 --- a/source/qjs_enet.h +++ b/source/qjs_enet.h @@ -1,7 +1,7 @@ #ifndef QJS_ENET_H #define QJS_ENET_H -#include "quickjs.h" +#include "cell.h" JSValue js_enet_use(JSContext*); diff --git a/source/qjs_fd.c b/source/qjs_fd.c index 64fba605..c790d6eb 100644 --- a/source/qjs_fd.c +++ b/source/qjs_fd.c @@ -1,6 +1,6 @@ #include "qjs_fd.h" +#include "qjs_blob.h" #include "jsffi.h" -#include "qjs_macros.h" #include #include @@ -12,7 +12,6 @@ #include #include #include "wildmatch.h" -#include "prosperon.h" // File descriptor wrapper structure typedef struct { diff --git a/source/qjs_fd.h b/source/qjs_fd.h index 6e352762..ce2e2087 100644 --- a/source/qjs_fd.h +++ b/source/qjs_fd.h @@ -1,7 +1,7 @@ #ifndef QJS_FD_H #define QJS_FD_H -#include +#include "cell.h" JSValue js_fd_use(JSContext *js); diff --git a/source/qjs_geometry.c b/source/qjs_geometry.c index 3fde412a..6342d599 100644 --- a/source/qjs_geometry.c +++ b/source/qjs_geometry.c @@ -1,18 +1,16 @@ #include "qjs_geometry.h" +#include "qjs_blob.h" #include "jsffi.h" -#include "qjs_macros.h" #include "qjs_common.h" #include #include #include "HandmadeMath.h" -#include "prosperon.h" #include "font.h" #include "sprite.h" #include "transform.h" #include "stb_ds.h" - // GEOMETRY FUNCTIONS JSC_CCALL(geometry_rect_intersection, diff --git a/source/qjs_geometry.h b/source/qjs_geometry.h index 38cc99d9..38cbaa3c 100644 --- a/source/qjs_geometry.h +++ b/source/qjs_geometry.h @@ -1,7 +1,7 @@ #ifndef QJS_GEOMETRY_H #define QJS_GEOMETRY_H -#include "quickjs.h" +#include "cell.h" JSValue js_geometry_use(JSContext *ctx); diff --git a/source/qjs_http.c b/source/qjs_http.c index 58fee61f..c8eca2c1 100644 --- a/source/qjs_http.c +++ b/source/qjs_http.c @@ -1,4 +1,5 @@ -#include "quickjs.h" +#include "qjs_http.h" +#include "qjs_blob.h" #include #include #include @@ -8,7 +9,6 @@ #include #include #include -#include "prosperon.h" typedef struct { char *data; diff --git a/source/qjs_http.h b/source/qjs_http.h index efb3b5fb..bf58a862 100644 --- a/source/qjs_http.h +++ b/source/qjs_http.h @@ -1,7 +1,7 @@ #ifndef QJS_HTTP_H #define QJS_HTTP_H -#include "quickjs.h" +#include "cell.h" JSValue js_http_use(JSContext*); diff --git a/source/qjs_imgui.cpp b/source/qjs_imgui.cpp index 9bcc991b..abab5dc8 100644 --- a/source/qjs_imgui.cpp +++ b/source/qjs_imgui.cpp @@ -1,7 +1,7 @@ +#include "qjs_imgui.h" #include "imgui.h" #include "implot.h" #include "imnodes.h" -#include "quickjs.h" #include diff --git a/source/qjs_io.c b/source/qjs_io.c index d535a9ca..95dee339 100644 --- a/source/qjs_io.c +++ b/source/qjs_io.c @@ -1,7 +1,9 @@ #include "qjs_io.h" #include "jsffi.h" #include "qjs_macros.h" -#include "prosperon.h" +#include "cell.h" + +#include "qjs_blob.h" #include #include diff --git a/source/qjs_io.h b/source/qjs_io.h index 70798882..6d0ed5c8 100644 --- a/source/qjs_io.h +++ b/source/qjs_io.h @@ -1,7 +1,7 @@ #ifndef QJS_IO_H #define QJS_IO_H -#include "quickjs.h" +#include "cell.h" JSValue js_io_use(JSContext *ctx); diff --git a/source/qjs_js.c b/source/qjs_js.c index 7763f585..e5a6ffe6 100644 --- a/source/qjs_js.c +++ b/source/qjs_js.c @@ -1,7 +1,7 @@ #include "qjs_js.h" #include "qjs_macros.h" #include "jsffi.h" -#include "prosperon.h" +#include "cell.h" #include #ifdef _WIN32 @@ -24,7 +24,7 @@ JSC_CCALL(js_dump_objects, return js_dump_objects(js)) void cycle_hook_call(JSContext *js, JSValue v) { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); JS_FreeValue(js,JS_Call(js, rt->cycle_fn,JS_UNDEFINED,1,&v)); } @@ -32,7 +32,7 @@ JSC_CCALL(js_cycle_hook, if (JS_IsUndefined(argv[0])) js_debug_sethook(js,NULL,JS_HOOK_CYCLE); else { - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); JS_FreeValue(js,rt->cycle_fn); rt->cycle_fn = JS_DupValue(js,argv[0]); js_debug_sethook(js,cycle_hook_call, JS_HOOK_CYCLE); diff --git a/source/qjs_js.h b/source/qjs_js.h index 7bdbdf0a..53dae658 100644 --- a/source/qjs_js.h +++ b/source/qjs_js.h @@ -1,7 +1,7 @@ #ifndef QJS_JS_H #define QJS_JS_H -#include +#include "cell.h" JSValue js_js_use(JSContext *ctx); diff --git a/source/qjs_macros.h b/source/qjs_macros.h index a6d32645..d4c68e64 100644 --- a/source/qjs_macros.h +++ b/source/qjs_macros.h @@ -163,7 +163,6 @@ JS_NewClassID(&js_##TYPE##_id);\ JS_NewClass(JS_GetRuntime(js), js_##TYPE##_id, &js_##TYPE##_class);\ JSValue TYPE##_proto = JS_NewObject(js); \ JS_SetClassProto(js, js_##TYPE##_id, TYPE##_proto); \ -//JS_SetPropertyStr(js, c_types, #TYPE, JS_DupValue(js,TYPE##_proto)); \ #define countof(x) (sizeof(x)/sizeof((x)[0])) diff --git a/source/qjs_math.c b/source/qjs_math.c index b0920ce2..b201bbed 100644 --- a/source/qjs_math.c +++ b/source/qjs_math.c @@ -5,7 +5,7 @@ #include #include #include "HandmadeMath.h" -#include "prosperon.h" +#include "cell.h" // Utility function to get number from array index @@ -232,17 +232,17 @@ JSC_CCALL(math_from_to, ) JSC_CCALL(math_rand, - MTRand *mrand = &((prosperon_rt*)JS_GetContextOpaque(js))->mrand; + MTRand *mrand = &((cell_rt*)JS_GetContextOpaque(js))->mrand; return number2js(js, genRand(mrand)); ) JSC_CCALL(math_randi, - MTRand *mrand = &((prosperon_rt*)JS_GetContextOpaque(js))->mrand; + MTRand *mrand = &((cell_rt*)JS_GetContextOpaque(js))->mrand; return number2js(js, genRandLong(mrand)); ) JSC_CCALL(math_srand, - MTRand *mrand = &((prosperon_rt*)JS_GetContextOpaque(js))->mrand; + MTRand *mrand = &((cell_rt*)JS_GetContextOpaque(js))->mrand; m_seedRand(mrand, js2number(js,argv[0])); ) diff --git a/source/qjs_math.h b/source/qjs_math.h index 46140bc7..f12740f1 100644 --- a/source/qjs_math.h +++ b/source/qjs_math.h @@ -1,7 +1,7 @@ #ifndef QJS_MATH_H #define QJS_MATH_H -#include "quickjs.h" +#include "cell.h" JSValue js_math_use(JSContext *ctx); diff --git a/source/qjs_nota.c b/source/qjs_nota.c index 2df62393..83acd3fa 100755 --- a/source/qjs_nota.c +++ b/source/qjs_nota.c @@ -1,5 +1,5 @@ -#include "quickjs.h" -#include "prosperon.h" +#include "qjs_nota.h" +#include "qjs_blob.h" #define KIM_IMPLEMENTATION #define NOTA_IMPLEMENTATION @@ -275,7 +275,7 @@ void *value2nota(JSContext *ctx, JSValue v) { return data_ptr; } -JSValue nota2value(JSContext *js, char *nota) { +JSValue nota2value(JSContext *js, void *nota) { if (!nota) return JS_UNDEFINED; JSValue ret; JSValue holder = JS_NewObject(js); diff --git a/source/qjs_nota.h b/source/qjs_nota.h index fd171530..570495bd 100644 --- a/source/qjs_nota.h +++ b/source/qjs_nota.h @@ -1,7 +1,7 @@ #ifndef QJS_NOTA_H #define QJS_NOTA_H -#include "quickjs.h" +#include "cell.h" JSValue js_nota_use(JSContext*); diff --git a/source/qjs_os.c b/source/qjs_os.c index c40b8497..46916bd5 100644 --- a/source/qjs_os.c +++ b/source/qjs_os.c @@ -1,10 +1,9 @@ #include "qjs_os.h" +#include "qjs_blob.h" #include "jsffi.h" -#include "qjs_macros.h" #include "qjs_common.h" #include "qjs_wota.h" #include "qjs_transform.h" -#include "prosperon.h" #include "transform.h" #include @@ -171,7 +170,7 @@ static JSValue js_os_version(JSContext *js, JSValue self, int argc, JSValue *arg } JSC_CCALL(os_on, - prosperon_rt *rt = JS_GetContextOpaque(js); + cell_rt *rt = JS_GetContextOpaque(js); JS_FreeValue(js, rt->on_exception); rt->on_exception = JS_DupValue(js,argv[1]); ) diff --git a/source/qjs_os.h b/source/qjs_os.h index 3fe67bc1..f5afbbd0 100644 --- a/source/qjs_os.h +++ b/source/qjs_os.h @@ -1,7 +1,7 @@ #ifndef QJS_OS_H #define QJS_OS_H -#include "quickjs.h" +#include "cell.h" JSValue js_os_use(JSContext *ctx); diff --git a/source/qjs_qr.c b/source/qjs_qr.c index 4376aef1..b63149cb 100644 --- a/source/qjs_qr.c +++ b/source/qjs_qr.c @@ -1,7 +1,8 @@ -#include "quickjs.h" +#include "cell.h" +#include "qjs_blob.h" + #include "quirc.h" #include "qrencode.h" -#include "prosperon.h" #include // for sqrt #include // for size_t, etc. @@ -82,7 +83,7 @@ static JSValue js_qr_encode(JSContext *js, JSValueConst this_val, int argc, JSVa if (JS_ToBool(js, ci)) { bool_val = 0; // qrencode: 0 = case-insensitive } else { - bool_val = 1; // qrencode: 1 = case-sensitive + bool_val = 1; // qrencode: 1 = case-sensitive } casesensitive = bool_val; JS_FreeValue(js, ci); diff --git a/source/qjs_qr.h b/source/qjs_qr.h index 1e981f10..e8acffac 100644 --- a/source/qjs_qr.h +++ b/source/qjs_qr.h @@ -1,7 +1,7 @@ #ifndef QJS_QR_H #define QJS_QR_H -#include "quickjs.h" +#include "cell.h" JSValue js_qr_use(JSContext*); diff --git a/source/qjs_renderer.c b/source/qjs_renderer.c index 637cdb69..618834e5 100644 --- a/source/qjs_renderer.c +++ b/source/qjs_renderer.c @@ -1,8 +1,6 @@ #include "qjs_renderer.h" -#include "quickjs.h" #include -#include "qjs_macros.h" #include #include diff --git a/source/qjs_renderer.h b/source/qjs_renderer.h index 4184f15f..b785aa56 100644 --- a/source/qjs_renderer.h +++ b/source/qjs_renderer.h @@ -1,7 +1,7 @@ #ifndef QJS_RENDERER_H #define QJS_RENDERER_H -#include "quickjs.h" +#include "cell.h" JSValue js_renderer_use(JSContext *ctx); diff --git a/source/qjs_rtree.c b/source/qjs_rtree.c index 57471195..781ed0b9 100644 --- a/source/qjs_rtree.c +++ b/source/qjs_rtree.c @@ -2,7 +2,7 @@ #include "qjs_macros.h" #include "jsffi.h" #include "rtree.h" -#include "prosperon.h" +#include "cell.h" #include #include diff --git a/source/qjs_rtree.h b/source/qjs_rtree.h index 3e7ece55..7d33df92 100644 --- a/source/qjs_rtree.h +++ b/source/qjs_rtree.h @@ -1,7 +1,7 @@ #ifndef QJS_RTREE_H #define QJS_RTREE_H -#include +#include "cell.h" JSValue js_rtree_use(JSContext *ctx); diff --git a/source/qjs_sdl.c b/source/qjs_sdl.c index 939b5b00..1f306b75 100644 --- a/source/qjs_sdl.c +++ b/source/qjs_sdl.c @@ -1,7 +1,8 @@ #include "qjs_sdl.h" #include "jsffi.h" #include "qjs_macros.h" -#include "prosperon.h" +#include "cell.h" +#include "qjs_blob.h" #include "stb_ds.h" #include "qjs_actor.h" #include "qjs_sdl_surface.h" @@ -92,7 +93,7 @@ extern SDL_Mutex *event_watchers_mutex; JSC_CCALL(input_watch, /* Use js2actor to get the actor from the JS object */ - prosperon_rt *actor = js2actor(js, argv[0]); + cell_rt *actor = js2actor(js, argv[0]); if (!actor) return JS_ThrowTypeError(js, "First argument must be a valid actor object"); @@ -118,7 +119,7 @@ JSC_CCALL(input_watch, JSC_CCALL(input_unwatch, /* Use js2actor to get the actor from the JS object */ - prosperon_rt *actor = js2actor(js, argv[0]); + cell_rt *actor = js2actor(js, argv[0]); if (!actor) return JS_ThrowTypeError(js, "First argument must be a valid actor object"); diff --git a/source/qjs_sdl.h b/source/qjs_sdl.h index 18ff84dd..37fb6a60 100644 --- a/source/qjs_sdl.h +++ b/source/qjs_sdl.h @@ -2,7 +2,7 @@ #define QJS_SDL_H #include -#include "quickjs.h" +#include "cell.h" JSValue js_input_use(JSContext *ctx); JSValue js_camera_use(JSContext *ctx); diff --git a/source/qjs_sdl_gpu.c b/source/qjs_sdl_gpu.c index e29e05ab..c0c5bc9a 100644 --- a/source/qjs_sdl_gpu.c +++ b/source/qjs_sdl_gpu.c @@ -4,7 +4,7 @@ #include #include "render.h" -#include "prosperon.h" +#include "cell.h" #include "sprite.h" #include "stb_dxt.h" @@ -801,7 +801,7 @@ JSC_CCALL(cmd_acquire_swapchain, if (!texture) return JS_UNDEFINED; JSValue swap = JS_UNDEFINED; - JSValue *js_swapchains = ((prosperon_rt*)JS_GetContextOpaque(js))->js_swapchains; + JSValue *js_swapchains = ((cell_rt*)JS_GetContextOpaque(js))->js_swapchains; for (int i = 0; i < arrlen(js_swapchains); i++) { if (js2SDL_GPUTexture(js,js_swapchains[i]) == texture) { diff --git a/source/qjs_sdl_surface.c b/source/qjs_sdl_surface.c index ab6a4463..41110a1c 100644 --- a/source/qjs_sdl_surface.c +++ b/source/qjs_sdl_surface.c @@ -1,10 +1,9 @@ #include "qjs_sdl_surface.h" -#include "qjs_macros.h" +#include "qjs_blob.h" #include "jsffi.h" #include #include #include -#include "prosperon.h" #include // Helper functions from jsffi.c that need to be declared diff --git a/source/qjs_sdl_surface.h b/source/qjs_sdl_surface.h index bb876fd0..1ebe89dd 100644 --- a/source/qjs_sdl_surface.h +++ b/source/qjs_sdl_surface.h @@ -1,7 +1,7 @@ #ifndef QJS_SDL_SURFACE_H #define QJS_SDL_SURFACE_H -#include +#include "cell.h" #include JSValue js_sdl_surface_use(JSContext *js); diff --git a/source/qjs_sdl_video.c b/source/qjs_sdl_video.c index 378a620c..3dfb84f5 100644 --- a/source/qjs_sdl_video.c +++ b/source/qjs_sdl_video.c @@ -1,9 +1,8 @@ #include "qjs_sdl_video.h" +#include "qjs_blob.h" #include "jsffi.h" -#include "qjs_macros.h" #include "qjs_sdl_surface.h" #include "qjs_actor.h" -#include "prosperon.h" #include "sprite.h" #include "transform.h" @@ -16,8 +15,8 @@ #include "qjs_sdl.h" // External function declarations -extern prosperon_rt *create_actor(int argc, char **argv, void (*hook)(JSContext *)); -extern const char *register_actor(const char *id, prosperon_rt *rt, int main_thread); +extern cell_rt *create_actor(int argc, char **argv, void (*hook)(JSContext *)); +extern const char *register_actor(const char *id, cell_rt *rt, int main_thread); // SDL Window free function void SDL_Window_free(JSRuntime *rt, SDL_Window *w) @@ -1820,6 +1819,6 @@ JSValue js_sdl_video_use(JSContext *js) { int argc = 8; // Create the actor with the hook to set up endowments - prosperon_rt *actor = create_actor(argc, (char**)argv, video_actor_hook); + cell_rt *actor = create_actor(argc, (char**)argv, video_actor_hook); return actor2js(js,actor); } diff --git a/source/qjs_sdl_video.h b/source/qjs_sdl_video.h index b7ed583c..e158e34c 100644 --- a/source/qjs_sdl_video.h +++ b/source/qjs_sdl_video.h @@ -1,7 +1,7 @@ #ifndef QJS_SDL_VIDEO_H #define QJS_SDL_VIDEO_H -#include "quickjs.h" +#include "cell.h" JSValue js_sdl_video_use(JSContext *ctx); diff --git a/source/qjs_soloud.c b/source/qjs_soloud.c index 8350097a..5ec0e00f 100644 --- a/source/qjs_soloud.c +++ b/source/qjs_soloud.c @@ -1,8 +1,9 @@ +#include "qjs_soloud.h" +#include "qjs_blob.h" + #define STB_HEXWAVE_IMPLEMENTATION #include "soloud_c.h" -#include "quickjs.h" #include -#include "prosperon.h" #define countof(x) (sizeof(x)/sizeof((x)[0])) diff --git a/source/qjs_soloud.h b/source/qjs_soloud.h index cabd5aa2..810f3543 100644 --- a/source/qjs_soloud.h +++ b/source/qjs_soloud.h @@ -1,7 +1,7 @@ #ifndef QJS_SOLOUD_H #define QJS_SOLOUD_H -#include "quickjs.h" +#include "cell.h" JSValue js_soloud_use(JSContext*); diff --git a/source/qjs_spline.h b/source/qjs_spline.h index 7ecf482e..24462145 100644 --- a/source/qjs_spline.h +++ b/source/qjs_spline.h @@ -1,7 +1,7 @@ #ifndef QJS_SPLINE_H #define QJS_SPLINE_H -#include +#include "cell.h" JSValue js_spline_use(JSContext *ctx); diff --git a/source/qjs_sprite.h b/source/qjs_sprite.h index 1bda2372..783f7f30 100644 --- a/source/qjs_sprite.h +++ b/source/qjs_sprite.h @@ -1,7 +1,7 @@ #ifndef QJS_SPRITE_H #define QJS_SPRITE_H -#include "quickjs.h" +#include "cell.h" #include "sprite.h" diff --git a/source/qjs_steam.cpp b/source/qjs_steam.cpp index b2480240..3a4412d3 100644 --- a/source/qjs_steam.cpp +++ b/source/qjs_steam.cpp @@ -1,8 +1,7 @@ #ifndef NSTEAM extern "C" { -#include "quickjs.h" -#include "qjs_macros.h" +#include "qjs_steam.h" #include "jsffi.h" } diff --git a/source/qjs_steam.h b/source/qjs_steam.h index 5ed74b84..59722356 100644 --- a/source/qjs_steam.h +++ b/source/qjs_steam.h @@ -1,7 +1,7 @@ #ifndef QJS_STEAM_H #define QJS_STEAM_H -#include "quickjs.h" +#include "cell.h" JSValue js_steam_use(JSContext *js); diff --git a/source/qjs_time.c b/source/qjs_time.c index 9b6e3679..578983b5 100644 --- a/source/qjs_time.c +++ b/source/qjs_time.c @@ -1,5 +1,4 @@ #include "qjs_time.h" -#include "quickjs.h" #include #include diff --git a/source/qjs_time.h b/source/qjs_time.h index 475e78df..cec48d77 100644 --- a/source/qjs_time.h +++ b/source/qjs_time.h @@ -1,7 +1,7 @@ #ifndef QJS_TIME_H #define QJS_TIME_H -#include "quickjs.h" +#include "cell.h" JSValue js_time_use(JSContext *ctx); diff --git a/source/qjs_transform.c b/source/qjs_transform.c index 500a88cf..cdfa8371 100644 --- a/source/qjs_transform.c +++ b/source/qjs_transform.c @@ -4,7 +4,7 @@ #include "transform.h" #include "HandmadeMath.h" -#include "prosperon.h" +#include "cell.h" // Transform class definitions JSClassID js_transform_id; diff --git a/source/qjs_transform.h b/source/qjs_transform.h index 4b48da87..e2c7dba1 100644 --- a/source/qjs_transform.h +++ b/source/qjs_transform.h @@ -1,7 +1,7 @@ #ifndef QJS_TRANSFORM_H #define QJS_TRANSFORM_H -#include "quickjs.h" +#include "cell.h" extern JSClassID js_transform_id; diff --git a/source/qjs_wota.c b/source/qjs_wota.c index 39a02eeb..7d3a54c4 100644 --- a/source/qjs_wota.c +++ b/source/qjs_wota.c @@ -1,7 +1,8 @@ -#include "quickjs.h" +#include "qjs_wota.h" +#include "qjs_blob.h" + #include "wota.h" #include -#include "prosperon.h" typedef struct WotaEncodeContext { JSContext *ctx; diff --git a/source/qjs_wota.h b/source/qjs_wota.h index 2ff56f61..6e0ef707 100644 --- a/source/qjs_wota.h +++ b/source/qjs_wota.h @@ -1,7 +1,7 @@ #ifndef QJS_WOTA_H #define QJS_WOTA_H -#include +#include "cell.h" #include "wota.h" JSValue js_wota_use(JSContext*); diff --git a/source/sprite.h b/source/sprite.h index a36f9d00..c42b12eb 100644 --- a/source/sprite.h +++ b/source/sprite.h @@ -3,7 +3,7 @@ #include "HandmadeMath.h" #include "render.h" -#include "quickjs.h" +#include "cell.h" struct sprite{ HMM_Vec2 pos; // x,y coordinates of the sprite diff --git a/source/transform.h b/source/transform.h index d90c8bb9..a2c0a079 100644 --- a/source/transform.h +++ b/source/transform.h @@ -2,7 +2,7 @@ #define TRANSFORM_H #include "HandmadeMath.h" -#include +#include "cell.h" #include "render.h" typedef struct transform {