Skip to content

Update transform member structure in base.hpp#194

Merged
Segfaultd merged 2 commits into
MafiaHub:developfrom
CrosRoad95:patch-3
May 20, 2026
Merged

Update transform member structure in base.hpp#194
Segfaultd merged 2 commits into
MafiaHub:developfrom
CrosRoad95:patch-3

Conversation

@CrosRoad95
Copy link
Copy Markdown
Contributor

@CrosRoad95 CrosRoad95 commented May 20, 2026

Fixes issue where flecs-explorer inproperly displays transform component.
With this change it displays everything properly, otherwise "glm::vec3::z" would be displayed as "w" component in rotation

image

Summary by CodeRabbit

  • Chores
    • Improved component metadata on Windows so the transform component now exposes a "generation" field alongside position, rotation, and velocity.
    • This enhances tooling and platform compatibility when inspecting or synchronizing component state on Windows builds.

Review Change Stack

Fixes issue where flecs-explorer inproperly displays transform component
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Walkthrough

The Base::Transform component registration for Windows now exposes the genID field as "generation" in its flecs binding metadata, placed before the existing pos, rot, and vel field bindings.

Changes

Transform Generation Field Exposure

Layer / File(s) Summary
Transform generation field binding
code/framework/src/world/modules/base.hpp
The Base::Transform component registration adds the genID field as "generation" to the Windows flecs member binding alongside pos, rot, and vel.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hop through code with cheery zing,
A tiny field called generation I bring,
Now genID wears the name with pride,
In Transform's members it will bide,
🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the transform member structure in base.hpp to fix component display mapping in flecs-explorer.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@code/framework/src/world/modules/base.hpp`:
- Line 184: The metadata registration for Transform is misordered:
_transform.member<uint16_t>("generation").member<glm::vec3>("pos").member<glm::quat>("rot").member<glm::vec3>("vel")
registers rot before vel but the Transform struct declares vel before rot;
update the chain on _transform to register "vel" before "rot" (i.e.
...member<glm::vec3>("pos").member<glm::vec3>("vel").member<glm::quat>("rot"))
so Flecs inspector metadata matches the Transform struct layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd8badfc-6678-4fc0-ac8c-97940ca990f7

📥 Commits

Reviewing files that changed from the base of the PR and between e10a7a2 and 0046f3b.

📒 Files selected for processing (1)
  • code/framework/src/world/modules/base.hpp

Comment thread code/framework/src/world/modules/base.hpp Outdated
@Segfaultd Segfaultd merged commit 87eaafe into MafiaHub:develop May 20, 2026
1 of 5 checks passed
@CrosRoad95 CrosRoad95 deleted the patch-3 branch May 20, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants