Scaling video by WIDTH

Q&A about the latest versions
Post Reply
teeray
Posts: 9
Joined: Fri Aug 14, 2020 10:52 pm

Hello! I have a project that simulates interactive interaction with an object. There is an image, when you press the button, a video appears, simulating the operation of the device. Accordingly, the angle and size of the substrate and the video are the same. The point is that when you click on the button, a video is played, simulating an interactive experience. But there is a problem. The image is scaled to fit the width of the screen and cropped at the top and bottom when switching to full screen mode and back. But the video is only scaled in height and cropped in width. Accordingly, when you press the button, the dimensions of the background and the video cease to correspond to each other. I was unable to change this in the skin editor. I ask for help! Thanks a lot!!!

link on project: https://rendermachine.studio/test_water/
User avatar
Hopki
Gnome
Posts: 13067
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Open the skin and in the video element properties, add the following to the CSS Styles Inner Element.

Code: Select all

object-fit: cover; overflow: hidden;
It may help, please try and let me know.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
teeray
Posts: 9
Joined: Fri Aug 14, 2020 10:52 pm

Yes, yes and yes again! Martin, thank you so much! You are the best of the best!
User avatar
Hopki
Gnome
Posts: 13067
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

:D
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
teeray
Posts: 9
Joined: Fri Aug 14, 2020 10:52 pm

Hello again! Is it possible to add an image to the skin and scale it in height? I expose 80% in height and auto in width. Image disappears... Thanks a lot.
Attachments
Screenshot_2.png
Screenshot_2.png (2.43 KiB) Viewed 1752 times
User avatar
Hopki
Gnome
Posts: 13067
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Use the External Image Loader to do this.

Screenshot 2021-03-15 at 08.58.49.png
Screenshot 2021-03-15 at 08.58.49.png (32.87 KiB) Viewed 1747 times

You have the option to do just this.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
teeray
Posts: 9
Joined: Fri Aug 14, 2020 10:52 pm

But what if I need buttons to click on? in this image?
Attachments
Screenshot_3.png
Screenshot_3.png (27.25 KiB) Viewed 1741 times
Post Reply