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

Test babylon vertex buffer instance divisor #12996

Merged

Conversation

Dok11
Copy link
Contributor

@Dok11 Dok11 commented Sep 19, 2022

Hi! There are some tests again :)

Some points here:

  1. Simplify the code.
  2. Setter was recompute the hash after every set call, but it shuld be only after change the this._instanced as it we can see in the _computeHashCode method.
  3. I found shadowed variable (data) in the constructor and fix it (to vertexData in the local scope).

And just in case I explain my pipeline:

  1. First I wrote test cases.
  2. Only after it I started to modify the code.

early the instanceDivisor setter recomputed the hash every time,
but it was necessary only when `this._instanced` changes
the data variable was defined as constructor's argument and reassigned,
but it was not necessary
@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@sebavan sebavan merged commit 7d397a3 into BabylonJS:master Sep 19, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
…nce-divisor

Test babylon vertex buffer instance divisor

Former-commit-id: 01bc5fe36eec61925ca04ece8ad6f288edfa869a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants