Skip to content

Commit ec5c62f

Browse files
committed
chore: bump JS runtime to 2.37.5 and add scripting example
1 parent 00c0936 commit ec5c62f

5 files changed

Lines changed: 47 additions & 15 deletions

File tree

4.62 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { Meta, StoryObj } from '@storybook/react';
2+
3+
import ScriptedEffect from './Scripting';
4+
5+
const meta = {
6+
title: 'Scripting',
7+
component: ScriptedEffect,
8+
parameters: {
9+
layout: 'fullscreen',
10+
},
11+
args: {},
12+
} satisfies Meta<typeof ScriptedEffect>;
13+
14+
export default meta;
15+
type Story = StoryObj<typeof meta>;
16+
17+
export const Default: Story = {};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
import { useRive } from '@rive-app/react-canvas';
3+
4+
const ScriptedEffect = () => {
5+
const { RiveComponent } = useRive({
6+
src: 'scripted-path-effect.riv',
7+
artboard: 'Multishape',
8+
stateMachines: "State Machine 1",
9+
autoplay: true,
10+
});
11+
12+
return <RiveComponent />;
13+
};
14+
15+
export default ScriptedEffect;

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
},
3636
"homepage": "https://github.com/rive-app/rive-react#readme",
3737
"dependencies": {
38-
"@rive-app/canvas": "2.37.4",
39-
"@rive-app/canvas-lite": "2.37.4",
40-
"@rive-app/webgl2": "2.37.4"
38+
"@rive-app/canvas": "2.37.5",
39+
"@rive-app/canvas-lite": "2.37.5",
40+
"@rive-app/webgl2": "2.37.5"
4141
},
4242
"peerDependencies": {
4343
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"

0 commit comments

Comments
 (0)