@edadma/logo 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edadma/logo",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Logo programming language interpreter with React component",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/main.js",
@@ -137,6 +137,12 @@ class LogoJS(canvas: html.Canvas) extends js.Object:
137
137
  def clearEventHandler(): Unit =
138
138
  eventHandler = None
139
139
 
140
+ /** Set a global variable */
141
+ def setVariable(name: String, value: Any): Unit = logo.setVariable(name, value)
142
+
143
+ /** Get a global variable */
144
+ def getVariable(name: String): Option[LogoValue] = logo.getVariable(name)
145
+
140
146
  /** Force a render */
141
147
  def render(): Unit =
142
148
  val width = canvas.width