| | |
| | | humble_init: function() { |
| | | // Dummy function to pull in the rest of the functions |
| | | }, |
| | | humble_sync__deps: ['$FS', '$CLOUDFS','$HUMBLE_API'], |
| | | humble_sync: function() { |
| | | humble_syncfs__deps: ['$FS', '$CLOUDFS','$HUMBLE_API'], |
| | | humble_syncfs: function() { |
| | | FS.syncfs(function (err) { |
| | | console.log('File Sync'); |
| | | }); |
| | |
| | | } |
| | | }); |
| | | }, |
| | | humble_get_player_size__deps: ['$HUMBLE_API'], |
| | | humble_get_player_size: function(w, h) { |
| | | var ret = {width: 0, height: 0, locked: false}; |
| | | if (HUMBLE_API.options.playerSize) { |
| | | ret = HUMBLE_API.options.playerSize(); |
| | | } |
| | | if (w) {{{ makeSetValue('w', '0', 'ret.width', 'i32') }}}; |
| | | if (h) {{{ makeSetValue('h', '0', 'ret.height', 'i32') }}}; |
| | | if (w && ret.width > 0) {{{ makeSetValue('w', '0', 'ret.width', 'i32') }}}; |
| | | if (h && ret.height > 0) {{{ makeSetValue('h', '0', 'ret.height', 'i32') }}}; |
| | | return ret.locked ? 1 : 0; |
| | | }, |
| | | humble_demo_ended__deps: ['$HUMBLE_API'], |
| | | humble_demo_ended: function() { |
| | | if (HUMBLE_API.options.demoEndedCallback) { |
| | | return HUMBLE_API.options.demoEndedCallback.call(HUMBLE_API); |
| | |
| | | } |
| | | }; |
| | | |
| | | autoAddDeps(LibraryHUMBLE, '$HUMBLE_API'); |
| | | mergeInto(LibraryManager.library, LibraryHUMBLE); |