Feat: Bump wasm and add examples to support touch feature

This commit is contained in:
Zach Plata
2022-05-17 10:15:54 -05:00
committed by Zachary Plata
parent 21a17ed40e
commit 3902948a2e
4 changed files with 19 additions and 9 deletions

View File

@@ -6,10 +6,10 @@
"@testing-library/jest-dom": "^5.13.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"react": "^17.0.2",
"react": "file:../../node_modules/react",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"rive-react": "latest",
"rive-react": "file:../..",
"web-vitals": "^1.1.2"
},
"scripts": {

View File

Binary file not shown.

View File

@@ -6,13 +6,23 @@ function App() {
autoplay: true,
};
const { RiveComponent } = useRive(params);
const { RiveComponent: RiveComponentBasic } = useRive(params);
const { RiveComponent: RiveComponentTouch } = useRive({
src: 'magic-ball.riv',
autoplay: true,
stateMachines: "Main State Machine",
});
return (
// The animation will fit to the parent element.
<div style={{ height: '500px', width: '500px' }}>
<RiveComponent />
</div>
<>
<div style={{ height: '500px', width: '500px' }}>
<RiveComponentBasic />
</div>
<div style={{ height: '300px', width: '300px' }}>
<RiveComponentTouch />
</div>
</>
);
}

View File

@@ -27,8 +27,8 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/canvas": "1.0.59",
"@rive-app/webgl": "1.0.56"
"@rive-app/canvas": "1.0.60",
"@rive-app/webgl": "1.0.57"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"