Comments (3)
Hey @OhadRau ! Thanks a lot for trying it out 😄 And for providing the minimal repro - very helpful.
Just tested it, and it's indeed a bug - we weren't updating the 'ViewNode' in our scene graph when the style changes. Pushed up a fix in #74
(Btw thanks for this project, I've been waiting for something like this to come along for ages... would love to help out on some of the work for this library)
That would be great, I could definitely use help! Let me know if there is a particular aspect you're interested in or if you need any help getting going.
from revery.
Awesome, thank you for the quick fix :) I was just messing around making some of the demos with open issues to get to know the library for now (I have a working wall clock @ https://github.com/OhadRau/revery/blob/master/examples/Clock.re but it's implemented super weirdly since rotations always anchor at the center). I'd be happy to try adding some features though, I might try to tackle anchor points with a PR (although idk what kind of API you'd want to have for that).
from revery.
@OhadRau - that clock is really cool! I just tried it out and was playing around with it 👍 Exactly the kind of example we need. Please feel free to submit it via a PR.
but it's implemented super weirdly since rotations always anchor at the center)
Oh ya, this is the default, but it can actually be changed with a transform:
transform=[RotateZ(Angle.from_degrees(90.), TranslateY(50.)]
This means - first move the element up 50 pixels, then apply the transform from the original center.
The order of operations is important, too, since:
transform=[TranslateY(50.), RotateZ(Angle.from_degrees(90)]
would mean rotate first from the center, and then apply the transform.
I think this would allow for anchor points (similar discussion here for react native: https://stackoverflow.com/questions/37165715/react-native-transforms-with-pivot-point)
One possibility would be to have a convenience method like rotateWithPivot: (Angle.t, Vec2.t) => list(Transform.t) = (angle: Angle.t, anchorPoint: Vec2.t) => { ... }
that could help provider a higher-level abstraction for this construction.
from revery.
Related Issues (20)
- Ubuntu 18.10 / 19.04: @opam/ocamlfind@opam:1.8.1 build failed HOT 5
- esy '@examples' run output has no text (Revery.FontCache: Error loading typeface (skia)) HOT 4
- Uncaught Division_by_zero crash on window resize. (maxHeight vs flexGrow ?) HOT 1
- Revery roadmap in face of Reason->Rescript rebrand HOT 2
- Having problem with building revery-quick-start project on Mac HOT 7
- MacOS: Allow selective modifier key mapping
- esy install failing on Windows. HOT 3
- Build Revery is presenting failure in shell.c HOT 2
- ScrollView does not work if children are added after initial mount
- CI: esy-skia won't build on Linux HOT 1
- createWindow with visible=false does not create a hidden window HOT 3
- Update the build guide for Fedora HOT 4
- SVG drawing mangled if OS locale does use a different floating point presentation HOT 4
- Quickstart build step error HOT 1
- Windows10 esy is installed but revery-ui can not be installed
- Build revery with esy on mac failed HOT 9
- Can't build on Fedora 35 due to glibc bug HOT 4
- OCaml <=14.12 doesn't support glibc>=2.34 HOT 9
- Support for FreeBSD HOT 1
- Is this project dead? HOT 2
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 revery.