pkalogiros / css3d-game Goto Github PK
View Code? Open in Web Editor NEWFirst person adventure game rendered in CSS/HTML
License: MIT License
First person adventure game rendered in CSS/HTML
License: MIT License
Line 2334 in 772a744
Tested on: Firefox 80, Chromium 84
Down in the sewers after staying still when the monster approaches, there is a shabby torch that can be picked up.
Other than all previous items that can be interacted with, this one does not change the cursor on hover.
Please use ES6 for game.LOG: pwfisher@1a24cda
game.LOG = (level, ...rest) => level < _log_level && console.log(...rest);
This is painful:
Line 798 in dc3ff4a
game.LOG = function ( a,b,c,d,e,f,g,h,i ) {
if (a > _log_level ) return ;
var log = console.log;
if (i !== undefined) { log (b,c,d,e,f,g,h,i); return ;}
if (h !== undefined) { log (b,c,d,e,f,g,h); return ;}
if (g !== undefined) { log (b,c,d,e,f,g); return ;}
if (f !== undefined) { log (b,c,d,e,f); return ;}
if (e !== undefined) { log (b,c,d,e); return ;}
if (d !== undefined) { log (b,c,d); return ;}
if (c !== undefined) { log (b, c ); return ;}
log( b );
};
Why not use ES6? It's 2020. ES6 is vanilla javascript. No need to restrict yourself an archaic style.
Sticking with ES5 only gets you IE11 support and you can get that with webpack if you need it for some reason, and still author ES6 for more readable (better) code.
If you want to be readable:
// level = priority rank (0 = error, 1 = alert, 2 = warning, 3 = info, 4 = debug)
// _log_level = verbosity setting
game.LOG = function (level, ...rest) {
if (level < _log_level) console.log(...rest);
};
Automate code formatting. Use Prettier with VSCode: pwfisher@e3a515b
Multiline interpolated string wanted:
Line 729 in dc3ff4a
Key/property shorthand wanted:
Line 956 in dc3ff4a
const ASM_stdlib = { Math, Float64Array, Uint8Array, Uint32Array };
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.