A minimalist starter for React, React-three-fiber and Threejs solving some of the problems that WebGL creates, for instance bundle size, canvas being its own black box without integration, and unloading/re-loading everything on route changes.
TTL ~ 100ms
First load JS ~ 85Kb
Lighthouse score of 100 (Performance, Accessibility, Best Practices, SEO)
This starter allows you to navigate seamlessly between pages with dynamic dom and/or canvas content without reloading or creating a new canvas every time. Context, routes and getStaticProps are all available inside the canvas, so that canvas contents can be swapped or react to routes.
⚫ Demo :
How to use
Installation
Tailwind is the default style. styled-components (styled) is also available.
:japanese_castle: React-Three-Next starter
A minimalist starter for React, React-three-fiber and Threejs solving some of the problems that WebGL creates, for instance bundle size, canvas being its own black box without integration, and unloading/re-loading everything on route changes.
This starter allows you to navigate seamlessly between pages with dynamic dom and/or canvas content without reloading or creating a new canvas every time. Context, routes and getStaticProps are all available inside the canvas, so that canvas contents can be swapped or react to routes.
⚫ Demo :
How to use
Installation
Tailwind is the default style. styled-components (styled) is also available.
or
:passport_control: Typescript
For typescript add the parameter
-ts
or--typescript
:or
:mount_fuji: Features
:bullettrain_side: Architecture
Inform the nextjs page that the component is a Threejs component. For that, simply add the canvas property to the parent component.
:control_knobs: Available Scripts
yarn dev
- Next devyarn analyze
- Generate bundle-analyzeryarn lint
- Audit code qualityyarn build
- Next buildyarn start
- Next startyarn export
- Export to static HTML⬛ Stack
threejs
– A lightweight, 3D library with a default WebGL renderer.@react-three/fiber
– A React renderer for Threejs on the web and react-native.@react-three/drei
- Optional – useful helpers for react-three-fiber@react-three/a11y
- Optional – Accessibility tools for React Three Fiberr3f-perf
- Optional – Tool to easily monitor react threejs performances.How to contribute :
Maintainers :
twitter 🐈⬛ @onirenaud