-
Notifications
You must be signed in to change notification settings - Fork 0
Adds heart.system namespace functions, corresponding to love.system #14
base: master
Are you sure you want to change the base?
Conversation
This changeset implements all but love.system.getProcessorCount(), because that particular function can't be done cleanly in JS without pulling in an external library https://github.com/oftn/core-estimator . Whether pulling in that library to enable one, likely rarely-used LÖVE function is worth it is up for debate. All the functions work to some extent in all the browsers, but due to security restrictions a lot of it does not work as nicely as one would wish. Also, the HTML5 Battery Status API is not available in browsers other than Firefox yet, and there is no other way to access that information; fortunately that API will soon be implemented in Chrome (it's already in WebKit itself). --HG-- rename : examples/basic.html => examples/system.html
As well as the processor-count-estimation library to enable |
(Really sorry for not getting back to you sooner!) Change itself looks good, but I wonder how much of this would be really useful to have, and how much of it we should put in an Any thoughts on this? |
Honestly, the whole Splitting up heart.js into multiple files and/or modules would be a good idea, in the long run, since otherwise as namespaces are ported from LÖVE that file's gonna get really big. I don't think an "extras" additional module is really the best idea, though? Modules that correspond to the namespaces on |
Alright. That seems sensible for core modules. The only thing I'm worried about is |
One option would be to split all the namespaces out into separate files, then have the browser-globals mode in the |
That's probably how libraries providing browser-based |
Well, the browser-based Hmm. One possible setup for heart.js would be to use separate modules for each namespace, then have a main file kind of like this: var heart = module.exports = {
graphics: require('./graphics'),
physics: require('./physics'),
system: require('./system'),
// etc
}; Then use a bundler, like Browserify, to build a single |
This changeset implements all but
love.system.getProcessorCount()
, because that particular function can't be done cleanly in JS without pulling in an external library https://github.com/oftn/core-estimator . Whether pulling in that library to enable one, likely rarely-used LÖVE function is worth it is up for debate.All the functions work to some extent in all the browsers, but due to security restrictions a lot of it does not work as nicely as one would wish. Also, the HTML5 Battery Status API is not available in browsers other than Firefox yet, and there is no other way to access that information; fortunately that API will soon be implemented in Chrome (it's already in WebKit itself).