Skip to content

Instantly share code, notes, and snippets.

@PerryRylance
PerryRylance / interpolated-polar-coordinates-shader.frag
Created November 15, 2021 07:26
Post-processing for polar coordinates / planet effect
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
vec2 originalUv = uv;
uv -= 0.5;
vec2 n = normalize(uv);
jQuery(function($){
$(document.body).on("init.wpgmza", function(event) {
var map = event.map;
var button = $("<button type='button'>Toggle KML</button>");
button.on("click", function(event) {
map.kmlLayers.forEach(function(layer) {
jQuery(function($) {
var Parent;
WPGMZA.CustomOLMap = function(element, options)
{
var self = this;
WPGMZA.ProMap.apply(this, arguments);
jQuery(function($) {
if(WPGMZA.isTouchDevice())
{
$(window).on("init.wpgmza", function(event) {
var map = event.target;
// On touch devices, require two fingers to drag and pan
// NB: Temporarily removed due to inconsistent behaviour
@PerryRylance
PerryRylance / no-shortcode-infowindow.js
Last active September 23, 2019 08:26
WP Google Maps - Pro add-on - Prevent infowindow opening when marker shortcode attribute used
jQuery(function ($) {
$(window).on("init.wpgmza", function(event) {
WPGMZA.ProMarker.prototype.onAdded = function (event) {
var m;
WPGMZA.Marker.prototype.onAdded.call(this, event);
this.updateIcon();
@PerryRylance
PerryRylance / wpgm-polyline-toggles.js
Created March 28, 2019 12:59
Polyline toggle checkboxes for WP Google Maps
jQuery(function($) {
$(window).on("load", function(event) {
var $ = jQuery;
var map_id = 2;
function bindClickListener(checkbox)
{
$(checkbox).on("change input", function() {