-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
fix: getSceneName use scenes #3022 #3023
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I committed with the wrong account. ; ; |
@aruru-weed No worries, I've done that before! |
…rjs#3027) Had a conversation here https://discord.com/channels/1195771303215513671/1232877562804305920 ``` From example in https://excaliburjs.com/docs/entities: const entityWithName = new ex.Entity({name: 'Named Entity'}); No overload matches this call. Overload 1 of 2, '(options: EntityOptions<any>): Entity<any>', gave the following error. Argument of type '{ name: string; }' is not assignable to parameter of type 'EntityOptions<any>'. Property 'components' is missing in type '{ name: string; }' but required in type 'EntityOptions<any>'. Overload 2 of 2, '(components?: any[] | undefined, name?: string | undefined): Entity<any>', gave the following error. Object literal may only specify known properties, and 'name' does not exist in type 'any[]'.ts(2769) Entity.d.ts(58, 5): 'components' is declared here. It seems that components is not optional here export interface EntityOptions<TComponents extends Component> { name?: string; components: TComponents[]; } ``` Changes: - Make `components` options optional here.
…balPos getter (excaliburjs#3017) Closes excaliburjs#2922 ## Changes: - `actor.oldGlobalPos` returns the globalPosition from the previous frame - `actor.getGlobalPos()` - use `actor.globalPos` instead - `actor.getGlobalRotation()` - use `actor.globalRotation` instead - `actor.getGlobalScale()` - use `actor.globalScale` instead This required some changes to `MotionSystem` so that `globalPos` could be properly captured. Previously, the parent's transform may have already been updated in the system's update when processing a child entity, leading to an incorrect `oldGlobalPos` value. Now, the MotionSystem update captures the entity & all of its children at the same time, skipping any entities that have parents as to not capture them twice over. This also deprecates other `getGlobalXYZ()` functions and replaces them with getters for consistency.
…calibur into aruru-weed-fix-get-scene-name
@aruru-weed Thanks for the contribution! Hope you didn't mind me tossing a couple commits in there! |
eonarheim
pushed a commit
that referenced
this pull request
May 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
===:clipboard: PR Checklist :clipboard:===
==================
Closes #3022
Changes:
getSceneName
to usescene
.I didn't know how to use
_sceneToInstance
cache, so I replaced it with something simpler.