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 java.util.concurrent.ConcurrentHashMap | |
| import scala.jdk.CollectionConverters._ | |
| var masas = new ConcurrentHashMap[Masa.ID, Masa]() | |
| def publicCreated: List[Masa] = masas.values.asScala.toList |
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
| allPos.forEach(pos => { | |
| let key = pos2key(pos), | |
| tile = tiles[key]; | |
| r.transform({ | |
| translate: [pos[0] * bounds.tileSize, pos[1] * bounds.tileSize] | |
| }, () => { | |
| if (current) { |
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 strict"; | |
| var fVertexShaderSource = `#version 300 es | |
| // an attribute is an input (in) to a vertex shader. | |
| // It will receive data from a buffer | |
| in vec4 a_position; | |
| in vec4 a_color; | |
| // A matrix to transform the positions by |
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
| var GAME = (function(){ | |
| var states = {}; | |
| assets = { | |
| // font:{ | |
| // string: "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_!@.'\"?/<()", | |
| // | |
| // // bin: '~cQz??I#_CH?|Ba<?FcdO~Rz90B?uFs,q:bwQKH2?h}/A`}yHc.FT$1VW"Q'+ | |
| // // 'F!D>#g"xtR|!?Ayx=_"t.Eg"x.:bpH!xo-j}/TC mQ@" BB', | |
| // // bin: [ |
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
| var GAME = (function(){ | |
| var states = {}; | |
| assets = { | |
| // font:{ | |
| // string: "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_!@.'\"?/<()", | |
| // | |
| // // bin: '~cQz??I#_CH?|Ba<?FcdO~Rz90B?uFs,q:bwQKH2?h}/A`}yHc.FT$1VW"Q'+ | |
| // // 'F!D>#g"xtR|!?Ayx=_"t.Eg"x.:bpH!xo-j}/TC mQ@" BB', | |
| // // bin: [ |
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
| var GAME = (function(){ | |
| var states = {}; | |
| assets = { | |
| // font:{ | |
| // string: "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_!@.'\"?/<()", | |
| // | |
| // // bin: '~cQz??I#_CH?|Ba<?FcdO~Rz90B?uFs,q:bwQKH2?h}/A`}yHc.FT$1VW"Q'+ | |
| // // 'F!D>#g"xtR|!?Ayx=_"t.Eg"x.:bpH!xo-j}/TC mQ@" BB', | |
| // // bin: [ |
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
| var GAME = (function(){ | |
| var states = {}; | |
| assets = { | |
| //font:{ | |
| // string: "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_!@.'\"?/<()", | |
| // bin: [ | |
| // ["111111111011111111001111111111111111000111111111111000110000100011000101110111100111011110011111111110001100011000110001100011111100100011101111010010111110111111111011100111001110000000010011111010100000000110110110111000001000100001001000"], | |
| // ["100011000110000100101000010000100001000100100000101001010000110111100110001100011000110001100000010010001100011000101010010100001001100100010000110010100001000000001100011000110001000000010010001111110000000010010011000100010001000010000100"], | |
| // ["111111111010000100011110011100101111111100100000101110010000101011010110001100101000111110011100010010001100011010100100001000010000100000100011011111111101111000010011100111110001000000010010111010100000000100100100011000100010000010000100"], |
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
| v){c=Math.min(c,f);g=Math.max(g,f);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=k;b.fillText(e(f)+" "+h+" ("+e(c)+"-"+e(g)+")",t,u);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,e((1-f/v)*p))}}};"object"===typeof module&&(module.exports=Stats); | |
| ENGINE = { | |
| E: this, | |
| /* | |
| screen memory | |
| each px: |
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
| object Sides { | |
| import scalalib.Zero.Syntax | |
| def apply[A : Zero]: Sides[A] = Sides( | |
| zero[A], | |
| zero[A], | |
| zero[A], | |
| zero[A] | |
| ) | |
| } |
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
| var h = require('virtual-dom/h'); | |
| var diff = require('virtual-dom/diff'); | |
| var patch = require('virtual-dom/patch'); | |
| var createElement = require('virtual-dom/create-element'); | |
| const area = [2, 1, 3, 4, 5]; | |
| function renderTile(pos) { | |
| const animation = area[pos]===1?'.animate':''; |