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

transform matrix documentation. #1899

Open
vaukalak opened this issue May 4, 2020 · 4 comments
Open

transform matrix documentation. #1899

vaukalak opened this issue May 4, 2020 · 4 comments
Labels
👻 Missing Docs Documentation is missing 👋 Good first issue Interested in collaborating? Take a stab at fixing one of these issues.

Comments

@vaukalak
Copy link

vaukalak commented May 4, 2020

Description

Documentation doesn't mention the matrix transform property, event if it's supported in react-native.

What is the problem?

I see that decomposedMatrix and transformMatrix are marked as deprecated in the doc. However following syntax is not mentioned at all:

<View style={{ transform: [{ matrix: some4x4Matrix }] }} />

So I'm not able to understand is this syntax deprecated / experimental / cross-platform ?

How can we address it?

If the matrix transform is deprecated, it would be great see that mentioned explicitly.
If it's currently supported, and not intended to be deprecated, it would be great to mention that explicitly here. IMHO even if it would be just listed as { matrix: CATransform3D } maybe with link to github file location, it would be a big improbement.

Why is it important?

Creating UI editor apps without using matrix is very hard. When you build a matrix inside your state, it would be great to just pass it to the UI component.

Who needs this?

Everyone who works with matrix transformations.

When should this happen (use version numbers if needed)?

Well, sooner is better :)

@Simek
Copy link
Collaborator

Simek commented May 4, 2020

Indeed using 'Use `transform: [{ matrix: ... }]` instead. is recommended in the deprecation warning, but there is no matrix example on the Transforms page.

I was only able to find few examples of matrix usage in the internal tests.

It's quite interesting that there is also a TODO note according to the matrix in the types definition file.

@Simek Simek added 👻 Missing Docs Documentation is missing 👋 Good first issue Interested in collaborating? Take a stab at fixing one of these issues. labels May 4, 2020
@ProBeta1
Copy link

Shall I work on this @Simek ?

@Simek
Copy link
Collaborator

Simek commented May 18, 2020

Hi @ProBeta1, feel free to work on this issue. Like an author, I'm curious too about the matrix structure.

@vaukalak
Copy link
Author

At least my tests shown that when we mount a view with a matrix transform, the only way to update that matrix is via setNativeProps. Also it would be good to document, that this is a 4x4 matrix (since rn supports rotateX/Y). I'm also unsure about the MatrixMath module documentation, it's not exposed as a top level thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 Missing Docs Documentation is missing 👋 Good first issue Interested in collaborating? Take a stab at fixing one of these issues.
Projects
None yet
Development

No branches or pull requests

3 participants