Skip to content

Instantly share code, notes, and snippets.

View KoGor's full-sized avatar

KoGor

View GitHub Profile
@KoGor
KoGor / LICENSE.txt
Created August 13, 2014 20:57
Dynamic tiles clipping
The MIT License (MIT)
Copyright (c) 2014 [KoGor](https://github.com/KoGor)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@KoGor
KoGor / License.txt
Last active August 29, 2015 14:05
Web maps and animated SVG patterns
The MIT License (MIT)
Copyright (c) 2014 [KoGor](https://github.com/KoGor)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@KoGor
KoGor / L.Terminator.js
Last active August 29, 2015 14:05
Solar Terminator with layers clipping
/* Terminator.js -- Overlay day/night region on a Leaflet map */
Date.prototype.getJulian = function() {
/* Calculate the present UTC Julian Date. Function is valid after
* the beginning of the UNIX epoch 1970-01-01 and ignores leap
* seconds. */
return (this / 86400000) + 2440587.5;
}
Date.prototype.getGMST = function() {
@KoGor
KoGor / README.md
Last active August 20, 2023 20:26
Marker animation along SVG <path> element with D3.js III

Marker animation along SVG "path" element with D3.js: animating "path" and marker movement synchronously, marker rotate according to tangent line to path.

@KoGor
KoGor / README.md
Created December 28, 2013 19:08
Marker animation along SVG <path> element with D3.js II

Marker animation along SVG "path" element with D3.js: animating "path" and marker movement synchronously.

@KoGor
KoGor / README.md
Last active March 8, 2018 07:54
Marker animation along SVG <path> element with D3.js
@KoGor
KoGor / PS4.svg
Created December 28, 2013 15:42
PlayStation 4: SVG animation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KoGor
KoGor / README.md
Last active December 31, 2015 01:09
SVG <path> element animation with D3.js
@KoGor
KoGor / README.md
Last active November 24, 2021 10:31
Globe to Map IV

Globe rotating all the time, click on canvas to unreel/reel. In this example transition is based on interpolation between two projections and map always cut along antimeridian, it creates effect of unreelling/reelling. You can see some artefacts during reeling back to globe, I guess it is because of clipping or timings overlapping, if you have any ideas how to fix it, let me know.

For other variations of transition from Orthographic to Equirectangular and back check these examples:

This projected is licensed under the terms of the MIT license.

@KoGor
KoGor / README.md
Last active September 28, 2016 20:41
Globe to Map III

Globe rotating manually via drag event, when mouse click event fires - transition begins. For transition backwards use double click on any country. In this example transition is based on interpolation between two projections and map always cut along antimeridian, it creates effect of unreelling/reelling.

For other variations of transition from Orthographic to Equirectangular and back check these examples:

This projected is licensed under the terms of the MIT license.