Skip to content

davidsteinberg/skylines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skylines

Skylines is a site that generates random city names and skylines. The building windows randomly change between grayscale colors, and the sun/moon toggles day and night modes.

Input

City names were taken from Wikipedia's List of national capitals article, released under the Creative Commons Attribution-ShareAlike License 3.0.

Implementation

Names are generated using the namerator module. Skylines are generated by creating SVG elements for a random number of buildings (with random dimensions and placement for each). Local storage is used to apply a previously chosen day/night mode.

Bundling

The site's script, index.js, is bundled from the TypeScript source in the ts directory using this command:

deno bundle ts/index.ts index.js

The deno.json file is implicitly required, as it specifies dom-related libraries to use when bundling.

About

See randomly-generated abstract city skylines spring to life under sunlight or moonlight.

Resources

License

Stars

Watchers

Forks