46 Commits

Author SHA1 Message Date
Hernan Torrisi
ac9f322ccb update comments 2024-05-27 20:19:23 -05:00
Hernan Torrisi
e3739f1a1f request instance of rive file 2024-05-27 20:19:23 -05:00
Hernan Torrisi
0e0a2bd972 add status handling 2024-05-27 20:19:23 -05:00
Adam
16dc257b2f feat: create useRiveFile hook 2024-05-27 20:19:23 -05:00
Hernan Torrisi
4678ea9ecf interpret undefined definition for shouldUseIntersectionObserver as true 2024-05-27 18:24:51 -05:00
Hernan Torrisi
d58963e29d edit hook description 2024-05-27 18:24:51 -05:00
Hernan Torrisi
c32433284a fix observer and use single instance 2024-05-27 18:24:51 -05:00
Hernan Torrisi
8e181d6ae2 change hooks lifecycle to account for component reloading 2024-05-14 12:02:47 -05:00
Zach Plata
c2319b8dea feat: add customDevicePixelRatio param from WASM for adjusting canvas size based on dpr 2024-01-09 14:13:01 -06:00
Zach Plata
6ba68fab9e feature: Bump WASM dependency to support Rive Events 2023-09-13 09:49:44 -05:00
Slava Khanilo
f8aa50fa49 feature: expose RiveProps type from package 2023-07-31 13:52:14 -05:00
Zach Plata
08b9f9a2aa Also export the container ref current element 2023-06-02 13:53:30 -05:00
Zach Plata
a24b910096 Update prop docs 2023-06-02 13:53:30 -05:00
Zach Plata
33760042d1 fix recursive useEffect call 2023-06-02 13:53:30 -05:00
Zach Plata
2c82fa04e7 Feature: Move canvas sizing logic into useResizeCanvas hook and clean up util hooks 2023-06-02 13:53:30 -05:00
Zach Plata
b56c17d48c feat: allow for children to be set inside the canvas for fallback content when canvas cannot be shown 2023-05-26 14:22:47 -05:00
Zach Plata
d3bc913bcf Add prop to the standalone Rive component 2023-05-02 13:27:38 -05:00
elVengador
3cbbf99fec Fix: matchMedia add event listener for safari 13 and older versions 2023-01-18 10:12:34 -06:00
Arthur Vivian
7be20b0a87 Call cleanup on unmount 2022-10-20 18:03:30 +01:00
Zach Plata
2b1aa01a87 fix: Adjust canvas size if devicePixelRatio changes for any reaason 2022-09-22 12:12:32 -05:00
Zach Plata
04685c0bcd fix: make a canvas of size 0 until we calculate the bounds appropriately 2022-09-15 10:53:36 -05:00
Maxwell Talbot
eb07281415 rev rive-wasm dependencies & update render delay to be 0ms 2022-07-22 14:30:04 +01:00
Maxwell Talbot
a1a155849a use window.settimeout and clear out some consts 2022-07-22 13:52:42 +01:00
Maxwell Talbot
59e67cec3d update name 2022-07-22 13:52:42 +01:00
Maxwell Talbot
84b18cc3dd ensure we re evaluate state machine inputs when we play is triggered, looks like there maybe additional situations where we are going to need this. 2022-07-22 13:52:42 +01:00
Maxwell Talbot
1092b44947 update resize behaviour to throttle, add parameters to enable switching modes 2022-07-22 13:52:42 +01:00
Zach Plata
838ed1abf8 Fix: Add check before setting Rive as state variable on Rive instance load 2022-07-19 18:44:20 -05:00
Maxwell Talbot
fd1c00a995 update canvas dimensions to use clientWidth and Height as opposed to BoundingClient, to avoid getting scaled information 2022-07-14 13:22:12 +01:00
Maxwell Talbot
62b3a1d8dc removed polyfill in favour of DIY appraoch to reduce package size 2022-07-14 11:24:55 +01:00
Maxwell Talbot
5be9d2f874 refactored the IE check into useSize 2022-07-14 11:24:55 +01:00
Zach Plata
ec61a6835d Fix useEffects so they're not in conditional statements 2022-07-14 11:24:55 +01:00
Maxwell Talbot
e966316971 add resizeObserver to replace window listeners for all but IE 2022-07-14 11:24:55 +01:00
Zach Plata
ec230faa73 Feat: Move existing examples into Storybook and add documentation 2022-06-08 09:47:41 -05:00
Zach Plata
84d9730767 Feat: Add stateMachines param to the default Rive component 2022-05-25 10:27:13 -05:00
Arthur Vivian
aab811b975 Fix animation playing with autoplay false when animation name passed 2022-04-26 16:03:06 +01:00
Zach Plata
5c0b9cd613 Breaking: Spread non-style props onto canvas element instead of containing div 2022-04-22 14:48:17 -07:00
Zach Plata
563dca3608 Move to using @rive-app/canvas as the backing renderer and update scripts accordingly. 2022-04-22 14:48:17 -07:00
Zach Plata
0a18b522cc Feat: Add extra param to useStateMachineInput to set an initial value on the input when its loaded 2022-04-11 10:03:36 -07:00
Arthur Vivian
b13413ba8b Update animations on param change 2022-04-06 16:57:03 +01:00
Zach Plata
1e1cabd057 Breaking: Switch from using the canvas renderer as default to the webgl renderer 2022-03-23 13:12:26 -07:00
Arthur Vivian
e599b1a38c Use @rive-app/canvas directly to fix path issues in downstream libs 2021-12-16 15:15:36 +00:00
Arthur Vivian
f309481a43 Add verticalAlign = top to canvas to prevent canvas growth on resize 2021-11-08 14:12:54 +00:00
Arthur Vivian
7fe0cbeacb Autoplay by default on Rive component 2021-06-07 15:39:25 +01:00
Arthur Vivian
66032c2e37 Export rive-js types 2021-06-07 12:59:25 +01:00
Arthur Vivian
7ca2e6765f Add eslint and prettier configs 2021-06-07 12:17:16 +01:00
Arthur Vivian
3b1d7593fe Initial commit of existing implementation 2021-06-04 16:43:13 +01:00