Code Monkey home page Code Monkey logo

react-native-skia-gesture's Introduction

Hi there ๐Ÿ‘‹

I'm a React Native Consultant at Worklet (Italy), want to collaborate? Reach me here.

  • ๐Ÿ”ญ Iโ€™m currently working on a React Native Reanimated YouTube Series
  • ๐Ÿง‘โ€๐Ÿ’ป Iโ€™m looking to collaborate on open source projects
  • โšก Fun fact: I'm a React Native Dev but I like Flutter ๐Ÿ˜ฎ

react-native-skia-gesture's People

Contributors

enzomanuelmangano avatar krislau avatar zaventh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-skia-gesture's Issues

Crash app when I build iOS adhoc

Hi there I'm using lib for touch on element of skia it work correctly on debug mode (on simulator and real device) but it crash when I touch element on build with adhoc (release mode). please help me check it
React info:
System:
OS: macOS 13.2.1
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 882.64 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 9.6.0 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /Users/hoan/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.8 => 0.70.8
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

image

Reanimted V3 support

Does this not support reanimated v3 yet? I'm not able to make any component Touchable. I'm using Reanimated v3.6.0-nightly-20231114-0837247d4 with Fabric enabled

Ref not working...

No Skia View currently available...

	const ref = useCanvasRef();

...
	<Touchable.Canvas
		style={{ width: '100%', height: '50%', backgroundColor: 'black' }}
		ref={ref}>

    const image = ref.current?.makeImageSnapshot();

Obviously works without HOC.

Feature request: Extended TouchHandler Logic

Hi,

Thanks for this useful project. I apologise for the lack of clarity but this is more of a question and potentially feature request. I have successfully integrated this library and can drag e.g. Images around as outline by this project.

However, what I am wanting to do is also provide my own complex TouchHandler logic on the canvas to allow other types of user interactions besides drag animations such as free-form drawing.

I do see in https://github.com/enzomanuelmangano/react-native-skia-gesture/blob/main/src/canvas/canvas.tsx#L81 where my "top-level" TouchHandler will also be called when supplied.

However, what I am trying to figure out is how to have the TouchInputs be "consumed" if, for example, they do intersect a Touchable component as defined in this library, and if not then process the touch input based on my own custom logic.

Currently I am having difficulty trying to figure out how to differentiate when a TouchInput will be interacting with a Touchable element on the canvas or is in empty canvas space where I should apply my own touch logic.

I am roughly thinking if the TouchHandler internal to this lib actually intersects a Touchable, it prevents propagation up to the parent TouchHandler and if it does not, it does indeed call my parent TouchHandler so I can perform my custom logic elsewhere.

Any feedback or suggestions would be most appreciated.

Skia v0.1.230 breaks package

Skia v0.1.230 removes the Skia Value API (useValue, useComputedValue, runTiming, etc) which breaks the package. The package will probably have to migrate to the methods aligned in the docs which utilize Reanimated v3. Probably somewhat related to #9

Text not rendering on first render

When the component first renders, the Text is not rendering. The moment I drag the item, the text renders immediately.

Initial render:
image

After dragging:
image

Tested and weirdly only happens with Touchable and this component even though I have another component that is almost exactly the same. Another weird thing is that when I use useComputedValue for the text instead of useValue, even when I drag it doesn't show the text.

Ok so when I replace the text x and y vales with static ones it shows up but then the drag is frozen.

https://snack.expo.dev/@kris_lau/text-no-render

Refs are never deleted from the context

There is an issue where refs never get deleted from the context due to a typo. This causes all previous touch locations to remain "touchable" and isPointInPath returns true for them even after they have been moved. PR forthcoming.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.