Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

scene name and logo embedded in saved images #269

Closed
kfarr opened this issue Sep 3, 2023 · 11 comments
Closed

scene name and logo embedded in saved images #269

kfarr opened this issue Sep 3, 2023 · 11 comments
Assignees

Comments

@kfarr
Copy link
Contributor

kfarr commented Sep 3, 2023

there should always be 3DStreet logo in upper-right hand corner of captured image in capture modal as well as scene title in lower-left hand corner.

These should appear in all versions accessible to a user except not when saving a thumbnail preview.

possible methods:

related to #306 -- they'll both need to be done before / after screencapture

@kfarr kfarr moved this from Backlog (Not Ready) to To Do - Soon in 3DStreet Dev Tracking Oct 7, 2023
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in 3DStreet Dev Tracking Oct 7, 2023
@kfarr
Copy link
Contributor Author

kfarr commented Oct 10, 2023

A few more notes:

  • This should be done as part of, or closely related to, the screentock component here https://github.com/3DStreet/3dstreet/blob/main/src/components/screentock.js
  • It may be helpful to have a "screenshot-overlay" entity that is a child of screentock entity / component. The screenshot-overlay entity will hold all of the overlays needed, such as logo or street name. The parent screenshot-overlay can be shown or hidden. Normally it is hidden. It is only shown right before the screentock component fires and hides right after.

@kfarr kfarr moved this from To Do - Soon to To Do - High Prio in 3DStreet Dev Tracking Nov 8, 2023
@Algorush
Copy link
Collaborator

Algorush commented Nov 12, 2023

Should the logo on the screenshot consist only of "3DStreet" text? Or "Editor/Viewer" icon too?
I could use the already loaded image from the img.viewer-logo-img element to take the screenshot, but it is only available when the scene is initially loaded. Then when user switch to the Editor, this element is deleted forever.
I could also use the svg logo from the inspector for the screenshot, but first I need to assign an id or class to it. Can I do this in 3DStreet-editor code?

@Algorush
Copy link
Collaborator

Algorush commented Nov 12, 2023

Another option for logo is to write it using text on canvas (fillText method). But judging by Figma, Google font Rubik is used for the logo. If we use regular sans-serif, it will look like this:
screenshot (8)
@kfarr I'll be waiting for your comment

@kfarr kfarr moved this from To Do - High Prio to For Review in 3DStreet Dev Tracking Nov 12, 2023
@Algorush
Copy link
Collaborator

3DStreet/3dstreet#409
I made a PR in the 3DStreet repository. since the screntock component is there. But maybe now we don't need to use the tock method?
I made a separate canvas for the screenshot for several reasons:

  • as it turned out, it is not possible to use the getContext method for canvas, which is already used as a WebGL renderer.
  • the second canvas is hidden and the user will not see the text and logo blinking when they are added to the screenshot

@Algorush
Copy link
Collaborator

Algorush commented Nov 12, 2023

To add a logo to a screenshot, I use the canvas.fillText method. Just for demonstration. But I can also use an SVG of the logo that is used on the stage and in the editor. I think the SVG option will be look better.
I added id to logo element in this PR: #343. After merging this PR I would be able to use SVG with logo for screenshot

@kfarr
Copy link
Contributor Author

kfarr commented Nov 24, 2023

@Algorush working to test and merge this next. One thing that we will need even before I test is an option on the screentock to not include name and logo for the purposes of generating thumbnail preview image, but yes to include name / logo overlay in other cases. How do you think is best to handle that?

@Algorush
Copy link
Collaborator

@Algorush working to test and merge this next. One thing that we will need even before I test is an option on the screentock to not include name and logo for the purposes of generating thumbnail preview image, but yes to include name / logo overlay in other cases. How do you think is best to handle that?

It could be done for example with property of screentock component - showTitleAndLogo: true/false

@kfarr
Copy link
Contributor Author

kfarr commented Nov 24, 2023

@Algorush that's great, is that available yet or can you help to provide that feature?

@Algorush
Copy link
Collaborator

@kfarr no, this option is not ready yet, I will add it today

@Algorush
Copy link
Collaborator

Added commit with this option in 3dStreet repo here:
3DStreet/3dstreet@08e236f

@kfarr
Copy link
Contributor Author

kfarr commented Dec 12, 2023

yes seems to work on 3dstreet.app production now

@kfarr kfarr closed this as completed Dec 12, 2023
@github-project-automation github-project-automation bot moved this from For Review to Done in 3DStreet Dev Tracking Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants