diff --git a/.todo b/.todo index 6cb1134..a89f511 100644 --- a/.todo +++ b/.todo @@ -1,4 +1,3 @@ -document 3D coordinate system add audio capabilities add fillCircle() add gradient functionality diff --git a/doc/index.html b/doc/index.html index 59493b6..5fb2f89 100644 --- a/doc/index.html +++ b/doc/index.html @@ -26,6 +26,7 @@ The library functions are documented below.
  • @@ -69,6 +70,21 @@ consist of red, green, and blue components. Each component is a real number that can range from 0.0 to 1.0.

    + +

    Coordinate Systems

    + +

    +Anaglym uses the OpenGL right-handed coordinate system for its 3D coordinates. +The default orientation is such that the XY plane is horizontal (the +"ground" plane). +The Z axis extends positively into the "air" above the XY plane, and the +default gravity vector pulls along the negative Z axis. +

    +

    +FIXME: 2D coordinates +

    + +
    @@ -208,7 +224,7 @@ of the circle.

    drawImage

    -

    ag.drawImage(width, height, x, y, texture, [, rot])

    +

    ag.drawImage(width, height, x, y, texture [, rot])

    This function tells the engine to draw an image to the screen. width and height specify the size of the image, diff --git a/tests/managed_objects.lua b/tests/managed_objects.lua index cee29d8..c0e9ca3 100644 --- a/tests/managed_objects.lua +++ b/tests/managed_objects.lua @@ -11,6 +11,8 @@ function init_event() ag.exit() end ag.setCursorVisible(true) + pt_x = -1 + pt_y = -1 end function init_obj(obj) @@ -66,5 +68,14 @@ function mousebutton_down_event(button, x, y) obj:setColor(0, 0, 1) end end + elseif (button == 3) then + pt_x = x + pt_y = y + end +end + +function update_overlay_event(width, height) + if (pt_x >= 0 and pt_y >= 0) then + ag.drawCircle(0, 1, 0, pt_x, pt_y, 5) end end