Improved commander.

This commit is contained in:
Devine Lu Linvega 2016-11-16 10:58:59 -08:00
parent d9673d2121
commit 747ecc24c6
4 changed files with 11 additions and 4 deletions

View File

@ -45,6 +45,7 @@ $ ! ; Clear temporary storage
```
+ M10 10 h 80 v 80 h -80 Z ; Draw a square outline
+ M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80 ; Draw a bezier
+ M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 ; Draw a circle
```
##Stroke*

View File

@ -67,6 +67,7 @@ function Commander(element,element_input)
var key = content[0];
content.shift();
this.cmd = new Command(content);
ronin.module = null;
switch(key) {
case "@":

View File

@ -6,6 +6,14 @@ function Hint(element)
this.update = function()
{
this.element.innerHTML = !ronin.module ? "Missing" : ronin.module.hint(commander.cmd);
if(ronin.module){
this.element.innerHTML = ronin.module.hint(commander.cmd);
this.element.style.display = "block";
}
else{
this.element.style.display = "none";
}
console.log(ronin.module);
}
}

View File

@ -24,7 +24,4 @@ function Vector()
{
return "Vector: "
}
// Demo:
// > 5 #ff0000;+ M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80
}