updated documentation - added handler / callback prototype section, added key names section; added ag::drawArc() and ag::drawCircle() w/ documentation; added tests/transparent.png and tests/imagetest.lua; renamed init() event to init_event(); re-added missing drawImage Lua hook; changed images to draw transparent parts correctly through to background
git-svn-id: svn://anubis/anaglym/trunk@197 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
1 parent
8ea89aea33
commit
b546ea74dd
14 files changed
+493
-67
No files matched your search
@@ -1,5 +1,5 @@
|
||||
|
||||
function init()
|
||||
function init_event()
|
||||
arena = ag.loadModelStatic("boxarena")
|
||||
ball = ag.loadModel("checkerball")
|
||||
ball:setPosition(-7, 7.4, 12)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
function init()
|
||||
function init_event()
|
||||
local rows = 5
|
||||
local offset = 1
|
||||
local pin = ag.loadModel("bowling_pin", 0.5)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
function init()
|
||||
function init_event()
|
||||
local levels = 7
|
||||
local crate = ag.loadModel("crate", 0.5)
|
||||
local offset = 0.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
function init()
|
||||
function init_event()
|
||||
crates = {}
|
||||
|
||||
levels = 5
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
function init_event()
|
||||
ag.import("std")
|
||||
image = ag.loadTexture("transparent.png")
|
||||
local crate = ag.loadModelStatic("crate")
|
||||
ag.setCamera(5, -5, 5)
|
||||
end
|
||||
|
||||
function update_overlay_event(width, height)
|
||||
local time = ag.elapsedTime()
|
||||
local rot = time / 1000 * 90
|
||||
local scale = math.sin(time / 1000) * 1.5 / 2 + 1.25
|
||||
ag.drawImage(256 * scale, 256 * scale, width / 2, height / 2, image, rot);
|
||||
ag.drawArc(1, 0, 0.5, width * 0.8, height * 0.8, height * 0.15,
|
||||
90, 180);
|
||||
ag.drawCircle(0, 0, 1, width * 0.8, height * 0.2, height * 0.15);
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
function init()
|
||||
function init_event()
|
||||
local crate_texture = ag.loadTexture("checker.jpg")
|
||||
local ground = ag.createPlaneStatic(0, 0, 1, 0)
|
||||
ground:setColor(0.2, 1.0, 0.2)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Reference in new issue
Block a user