kitgit

tirbofish/dropbear · diff

3b8f08e · Thribhu K

wip: animation wip: animation scripting feature: implemented puffin profiler into dropbear_engine refactor: completely remade the asset server, with support for typesafe handles instead of using arbitrary values (fixes #87) refactor: model importing to be able to export in a custom format during production builds are still not available yet because the other crates are still fucked.

Unverified

diff --git a/scripting/commonMain/kotlin/com/dropbear/asset/model/Animation.kt b/scripting/commonMain/kotlin/com/dropbear/asset/model/Animation.kt
new file mode 100644
index 0000000..226e577
--- /dev/null
+++ b/scripting/commonMain/kotlin/com/dropbear/asset/model/Animation.kt
@@ -0,0 +1,29 @@
+package com.dropbear.asset.model
+
+import com.dropbear.math.Vector3f
+import com.dropbear.math.Quaternionf
+
+data class Animation(
+    val name: String,
+    val channels: List<AnimationChannel>,
+    val duration: Float
+)
+
+data class AnimationChannel(
+    val targetNode: Int,
+    val times: DoubleArray,
+    val values: ChannelValues,
+    val interpolation: AnimationInterpolation
+)
+
+enum class AnimationInterpolation {
+    LINEAR,
+    STEP,
+    CUBICSPLINE
+}
+
+sealed class ChannelValues {
+    data class Translations(val values: List<Vector3f>) : ChannelValues()
+    data class Rotations(val values: List<Quaternionf>) : ChannelValues()
+    data class Scales(val values: List<Vector3f>) : ChannelValues()
+}
diff --git a/scripting/commonMain/kotlin/com/dropbear/asset/model/Material.kt b/scripting/commonMain/kotlin/com/dropbear/asset/model/Material.kt
new file mode 100644
index 0000000..9e1c9ce
--- /dev/null
+++ b/scripting/commonMain/kotlin/com/dropbear/asset/model/Material.kt
@@ -0,0 +1,24 @@
+package com.dropbear.asset.model
+
+import com.dropbear.asset.Texture
+import com.dropbear.math.Vector2f
+import com.dropbear.math.Vector3f
+import com.dropbear.math.Vector4f
+
+data class Material(
+    val name: String,

Large diffs are not rendered by default. Showing the first 50 of 124 lines. Show full diff