Skip to content

Instantly share code, notes, and snippets.

@juliaogris
Last active June 20, 2023 13:44
Show Gist options
  • Save juliaogris/fb790462e5b2c6e7c8f24b796aced1a7 to your computer and use it in GitHub Desktop.
Save juliaogris/fb790462e5b2c6e7c8f24b796aced1a7 to your computer and use it in GitHub Desktop.

FIX: https://github.com/foxygoat/evy/wiki/Learn:-Draw-Shapes#rect 50 50 FIX: frame around star.

Learn: drawing split up content

  • drawing 101: move line rect circle color grid
  • drawing 201: poly clear width text font
  • drawing 301: transparent colors (drawing 301), ellipse
  • drawing 401: fill, stroke, dash, linecap

Practice: drawing fixes

  • remove the orange colored lines replace with rainbows
  • less colors in sample
  • more easier sample building up to the line sample

Learn: variables split up content

  • Types (+pracitce)
  • Vairable declaraiont (+pracitce)
  • Variable Zero Values (+pracitce)
  • Inferred declarations (+practice)
  • read (+practice)
  • cls (+practice)
  • Practice: easy combinations
  • Practice: hard combinations

Evy web component ideas:

<evy-code>
move 50 50
circle 10
</evy-code>

not sure about inline code:

<evy-code inline>print 10</evy-code>
<evy-playground autorun>
move 50 50
circle 10
</evy-playground>
<evy-canvas autorun>
move 50 50
circle 10
</evy-canvas>
<evy-console>
print "hello world"
</evy-console>
<evy-env> // read-input slider-input console
move 50 50
circle 10
</evy-env>

Wiki leftovers


Code comments

Evy supports code comments, which are text that is ignored by the computer. Code comments are used to provide explanatory notes on code. To create a code comment, simply type two forward slashes //. Everything after the two forward slashes until the end of the line will be ignored by the computer.

Here is an example of code comments:

// This is a code comment.
print "Hello world" // Inline code comment.

Transparent Colors and Code Comments

Here is an example of how to use semi-transparent colors in Evy. We also introduce code comments in this example. Code comments are text that is ignored by the computer. They are used to provide explanatory notes on code. To create a code comment, simply type two forward slashes //. Everything after the two forward slashes until the end of the line will be ignored by the computer.

The following code draws two squares, one red and one blue. The blue square is semi-transparent, while the red square is opaque.

move 20 20
color "red"
rect 40 40

move 40 40 // semi trasparent blue color "rgba(0, 0, 255, 0.5)" rect 40 40

canvas with transparent rectangles and grid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment