summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starling/node-2d.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm
index 9a18284..cdf8af1 100644
--- a/starling/node-2d.scm
+++ b/starling/node-2d.scm
@@ -53,6 +53,7 @@
<canvas>
cameras
+ first-camera
<scene-2d>
@@ -196,6 +197,11 @@
canvas)))
(cameras canvas)))
+(define-method (first-camera (canvas <canvas>))
+ (match (cameras canvas)
+ ((camera . _) camera)
+ (() #f)))
+
;;;
;;; 2D Scene