From c4c0f09731ab7a1f947a9dacbc399f051737829a Mon Sep 17 00:00:00 2001 From: Paulo Feodrippe Date: Mon, 13 Jan 2025 23:08:40 -0500 Subject: [PATCH] wip7 --- test/vybe/flecs_test.clj | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/test/vybe/flecs_test.clj b/test/vybe/flecs_test.clj index 77be682..da0ae7f 100644 --- a/test/vybe/flecs_test.clj +++ b/test/vybe/flecs_test.clj @@ -159,7 +159,7 @@ :inout (flecs/EcsIn) :oper (flecs/EcsOptional)}]}}))))) -(deftest default-systems-test +#_(deftest default-systems-test (let [w (vf/make-world)] (vf/eid w vt/Translation) (vf/eid w vt/Rotation) @@ -194,27 +194,6 @@ [:m12 :m13 :m15]))))) ;; -- Macro system. -(vc/defn* vybe-transform-2 :- :void - [it :- [:* vf/iter_t]] - (let [pos (field it vt/Translation 0) - rot (field it vt/Rotation 1) - scale (field it vt/Scale 2) - - transform-global (field it vt/Transform 3) - transform-local (field it vt/Transform 4) - - is-parent-set (vf.c/ecs-field-is-set it 5) - transform-parent (field it vt/Transform 5)] - - (doseq [i (range (:count @it))] - (let [t-global (vp/& (nth transform-global i)) - t-local (vp/& (nth transform-local i)) - local (matrix-transform (nth pos i) (nth rot i) (nth scale i))] - (reset! @t-local local) - (if is-parent-set - (reset! @t-global (vr.c/matrix-multiply local (nth transform-parent 0))) - (reset! @t-global local)))))) - (vp/defnc ddd :- :long [w :- :*] (let [q (vf/parse-query-expr w @@ -235,7 +214,7 @@ id (bit-or (flecs/EcsCascade) (flecs/EcsUp)) system-desc (vf/system_desc_t {:entity e - :callback (vp/mem vybe-transform-2) + :callback (vp/mem vybe-transform) :query q})] (tap> id) (vf.c/ecs-system-init @@ -279,7 +258,7 @@ transform-parent (vr.c/matrix-multiply transform-parent))))) -#_(deftest default-systems-2-test +(deftest default-systems-2-test (let [w (vf/make-world)] (vf/eid w vt/Translation) (vf/eid w vt/Rotation)