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

Animating tex and fontSize of Latex at the same time doesn't let fontSize animate #1103

Open
Quantodeluz opened this issue Aug 31, 2024 · 1 comment
Labels
a-2d Relates to the 2d package b-bug Something isn't working c-accepted The issue is ready to be worked on

Comments

@Quantodeluz
Copy link

Description
If you animate tex and fontSize at the same time, fontsize doesn't change until tex finishes animating

To Reproduce

export default makeScene2D(function* (view) {
  view.fill('white');

  const latex = createRef<Latex>()
  view.add(
    <Latex
    ref={latex}
    fill={'black'}
    fontSize={100}
    tex={`{{ some }}{{ \\phantom{-} }}{{ \\LaTeX }}`}
    />
  )
  yield* all(
    latex().fontSize(60, 1),
    latex().tex(`{{ some }}{{ \\phantom{-} }}{{ more }}{{ \\phantom{-} }}{{ \\LaTeX }}`, 2),
  )
  yield* waitFor(1)
});
error.mp4

Package versions:

  • core: 3.17.0
  • two: 3.17.1
  • ui: 3.17.0
  • vitePlugin: 3.17.0

Additional info
If the fontSize animation takes longer than tex, at the end of the tex animation fontSize catches up:

export default makeScene2D(function* (view) {
  view.fill('white');

  const latex = createRef<Latex>()
  view.add(
    <Latex
    ref={latex}
    fill={'black'}
    fontSize={100}
    tex={`{{ some }}{{ \\phantom{-} }}{{ \\LaTeX }}`}
    />
  )
  yield* all(
    latex().tex(`{{ some }}{{ \\phantom{-} }}{{ more }}{{ \\phantom{-} }}{{ \\LaTeX }}`, 1),
    latex().fontSize(60, 2),
  )
  yield* waitFor(1)
})
error.2.mp4
@Quantodeluz Quantodeluz added the b-bug Something isn't working label Aug 31, 2024
@aarthificial aarthificial added c-accepted The issue is ready to be worked on a-2d Relates to the 2d package labels Sep 1, 2024
@aarthificial aarthificial removed their assignment Sep 1, 2024
@aarthificial
Copy link
Contributor

Related to #1074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-2d Relates to the 2d package b-bug Something isn't working c-accepted The issue is ready to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants