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
Some js native classes have a set method but not have a copy.
Map/Set/TypedArray (UInt8Array for example).
Ok, there are not reason handle a Map/Set as props because there are not API what use it, but should be way pass ArrayBuffer view.
// we should bypass set for array buffer, because it not resizable. You cant set a 4 values to array of 0. if(target?.set&&!ArrayBuffer.isView(value)){if(target.constructor.name===value.constructor.name&&target.copy){target.copy(value)}elseif(Array.isArray(value)){target.set(...value)}else{// Support shorthand scalar syntax like scale={1}constscalar=newArray(target.length).fill(value)target.set(...scalar)}}else{
This sometime can be used for API's like a :
{/* texture 2x2 filled to red */}<texturewidth={2}height={2}image={newUint8Array([255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255]}/>
The text was updated successfully, but these errors were encountered:
Some js native classes have a
set
method but not have acopy
.Map/Set/TypedArray (UInt8Array for example).
Ok, there are not reason handle a Map/Set as props because there are not API what use it, but should be way pass ArrayBuffer view.
This line try to use copy method that wrong for this case:
https://github.com/pmndrs/react-ogl/blob/main/src/utils.ts#L144
Possible fix:
This sometime can be used for API's like a :
The text was updated successfully, but these errors were encountered: