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
// http://howtocenterincss.com/#contentType=div&horizontal=center&vertical=middle&browser.IE=11 | |
<div style="display:flex;justify-content:center;align-items:center;"> | |
<div></div> | |
</div> |
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
.config(function($compileProvider) { | |
$compileProvider.debugInfoEnabled(false); | |
}) |
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
# install brew | |
# | |
# download gource | |
# brew install all pre-reqs for gource. | |
# | |
# configure, make, make install | |
# | |
# use following script to output a movie. | |
# -s is seconds per day. In this example, 1 second is 10 days. 1/10 == 0.1 You'll want to tweak this value. | |
# |
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 gulpfile will copy static libraries and a index.html file as well as | |
* merge, babelify and uglify the rest of the javascript project. | |
* | |
* TODO: | |
* - Separate media, libs and src with different watchers. | |
* - Media and libs should only be copied to dist if they are different sizes. | |
* | |
* The expected project is to be laid out as such: | |
* |
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
function getScopes(root) { | |
var scopes = []; | |
function traverse(scope) { | |
scopes.push(scope); | |
if (scope.$$nextSibling) | |
traverse(scope.$$nextSibling); | |
if (scope.$$childHead) | |
traverse(scope.$$childHead); | |
} | |
traverse(root); |
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
//inject the module as such | |
var myApp = angular.module("myApp", ['ngExceptions']) | |
// put this in one file. | |
(function(window, angular) {'use strict'; | |
/** | |
* @ngdoc module | |
* @name ngExceptions | |
* @description | |
* |
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
"use strict"; | |
tttApp.factory('ThreeEnv', function ($http, $log, $rootScope ) { | |
var demo, | |
rotateCamera = true, | |
canvas = document.getElementById('ttt-canvas'); | |
/** | |
* Initialize the 3D scene. |
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
"use strict"; | |
tttApp.controller('TTTController', function ($scope, ThreeEnv) { | |
$scope.dims = 3; | |
$scope.usercolor = "#0000FF"; | |
$scope.username = "Player1"; | |
$scope.userfirst = false; |
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
"use strict"; | |
tttApp.directive("selectcube", function(ThreeEnv){ | |
return { | |
restrict: "A", | |
link: function(scope, element){ | |
var offsetLeft = element[0].offsetLeft, | |
offsetTop = element[0].offsetTop, |
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
var Demo = Demo || {}; | |
// This object manages all of the 4D objects. | |
// Between renders, it'll take the difference between the last render and the current time. | |
// This Time Delta is passed to each Object4D object. | |
// Each Object4D object will then move a distance based upon their individually set speed, | |
Demo.Manager = function () { | |
this.clock = new Demo.Clock(); |
NewerOlder