Skip to content

fix: Rename anchorX and anchorY to pivotX and pivotY in AssetLevelMap…#2379

Open
jobe-m wants to merge 2 commits into
mainfrom
jobe-m/feat/rename-anchor-to-pivot-for-entity-import-from-LDtk-level-map
Open

fix: Rename anchorX and anchorY to pivotX and pivotY in AssetLevelMap…#2379
jobe-m wants to merge 2 commits into
mainfrom
jobe-m/feat/rename-anchor-to-pivot-for-entity-import-from-LDtk-level-map

Conversation

@jobe-m

@jobe-m jobe-m commented Jul 14, 2026

Copy link
Copy Markdown
Member

…Exporter

@augmentcode

augmentcode Bot commented Jul 14, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Updates the LDtk AssetLevelMap exporter to output entity pivot offsets using pivotX/pivotY instead of anchorX/anchorY.
Why: Aligns the exported JSON schema with pivot terminology to better reflect LDtk’s __pivot semantics.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

chunkEntity["y"] = entityPosY
chunkEntity["anchorX"] = (entityPivotX * ldtkEntity["width"] as Int).toInt()
chunkEntity["anchorY"] = (entityPivotY * ldtkEntity["height"] as Int).toInt()
chunkEntity["pivotX"] = (entityPivotX * ldtkEntity["width"] as Int).toInt()

@augmentcode augmentcode Bot Jul 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This renames exported JSON fields from anchorX/anchorY to pivotX/pivotY, which is a schema change for the generated level_data chunk files; can you confirm all consumers are updated (or can tolerate both keys) to avoid breaking existing projects?

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

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.

1 participant