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

Convert networking system to typescript #5802

Merged

Conversation

johnshaughnessy
Copy link
Contributor

Convert networking system to typescript in preparation for future changes

Co-authored-by: Dominick D'Aniello <netpro2k@gmail.com>
Copy link
Contributor

@netpro2k netpro2k left a comment

Choose a reason for hiding this comment

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

lgtm other than the extra TODO

types/networked-aframe.d.ts Outdated Show resolved Hide resolved
@@ -36,11 +42,25 @@ export function takeOwnership(world, eid) {
}
}

const createMessageDatas = new Map();
type EntityID = number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice to start using this universally just for ease of reading. Tradeoff is tricking ourselves into thinking its something special and making EntityID specific things when we are actually just doing number stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It feels "correct" to call them EntityIDs because (even though this isn't enforced), EntityIDs are a narrower type than numbers: They are (supposed to be) uints between 0 and MAX_ENTITY_COUNT.

@johnshaughnessy johnshaughnessy merged commit b9970ca into master Nov 23, 2022
@johnshaughnessy johnshaughnessy deleted the feature/convert-networking-system-to-typescript branch November 23, 2022 19:26
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.

2 participants