Skip to content

Instantly share code, notes, and snippets.

View zj8487's full-sized avatar

zj8487 zj8487

  • chengdu china
View GitHub Profile
@neekey
neekey / mongooseGeoSerach.js
Created May 22, 2012 15:09
Mongoose 地理位置搜索 代码示例
/**
* 商品种类
*/
var Location = new schema({
// 地点位置
name: { type: String, required: true },
// 位置GPS坐标
location: { type: Array, index: "2d" }
});
@mutoo
mutoo / LayerBlur.js
Last active June 21, 2021 21:10
blurred-modal-background-in-cocos2d-js
var LayerBlur = cc.Layer.extend({
ctor: function (blurRadius, maskColor) {
this._super();
// create shader program
var program = cc.GLProgram.create(res.blur_vsh, res.blur_fsh);
program.addAttribute(cc.ATTRIBUTE_NAME_POSITION, cc.VERTEX_ATTRIB_POSITION);
program.addAttribute(cc.ATTRIBUTE_NAME_COLOR, cc.VERTEX_ATTRIB_COLOR);
program.addAttribute(cc.ATTRIBUTE_NAME_TEX_COORD, cc.VERTEX_ATTRIB_TEX_COORDS);
program.link();