|
@@ -21,12 +21,18 @@ function init(self)
|
|
go.set(url, "mycolor", vmath.vector4(x/maxx, y/maxy, 0, 1))
|
|
go.set(url, "mycolor", vmath.vector4(x/maxx, y/maxy, 0, 1))
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
+
|
|
|
|
+ self.updated = false
|
|
|
|
+end
|
|
|
|
+
|
|
|
|
+function update(self, dt)
|
|
|
|
+ self.updated = true
|
|
end
|
|
end
|
|
|
|
|
|
function on_input(self, action_id, action)
|
|
function on_input(self, action_id, action)
|
|
- if action_id == hash("touch") and action.released then
|
|
|
|
|
|
+ if action_id == hash("touch") and action.pressed and self.updated then
|
|
for _, url in ipairs(self.urls) do
|
|
for _, url in ipairs(self.urls) do
|
|
- -- crash: go.animate(url, "mycolor", go.PLAYBACK_ONCE_PINGPONG, vmath.vector4(0, 0, 1, 1), go.EASING_OUTELASTIC, 1)
|
|
|
|
|
|
+ go.animate(url, "mycolor", go.PLAYBACK_ONCE_PINGPONG, vmath.vector4(0, 0, 1, 1), go.EASING_LINEAR, .2)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|