Comments (8)
from react-native-skia.
I had an app running with normal react-native and it was working. I converted it to expo to make an external library but I'm having the following problems. I'm trying to create an example with Snack, but I probably won't be able to because of version incompatibility. Could you please review my repo
from react-native-skia.
from react-native-skia.
The simple example I created works :D. I'm trying to find the source of the error. I would like to ask you if there is a possibility of having a problem with values of type sharedValue passed with react-context. Is there a possibility of having such a problem?
from react-native-skia.
from react-native-skia.
I tried the snack and it appear to work properly.
Please be mindful when reporting such issues to clearly state what the bug appears to be, how to reproduce it as easily as possible and which platforms and versions of the package are affected by the issue.
I will close the issue for now. If you have a reproduction that we can confirm, we will re-open the issue.
from react-native-skia.
Hi @wcandillon, I need to explain the problem in detail. I finally found the cause.
To explain the problem in its simplest form, SharedValue or any other Matrix4 value unfortunately does not work with the matrix={} prop of Skia components. This should be obvious in the Snack application I shared. If you can drag an element with a green background, this is the view of the gestureHandler. Skia path should have a white background.
What did I try to run Matrix4 ?
- with SharedValue
- React useState/useReducer/useSyncExternalStore
- EventEmitter
I found no other way to try :)
How did I solve it?
Matrix4 is definitely not working and I created it again with a value of type SkMatrix. It worked successfully the first time :) The solution to 3 days of tedious work for me was to switch back to SkMatrix from Matrix4 that you used in your examples. I don't know exactly why it didn't work but Matrix4 really didn't work.
Finally, I think we should complete the examples and missing documentation about this in the documentation.
By the way, my friend, you are a great guy and you share excellent examples. I am a bit new to canvas/svg. I apologize for advancing this issue in a way that will tire you out. I will continue to learn as much as I can and provide people with useful ideas, examples and products.
Good work
from react-native-skia.
The problem is that on snack, you can only use RN Skia 0.1.221
support for Matrix4 arrived in 0.1.229
.
Using SkMatrix on 0.1.221
is probably the best way or you can use expo devclient to run the latest version of Skia in your project.
from react-native-skia.
Related Issues (20)
- Opacity is not working on Paragraph HOT 2
- Skia.ParagraphBuilder is undefined HOT 2
- hello-snack from tutorial is not working HOT 2
- Support RN Module for Web (to fix error when loading assets on Web with Metro) HOT 4
- Matrix4 is not working for skia elements
- Dev works but main/prod environment broken/have different behaviors on android HOT 1
- App Crashes When Scrolling with FlatList HOT 1
- Create driving animations HOT 3
- Dashed line HOT 1
- Height and width constant of a canvas
- Path dash return SkPath HOT 3
- Cannot read properties of undefined (reading 'Path') TypeError: Cannot read properties of undefined (reading 'Path') HOT 7
- Canvas onTouch Android HOT 3
- "Hello world" example code in Atlas document runs blank View, whereas "Animations" functions properly. HOT 1
- The useTexture function throws an error on Android: "Cannot read property 'getCanvas' of null" . HOT 6
- The Atlas API's transform exhibits random anomalies. HOT 3
- property opacity not working in some Element. include: <Group/>; <Picture/> HOT 1
- makeImageFromView. Android crash when attempting to create an image from a view that is outside the viewport. HOT 1
- Please can useSharedValueEffect be brought back? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-skia.