An open API service indexing awesome lists of open source software.

https://github.com/gsimone/use-capture

πŸŽ₯ Record react-three-fiber scenes with ccapture.js
https://github.com/gsimone/use-capture

Last synced: 9 months ago
JSON representation

πŸŽ₯ Record react-three-fiber scenes with ccapture.js

Awesome Lists containing this project

README

          

# πŸŽ₯ use-capture [![npm version](https://badge.fury.io/js/use-capture.svg)](https://badge.fury.io/js/use-capture)
Record react-three-fiber scenes with [ccapture.js](https://github.com/spite/ccapture.js)

## Notes

- Not yet ready for general use, if you try it let me know ✌️
- Gif format doesn't work yet

## Usage

[Check a simple example on codesandbox](https://zgi8e.csb.app/)

#### 1️⃣ bind useCapture to your `react-three-fiber` canvas:
```jsx
import useCapture from "use-capture";

function App() {

const [bind, startRecording] = useCapture({ duration: 2, fps: 60 });

return (
<>

{/* πŸ’‘ not having a clear color would glitch the recording */}



);
}
```

#### 2️⃣ call the `startRecording` function
```jsx
⏺️ Start Recording
```

Your file will start downloading as soon as it's done.