repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/src/webview/config.js
src/webview/config.js
import en from '../i18n/en.json'; import zhHans from '../i18n/zh-Hans.json'; import zhHant from '../i18n/zh-Hant.json'; export const i18n = { en, 'zh-Hans': zhHans, 'zh-Hant': zhHant, }; export const keyCodePresets = { 8: '⌫', 37: '←', 38: '↑', 39: '→', 40: '↓', 48: '0', 49: '1', 50: '2', 51: ...
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/src/webview/services/event-bus.js
src/webview/services/event-bus.js
import Vue from 'vue'; export default new Vue();
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/src/webview/services/bridge.js
src/webview/services/bridge.js
import emitter from 'sketch-module-web-view/client'; const listeners = {}; window.webviewBroadcaster = (event, ...args) => { const queue = listeners[event]; (queue || []).forEach((cb) => { cb(...args); }); }; export default { on(event, cb) { if (listeners[event]) { listeners[event].push(cb); ...
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/test/unit/setup.js
test/unit/setup.js
import Vue from 'vue'; import { config } from '@vue/test-utils'; import bridge from '../../src/webview/services/bridge'; import { i18n } from '../../src/webview/config'; Vue.filter('shortcut', key => key); config.mocks.$t = key => i18n.en[key] || key; config.mocks.$i18n = {}; // mock emitter of sketch-module-web-view...
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/test/unit/specs/PluginGroup.spec.js
test/unit/specs/PluginGroup.spec.js
import { mount } from '@vue/test-utils'; import PluginGroup from '@/components/PluginGroup'; import eventBus from '@/services/event-bus'; describe('PluginGroup.vue', () => { const plugin = { fsName: 'A', name: 'A', identifier: 'a', commands: [ { name: 'A-1', identifier: 'a-1', ...
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/test/unit/specs/Manager.spec.js
test/unit/specs/Manager.spec.js
import { mount } from '@vue/test-utils'; import Manager from '@/components/Manager'; import eventBus from '@/services/event-bus'; describe('Manager.vue', () => { const manager = mount(Manager); const statusBar = manager.find('.status-bar-wrapper'); const notification = manager.find('.notification'); const plug...
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
PeachScript/sketch-plugin-monster
https://github.com/PeachScript/sketch-plugin-monster/blob/18414b9904eca08a5684bf844fb833813db09ad4/build/webpack.webview.config.js
build/webpack.webview.config.js
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const pkg = require('../package.json'); module.exports = { entry: { manager: './src/webview/manager.js' }, output: { path: path.join(process.cwd(), pkg.skpm.main, 'Contents'), filename: 'Resources/webview/[name]....
javascript
MIT
18414b9904eca08a5684bf844fb833813db09ad4
2026-01-05T03:42:40.992372Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/source.js
source.js
'use strict'; var fs = require('fs'); var templateSTR = fs.readFileSync(__dirname + '/template.min.js', 'utf8'); function template(moduleName, options) { if (typeof options === 'boolean') { options = {commonJS: options}; } else if (!options) { options = {}; } var str = templateSTR.replace(/defineNames...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/template.js
template.js
;(function (f) { // CommonJS if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f(); // RequireJS } else if (typeof define === "function" && define.amd) { define([], f); // <script> } else { var g if (typeof window !== "undefined") { g = window; ...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/test/index.js
test/index.js
'use strict'; var assert = require('assert') var umd = require('../') var src = umd('sentinel-prime', 'return "sentinel"') var namespacedSrc = umd('sentinel.prime', 'return "sentinel"') var multiNamespaces = umd('a.b.c.d.e', 'return "sentinel"') var dollared = umd('$', 'return "sentinel"') var number = umd('2sentinel'...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/bin/cli.js
bin/cli.js
#!/usr/bin/env node var read = require('fs').createReadStream var write = require('fs').createWriteStream var umd = require('../') var args = process.argv.slice(2) var help = false var commonJS = false args = args.filter(function (arg) { if (arg === '-h' || arg === '--help') { help = true return false }...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/build.js
examples/build.js
var umd = require('../'); var fs = require('fs'); var join = require('path').join; fs.createReadStream(join(__dirname, 'cjs', 'index.js')) .pipe(umd('common-js-module', true)) .pipe(fs.createWriteStream(join(__dirname, 'cjs', 'bundle.js'))) .on('close', end); fs.createReadStream(join(__dirname, 'raw', 'index.js...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/constructor/index.js
examples/constructor/index.js
return "Constructor example";
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/constructor/bundle.js
examples/constructor/bundle.js
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.CommonJsModule=e():"undefined"!=typeof global?global.CommonJsModule=e():"undefined"!=typeof self&&(self.CommonJsModule=e())}(function(){var define,module,exports; return "Constructo...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/raw/index.js
examples/raw/index.js
return "Raw example";
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/raw/bundle.js
examples/raw/bundle.js
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.commonJsModule=e():"undefined"!=typeof global?global.commonJsModule=e():"undefined"!=typeof self&&(self.commonJsModule=e())}(function(){var define,module,exports; return "Raw exampl...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/cjs/index.js
examples/cjs/index.js
module.exports = "common JS example";
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
ForbesLindesay/umd
https://github.com/ForbesLindesay/umd/blob/fe4f5acd52518c3ecdd81aa518ada20774081ec3/examples/cjs/bundle.js
examples/cjs/bundle.js
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.commonJsModule=e():"undefined"!=typeof global?global.commonJsModule=e():"undefined"!=typeof self&&(self.commonJsModule=e())}(function(){var define,module,exports;module={exports:(ex...
javascript
MIT
fe4f5acd52518c3ecdd81aa518ada20774081ec3
2026-01-05T03:42:41.937757Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/editor.js
editor.js
import Quill from "quill"; import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.core.css'; import Authorship from "./authorship"; import ImageHandlers from "./image-handlers"; import Composition from "./composition"; import shareDB from "sharedb/lib/client"; import richText from "rich-text"; import lodashObj...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/synchronizer.js
synchronizer.js
import EditorEvents from "./editor-events"; import ReconnectingWebSocket from "reconnecting-websocket"; import ShareDB from "sharedb/lib/client"; class Synchronizer { constructor (editor, composition) { this.editor = editor; this.doc = null; this.debug = false; this.composition = ...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/composition.js
composition.js
import Quill from "quill"; import EditorEvents from "./editor-events"; const Delta = Quill.import("delta"); class Composition { constructor(editor) { this.editor = editor; this.quill = editor.quill; this.synchronizer = null; this.compositionInProgress = false; let self = t...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/editor-events.js
editor-events.js
const EditorEvents = { editorTextChanged: "editor-text-changed", userTextChanged: "user-text-changed", upstreamTextChanged: "upstream-text-changed", documentLoaded: "document-loaded", documentDeleted: "document-deleted", beforeSync: "before-sync", beforeSubmitToUpstream: "before-submit-to-u...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/image-handlers.js
image-handlers.js
import Quill from "quill"; const Delta = Quill.import("delta"); class ImageHandlers { constructor(editor) { this.editor = editor; this.imageUploadButtonHandler = this.imageUploadButtonHandler.bind(this); this.imageDropAndPasteHandler = this.imageDropAndPasteHandler.bind(this); } i...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/webpack.config.js
webpack.config.js
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { mode: 'development', entry: { index: "./demo/index.js", display: "./demo/display.js" }, output: { filename: '[name].js', path: path.resolve(__dirname, 'dist'), ...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/authorship.js
authorship.js
import Quill from "quill"; import EditorEvents from "./editor-events"; const Parchment = Quill.import("parchment"); const Delta = Quill.import("delta"); const AuthorAttribute = new Parchment.Attributor.Class('author', 'ql-author', { scope: Parchment.Scope.INLINE }); Quill.register(AuthorAttribute); import './a...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/blot/image-placeholder.js
blot/image-placeholder.js
import Quill from "quill"; const Parchment = Quill.import('parchment'); import './image-placeholder.css'; class ImagePlaceholder extends Parchment.Embed { static create(value) { let node = super.create(value); node.setAttribute("image-placeholder-id", value); node.setAttribute("contentedit...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/modules/history.js
modules/history.js
import Quill from "quill"; import EditorEvents from "../editor-events"; const Parchment = Quill.import("parchment"); class History { constructor(quill, options) { this.quill = quill; this.options = options; this.editor = null; } init(editor) { this.lastRecorded = 0; ...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/modules/miks-clipboard.js
modules/miks-clipboard.js
import Quill from "quill"; import EditorEvents from "../editor-events"; import normalizeUrl from "normalize-url"; const Clipboard = Quill.import("modules/clipboard"); const Delta = Quill.import("delta"); class MiksClipboard extends Clipboard { setEditor(editor) { this.editor = editor; } onPaste(e...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/modules/task-list.js
modules/task-list.js
// Quill task list module // https://github.com/koffeinfrei/quill-task-list import Quill from "quill"; const List = Quill.import('formats/list'); const ListItem = Quill.import('formats/list/item'); const Parchment = Quill.import('parchment'); const Module = Quill.import('core/module'); //create and register a new cl...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/server/server.js
server/server.js
let http = require('http'); let express = require('express'); let ShareDB = require('sharedb'); let richText = require('rich-text'); let WebSocket = require('ws'); let WebSocketJSONStream = require('@teamwork/websocket-json-stream'); ShareDB.types.register(richText.type); let backend = new ShareDB(); createDoc(startSe...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/demo/index.js
demo/index.js
import Editor from "../editor"; import 'quill/dist/quill.snow.css' import EditorEvents from "../editor-events"; import '../modules/task-list'; import ReconnectingWebSocket from "reconnecting-websocket"; import ShareDB from "sharedb/lib/client"; import Quill from 'quill'; import richText from "rich-text"; ShareDB.types...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
we-miks/collaborative-editor
https://github.com/we-miks/collaborative-editor/blob/04a4b729b42d84385cc8e6d1c690b388c43081ca/demo/display.js
demo/display.js
import ReconnectingWebSocket from "reconnecting-websocket"; import ShareDB from "sharedb/lib/client"; import Quill from 'quill'; import richText from "rich-text"; ShareDB.types.register(richText.type); import '../display.styl'; let websocketEndpoint = "ws://127.0.0.1:8080"; let socket = new ReconnectingWebSocket(webs...
javascript
Apache-2.0
04a4b729b42d84385cc8e6d1c690b388c43081ca
2026-01-05T03:42:42.635393Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/master-server.js
master-server.js
"use strict"; var express = require("express"); var http = require("http"); var path = require("path"); var logger = require('morgan'); var bodyParser = require('body-parser'); var fs = require("fs"); var config = require("config"); var log = require("libs/log")(module); var net_server = require("./net-server"); var...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/net-server.js
net-server.js
"use strict"; const log = require("libs/log")(module); const Server = require("libs/net").Server; const config = require("config"); var port_for_game_server = config.get("master-server:port-for-game-server"); var server_for_game = new Server(port_for_game_server); server_for_game.onconnection = function(addr) { l...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/game-instance.js
game-server/game-instance.js
"use strict"; const log = require("libs/log")(module); const Server = require("libs/net").Server; const Client = require("libs/net").Client; const config = require("config"); const spawn = require("child_process").spawn; const os = require("os"); function GameInstance(port_for_room, room_path) { var callback_for_...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/index.js
game-server/index.js
"use strict"; const log = require("libs/log")(module); const config = require("config"); const GameInstance = require("./game-instance"); var port_for_room = config.get("game-server:port-for-room"); if (!port_for_room) { log.error("Please set port for room: npm run game -- --game-server:port-for-room=[port]"); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/room-instance.js
game-server/room/room-instance.js
"use strict"; const log = require("libs/log")(module); const Client = require("libs/net").Client; const config = require("config"); function RoomInstance(seed, size_class, port_for_game, Room) { const websocket_port = config.get("game-server:start-websocket-port"); var room = new Room(seed, size_class, parseI...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/index.js
game-server/room/index.js
"use strict"; const log = require("libs/log")(module); const config = require("config"); const Room = require("./common/room").Room; const RoomInstance = require("./room-instance"); const seed = config.get("seed"); const size_class = config.get("size_class"); const port_for_game = config.get("port"); if (seed === "" ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/room.js
game-server/room/common/room.js
"use strict"; function Room(seed, size_class, port) { var Console = require("libs/log")(module); var Game = require("./game/game").Game; var Transport = require("./game/transport").Transport; var config = require("config"); var WebSocket = require("ws"); var game = new Game(size_class, seed); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/level/bridges.js
game-server/room/common/level/bridges.js
"use strict"; var Vector = require("../libs/vector").Vector; var Dynent = require("../objects/dynent").Dynent; function Bridges(river_tree, river_buf, size_map, board_width) { var bridges = []; function create_bridge(prev, cur, next) { function get_width_of_river(pos, dir) { f...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/level/level.js
game-server/room/common/level/level.js
"use strict"; var Console = require("libs/log")(module); var LevelGeneration = require("./gener").LevelGeneration; var AI = require("./ai").AI; var Vector = require("../libs/vector").Vector; var Random = require("../libs/utility").Random; var Dynent = require("../objects/dynent").Dynent; function Level(size_class, se...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/level/gener.js
game-server/room/common/level/gener.js
"use strict"; var Console = require("libs/log")(module); var Buffer = require("../libs/buffer").Buffer; var Vector = require("../libs/vector").Vector; var Bridges = require("./bridges").Bridges; function RiverGeneration(size_class, seed) { Console.assert(size_class === 0 || size_class === 1 || size_class === 2);...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/level/ai.js
game-server/room/common/level/ai.js
"use strict"; var Buffer = require("../libs/buffer").Buffer; var Console = require("libs/log")(module); var Vector = require("../libs/vector").Vector; function Waypoint(pos, dist) { this.pos = pos; this.dist = dist; this.next = []; this.deleting_edges = []; } Waypoint.prototype.del_next = function(ne...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/game/global.js
game-server/room/common/game/global.js
var config = require("config"); exports.constants = { WEAPON: { PISTOL : 0, SHAFT : 1, RAIL : 2, PLASMA : 3, ZENIT : 4, ROCKET : 5, RADIUS_ROCKET : 3, FRAME_DELTA_TIME : parseInt(config.get("game-server:update-time")), wea_tabl : ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/game/gameplay.js
game-server/room/common/game/gameplay.js
"use strict"; var config = require("config"); var WEAPON = require("./global").constants.WEAPON; var Event = require("../libs/event").Event; var gameplay = { ratingkoef : parseInt(config.get("game-server:ratingkoef")), ratingdiap : parseInt(config.get("game-server:ratingdiap")), looserseria ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/game/aibot.js
game-server/room/common/game/aibot.js
"use strict"; var Console = require("libs/log")(module); var Event = require("../libs/event").Event; var Vector = require("../libs/vector").Vector; var normalizeAngle = require("../libs/utility").normalizeAngle; var cameraCulling = require("../objects/dynent").cameraCulling; var ITEM = require("./global").constants.IT...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/game/transport.js
game-server/room/common/game/transport.js
"use strict"; var Console = require("libs/log")(module); var normalizeAngle = require("../libs/utility").normalizeAngle; var WEAPON = require("./global").constants.WEAPON; var ITEM = require("./global").constants.ITEM; var EVENT = require("./global").constants.EVENT; //commands const CL_GET_LEVEL_PARAM = 1; const CL_...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/game/game.js
game-server/room/common/game/game.js
"use strict"; var Console = require("libs/log")(module); var config = require("config"); var Level = require("../level/level").Level; var Bot = require("../objects/bot").Bot; var cameraCulling = require("../objects/dynent").cameraCulling; var Vector = require("../libs/vector").Vector; var updateItem = require("../obje...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/bot.js
game-server/room/common/objects/bot.js
"use strict"; var Event = require("../libs/event").Event; var Vector = require("../libs/vector").Vector; var Dynent = require("./dynent").Dynent; var Aibot = require("../game/aibot").Aibot; var Weapon = require("./weapon").Weapon; var ITEM = require("../game/global").constants.ITEM; var WEAPON = require("../game/globa...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/dynent.js
game-server/room/common/objects/dynent.js
"use strict"; var Vector = require("../libs/vector").Vector; //pos - Vector //size - Vector //vel - Vector function Dynent(pos, size, angle) { this.pos = new Vector(pos); this.size = size === undefined ? new Vector(1, 1) : new Vector(size); this.vel = new Vector(0, 0); this.angle = angle === undefined...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/weapon.js
game-server/room/common/objects/weapon.js
"use strict"; var Event = require("../libs/event").Event; var Vector = require("../libs/vector").Vector; var Bullet = require("./bullet").Bullet; var ITEM = require("../game/global").constants.ITEM; var WEAPON = require("../game/global").constants.WEAPON; function Weapon(owner) { this.type = WEAPON.PISTOL; th...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/bullet.js
game-server/room/common/objects/bullet.js
"use strict"; var Event = require("../libs/event").Event; var Vector = require("../libs/vector").Vector; var Dynent = require("./dynent").Dynent; var WEAPON = require("../game/global").constants.WEAPON; var ITEM = require("../game/global").constants.ITEM; //pos - Vector function Bullet(type, pos, angle, owner) { ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/item.js
game-server/room/common/objects/item.js
"use strict"; var Console = require("libs/log")(module); var config = require("config"); var Event = require("../libs/event").Event; var Vector = require("../libs/vector").Vector; var Dynent = require("./dynent").Dynent; var ITEM = require("../game/global").constants.ITEM; var WEAPON = require("../game/global").consta...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/objects/event.js
game-server/room/common/objects/event.js
"use strict"; var Event = require("../libs/event.js").Event; var Vector = require("../libs/vector.js").Vector; var EVENT = require("../game/global.js").constants.EVENT; var WEAPON = require("../game/global.js").constants.WEAPON; function GameEvent(type, pos, dir, arg1, arg2) { this.type = type; this.pos = new...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/vector.js
game-server/room/common/libs/vector.js
"use strict"; var Console = require("libs/log")(module); function Vector(arg1, arg2) { if (arg1 instanceof Vector) { Console.assert(arg2 === undefined); this.x = arg1.x; this.y = arg1.y; } else if (typeof(arg1) === "object") { Console.assert(arg2 === undefined); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/buffer.js
game-server/room/common/libs/buffer.js
"use strict"; var Console = require("libs/log")(module); var Random = require("./utility").Random; var Vector = require("./vector").Vector; function Buffer(size, seed) { var data = new Float32Array(size * size); data.fill(0.0); var self = this; var rand = new Random(seed); this.getData = functi...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/utility.js
game-server/room/common/libs/utility.js
"use strict"; // my random generate function Random(seed) { var holdrand = (seed || (Date.now() * Math.random())) & 0xffffffff; this.next = function() { holdrand = (holdrand * 214013 + 2531011) & 0xffffffff; var ret = (holdrand >> 16) & 0x7fff; return ret / 32767.0; } } fu...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/event.js
game-server/room/common/libs/event.js
"use strict"; var Event = { events: [], }; Event.on = function(event_name, callback) { if (!this.events[event_name]) { this.events[event_name] = []; } this.events[event_name].push( { callback: callback, }); if (this.events[event_name].length > 10) throw new Erro...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/nickGenerator/dict.js
game-server/room/common/libs/nickGenerator/dict.js
var english_words = [ "aardvark", "abacus", "abbey", "abbreviation", "abdomen", "abettor", "abilities", "ability", "abolishment", "abrasion", "abrasive", "abroad", "absence", "abuse", "abuser", "accelerant", "acceleration", "accelerator", "acceptance", "acceptor", "access", "accesses", "accessories", "ac...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
true
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/game-server/room/common/libs/nickGenerator/index.js
game-server/room/common/libs/nickGenerator/index.js
"use strict"; var words = require("./dict").english_words; function NickGenerator(max_prefix) { function Node(ch) { var self = this; this.ch = ch; this.count = 0; this.getRandomChild = function() { var counts = 0; var chars = []; for...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/fake-room-index.js
test/fake-room-index.js
"use strict"; const log = require("libs/log")(module); const config = require("config"); const FakeRoom = require("./fake-room"); const RoomInstance = require("../game-server/room/room-instance"); const seed = config.get("seed"); const size_class = config.get("size_class"); const port_for_game = config.get("port"); i...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/fake-room.js
test/fake-room.js
"use strict"; const WebSocket = require("ws"); const log = require("libs/log")(module); function FakeRoom(seed, size_class, port) { var count_users = 0; var socket = new WebSocket.Server({ port: port }); socket.on("connection", function(ws) { count_users++; log.info("new connection"); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/game-server-test.js
test/game-server-test.js
"use strict"; const log = require("libs/log")(module); const Server = require("libs/net").Server; const config = require("config"); const WebSocket = require("ws"); const os = require("os"); log.info("free memory", os.freemem()); log.info("os.loadavg()", os.loadavg()); const port_for_room = 9100; var server_for_roo...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/fakesocket.js
test/fakesocket.js
var Console = require("libs/log")(module); var FakeSocketClient = require("../public/game/client/fakesocket").FakeSocketClient; var server = require("../public/game/client/fakesocket").FakeServer; var socket = new server.Server({ port: 8080 }); socket.on("connection", function(ws) { Console.info("SERVER: new conn...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/room-test.js
test/room-test.js
"use strict"; var Room = require("../game-server/room/common/room").Room; var Event = require("../game-server/room/common/libs/event").Event; var Console = require("libs/log")(module); const seed = 42; const size_class = 2; const websocket_port = 8099; var room = new Room(seed, size_class, websocket_port); Event.on(...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/test/net.js
test/net.js
"use strict"; const log = require("libs/log")(module); const Server = require("libs/net").Server; const Client = require("libs/net").Client; var server = new Server(8081); server.onconnection = function(addr) { server.command(addr, "hello", function(res) { log.info(addr, "responded", res); ser...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/app.js
public/app.js
$(document).ready(function() { $('#nickname').on('input',function(e) { $("#nick-form").removeClass('has-error'); }); $('#nick-form').submit(function(e) { $('#nick-form').hide(); $('#loading').show(); e.preventDefault(); var nick = $('#nickname').val(); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/main.js
public/game/main.js
"use strict"; //main objects var canvas; var gl; var text; var gameClient; var sun_direction = new Vector(-0.25, -0.5); //input objects var input = { mouse_angle: 0, mouse_down: false, mouse_wheel: 0, keys: new Array(256), }; var VK_A = function() { return input.keys['A'.charCodeAt(0)] || input...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/polyfill.js
public/game/polyfill.js
"use strict"; var exports = {}; var module = {}; function assert(condition, message) { if (!condition) { message = message || "Assertion failed"; Console.error(message); if (typeof Error !== "undefined") { throw new Error(message); } throw message; /...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/particles.js
public/game/client/particles.js
"use strict"; //dir - Vector function Particle(type, pos, dir) { this.dynent = new Dynent(pos, [1, 1], Math.random() * Math.PI * 2); this.type = type; this.time = Date.now(); this.lifetime = 400; this.last_update = Date.now(); if (type & Particle.EXPLODE) { this.lifetime = 500; ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/bot.js
public/game/client/bot.js
"use strict"; function BotClient(server_time, serverBot, isCamera) { this.id = serverBot.id; this.controlable = serverBot.controlable; var skinid = this.id % Bot.skinnames.length; this.skin = Bot.skinnames[skinid]; this.old_frame_dynent = null; this.new_frame_dynent = new Dynent([serverBot.x, ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/dynent.js
public/game/client/dynent.js
Dynent.render = function(camera, texture, shader, pos, size, angle, states) { assert(camera); assert(texture); assert(shader); var tex_id = texture instanceof Texture ? texture.getId() : texture; if (tex_id === null) return; if (cameraCulling(camera, pos, new Vector(size))) retu...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/hud.js
public/game/client/hud.js
"use strict"; function Achievement(type, str, prior) { var achievementtime = parseInt(Console.variable("achievementtime", "time for disappear achievement", 3000)); this.time = Date.now() + achievementtime; this.prior = prior; this.render = function() { var alpha = (this.time - Date.now()) ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/weapon.js
public/game/client/weapon.js
"use strict"; function WeaponClient(type, shoot) { this.type = WEAPON.PISTOL; this.shooting = false; this.dead = 0; this.setType(type); if (shoot) this.shoot(); } WeaponClient.prototype.setType = function(type) { if (this.type !== type) { this.type = type; this.shooting = ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/bullet.js
public/game/client/bullet.js
"use strict"; //pos - Vector function BulletClient(type, pos, angle, power, id) { this.type = type; this.power = power this.id = id; this.dynent = new Dynent(pos, [1, 1], angle); var norm_dir = new Vector(-Math.sin(angle), -Math.cos(angle)); this.dynent.vel = Vector.mul(norm_dir, WEAPON.we...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/item.js
public/game/client/item.js
"use strict"; Item.render = function(camera, item) { var angle = item.type <= ITEM.LIFE ? ((Date.now() % 3000) / 3000) * Math.PI * 2 : camera.angle; if (item.type <= WEAPON.ROCKET) { Dynent.render(camera, Weapon.skins[item.type].gun, Weapon.shader_noshadow, new ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/fakesocket.js
public/game/client/fakesocket.js
"use strict"; var Console = require("libs/log")(module); var Event = require("../../../game-server/room/common/libs/event").Event; function fakeSend(event, data) { const PING = 16; setTimeout(function() { Event.emit(event, data); }, PING); } function FakeSocketClient(port, my_ip) { Consol...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/bridges.js
public/game/client/bridges.js
"use strict"; function BridgesRender(level) { var vert = "\n\ attribute vec4 position;\n\ uniform mat4 mat_pos;\n\ uniform mat4 mat_tex;\n\ varying vec4 texcoord;\n\ varying vec4 tc_visible;\n\ \n\ void main()\n\ {\n\ gl_Position = mat_pos * position;\n\ texcoord = m...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/sound.js
public/game/client/sound.js
"use strict"; function Sound(file) { this.snd = new Howl( { src: ["sounds/" + file + ".wav"], onloaderror: function(id, message) { assert(false, file + ".wav: " + message); }, onload: function() { Console.info("Loaded sound " + file + ".wa...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/decal.js
public/game/client/decal.js
"use strict"; function Decal(size_class) { var vert = Shader.vertexShader(true, false, "gl_Position"); var frag_blit = "\n\ #ifdef GL_ES\n\ // define default precision for float, vec, mat.\n\ precision highp float;\n\ #endif\n\ \n\ uniform sampler2D tex;\n\ varying vec4 texcoord;\n\...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/level.js
public/game/client/level.js
"use strict"; function LevelRender(my_level, my_size_class) { var vert = Shader.vertexShader(false, true, "position"); var vert_simple = Shader.vertexShader(true, false); var frag_simple = "\n\ #ifdef GL_ES\n\ // define default precision for float, vec, mat.\n\ precision highp float;\n\ #e...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/debug.js
public/game/client/debug.js
function DebugRender(game) { var vert = Shader.vertexShader(true, false, "gl_Position"); var frag = "\n\ #ifdef GL_ES\n\ // define default precision for float, vec, mat.\n\ precision highp float;\n\ #endif\n\ \n\ uniform sampler2D tex;\n\ uniform sampler2D tex_visible;\n\ unifo...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/client/game.js
public/game/client/game.js
"use strict"; function GameClient(param) { var nick = decodeURI(param.nick); var local = param.local; var addr = param.addr; var self = this; var debugRender; var socket; var room; var allbots = []; var nicks = []; var mybot; var server_time = 0; var framebots = [...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/render_text.js
public/game/engine/render_text.js
"use strict"; function Text() { //Xpos, Ypos, Width, Height, Xoffset, Yoffset, OrigW, OrigH var large_font = [ 0, 0, 0, 0, 14, 56, 14, 56, 23, 216, 28, 31, 0, 17, 28, 56, 387, 87, 27, 40, 1, 8, 28, 56, 112, 250, 25, 31, 0, 17, 25, 56, 330, 92, 26, 40, 0, 8, 28, 56, ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/texture.js
public/game/engine/texture.js
"use strict"; function Texture(img, param, callback) { var id = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, id); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); var filter = gl.LINEAR; var wrap = gl.REPEAT; if (param) { if (param.filter) filter = param.filter; if (param...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/utility.js
public/game/engine/utility.js
"use strict"; mat4.trans = function(out, vec) { return mat4.translate(out, out, [vec[0], vec[1], 0, 0]); }; mat4.scal = function(out, vec) { return mat4.scale(out, out, [vec[0], vec[1], 1, 1]); }; mat4.rotate = function(out, angle) { return mat4.rotateZ(out, out, angle); }; Buffer.loadImage = function(i...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/shader.js
public/game/engine/shader.js
"use strict"; function Shader(vp, fp, names) { function compileShader(prog, type) { var shader = gl.createShader(type); gl.shaderSource(shader, prog); gl.compileShader(shader); if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { console.log(prog); ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/console.js
public/game/engine/console.js
"use strict"; var Console = { assert : assert, html : () => {} } Event.on("keydown", function(key) { if (key === Console.TILDA_MAC || key === Console.TILDA_WIN) { Console.show = !Console.show; } else if (Console.show) { if (key.length === 1) { Console.cu...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/public/game/engine/FBO.js
public/game/engine/FBO.js
"use strict"; function Framebuffer(width, height) { var id = gl.createFramebuffer(); var tex = gl.createTexture(); // init texture gl.bindTexture(gl.TEXTURE_2D, tex); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); //non-multisample, so bind things...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/config/index.js
config/index.js
"use strict"; var nconf = require("nconf"); var path = require('path'); nconf.argv().file({ file: path.join(__dirname, "config.json") }); module.exports = nconf;
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/libs/log.js
libs/log.js
"use strict"; var winston = require("winston"); var fs = require("fs"); function getLogger(module) { var path = module.filename.split('/').slice(-2).join('/'); var ret = new winston.Logger( { transports: [ new winston.transports.Console( { colorize:...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
schibir/instagib.io
https://github.com/schibir/instagib.io/blob/d57874843b8b0da9fe47ab9aa48cd74e79348e97/libs/net.js
libs/net.js
"use strict"; const net = require("net"); const log = require("libs/log")(module); const config = require("config"); function Server(port) { var self = this; var clients = []; var broadcast_callbacks = []; this.countClients = function() { var ret = 0; clients.forEach((cl) => ...
javascript
MIT
d57874843b8b0da9fe47ab9aa48cd74e79348e97
2026-01-05T03:42:43.575400Z
false
stilliard/github-task-list-completed
https://github.com/stilliard/github-task-list-completed/blob/18b23a24a2ad63d9ad1e7f522811040ff80ad2bd/index.js
index.js
const checkOutstandingTasks = require('./src/check-outstanding-tasks'); const ENABLE_ID_LOGS = true; // Repo name & ID only for logs, no private data logged! (Repo name only needed to help with issue reports & debugging). module.exports = (app) => { app.log('Yay! The app was loaded!'); // watch for pull requests...
javascript
MIT
18b23a24a2ad63d9ad1e7f522811040ff80ad2bd
2026-01-05T03:42:45.250935Z
false
stilliard/github-task-list-completed
https://github.com/stilliard/github-task-list-completed/blob/18b23a24a2ad63d9ad1e7f522811040ff80ad2bd/src/check-outstanding-tasks.js
src/check-outstanding-tasks.js
const marked = require('marked'); module.exports = function (body) { if (body === null) { return { total: 0, remaining: 0 }; } let tokens = marked.lexer(body, { gfm: true }); // flatten the nested tokens to make filtering easier let allTokens = tokens.flatMa...
javascript
MIT
18b23a24a2ad63d9ad1e7f522811040ff80ad2bd
2026-01-05T03:42:45.250935Z
false
stilliard/github-task-list-completed
https://github.com/stilliard/github-task-list-completed/blob/18b23a24a2ad63d9ad1e7f522811040ff80ad2bd/tests/index.test.js
tests/index.test.js
// Tests use Jest by default. // To read more about testing with Probot, visit https://probot.github.io/docs/testing/ const checkOutstandingTasks = require('../src/check-outstanding-tasks'); test('Test outstanding tasks found', () => { let markdown = ` Hello World - [ ] testing - [x] 123 `; let results = check...
javascript
MIT
18b23a24a2ad63d9ad1e7f522811040ff80ad2bd
2026-01-05T03:42:45.250935Z
false
IgorRozani/filosofunk
https://github.com/IgorRozani/filosofunk/blob/65a0ecd86a0e775d41df8605050c00a22f495335/Alexa/lambda/index.js
Alexa/lambda/index.js
/* * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * http://www.apache.org/licenses/LICENSE-2.0 * * or in ...
javascript
MIT
65a0ecd86a0e775d41df8605050c00a22f495335
2026-01-05T03:42:53.752902Z
false
IgorRozani/filosofunk
https://github.com/IgorRozani/filosofunk/blob/65a0ecd86a0e775d41df8605050c00a22f495335/Alexa/lambda/languageStrings.js
Alexa/lambda/languageStrings.js
module.exports = { pt: { translation: { SKILL_NAME: 'Filosofunk', HELP_MESSAGE: 'Você pode dizer Declamar Funk para escutar um trecho de funk', HELP_REPROMPT: 'Lança outra braba! Diga Declamar Funk', FALLBACK_MESSAGE: 'Não sei o que responder, você pode me ped...
javascript
MIT
65a0ecd86a0e775d41df8605050c00a22f495335
2026-01-05T03:42:53.752902Z
false
IgorRozani/filosofunk
https://github.com/IgorRozani/filosofunk/blob/65a0ecd86a0e775d41df8605050c00a22f495335/Alexa/lambda/local-debugger.js
Alexa/lambda/local-debugger.js
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "...
javascript
MIT
65a0ecd86a0e775d41df8605050c00a22f495335
2026-01-05T03:42:53.752902Z
false
IgorRozani/filosofunk
https://github.com/IgorRozani/filosofunk/blob/65a0ecd86a0e775d41df8605050c00a22f495335/Alexa/lambda/util.js
Alexa/lambda/util.js
const AWS = require('aws-sdk'); const s3SigV4Client = new AWS.S3({ signatureVersion: 'v4', region: process.env.S3_PERSISTENCE_REGION }); module.exports.getS3PreSignedUrl = function getS3PreSignedUrl(s3ObjectKey) { const bucketName = process.env.S3_PERSISTENCE_BUCKET; const s3PreSignedUrl = s3SigV4Cli...
javascript
MIT
65a0ecd86a0e775d41df8605050c00a22f495335
2026-01-05T03:42:53.752902Z
false
IgorRozani/filosofunk
https://github.com/IgorRozani/filosofunk/blob/65a0ecd86a0e775d41df8605050c00a22f495335/Site/js/app.js
Site/js/app.js
/** * Replacing $(document).ready() * @return void */ function ready(fn) { if (document.readyState != 'loading') { fn(); } else { document.addEventListener('DOMContentLoaded', fn); } } ready(onReady); /** * Carrega funções * @return void */ function onReady() { if(!location.hash)...
javascript
MIT
65a0ecd86a0e775d41df8605050c00a22f495335
2026-01-05T03:42:53.752902Z
false