Skip to content

Squircle

Working Example

<>

Description

A 3D Squircle has the properties of a sphere and a cube.

This example modifies the geometry of an octahedron to create a squircle using hyperbolic tangent.

Since the geometry size changes greatly when using the slider, you can also use the Drei Bounds helper to reposition the camera to fit the bounds of the new geometry.

Squircle wikipedia
Bounds github.com/pmndrs/drei

GitHub Branch

git clone https://github.com/Sean-Bradley/React-Three-Fiber-Boilerplate.git
cd React-Three-Fiber-Boilerplate
git checkout squircle
npm install
npm start

Comments