TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

FourShadows.js – Time-aware algorithm driven shadows for icons

48 pointsby Gigacoreover 10 years ago

16 comments

SwellJoeover 10 years ago
Clever, but light comes from the sky (it always comes from the sky in nature...light from below weirds us out). It&#x27;s probably poor design to have shadows rotating throughout the day. Might be more friendly to have the shadows play like real shadows (never going above the object).<p>Source: <a href="http://static.tvtropes.org/pmwiki/pub/images/TV_Tropes_Flashlight_Image_5440.jpg" rel="nofollow">http:&#x2F;&#x2F;static.tvtropes.org&#x2F;pmwiki&#x2F;pub&#x2F;images&#x2F;TV_Tropes_Flash...</a>
评论 #8649144 未加载
评论 #8649407 未加载
andrewliebchenover 10 years ago
Neat idea, but shadows cast on the ground don&#x27;t move around an object a full 360deg over the course of the day.<p>If the metaphor is that we&#x27;re looking at the object from above, then the angle of the shadow would depend on the time of day, the day of the year, and the object&#x27;s latitude. Now THAT would be a neat plugin.<p>Others have mentioned that Google does it like this in Google Maps...which is even stranger because there is a very clear real world analog in that case. I would have expected that they would take the care to render the shadows as they would actually appear for that location at that time.
评论 #8648282 未加载
balazsdavid987over 10 years ago
I&#x27;m not sure about the usefulness of this, but it&#x27;s creative, beautiful and unconventional for sure.
peter_l_downsover 10 years ago
This feels unnecessary, although it&#x27;s some cool code for sure. I think it ends up looking unnatural when the generated shadow doesn&#x27;t match the shadow in the icon itself; in the demo on the github page, this would be at 1 o&#x27;clock and 5 o&#x27;clock.
评论 #8648066 未加载
richbradshawover 10 years ago
Google maps does this for shadows on buildings - check out something tall to see. It makes more sense there as the shadows actually fall in that location. As an interface it&#x27;s a cool idea but we normally consider light to fall from top to bottom.
social_quotientover 10 years ago
Cool demo and js file size. I did something similar a while back and thought I would share <a href="http://codepen.io/social_quotient/pen/msrIx" rel="nofollow">http:&#x2F;&#x2F;codepen.io&#x2F;social_quotient&#x2F;pen&#x2F;msrIx</a>
emsyover 10 years ago
This would be cool on a mobile, since you usually hold it with the display facing towards the sky. But then, the length and angle of the shadow have to depend on the orientation of the phone.
iandanforthover 10 years ago
Nerd Snipe! - Pick a website that uses consistent shadows. Assume that the website is a 3 dimensional object that could cast those shadows. Also assume that the object is positioned sitting on the ground, with the length of the page normal to the surface of the earth. Provide a location, rotation, time of day and day of year in which the shadows are accurate.
dslover 10 years ago
Does it remove the shadows at night?
LukeB_UKover 10 years ago
The effect gets totally ruined on the demo page where the HTML5 and CSS3 shields are used which have their own light source. Screenshot: <a href="http://i.imgur.com/prMIIOQ.png" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;prMIIOQ.png</a>
评论 #8649299 未加载
adamwong246over 10 years ago
Wouldn&#x27;t using svg&#x27;s be tremendously more powerful, rather than pngs and image sprites? Of course, there are compatibility issues with older browsers but placing 1 of 4 pngs is just barely &quot;time aware&quot;
califieldover 10 years ago
To be honest, this library doesn&#x27;t really make sense.<p>Perhaps a related but more useful idea would be to adjust the colors of your site to match the user&#x27;s local time like f.lux...
fit2ruleover 10 years ago
Think of the Icon as a planet, and your attention and focus as the sun .. only then will you find true nirvana. Daily.
asadlionpkover 10 years ago
It would have been a great effect if it had 12 shadows. Although unnecessary but cool.
rguldenerover 10 years ago
When I click the demo link I get a 404
评论 #8648053 未加载
vstpover 10 years ago
Waste