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
extends Node | |
enum TERRAIN_SHAPE { NONE, FLAT, PEAK, DROP, SLANT } | |
const QUAD_UVS: = PoolVector2Array([Vector2(0, 0), Vector2(1, 0), Vector2(1, 1), Vector2(0, 1)]) |
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
// My custom shader for implementing dithered alpha | |
shader_type spatial; | |
render_mode blend_mix,depth_draw_opaque,cull_disabled,diffuse_burley,specular_schlick_ggx; | |
// Texture maps | |
uniform sampler2D texture_albedo : hint_albedo; | |
uniform sampler2D texture_masks : hint_white; | |
uniform sampler2D texture_normal : hint_normal; | |
// Parameters |
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
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"sourceType": "module", | |
"ecmaVersion": 8 | |
}, |
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
0000000000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000 | |
0000000000000000000111111111111111111111111111111110000000000000000000000000000000000000000000000000 | |
0000000000000111111111111111111111111111111111111111111111111100000000000000000000000000000000000000 | |
0000000111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000 | |
0000011111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000 | |
0000011111111111111111111111111111111111122222222222222221111111111111111111111111111110000000000000 | |
0000011111111111111111111111111222222222222222233333333333333333331111111111111111111111000000000000 | |
0000111111111111111111222222222222222223333333333333333333333333333333333333311111111111000000000000 | |
0000111111111111122222222222222333333333333333333333333333333333333333333333333333111111100000000000 | |
0000111111111111122222333333333333333333333333333333333333333333333333333333333333311111100000000000 |
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
router.post('/:id/title-image', (req, res, next) => { | |
lwip.open(req.file.buffer, 'jpg', (err, image) => { | |
if (err) { next(err); return; } | |
let ratio = (image.width() > 960 ? (960 / image.width()) : 1); | |
image.scale(ratio, (err, image) => { | |
if (err) { next(err); return; } | |
image.crop(image.width(), Math.min((image.width() / 2), image.height()), (err, image) => { | |
if (err) { next(err); return; } | |
image.toBuffer('jpg', { quality: 80 }, (err, buffer) => { |
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
//// | |
.......... | |
..................... | |
..T.......T....T...........T... | |
.......................................... | |
...........T........................................ | |
.....T................T...............T........................ | |
.........T...................... |
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
//// | |
......................................................... | |
..............T........................................................ | |
............................T..................T.................................... | |
.T....................T.......................................T.................................. | |
.....................T.....T...................T.........................................T........ | |
............................................ |
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
// `domains` is a global containing valid domains grouped by keys | |
// this module is instantiated via require at the top of some file and | |
// the following is run once per request: | |
// Origin.foundKey(blah, blah); | |
// some origin stuff | |
var _ = require('underscore'); |
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
Router.query = (function(router) { | |
var current = function () { | |
return router.current(); | |
}; | |
var rawParams = function () { | |
return current().params.query; | |
}; | |
var params = function () { |
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
class MyApp.Update | |
constructor: (@obj, @attrs={}) -> | |
@obj.data ?= {} | |
@obj.isOwned = false | |
$.extend @attrs, | |
ownerId: (v) => | |
@obj.isOwned = MyApp.account.signedIn v |
NewerOlder