-
Notifications
You must be signed in to change notification settings - Fork 2
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
(REVIEW ONLY) Jeremy bubble exercises #1
Conversation
Thank you for your pull request and welcome to the Ethereal Engine developer community! We require contributors to sign our Copyright Assignment Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the agreement at https://forms.gle/15ENsSAJGKf2ozvB7 The agreement has not been signed by users: @Rezmason. After signing the agreement, you can ask me to recheck this PR by posting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it has taken so long to go over this. Nice job. Very clean and consise. Hope it helped get your feet wet.
@@ -92,21 +93,31 @@ export const BubbleEmitterComponent = defineComponent({ | |||
// Spawning a single bubble as an example | |||
// [Exercise 1]: Using this system. Spawn multiple bubbles with varying x,z Localtransform positons | |||
// [Exercise 3]: Remove them if they are too old(bubble.age > N seconds)[This can be done in a couple ways(reactively and within this sytem synchronosly)] | |||
if(emitterComponent.bubbleEntities.value!.length < 1) { //For example ensuring there is only one bubble being added | |||
const bubbles: Array<Entity> = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using emitterComponent.bubbleEntities was enough to track the bubbles.
if(emitterComponent.bubbleEntities.value!.length < 1) { //For example ensuring there is only one bubble being added | ||
const bubbles: Array<Entity> = [] | ||
const numExistingBubbles = emitterComponent.bubbleEntities.value!.length | ||
const numBubbles = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer this constant to actually be at the top of the file or configured withing the emitter component
Don't merge! But feedback appreciated. Things of note:
bubbles
array getting populated and then merged the right approach?.slice()
necessary to guarantee iterator stability? ie., do we routinely look out for mutating data structures we're in the middle of looping over?