added s.pal, s.palc and s.paint
All checks were successful
FTP Upload on Push / deploy (push) Successful in 8s
FTP Upload on Push / release (push) Successful in 6s

This commit is contained in:
2025-12-31 10:37:41 +00:00
parent 0d3d6d5abf
commit 4ecdd3a419

View File

@@ -250,6 +250,18 @@ var $builtinmodule = function (name) {
mod.sqrt = new Sk.builtin.func((n) => toPy(Math.sqrt(toJS(n))));
mod.pause = new Sk.builtin.func(() => { pause(); return Sk.builtin.none.none$; });
mod.resume = new Sk.builtin.func(() => { resume(); return Sk.builtin.none.none$; });
mod.pal = new Sk.builtin.func((colors, textColor) => {
pal(colors !== undefined ? toJS(colors) : undefined, textColor !== undefined ? toJS(textColor) : 3);
return Sk.builtin.none.none$;
});
mod.palc = new Sk.builtin.func((a, b) => {
palc(a !== undefined ? toJS(a) : undefined, b !== undefined ? toJS(b) : undefined);
return Sk.builtin.none.none$;
});
mod.paint = new Sk.builtin.func((width, height, data, options) => {
var result = paint(toJS(width), toJS(height), toJS(data), options !== undefined ? toJS(options) : undefined);
return result ? toPy(result) : Sk.builtin.none.none$;
});
return mod;
};