summaryrefslogtreecommitdiff
path: root/src/SomhairlesDream.Frontend/Bindings.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SomhairlesDream.Frontend/Bindings.fs')
-rw-r--r--src/SomhairlesDream.Frontend/Bindings.fs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SomhairlesDream.Frontend/Bindings.fs b/src/SomhairlesDream.Frontend/Bindings.fs
index a0276cc..2822e33 100644
--- a/src/SomhairlesDream.Frontend/Bindings.fs
+++ b/src/SomhairlesDream.Frontend/Bindings.fs
@@ -18,6 +18,10 @@ type ThreeNode =
abstract position: ThreeVector with get
abstract rotation: ThreeVector with get
abstract background: obj with get, set
+ abstract children: ThreeNode array with get
+
+[<Emit("$0.traverse(function (o) { if (o.geometry && o.geometry.dispose) { o.geometry.dispose(); } var mats = Array.isArray(o.material) ? o.material : (o.material ? [o.material] : []); mats.forEach(function (m) { ['map','normalMap','roughnessMap','metalnessMap','aoMap','emissiveMap'].forEach(function (key) { var t = m[key]; if (t && t.dispose) { t.dispose(); } }); if (m.dispose) { m.dispose(); } }); })")>]
+let disposeNodeResources (node: ThreeNode) : unit = jsNative
[<Erase>]
type ThreeBox3 =