Skip to content

Commit

Permalink
wip5
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeodrippe committed Jan 14, 2025
1 parent 6adeb57 commit b141b4c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/vybe/flecs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,17 @@
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)]
is-parent-set (vf.c/ecs-field-is-set it 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)
(reset! @t-global local)))))
(if is-parent-set
(let [transform-parent (field it vt/Transform 5)]
(reset! @t-global (vr.c/matrix-multiply local (nth transform-parent 0))))
(reset! @t-global local))))))

(vc/defn* default-systems :- :void
[w :- :*]
Expand Down

0 comments on commit b141b4c

Please sign in to comment.