Re:Show HN: Using 3D CSS transform to make a "live screenshot"
by grey-area on Sunday August 18, 2013 @03:48AM
(#6232025)
For the confused (I initially only saw a sign-up form and thought it was required, and came back here disappointed) - if your browser window is below 1300px or so wide, the live demo won't show up. When it does show up it is quite subtle - in the screen of the generic background image is an editable code snippet, transformed with CSS so that it is skewed and appears to be in the picture. You can type and run code in that laptop window screen.
Note to the site author - you should put the live screen flat below the sign-up form even when the screen is smaller. Changing window size should not remove information from your page, just move it around.
Re:Show HN: Using 3D CSS transform to make a "live screenshot"
by eranation on Sunday August 18, 2013 @04:55AM
(#6232140)
Thanks, good idea, will do!
p.s. due to HN front page traffic probably the service that does the execution of the code seems to have been knocked down... (scalakata.com, an amazing project by the way, not mine, source on github). sorry!
Re:Show HN: Using 3D CSS transform to make a "live screenshot"
by austinz on Sunday August 18, 2013 @03:12AM
(#6231959)
This is really cool!
Two minor bugs, which are probably two manifestations of the same underlying issue:
1: The screen is centered correctly but the lower left and lower right corners are slightly too far down compared to the screen graphic. (This is with a maximized Chrome window on a 1920x1080 screen.)
2: If the window's not minimized, and I slowly make it narrower or wider, the point at which the live screenshot appears (instead of the static white screenshot) has a problem - the simulated live screen is slightly too small and doesn't fill up the entire laptop screen. The live screen's top right corner is positioned correctly. The problem goes away as I make the window wider and the live screenshot expands (and vice versa).
Re:Show HN: Using 3D CSS transform to make a "live screenshot"
by Arkeus on Sunday August 18, 2013 @03:11AM
(#6231958)
Similar problem, using Version 30.0.1588.0 dev-m.
As I resize my browser the screenshot position moves (such that it never fully lines up). It's always near the laptop screen, but depending on the width of the browser it's always off either in size or position.
Note to the site author - you should put the live screen flat below the sign-up form even when the screen is smaller. Changing window size should not remove information from your page, just move it around.
p.s. due to HN front page traffic probably the service that does the execution of the code seems to have been knocked down... (scalakata.com, an amazing project by the way, not mine, source on github). sorry!
Two minor bugs, which are probably two manifestations of the same underlying issue:
1: The screen is centered correctly but the lower left and lower right corners are slightly too far down compared to the screen graphic. (This is with a maximized Chrome window on a 1920x1080 screen.)
2: If the window's not minimized, and I slowly make it narrower or wider, the point at which the live screenshot appears (instead of the static white screenshot) has a problem - the simulated live screen is slightly too small and doesn't fill up the entire laptop screen. The live screen's top right corner is positioned correctly. The problem goes away as I make the window wider and the live screenshot expands (and vice versa).
It's hard! :)
Though I found a generic formula, apparently I need to work on it!
Thanks
EDIT:
fixed the perspective attribute to follow screen width
one open issue is that for some 4:3 resolutions, the sizes are wrong (the background stop resizing for some ratios)
still needs some work. but the real thing will be to find the generic formula for any background, and any location on the screen...
Nice idea, though.
As I resize my browser the screenshot position moves (such that it never fully lines up). It's always near the laptop screen, but depending on the width of the browser it's always off either in size or position.