Download pool/shard002/JavaScript/0012792_cocos2dService.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012792_cocos2dService.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard002/JavaScript/0012792_cocos2dService.js
-
curl -L -o 0012792_cocos2dService.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012792_cocos2dService.js
1.63 kB
| /** | |
| * Created by guglielmo on 29/03/17. | |
| */ | |
| ; | |
| var guglielmodeletisService = angular.module('guglielmodeletisService', []) | |
| .service('cocos2dService', ['$rootScope', '$location', '$route', '$window','$timeout','$interval', 'angularLoad', | |
| function cocos2dService($rootScope, $location, $route, $window,$timeout,$interval, angularLoad) { | |
| this.loadCocos = function(success, failure){ | |
| angularLoad.loadScript('games/cocos2d.js').then(function() { | |
| //GUI: cocos loaded succesfully. Let's init it | |
| window.cocos.initCocos(); | |
| //GUI: now loading my extensions | |
| angularLoad.loadScript('games/base/engineBase.js').then(function() { | |
| // Script loaded succesfully. | |
| // We can now start using the functions from someplugin.js | |
| if(success){ | |
| success(); | |
| } | |
| }).catch(function(error) { | |
| // There was some error loading the script. Meh | |
| console.log("Loading cocos.js error", error); | |
| if(failure){ | |
| failure(error); | |
| } | |
| }); | |
| }).catch(function(error) { | |
| // There was some error loading the script. Meh | |
| console.log("Loading cocos.js error", error); | |
| if(failure){ | |
| failure(error); | |
| } | |
| }); | |
| } | |
| }]); |