ang2-phaser
Advanced tools
Comparing version 1.1.3 to 1.1.5
@@ -0,0 +0,0 @@ { |
@@ -33,37 +33,9 @@ "use strict"; | ||
} | ||
for (var i = 0; i < allScripts.length; i++) { | ||
var str = allScripts[i].src; | ||
if (str.indexOf(t.settings.file) >= 0) { | ||
alreadyLoaded = true; | ||
} | ||
} | ||
if (alreadyLoaded) { | ||
var scriptLoadedTest = function () { | ||
setTimeout(function () { | ||
try { | ||
var test = new Phaser.Game(); | ||
clearInterval(this); | ||
} | ||
catch (err) { } | ||
finally { | ||
if (test != undefined) { | ||
t.initPhaser(); | ||
} | ||
else { | ||
scriptLoadedTest(); | ||
} | ||
} | ||
}, 1); | ||
}; | ||
var intv = scriptLoadedTest(); | ||
} | ||
else { | ||
var js = document.createElement("script"); | ||
js.type = "text/javascript"; | ||
js.src = t.settings.file; | ||
document.body.appendChild(js); | ||
js.onload = function () { | ||
t.initPhaser(); | ||
}; | ||
} | ||
var js = document.createElement("script"); | ||
js.type = "text/javascript"; | ||
js.src = t.settings.file; | ||
document.body.appendChild(js); | ||
js.onload = function () { | ||
t.phaser.emit({ firstLoad: true, container: t.selfRef }); | ||
}; | ||
}; | ||
@@ -70,0 +42,0 @@ //-------------- |
@@ -39,40 +39,10 @@ // core | ||
for(var i = 0; i < allScripts.length; i++){ | ||
var str = allScripts[i].src; | ||
if (str.indexOf(t.settings.file) >= 0){ | ||
alreadyLoaded = true; | ||
} | ||
} | ||
var js = document.createElement("script"); | ||
js.type = "text/javascript"; | ||
js.src = t.settings.file; | ||
document.body.appendChild(js); | ||
js.onload = function(){ | ||
t.phaser.emit({firstLoad: true, container: t.selfRef}) | ||
} | ||
if(alreadyLoaded){ | ||
var scriptLoadedTest = function(){ | ||
setTimeout(function(){ | ||
try { | ||
var test = new Phaser.Game(); | ||
clearInterval(this) | ||
} | ||
catch(err) {} | ||
finally{ | ||
if(test != undefined){ | ||
t.initPhaser(); | ||
} | ||
else{ | ||
scriptLoadedTest() | ||
} | ||
} | ||
}, 1) | ||
} | ||
var intv = scriptLoadedTest(); | ||
} | ||
else{ | ||
var js = document.createElement("script"); | ||
js.type = "text/javascript"; | ||
js.src = t.settings.file; | ||
document.body.appendChild(js); | ||
js.onload = function(){ | ||
t.initPhaser() | ||
} | ||
} | ||
} | ||
@@ -79,0 +49,0 @@ //-------------- |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "ang2-phaser", | ||
"version": "1.1.3", | ||
"version": "1.1.5", | ||
"description": "A Phaser module built for Angular 2 components.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # ang2-phaser |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6205305
90675