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

feat(2d): add camera node #1019

Merged
merged 5 commits into from
Apr 6, 2024

Conversation

ksassnowski
Copy link
Contributor

This PR adds an orthographic camera node.

There a still a few kinks that I'd like to work out before merging this:

  • The hit method selects the correct object, but the actual overlay in the editor is offset. I'm not sure why this happens.
  • I would like most of the camera's methods to return a SignalGenerator in order to be chainable. I'm not sure what the best way to do this would be, however.

@aarthificial aarthificial merged commit 4ca346b into motion-canvas:main Apr 6, 2024
9 checks passed
@aarthificial
Copy link
Contributor

We could probably make the scene accept any ComponentChildren including a fragment (<>) by specifying a parser for the signal like this:

@parser((children: ComponentChildren) => {
  if (children instanceof Node) {
    return children;
  } else {
    return new Node({children});
  }
})
@signal()
public declare readonly scene: Signal<ComponentChildren, Node, this>;

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

Successfully merging this pull request may close these issues.

None yet

2 participants