This file contains 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
import * as THREE from 'three' | |
/** | |
* See: https://github.com/maximeq/three-js-capsule-geometry | |
*/ | |
export class CapsuleGeometry extends THREE.BufferGeometry { | |
constructor( | |
radiusTop, | |
radiusBottom, | |
height, |
This file contains 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
import { BufferGeometry, Vector3 } from 'three' | |
export class CrosshairGeometry extends BufferGeometry { | |
constructor(thickness = 0.5) { | |
super() | |
const t = thickness | |
const points = [ | |
[-5, t, 0], | |
[5, -t, 0], | |
[5, t, 0], |
This file contains 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
.image-modal { | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
z-index: 150; | |
opacity: 1; | |
transition: opacity .15s ease; | |
overflow: hidden; |
This file contains 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
/* | |
* This example shows how to control the history stack. | |
* Say if we went A->B->C and then when pressing back, you want it to go to A (skip B) | |
*/ | |
// Reference current history set | |
var viewHistory = $ionicHistory.viewHistory(); | |
var history = viewHistory.histories[viewHistory.currentView.historyId]; | |
// Remove both B and C |
This file contains 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
app.directive('csDropdown', function($window, $rootScope) { | |
return { | |
restrict: 'A', | |
scope: { | |
bool: '=csDropdown' | |
}, | |
link: function(scope, elem, attrs) { | |
var page = angular.element($window); | |
// On Dropdown Button Pressed |