     [(/ (.getHeight current-world-extent) (.getHeight initial-world-extent)),
      (/ (.getWidth current-world-extent) (.getWidth initial-world-extent))]))
 
+(defn get-canvas-from-scene
+  "Returns canvas associated with a scene."
+  [#^GScene scn]
+  (.. scn getWindow getCanvas))
+
 ;;;
 
 nil

  [#^GScene scn]
  (.zoom scn 1.0))

(defn- get-scene-hooks
  "Returns the hooks with their corresponding callbacks for scene."
  [#^GScene scn]
  (:hooks (.getUserData scn)))

(defn- set-scene-hooks
  "Sets hash-map of hooks to callbacks as scene hooks."
  [#^GScene scn, hooks]
  (.setUserData scn (assoc (.getUserData scn) :hooks hooks)))

(defn add-hook
  "Adds hook for scene."
  [#^GScene scn, hook]
  (when (not (contains? (get-scene-hooks scn) hook))
    (.setUserData scn (assoc-in (.getUserData scn) [:hooks hook] []))))

(defn set-callback-for-hook
  "Sets given functions as callbacks for hook on scene."

  (let [#^GScene scn (GScene. window)]
    (doto scn
      (initialize-scene)
      (add-data-to-scene :hooks {})
      (.shouldZoomOnResize true)
      (.shouldWorldExtentFitViewport false)
      (.setStyle *default-scene-style*))
