feat: render API shim - a game's renpy.Displayable subclasses are drawn and receive events
CI / frontend (push) Failing after 1m13s
CI / backend (push) Failing after 1m33s

Games write their own displayables with render(), renpy.Render, blit, fill, canvas() and renpy.redraw.
render.ts keeps a tree of placed pieces (child renders, ordinary displayables, fills and drawing
commands) and turns it into DOM elements that stay put between redraws; pointer events reach event()
as pygame-style objects, and a returned value ends the interaction. Shaders and GPU properties are
accepted and ignored. The converter whitelists the calls and methods and accepts `import pygame`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-26 15:20:35 +03:00
1 parent 6d78b8b847
commit 3f51f06fec
8 files changed
+354 -3

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ UNARY_OPS = {ast.Not: "not", ast.USub: "-", ast.UAdd: "+", ast.Invert: "~"}
# Modules whose import is harmless: the player provides the functions it supports.
KNOWN_MODULES = {"random", "math", "renpy", "store", "time", "datetime", "re", "copy", "collections",
"itertools", "string", "functools", "operator", "json", "gc", "hashlib", "uuid"}
"itertools", "string", "functools", "operator", "json", "gc", "hashlib", "uuid", "pygame"}
class Unsupported(Exception):