Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Online flag waver (krikienoid.github.io)
98 points by billpg on March 20, 2018 | hide | past | favorite | 38 comments


I use this to test flags. A flag may look fine when flat and still, but it has to work and be recognizable under windy conditions too.


Just out of curiosity — what is it that you do that requires creating (I assume) a large set of new flags?


In my case, I work for a design studio that often creates branded flags (along with awnings, signage, stickers, etc) for restaurants and other storefronts. This is going to be great for our designers to test out what their flags will look like under semi-realistic wind conditions!


What types of patterns don't work on realistic flags?


Stuff that's heavily reliant on text, mostly. So we'll try to use logo marks that are identifiable as the brand instead of using the full place's name.


Sounds like adapting rules for mediæval heraldry might be useful for y'all. Shields & livery, after all, were meant to be clearly visible from a distance, in poor conditions, while the viewers were in psychological distress.

Likewise, flags which use bold swathes of colour & logos are more likely to be recognisable than wordy texts.


Also some words are confusing when flapping around and some are not, depending on how many other words can be formed with the letters that are not visible. Perhaps some algorithm could be made to ascertain the flagworthiness of a string.


Cool! Do you also design wacky waving inflatable arm flailing tube men? I'd love to see what kind of a virtual wind tunnel stress testing tool somebody could come up with for those!

https://www.youtube.com/watch?v=a3-JNf-5Yqw


Nice! And timely for this xkcd -- I tried to use this as the image, but hit cross site limitations:

https://xkcd.com/1969/



If you don't see the flagpole, your WebGL implementation might be broken. I had to launch Chrome on a dedicated GPU (using optirun/bumblebee), it didn't work on the Intel one. A lot of stuff is logged into console, the relevant part is probably "extension `GL_ARB_gpu_shader5' unsupported in fragment shader". I guess my laptop is just too old.

Thinkpad T420, i5-2540M (didn't work) & Quadro NVS 4200M (works), Linux.


Newer Intel chips seem to render it fine in Chrome on Linux. i7-8550U laptop here running Ubuntu 16.04.


Anyone had any luck with Firefox on any system?


It seems to work fine with my Fedora 27 system (Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0) using a GeForce GTX 1080 Ti/PCIe/SSE2 running proprietary linux drivers (v390.25).


Not with the stable version, but Firefox nightly (61.0a1) seems to work very well (with optirun to run it with NVidia card, see parent comment). Better than Chrome actually.


Works with Firefox 52.7, Debian 9, Intel i5-6200U, no graphics card.


Works fine on 59.0 here. Modern-ish integrated Intel GFX.


Good on Firefox 59.0.1, macOS 10.13.3


Firefox Focus on Android works fine


That uses a Chrome rendering engine.


The title immediately made me think that this would be a competitive multi-player webgame that invoked the patriotism of users to keep their country's flag flying.


Every tweet with a country's hashtag provides a tiny little gust of wind to their flag.


I thought it would be about social media patriotic astroturfing.


Sharing these is very hard as the URL takes the b64 content and most places i've tried to send this don't take URL's this long (i cannot even shorten it with bitly or our internal url shortener). It'd be nice if it took the URL to make this happen!


If you hand it an URL, the URL remains an URL.

E.g. https://krikienoid.github.io/flagwaver/#?src=https%3A%2F%2Fu...


Thanks and interesting, i passed it a URL but it gave me a b64 version. I am wondering if something changed. I certainly didn't provide it b64 previously.


From the code:

https://krikienoid.github.io/flagwaver/js/flagwaver.js

Aug 3 2012

Since I started working for a new startup not too long ago, I commute between home and work for over 2 hours a day. Although this means less time on three.js, I try getting a little coding on the train.

This set of experiments started from a simple hook's law doodle, to spring simulation, string simulation, and I realized I once again stepped onto physics and particle simulation, this time, more specifically soft body physics.

Based on the "Advanced Character Physics" article, this experiment attempts to use a "massless" cloth simulation model. It's somewhat similiar but simplier to most cloth simulations I found.

This was coded out fairly quickly, so expect more to come meanwhile feel free to experiment yourself and share

Cheers, Graphics Noob (aka @Blurspline, zz85)

Suggested Readings:

Advanced Character Physics by Thomas Jakobsen Character:

http://web.archive.org/web/20070610223835/http:/www.teknikus...

http://freespace.virgin.net/hugo.elias/models/m_cloth.htm

http://en.wikipedia.org/wiki/Cloth_modeling

http://cg.alexandra.dk/tag/spring-mass-system/

Real-time Cloth Animation:

http://www.darwin3d.com/gamedev/articles/col0599.pdf


Very nice. Is there an option to remove the text and forms once you load a file/url?

My test: https://krikienoid.github.io/flagwaver/#?src=http%3A%2F%2Fim...



This would have been a great reference during New Zealand's failed flag referendum.

Long live laser kiwi!






Only getting a white flag using this:

https://thepiratebay.org/static/img/tpb.jpg


perhaps their hosting service (or your ISP, depending on where the image gets pulled to) blocks connections or DNS lookups to TBP?

Update: looking at the JS console, it looks like CORS policy is preventing this: Access to Image at 'https://thepiratebay.org/static/img/tpb.jpg' from origin 'https://krikienoid.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://krikienoid.github.io' is therefore not allowed access.


It even works perfectly with transparent PNGs!


They need to add a giphy option




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: