paratron / gamekit Goto Github PK
View Code? Open in Web Editor NEWMinimal, Promise/A based HTML5 canvas game engine
License: Other
Minimal, Promise/A based HTML5 canvas game engine
License: Other
Hi,
stumbled across your framework and was wondering if this is still being maintained.
Established module patterns may be more useful than strange replacing.
If proper modules were used, I could see using this with FrozenJS
Add license
Hey @Paratron, I'm writing some unit tests on Jasmine and getting it to work with Grunt. In one day or two, I'll make a pull request including them :)
When trying to use the custom build the download gives me a corrupted download.php file instead of a archive javascript
I'm working with a forked cop of your framework and with the following logic
gamekit.defineModule("main", function(){
function setup(){
gamekit.a.rejects = new gamekit.SpriteMap({
image: gamekit.a.rejects,
tileW: 400,
tileH: 400,
offsX: 0,
offsY: 0
});
var reject2 = new gamekit.Sprite(gamekit.a.rejects[2]);
gamekit.clearCanvas();
gamekit.createLayer();
gamekit.layer[0].attach(reject2);
}
var p = gamekit.loadAssets('characters.assets.json');
p.then(setup, function(){
console.log('error', arguments);
}, function(){
console.log('progress', arguments);
}).then(gamekit.start);
});
Everything loads as expected but I get an error
gamekit.js:2801 Uncaught TypeError: Cannot read property 'call' of undefined
at gamekit.Sprite.update (gamekit.js:2801)
at GamekitLayer.draw (gamekit.js:1224)
at mainLoop (gamekit.js:263)
update @ gamekit.js:2801
draw @ gamekit.js:1224
mainLoop @ gamekit.js:263
checking the line @ 2801
the this in this._update.call(this);
refers to a Sprite.object
gamekit.Sprite {
false
direction
:
NaN
friction
:
0
h
:
400
life
:
NaN
originX
:
0
originY
:
0
rotation
:
0
scaleX
:
NaN
scaleY
:
NaN
speed
:
NaN
stretch
:
false
w
:
400
x
:
0
y
:
0
}
any reason why this is happening? should Sprite have an ._update function?
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.