Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new tile accessor to get at tile props #445

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

eonarheim
Copy link
Member

Based on this conversation excaliburjs/Excalibur#2673

We want a convenient way to get at custom tile properties!

// Grab tiles by worldspace point and the named layer
const tile = map.getTileByPoint('Ground', evt.worldPos);
// or by coordinate
const tile = map.getTileByCoordiante('Ground, 10, 100);

console.log('tile', tile);
console.log('id', tile?.id);
console.log('tile props', tile?.properties);

@eonarheim eonarheim merged commit a30dc97 into main Jul 6, 2023
@eonarheim eonarheim deleted the feature/add-tile-accessor branch July 6, 2023 23:18
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