Tresjs / cientos

Collection of useful helpers and fully functional, ready-made abstractions for TresJS
https://cientos.tresjs.org/
MIT License
288 stars 40 forks source link

KeyboardControls not working in Nuxt 3.11.2 #403

Closed JakobHock closed 6 months ago

JakobHock commented 6 months ago

Describe the bug

KeyboardControls as per documentation are currently not working with Nuxt 3.11.2.

Reproduction

https://stackblitz.com/edit/nuxt-starter-cpvwvw?file=app.vue

Steps to reproduce

  1. Click on canvas
  2. Try to move
  3. Camera not moving

System Info

OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 2.31 GB / 15.95 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.0.6 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Chrome: 124.0.6367.119
    Edge: Chromium (123.0.2420.81)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    @tresjs/cientos: ^3.8.0 => 3.8.0
    @tresjs/nuxt: ^2.1.1 => 2.1.1

Used Package Manager

pnpm

Code of Conduct

stackblitz[bot] commented 6 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

JaimeTorrealba commented 6 months ago

This is weird, but in the V4 of cientos (soon) the KeyboardControls will be modified, and comes with breaking changes.

Maybe try this instead: https://github.com/JaimeTorrealba/tres-fps-controls

JakobHock commented 6 months ago

Thank you very much. I will take a look at it 👍

janvorisek commented 5 months ago

CameraControls don't work in the same way. The are added with no error, accessible using ref, yet no action on mousewheel/drag.