Open SlawomirMazgaj opened 9 months ago
Hi,
It seems to work with int values declared in types :
export declare const ACTION: Readonly<{
readonly NONE: 0;
readonly ROTATE: 1;
readonly TRUCK: 2;
readonly OFFSET: 4;
readonly DOLLY: 8;
readonly ZOOM: 16;
readonly TOUCH_ROTATE: 32;
readonly TOUCH_TRUCK: 64;
readonly TOUCH_OFFSET: 128;
readonly TOUCH_DOLLY: 256;
readonly TOUCH_ZOOM: 512;
readonly TOUCH_DOLLY_TRUCK: 1024;
readonly TOUCH_DOLLY_OFFSET: 2048;
readonly TOUCH_DOLLY_ROTATE: 4096;
readonly TOUCH_ZOOM_TRUCK: 8192;
readonly TOUCH_ZOOM_OFFSET: 16384;
readonly TOUCH_ZOOM_ROTATE: 32768;
}>;
It works in my case :
controls.current.mouseButtons.right = 0;
Thank you for contributing! We’re marking this issue as stale as a gentle reminder to revisit it and give it the attention it needs to move forward.
Any activity, like adding an update or comment, will automatically remove the stale label so it stays on our radar.
Feel free to reach out on Discord if you need support or feedback from the community. This issue will close automatically soon if there’s no further activity. Thank you for understanding and for being part of the project!
three
version: 0.161.0@react-three/fiber
version: 8.15.16@react-three/drei
version: 9.97.1node
version: 20.10.0npm
version: 10.2.3Problem description:
Some exports seem to be missing for
CameraControls
. When trying to setmouseButtons
one might think there isCameraControls.ACTION.*
being there:but looks like it's not the case. I can't see
ACTION
being exported either.Relevant code:
Sandbox
Suggested solution:
After cloning the
drei
repo it looks likeACTION
can be imported fromI'm not sure if the best course of action is to export it from here or if it's actually a bug in camera-controls and that's why
drei
isn't forwarding it.