From 4b57633a00e65dbb0e704f5535ab5094db9c1ec1 Mon Sep 17 00:00:00 2001 From: sandeep-vedam Date: Tue, 3 Dec 2024 16:06:04 +0530 Subject: [PATCH] Added method for changing canvas color runtime in Blits --- src/component/base/methods.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/component/base/methods.js b/src/component/base/methods.js index 35061bd8..d760ce01 100644 --- a/src/component/base/methods.js +++ b/src/component/base/methods.js @@ -21,6 +21,7 @@ import eventListeners from '../../lib/eventListeners.js' import { trigger } from '../../lib/reactivity/effect.js' import { Log } from '../../lib/log.js' import { removeGlobalEffects } from '../../lib/reactivity/effect.js' +import { renderer } from '../../launch.js' export default { focus: { @@ -143,6 +144,14 @@ export default { enumerable: true, configurable: false, }, + $setClearColor: { + value: function (color) { + renderer.setClearColor(color) + }, + writable: false, + enumerable: false, + configurable: false, + }, } const deleteChildren = function (children) {