uncomputable / simfony-webide

Simplicity / Simfony development in the browser!
https://simfony.dev
Creative Commons Zero v1.0 Universal
8 stars 3 forks source link

badger animation bug fixes #33

Closed dpet closed 4 months ago

dpet commented 4 months ago

Increased the resolution of the badger animation for low res screens Fixed a gap bug where badger wasn't on the panel on lower res screens Removed the parser-error-box height animation because it would trigger on every key press.

uncomputable commented 4 months ago

Is there a way to display raw vector graphics without a resolution?

dpet commented 4 months ago

I don't think there is on Canvas. Svg's can scale to any size without getting pixelated but Rive draws everything onto a canvas which handles everything in pixels. https://www.geeksforgeeks.org/difference-between-svg-and-html-5-canvas/ Rive does a lot of stuff under the hood to try and optimize the animation. I was a able to increase the resolution by setting the draw boundaries and the styling dimensions separately. \ Rive looks at the size of the canvas before setting up the artboard for display. I have to keep the canvas the same size to be able to position the badger in the same spot on the input panel. Otherwise I could call [resizeDrawingSurfaceToCanvas](https://rive.app/community/doc/rive-parameters/docHI9ASztXP#:~:text=canvas%20is%20resized.-,resizeDrawingSurfaceToCanvas,-()) which looks at the pixel density of the device and tries to keep the animations and canvas synced.

uncomputable commented 4 months ago

I see. Rive works with a canvas which works with pixels. Let's keep the raster graphic animation for now.