-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(perp): initial work for sharing position Refs: BFE-32
- Loading branch information
1 parent
bf4dfd3
commit d108f52
Showing
14 changed files
with
387 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use client"; | ||
|
||
import { useEffect, useState } from "react"; | ||
import { | ||
Spinner, | ||
} from "@bera/shared-ui"; | ||
import { | ||
EventType, | ||
Fit, | ||
Layout, | ||
useRive, | ||
useStateMachineInput, | ||
} from "@rive-app/react-canvas"; | ||
|
||
export function RocketAnimation() { | ||
const { RiveComponent, rive } = useRive({ | ||
src: "/berps_rocket.riv", | ||
stateMachines: "State Machine", | ||
autoplay: true, | ||
layout: new Layout({ fit: Fit.Contain }), | ||
}); | ||
|
||
useEffect(() => { | ||
if (rive) rive.play(); | ||
}, [rive]); | ||
|
||
return ( | ||
<> | ||
<div className="z-0 mt-[400px] absolute opacity-60 h-[500px] w-[500px]"> | ||
<RiveComponent /> | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.