Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the new useClock doesn't update #2412

Closed
alibenmlah opened this issue Apr 30, 2024 · 3 comments
Closed

the new useClock doesn't update #2412

alibenmlah opened this issue Apr 30, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@alibenmlah
Copy link

alibenmlah commented Apr 30, 2024

hello , thanks for the good work and this amazing module ;
after the new update of the module useClockValue has been removed and also useComputedValue , so the old solutions to make iTime on react-native-skia are useless
I tried useDerivedValue
const t = useClock()
const clock = useDerivedValue(()=>{ return t.value },[t.value])
<Shader source={source} uniforms={{clock:clock.value}} />
doesn't update

@alibenmlah alibenmlah added the documentation Improvements or additions to documentation label Apr 30, 2024
@alibenmlah alibenmlah changed the title how to use the new useClock to simulate iTime the new useClock doesn't update May 2, 2024
@NikitaDudin
Copy link
Contributor

try

const t = useClock();
const uniforms = useDerivedValue(()=> ({ clock: t.value }), [t]);
<Shader source={source} uniforms={uniforms}  />

@alibenmlah
Copy link
Author

also don't udpade thanks anyway nikitaDudin for responding , i closed the issue because i am not interseted about rn-skia any more i will use expo-gl because skia shading language lack's documentation it's assumes you already have experience with shaders at the same time it's deffirente from openGL without clearing how to deal with those differences

@NiccoloCase
Copy link

still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants