git clone https://github.com/vilmosioo/Sky-Watch.git
cd src/client
bower install & npm install
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
public class ArcBall { | |
private static final float Epsilon = 1.0e-5f; | |
Vector3f StVec; // Saved click vector | |
Vector3f EnVec; // Saved drag vector | |
float adjustWidth; // Mouse bounds width | |
float adjustHeight; // Mouse bounds height | |
public ArcBall(float NewWidth, float NewHeight) { |
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
<?php | |
$constellations = array( | |
"Andromeda" => "and", | |
"Antlia" => "ant", | |
"Apus" => "aps", | |
"Aquarius" => "aqr", | |
"Aquila" => "aql", | |
"Ara" => "ara", | |
"Aries" => "ari", | |
"Auriga" => "aur", |
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
<?php | |
$read = @fopen("dump_sqlite", "r"); | |
$write = @fopen("dump_mysql", "w"); | |
if ($read && $write) { | |
while (($buffer = fgets($read, 4096)) !== false) { | |
// replace all double-quotes (") with grave accents (') | |
$buffer = preg_replace('/"/', "'", $buffer); | |
// replace "autoincrement" with "auto_increment" | |
$buffer = str_replace("autoincrement", "auto_increment", $buffer); |
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() { | |
var lastTime = 0; | |
var vendors = ['webkit', 'moz']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = | |
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
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
// make sure you enable the stencil buffer when creating the canvas | |
GLProfile profile = GLProfile.get(GLProfile.GL2); | |
GLCapabilities capabilities = new GLCapabilities(profile); | |
capabilities.setStencilBits(8); | |
// when picking, enable stencil test | |
if (picking) { | |
gl.glEnable(GL2.GL_STENCIL_TEST); | |
gl.glStencilOp(GL2.GL_KEEP, GL2.GL_KEEP, GL2.GL_REPLACE); | |
} else { |
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
#!/usr/bin/env node | |
var exec = require('child_process').exec; | |
// Runs the build task, in our case `grunt jshint` | |
exec('grunt jshint', function (error, stdout, stderr) { | |
// Build task output might be useful to the developer so let's print it | |
// We could also log it in a file | |
console.log(stdout); | |
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
grunt.initConfig({ | |
ngconstant: { | |
<task>: [ | |
{ | |
dest: '<destination file>', | |
name: '<module name>', | |
constants: { | |
'<constant name>': '<constant value>', | |
'<constant name>': { ... } | |
'<constant name>': grunt.file.readJSON('<JSON file>') |
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
grunt.initConfig({ | |
ngconstant: { | |
dev: [ | |
{ | |
dest: 'path/to/constants.js', | |
name: 'Constants', | |
constants: { | |
'<constant name>': grunt.file.readJSON('path/to/dev.json'), | |
} | |
} |
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
// How to register a controller normally | |
angular.module('ngApp').controller(/*controller code*/); | |
// How to register a controller after application bootstrap | |
$controllerProvider.register(/*controller code*/); |