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
| use std::ptr::null; | |
| use std::any::Any; | |
| use std::collections::HashMap; | |
| use std::string::String; | |
| use std::vec::Vec | |
| struct Element { | |
| tag: String, | |
| properties: HashMap<String, Any>, |
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
| import { Renderer, Shader } from 'mysupercoolwebgllibrary'; | |
| const canvas = document.createElement('canvas'); | |
| // Instantiate a Renderer -- this is our main interface into WebGL | |
| const renderer = new Renderer(canvas); | |
| // Create a fragment shader | |
| const fragmentShader = new Shader('fragment', ` | |
| precision mediump float; |
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
| import { Renderer, Shader } from 'picasso'; | |
| const canvas = document.getElementById('canvas'); | |
| const fragment = new Shader('fragment', ` | |
| precision mediump float; | |
| out vec4 color; | |
| void main () { |
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
| const entities = [ ... ] | |
| function update () { | |
| setTimeout(() => update(), 1000 / 60); | |
| for (const entity of entities) { | |
| entity.update(); | |
| } | |
| } |
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
| import Game from 'vorge/core/Game'; | |
| import common from '../plugins/common'; | |
| const game = new Game('Title Here', [ common ]); | |
| game.play('localhost:9999'); |
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
| const Mock = require('fenrir/core/Mock'); | |
| const Specification = require('fenrir/core/Specification'); | |
| const Spy = require('fenrir/core/Spy'); | |
| const Connection = require('../../modules/Connection'); | |
| const Server = require('../../core/Server'); | |
| module.exports = new Specification('Connection', test => { | |
| const server = new Mock(Server); | |
| const connection = new Connection('connection', server); |
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
| const webfontloader = require('webfontloader'); | |
| const Flex = require('elementary/components/Flex'); | |
| const Frame = require('elementary/components/Frame'); | |
| const Menu = require('elementary/components/Menu'); | |
| const Pane = require('elementary/components/Pane'); | |
| const Tab = require('elementary/components/Tab'); | |
| const Toolbar = require('elementary/components/Toolbar'); | |
| const element = require('quark/core/element'); |
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
| macro example (foo, bar) { | |
| // code here | |
| } | |
| example('foo', 'bar'); |
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
| const Widget = require('../core/Widget'); | |
| const rgba = require('../color/rgba'); | |
| const mount = require('../system/mount'); | |
| const render = require('../system/render'); | |
| const Rectangle = require('../geometry/Rectangle'); | |
| class Application extends Widget { |
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
| # include <functional> | |
| # include <iostream> | |
| # include <map> | |
| # include <string> | |
| # include "git2/global.h" | |
| # include "grok/commands/help.h" | |
| # include "grok/commands/make.h" | |
| # include "grok/commands/sync.h" |