Skip to content

Conversation

@ksassnowski
Copy link
Contributor

This PR adds start and end signals to the Grid node. These signals can be used to animate the grid appearing on screen similar to lines or curves work.

Example

export default makeScene2D(function* (view) {
  const grid = createRef<Grid>();

  view.add(
    <Grid
      ref={grid}
      width={'100%'}
      height={'100%'}
      stroke={'#666'}
      start={0.5}
      end={0.5}
    />,
  );

  yield* all(
    grid().end(1, 1).wait(1).to(0.5, 1),
    grid().start(0, 1).wait(1).to(0.5, 1),
  );
});
grid.mp4

@ksassnowski ksassnowski requested a review from aarthificial July 3, 2023 09:16
@aarthificial aarthificial merged commit e37ea80 into motion-canvas:main Jul 3, 2023
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.

2 participants