charlieroberts / gibber.lib

This library provides the graphics and audio capabilities of Gibber without the code editing environment.
MIT License
24 stars 3 forks source link

Using Canvas #11

Closed eddyc closed 7 years ago

eddyc commented 7 years ago

Hi, really enjoying getting to know this library, I was trying to use the Canvas object but it doesn't seem to be present in this version. Although there seems to be some code commented out in the built version of the library that relates to the Canvas object, is the Canvas object not really supported in this version?

charlieroberts commented 7 years ago

Hmmm... I just checked out the most recent version (via npm) and the following code worked fine. Maybe you could post your code?

<html>

<head>
  <script src='./build/gibber.lib.js'></script>
</head>

<body></body>

<script>
Gibber.init()

a = EDrums('x*ox*xo-')
a.snare.snappy = 1

a.fx.add( Reverb() )

c = Canvas()

c.square( 200,200,200 )

c.fill( 'red' )

</script>

</html>
eddyc commented 7 years ago

Sorry for the noise, I had left out the call to Gibber.init, thanks for your help. Ed

charlieroberts commented 7 years ago

No worries!