Skip to content

three-stdlib>=2.34.1 controls are incompatible with R3F  #3416

@RodrigoHamuy

Description

@RodrigoHamuy

Most three-stdlib controllers like OrbitControls and others are incompatible with R3F controls API.

This is because R3F store controls: THREE.EventDispatcher | null (source) extends from THREE.EventDispatcher, but latest three-stdlib introduced its own EventDispatcher (pmndrs/three-stdlib#388) and their types do not match.

How to reproduce: Using latest R3F and three-stdlib write this line of code: useThree().set({controls: OrbitControls})
Expected: Typescript should not complain.
Currently: TS complains.

Depending on what's decided, we may not need to change anything in R3F, more info here: pmndrs/three-stdlib#388 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Typescriptissues to do with TSbugSomething isn't workingstaleAn older item that may not be relevant anymorev10

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions