DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

0.4 Port #24

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 5 years ago

Priority: [Unset]

Depends:

Description:

OoPort Is a template class that only exists outside of OoView so developers can create their own Port SubClasses. Additionally developers can extend an instance of OoPort by adding properties and methods after declaration. A port is an array of draw instructions which are followed to draw a figure. Ports are written in JSON. The exact data structure isn't written yet but I'm imagining it like

{
 "layers":  [
  { 
      "Lines":[ 
          "stickMan Body": "draw line command",
          "stickMan Arms": "draw line command",
           ...
       ],
       "Circles":[
         "stickMan Head":"draw circle command",
      ]

  } 
 {
  "lines":[ ],
  "circles":[ ]
 }
],
"functions": [ ]
}

If a port contains a function named initialize it should be executed prior to drawing the figure.

UML:

OoPort-06-09-2019

Properties:

rayDrawInstructions - public array, array stores a JSON port.

Methods:

DanielBullimore commented 4 years ago

easy sanity check pass