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

setInstancedAttribute #17858

Open
wants to merge 1 commit into
base: v3.8.5
Choose a base branch
from
Open

Conversation

GengineJS
Copy link
Contributor

No description provided.

size_t byteLength = 0;
if (val.toObject()->getTypedArrayData(&data, &byteLength) && data != nullptr && byteLength > 0) {
cobj->setInstancedAttribute(name, reinterpret_cast<const float *>(data), static_cast<uint32_t>(byteLength));
size_t byteCount = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think byteCount means elementCount
Becasue byteCount is no different from byteLength by name.

Copy link
Contributor

Choose a reason for hiding this comment

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

getTypedArrayData returns byte length of the internal buffer.
Why change the variable name from byteLength to byteCount?

Copy link

✅ Package size is not changed

Interface Check Report

This pull request does not change any public interfaces !

@qiuguohua
Copy link
Contributor

#17859

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.

4 participants