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

Remember camera state #4

Closed
bendikrb opened this issue Jun 16, 2021 · 8 comments
Closed

Remember camera state #4

bendikrb opened this issue Jun 16, 2021 · 8 comments

Comments

@bendikrb
Copy link

Awesome work! I've longed for something like this for a long time, after modelling my house in sweethome3d :)

My first (of many, I fear) feature request, is to persist the camera state (possibly utilizing localStorage or the likes).
Perhaps also making it possible to set a default camera position in the card config.

@adizanni
Copy link
Owner

Accepted, will work on it.

@adizanni
Copy link
Owner

Added in new release. Still a manual procedure but works

@GaoMax
Copy link

GaoMax commented Jun 21, 2021

Hi, great work!
Unfortunately the camera position doesn't work for me: I double click in edit mode and retrieve this:
camera_position: { x: -65.36282549580928, y: 2765.0883765575823, z: -934.2915084651966 }
camera_rotate: { x: -1.5628839344749774, y: 0.00017519740014949184, z: 0.02213807336676118 }
But after I enter it in the Code Editor it turns adds '' around the y coordinate. But even after removing it the camera position is not correct and it adds the ' ' back around the y.
camera_position:
x: -65.36282549580928
'y': 2765.0883765575823
z: -934.2915084651966
camera_rotate:
x: -1.5628839344749774
'y': 0.00017519740014949184
z: 0.02213807336676118

@adizanni
Copy link
Owner

Yes the 'y' it is to escape a keywork, but it does not bother and it should work. Be advised that it reset the camera position and rotation but not the zoom (yet).

@GaoMax
Copy link

GaoMax commented Jun 21, 2021

Thanks for the clarification.
If I double click and get the coordinates from an angle and enter them in the config and reload, the picture is off.
If I retrieve the coordinates from the reloaded page the position matches with the ones in the config, but the rotation is wrong.

config:
camera_position: { x: 28.585259575065674, y: 3256.7526642101784, z: -1069.565810623808 } camera_rotate: { x: -1.570795326820248, y: 1.1815363197380246e-8, z: 0.01181511292553725 }

after reload :
camera_position: { x: 28.58525957506562, y: 3256.7526642101784, z: -1069.5658106238081 } camera_rotate: { x: -1.8881136986602536, y: 0.00833883888879998, z: 3.1162072243275625 }

@adizanni
Copy link
Owner

I may have to retest, I had the impression that the position and rotation were good. Let me check

@GaoMax
Copy link

GaoMax commented Jun 29, 2021

#17
Is the issue I had! Moving the upper left corner to 0,0 fixed the issue.

@adizanni
Copy link
Owner

Thanks GaoMax

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