1

Can somebody explain why the following block does not allow for using controls?

import React from 'react'
import { PresentationControls, Stage } from '@react-three/drei'
import { Canvas, useLoader } from '@react-three/fiber'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import './styles.css'

export default function App() {
  const { scene } = useLoader(
    GLTFLoader,
    'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF/Duck.gltf'
  )
  return (
    <Canvas shadows fov={80} near={0.1} far={1000}>
      <Stage>
        <PresentationControls snap={true}>
          <primitive object={scene} />
        </PresentationControls>
      </Stage>
    </Canvas>
  )
}

Here is a sandbox link to show the problem.

The console shows:

[@use-gesture]: You've created a custom handler that that uses the `hover` gesture but isn't properly configured.

Please add `hoverAction` when creating your handler. 
knipknap
  • 5,934
  • 7
  • 39
  • 43
  • 1
    Downgrading `@react-three/drei` to `9.46.4` seems to fix the sandbox, but I don't see any open issues for this... – HudsonGraeme Jan 15 '23 at 19:35
  • 1
    Ahhh, true, starting 9.46.5 it stops working. Thanks a lot for narrowing it down, I will downgrade for now! – knipknap Jan 15 '23 at 19:42

0 Answers0