aframe icon indicating copy to clipboard operation
aframe copied to clipboard

The default camera is not deleted

Open Sincenir opened this issue 1 year ago • 4 comments

Description:

In SvelteJS. When I add a custom camera, <a-entity crmaera /> or <a-camera /> ,can't delete the default camera. And When I view the Element through "Visual Inspector & Dev Tools" , I find that my custom camera has been activated but is not actually activated. It requires two consecutive clicks through active to activate.

I don't know if ths problem is unique to SvelteJS. I don't see this problem with native HTML.

  • A-Frame Version: 1.5.0
  • Platform / Device: window chrome
  • Reproducible Code Snippet or URL: null

Sincenir avatar Dec 24 '23 06:12 Sincenir

If you can reproduce with vanilla A-Frame I'm happy to look at it but from your description it looks a Svelte integration issue that I don't have experience with. I always recommend sharing code so people can understand what exactly you are doing and can help. https://glitch.com/~aframe is great. Best of luck

dmarcos avatar Dec 24 '23 17:12 dmarcos

If you can reproduce with vanilla A-Frame I'm happy to look at it but from your description it looks a Svelte integration issue that I don't have experience with. I always recommend sharing code so people can understand what exactly you are doing and can help. https://glitch.com/~aframe is great. Best of luck

It is indeed a problem with svelte integration.It is currently in my aframe project. I will back and kae a demo. It should be that this problem will occur when using svelte.

Sincenir avatar Dec 27 '23 03:12 Sincenir

I have the same issue with A-Frame 1.5 and SvelteKit

DaniruKun avatar Jan 02 '24 18:01 DaniruKun

I have the same issue with A-Frame 1.5 and SvelteKit

this is a compatibility issues unique to svelte.

I may try to fix the submitted code in the future.

The temporary solution is to manually activate the camera you created through document.query('#camera').setAttr('active', true) before the aframe is rendered.

Sincenir avatar Jan 11 '24 03:01 Sincenir