        (reduce merge {})
        (assoc root-node :children)))
 
-(defn fix-webgl-inspector-quirks [capture-first-frame? show? & [height]]
-  (let [inspector-capture-nodes (js/document.querySelectorAll "[title='Capture frame (F12)']")
-        inspector-ui-nodes      (js/document.querySelectorAll "[title='Show full inspector (F11)']")
-        inspector-windows       (js/document.querySelectorAll ".splitter-horizontal")
-        target-capture-node     (aget inspector-capture-nodes 1)
-        synthetic-click         (doto (js/document.createEvent "MouseEvent")
-                                  (.initMouseEvent "click", true, true, js/window, 0, 0, 0, 0, 0, false, false, false, false, 0))]
-    (when (= 3 (.-length inspector-capture-nodes))
-      (.remove (aget inspector-capture-nodes 0))
-      (.remove (aget inspector-ui-nodes 0))
-      (.remove (aget inspector-capture-nodes 2))
-      (.remove (aget inspector-ui-nodes 2))
-      (.remove (.-parentNode (aget inspector-windows 0)))
-      (.remove (.-parentNode (aget inspector-windows 2)))
-      (when capture-first-frame?
-        (.dispatchEvent target-capture-node synthetic-click))
-      (aset js/window "captureNextFrame"
-            (fn [] (.dispatchEvent target-capture-node synthetic-click)))
-      (let [inspector-window (.-parentNode (aget inspector-windows 1))
-            existing-height  (.-clientHeight inspector-window)]
-        (.setAttribute inspector-window "style" (str "height: " height "px;" (when-not show? "display: none;")))))))
+
 
 (def default-model
   "apartment_3.gltf")

                            n))
        render-node     (fn render-node [[node-name node] mv]
                          (let [mv mv ;;(geom/* mv (:matrix node))
                                ]
                            (doseq [mesh (:meshes node)]
                              (doseq [[index mesh] (map vector (range) (:primitives mesh))]
                                (let [vertices         (assoc (get-in mesh [:attributes :p]) :id (primitive-id node-name mesh index :p))

        texture-program? (map? material)]
    (if texture-program?
      (do
        ;;:texture-specular-per-fragment
        :texture-per-fragment-light
        ;;:texture-flat
        )
      (do
        :diffuse-per-fragment-light
        ;;:diffuse-light
        ;;:diffuse-flat
        ))))

