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

Atlas is not working with large spritesheet #2907

Open
1 task done
kkaplinski opened this issue Jan 22, 2025 · 0 comments
Open
1 task done

Atlas is not working with large spritesheet #2907

kkaplinski opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kkaplinski
Copy link

kkaplinski commented Jan 22, 2025

Description

Hi! I tried to use quite large image file (16 frames, 8640 × 675) with Atlas component to animate sprites but nothing was rendered. Code is working perfectly fine with less frames (8 frames, 4320 × 675).

React Native Skia Version

1.10.2

React Native Version

0.76.6

Using New Architecture

  • Enabled

Steps to Reproduce

Use Atlas component with large image file ( width > 8150px).

Snack, Code Example, Screenshot, or Link to Repository

  const image = useImage(require('test.png'));
  const sprites = useRectBuffer(1, (rect, i) => {
    'worklet';
    const x = width * progress.value;
    rect.setXYWH(x, 0, width, height);
  });

  const transforms = [Skia.RSXform(1, 0, 0, 0)]

  return (
    <Canvas style={{width: '100%', height: '100%'}}>
      <Atlas
        sprites={sprites}
        image={image}
        transforms={transforms}
      />
    </Canvas>
  );
@kkaplinski kkaplinski added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant