Hello, I’m trying to implement a canvas pattern using Dynamic Texture in React-Native. I’m facing the issue is context.createPattern(* is undefined.. After that I’m trying to implement context.drawImage as alternative. context.drawImage is working fine but issue is here when I’m use context.clip(* is not working…
1 - Regarding context.drawImage not working after context.clip, this is actually a bug. I’ve created a PR and an Issue addressing it and it is now waiting to be reviewed by other memebers of the team. You can follow the progress here:
It is probably going to take a while for it to be merged due to the holy days, but once it is done I will make sure to ping this thread and let you know.
2 - context.createPattern is not currently supported in Babylon Native (we don’t have a native implementation for it yet). This is a missing feature and is currently been tracked under Babylon Native’s backlog. We won’t be addressing it immediately since features are dependent on how the Babylon Native team prioritizes things. However, I will make sure to ping this thread once we start working on it.
Let me know if this helps you.
If you have a very urgent demand for context.createPattern let me know, we talk with the team about prioritizing that.
Thank You Very much ! @srzerbetto It’s woking fine, But it’s missed some clipping path when I use it inside a loop, and when I frequently clear the context and call drawImage again the app was crashed. maybe this issue is come from my end.
@Suman if you find something that you can repro consistently, feel free to open a new issue here in the forum and we can take a look! Just be sure to create a Playground to show what the target behavior should be.