This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
angular.module('simple-virtual-repeater', []) | |
.directive('virtualRepeater', virtualRepeater); | |
virtualRepeater.$inject = ['$compile', '$timeout']; | |
function virtualRepeater($compile, $timeout) { | |
var directive = { | |
restrict: 'EA', | |
replace: 'true', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isBotUserAgent(request) { | |
/*VALIDATE request.headers.user-agent*/ | |
/** | |
Facebook: facebookexternalhit/1.1 | |
Twitter: Twitterbot | |
Google: Googlebot | |
Slack: Slack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const latLngToVector3 = (latLng, radius) => { | |
// TODO: pending to fix the projections | |
const lat = parseFloat(latLng.lat); | |
const lng = parseFloat(latLng.lng); | |
const phi = Math.PI * (lat / 90); | |
const theta = Math.PI * (- (lng + 180) / 180); | |
const spherical = new THREE.Spherical(radius || 1, phi, theta); | |
const vector = new THREE.Vector3(); | |
vector.setFromSpherical(spherical); |