You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing out the BaseTexture::readPixels() function I found that the behavior of the Napi ArrayBuffer construction at this line was behaving differently in Babylon Native vs Babylon React Native where the implementations of Napi differ.
In Babylon Native the ArrayBuffer construction works as expected and later on IsNull() on the buffer returns true. In Babylon React Native an exception is thrown at that line and the readPixels operation is aborted.
To Reproduce
Steps to reproduce the behavior:
In the Babylon React Native playground call readPixels() on a texture with no arguments
Expected behavior
The call to readPixels() succeeds
Screenshots
If applicable, add screenshots to help explain your problem.
Other
Tested on React-Native Android
The text was updated successfully, but these errors were encountered:
I tested this with V8 (reference), Chakra, and JSI using the following code:
auto arg = info[0];
auto arrayBuffer = arg.As<Napi::ArrayBuffer>();
auto argIsNull = arg.IsNull();
(void)argIsNull;
auto arrayBufferIsNull = arrayBuffer.IsNull();
(void)arrayBufferIsNull;
V8: argIsNull is true, arrayBufferIsNull is true
Chakra: argIsNull is true, arrayBufferIsNull is false
JSI: argIsNull is true, arrayBufferIsNull causes assert
While testing out the BaseTexture::readPixels() function I found that the behavior of the Napi ArrayBuffer construction at this line was behaving differently in Babylon Native vs Babylon React Native where the implementations of Napi differ.
In Babylon Native the ArrayBuffer construction works as expected and later on IsNull() on the buffer returns true. In Babylon React Native an exception is thrown at that line and the readPixels operation is aborted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The call to readPixels() succeeds
Screenshots
If applicable, add screenshots to help explain your problem.
Other
Tested on React-Native Android
The text was updated successfully, but these errors were encountered: