Tresjs / cientos

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

CameraControls not working #341

Closed Sea-DH1 closed 7 months ago

Sea-DH1 commented 7 months ago

Describe the bug

CameraControls not working, Scene cannot be interacted with.

Reproduction

https://stackblitz.com/edit/vitejs-vite-eg7wqt

Steps to reproduce

No response

System Info

system:
    OS: windows
    CPU: (8) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.2GHz
    Memory: 0 Bytes / 0 Bytes
  Binaries:
    Node: 18.18.0
    Yarn: 1.22.19
    npm: 9.4.2
    pnpm: 8.14.0
  npmPackages:
    @tresjs/cientos: 3.7.0 => 3.7.0 
    @tresjs/core: 3.7.0 => 3.7.0 
    vite: ^5.0.12 => 5.0.12

Used Package Manager

npm

Code of Conduct

stackblitz[bot] commented 7 months ago

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

andretchen0 commented 7 months ago

@JaimeTorrealba , I can't get the StackBlitz to run. It's stalling here for me:

Screenshot 2024-02-04 at 20 20 42

Any luck on your end?

JaimeTorrealba commented 7 months ago

Nop I can't...

I'll try tomorrow

Sea-DH1 commented 7 months ago

Is it a network problem? I tried it and it can be opened

andretchen0 commented 7 months ago

Is it a network problem? I tried it and it can be opened

The StackBlitz can be viewed now. Thanks. Unsure what the error was.

andretchen0 commented 7 months ago

Expected:

The camera should move when the mouse is click and dragged across the canvas.

Bug:

Nothing happens (on StackBlitz).

Further context

Fwiw, here's another StackBlitz without style.css and assets, and with all Tres code in app.vue. The problem continues for me, but only on StackBlitz.

@Sea-DH1 : Can you reproduce the bug locally or anywhere else but StackBlitz? @JaimeTorrealba : Any ideas?

JaimeTorrealba commented 7 months ago

Yep, seems like something weird with StackBlitz.

In the playground and local works fine

https://play.tresjs.org/#eNqdVV1z2jgU/SsaZ3bysGCbkGR3vekOC/2Ydpo2U3ir+6DYN1iJLGkkQWAy/PdeSWDsNE1JwcOg+3F0dHTv9UM002D+VypeL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t5fx+QZlfYnG8bDRvDNd5en/BE=

Sea-DH1 commented 7 months ago

@andretchen0 @JaimeTorrealba The code is copied from the document CameraControls, nothing has changed.

Sea-DH1 commented 7 months ago

@JaimeTorrealba I directly copied the code you linked above, but it’s still the same, the camera can’t rotate.

andretchen0 commented 7 months ago

@JaimeTorrealba I directly copied the code you linked above, but it’s still the same, the camera can’t rotate.

@Sea-DH1 , into a StackBlitz? Locally?

Sea-DH1 commented 7 months ago

@andretchen0 This link https://stackblitz.com/edit/vitejs-vite-28xfvq?file=src%2FApp.vue

Sea-DH1 commented 7 months ago

@JaimeTorrealba Hi, may I ask which version of cientos is used in your case? I copied my code and it ran normally.

JaimeTorrealba commented 7 months ago

@Sea-DH1 seems like with the cientos v3.8.0 works fine

Sea-DH1 commented 7 months ago

@JaimeTorrealba Wow, yes, I updated to version 3.8.0 and it works normally