Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default camera is not deleted #5421

Open
Sincenir opened this issue Dec 24, 2023 · 4 comments
Open

The default camera is not deleted #5421

Sincenir opened this issue Dec 24, 2023 · 4 comments

Comments

@Sincenir
Copy link

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
@dmarcos
Copy link
Member

dmarcos commented Dec 24, 2023

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

@Sincenir
Copy link
Author

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.

@DaniruKun
Copy link

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

@Sincenir
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants