A lightweight, library for for creating 3D apps in React that supports Physics, Pointer Events, Gaussian Splats and a built-in Scripts out of the box.
![image](https://private-user-images.githubusercontent.com/430764/402936870-92053462-f39e-4f6d-94fc-b34e7b9ea266.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MDIwNjUsIm5iZiI6MTczOTkwMTc2NSwicGF0aCI6Ii80MzA3NjQvNDAyOTM2ODcwLTkyMDUzNDYyLWYzOWUtNGY2ZC05NGZjLWIzNGU3YjllYTI2Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQxODAyNDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04YzA5MGYxNDAzNDc5M2ZmOGE3OGNjNWQyOTVhNmU1NjhlY2JkMTk5OWIwNGFjZDY4MWExOGEyYjQ2Yjg2ZWI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.MdjZKskf7ns4z7m0WAIgOR355lM_gME91KGbcovNBno)
Install with your favorite package manager...
npm install @playcanvas/react react react-dom playcanvas
Create a sphere component
import { Application, Entity } from '@playcanvas/react'
import { Camera } from "@playcanvas/react/components"
import { OrbitControls } from "@playcanvas/react/scripts"
const App = () => {
return (
<Application>
<Entity position={[0, 2, 0]}>
<Camera/>
<OrbitControls />
</Entity>
<Entity >
<Render type="sphere" />
</Entity>
</Application>
);
}
Et voilà! ✨
The library is built around the PlayCanvas engine and comes with lots of features for creating more complex content including...
- 🎭 Simple Scene API
- ⏳ Suspenseful Asset loading
- ️👆 Pointer Events
- 🛠️ Physics out of the box
- ⚡ Script component for high frequency updates
- 🏗️ Entity Component System
To find out more, check the Getting Started guide for a walk through, or see the other examples in the Playground.