Hey guys,
Basically, A plugin that gets rid of the ugly blur in full screen that ive gotten from someone; has been giving a, seemingly, harmless error, but id still like to keep my game as error free as possible. The code is pretty simple, but I dont have much coding knowledge so I dont know whats wrong with it.
''ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.png'; var bitmap = this.loadNormalBitmap(path, hue || 0); //console.log("disabling smoothing for "+path); bitmap.smooth = false; return bitmap;
}
else {
return this.loadEmptyBitmap();
}
}
;That will switch to nearest neighbor for all bitmap loads.''
To add to this, I also had to put in this in the ''index.html'' file: <style type="text/css"> CANVAS{image-rendering: pixelated;}</style>
This is the error: Smooth_Fullscreen.js:9 Uncaught SyntaxError: Unexpected identifier
Basically, A plugin that gets rid of the ugly blur in full screen that ive gotten from someone; has been giving a, seemingly, harmless error, but id still like to keep my game as error free as possible. The code is pretty simple, but I dont have much coding knowledge so I dont know whats wrong with it.
''ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.png'; var bitmap = this.loadNormalBitmap(path, hue || 0); //console.log("disabling smoothing for "+path); bitmap.smooth = false; return bitmap;
}
else {
return this.loadEmptyBitmap();
}
}
;That will switch to nearest neighbor for all bitmap loads.''
To add to this, I also had to put in this in the ''index.html'' file: <style type="text/css"> CANVAS{image-rendering: pixelated;}</style>
This is the error: Smooth_Fullscreen.js:9 Uncaught SyntaxError: Unexpected identifier