Live data from Hacker News

ASCII Google Streetview

tllabs.io

31–40 of 45 posts

Re: ASCII Google Streetview

#31
post #28
post #25

Earlier quoted context omitted.

From reading the fragment shader code, it seems to a) sample a 4x4 grid of 2x2 neighborhoods b) quantize the color to 3 bits per channel (so 512 colors) c) "hash" (not really hashing) the "key" computed from adding up all the pixel neighborhoods and index into a lookup table: http://tllabs.io/asciistreetview/fontHash.png d) use the green channel from the hash table to index into the font: http://tllabs.io/asciistreet…

This was just a quick shader port/hack from an openFrameworks library I was working on. You can see the LUT texture generation here (which is done on the fly in oF): https://github.com/TeehanLax/ofxAsciiArt/blob/master/src/ofx... All of this is pulled from Sol's TextFX library. The character bitmap actually doesn't line up to Sol's table, so that's why you see weird characters popping up in places. The main goal was…

Ah, I see what I was missing: there are four components in the key (r,g,b,a), and each one corresponds to how filled-in each quadrant of the character is. But since each component is 0..16, and the hash table lookup is 256x256, shouldn't packColor be defined as (color.r + 16.0 * color.g + 256.0 * color.b + 4096.0 * color.a)?

Re: ASCII Google Streetview

#32
Very cool! I wrote some quick and dirty code that adds some functionality to the page: http://pastebin.com/FZGwjJvv . It should work if you have a javascript console or greasemonkey or something like that.

h - Toggle visibility of the HUD (minimap and information)

space - Toggle the rotation on/off

- (numpad) - Slow down the rotation (slowing below 0 reverses rotation)

+ (numpad) - Speed up the rotation

- (main keyboard) - Lower the delta by which the rotation speed is increased/decreased (default delta is 0.005, lowers by 0.0001)

= (main keyboard) - Raise the delta by which the rotation speed is increased/decreased (default delta is 0.005, raises by 0.0001)

Might I suggest warp speed? ;)

Re: ASCII Google Streetview

#34

I'm on macbook with nvidia 9400m, only works on Firefox. On Chrome (latest) and Safari, it doesn't show anything. I wonder why WebGL isn't working on these browsers.

These MacBooks have dual graphics chipsets don't they? So does the HP Envy I'm using now. Chrome has a built-in list of chipsets on which it disables WebGL. It detects the onboard Intel chipset as on that list and disables WebGL even though the ATI Radeon chipset I'm actually using at the moment would handle the site easily. I'm guessing it's the same situation on your MacBook. You can probably manually flip a settin…

> These MacBooks have dual graphics chipsets don't they?

My 13" does not: 9400m is the sole GPU. I get the same blackness on Safari 6 despite WebGL being enabled. WebGL works otherwise [0], albeit it seems much slower than before.

[0] http://madebyevan.com/webgl-water/

Re: ASCII Google Streetview

#35
Are the start locations completely random?

I ask because the 3-4 times I opened it, the start location looked absolutely stunning

Also: My laptop usually have issues with WebGL sites, they crash or run really slow. This is smooth as can be!.. Great work

edit: people are talking about zooming.. How do you zoom?

Re: ASCII Google Streetview

#37
post #35

Are the start locations completely random? I ask because the 3-4 times I opened it, the start location looked absolutely stunning Also: My laptop usually have issues with WebGL sites, they crash or run really slow. This is smooth as can be!.. Great work edit: people are talking about zooming.. How do you zoom?

Upon startup it picks one of the following locations at random:

  lat: 40.759011, lng: -73.98447220000003
  lat: 37.785747104443196, lng: -122.40620172951662
  lat: 39.36382677360614, lng: 8.431220278759724
  lat: 50.09072314148827, lng: 14.393133454556278
  lat: 35.69143938066447, lng: 139.695139627539
  lat: 35.67120372775569, lng: 139.77167914398797
  lat: 39.907974000227846, lng: -118.82814144140627
  lat: 38.897556289243894, lng: -77.0365502699753
  lat: 51.509651382445206, lng: -0.1184348782348934

Re: ASCII Google Streetview

#38
post #35

Are the start locations completely random? I ask because the 3-4 times I opened it, the start location looked absolutely stunning Also: My laptop usually have issues with WebGL sites, they crash or run really slow. This is smooth as can be!.. Great work edit: people are talking about zooming.. How do you zoom?

Upon startup it picks one of the following locations at random: lat: 40.759011, lng: -73.98447220000003 lat: 37.785747104443196, lng: -122.40620172951662 lat: 39.36382677360614, lng: 8.431220278759724 lat: 50.09072314148827, lng: 14.393133454556278 lat: 35.69143938066447, lng: 139.695139627539 lat: 35.67120372775569, lng: 139.77167914398797 lat: 39.907974000227846, lng: -118.82814144140627 lat: 38.897556289243894, ln…

translation:

  New York (Times Sq)
  San Francisco (Union Sq)
  Corsica
  Prague
  Tokyo (Shinjuku)
  Tokyo (Shintomicho)
  Nevada desert (I-80 east of Reno)
  Washington (White House)
  London (Waterloo Bridge)

Re: ASCII Google Streetview

#39
post #23

What a nice way to find out that my rather old Thinkpad (on Debian testing) now has WebGL support - I only updated everything from time to time, and apparently stuff actually started working . Great! Great hack, too. I really, really want that thing as a screensaver!

Be aware that this eats CPU (and probably GPU) and thus battery like mad. I cannot imagine it being a good screensaver.

Re: ASCII Google Streetview

#40
post #35

Are the start locations completely random? I ask because the 3-4 times I opened it, the start location looked absolutely stunning Also: My laptop usually have issues with WebGL sites, they crash or run really slow. This is smooth as can be!.. Great work edit: people are talking about zooming.. How do you zoom?

>people are talking about zooming.. How do you zoom?

The scroll wheel.

EDIT: If you keep zooming you can fisheye everything inside out.

Post reply on HN