Skip to content

Releases: birkir/react-three-gui

v0.4.0

20 Oct 10:41
Compare
Choose a tag to compare

Breaking changes

ControlsProvider

The Controls Provider is now a part of the Controls imported component.

Before

import { ControlsProvider } from 'react-three-gui';

<ControlsProvider>
...
</ControlsProvider>

After

import { Controls } from 'react-three-gui';

<Controls.Provider>
...
</Controls.Provider>

Canvas

Note: We do no longer automatically detect your Canvas node and inject the Controls Context to it.

You will have to use the built-in <Controls.Canvas/> or make your own with withControls higher order component.

Before

import { Controls } from 'react-three-gui';
import { Canvas } from 'react-three-fiber';

<Controls.Provider>
  <Canvas />
</Controls.Provider>

After (version 1)

import { Controls } from 'react-three-gui';

<Controls.Provider>
  <Controls.Canvas />
</Controls.Provider>

After (version 2)

import { Controls, withControls } from 'react-three-gui';
import { Canvas } from 'react-three-fiber';

const CanvasWithControls = withControls(Canvas);

<Controls.Provider>
  <CanvasWithControls />
</Controls.Provider>

v0.3.1

03 Sep 19:17
a6cd5f3
Compare
Choose a tag to compare

This release includes additional props for the <Controls /> widget.

  • anchor
  • width
  • style

v0.3.0

03 Sep 19:15
Compare
Choose a tag to compare
feat: refactor done