mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-28 22:30:04 -04:00
Offline Sprites (#27)
* Added Scratch Cat SVG * Offline Scratch Cat * Moved To SRC * Update README.md * Delete Travis * Add Travis YML * Recompile * Add files via upload * Recompile Part 1 * Recompile Part 1 * Recompile Part 1 * Recompile Part 1 * Recompile! * Not Needed * Recompile For Real * Update README.md * Added Stage Offline * Less Hacky Offline * Recompile * Fixed Line Length
This commit is contained in:
parent
19bb8b99c3
commit
3277584da9
5 changed files with 770 additions and 506 deletions
|
@ -113,11 +113,15 @@ Drawable.getDrawableByID = function (drawableID) {
|
|||
|
||||
// TODO: fall back on a built-in skin to protect against network problems
|
||||
Drawable._DEFAULT_SKIN = {
|
||||
squirrel: '7e24c99c1b853e52f8e7f9004416fa34.png',
|
||||
bus: '66895930177178ea01d9e610917f8acf.png',
|
||||
scratch_cat: '09dc888b0b7df19f70d81588ae73420e.svg',
|
||||
gradient: 'a49ff276b9b8f997a1ae163992c2c145.png'
|
||||
}.squirrel;
|
||||
squirrel: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/\
|
||||
7e24c99c1b853e52f8e7f9004416fa34.png/get/',
|
||||
bus: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/\
|
||||
66895930177178ea01d9e610917f8acf.png/get/',
|
||||
scratch_cat: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/\
|
||||
09dc888b0b7df19f70d81588ae73420e.svg/get/',
|
||||
gradient: 'https://cdn.assets.scratch.mit.edu/internalapi/asset/\
|
||||
a49ff276b9b8f997a1ae163992c2c145.png/get/'
|
||||
}.scratch_cat;
|
||||
|
||||
/**
|
||||
* Dispose of this Drawable. Do not use it after calling this method.
|
||||
|
@ -207,10 +211,7 @@ Drawable.prototype.getEnabledEffects = function () {
|
|||
* @private
|
||||
*/
|
||||
Drawable.prototype._setSkinBitmap = function (skin_md5ext) {
|
||||
var url =
|
||||
'https://cdn.assets.scratch.mit.edu/internalapi/asset/' +
|
||||
skin_md5ext +
|
||||
'/get/';
|
||||
var url = skin_md5ext;
|
||||
this._setSkinCore(url, 2);
|
||||
};
|
||||
|
||||
|
@ -226,10 +227,7 @@ Drawable.prototype._setSkinBitmap = function (skin_md5ext) {
|
|||
* @private
|
||||
*/
|
||||
Drawable.prototype._setSkinSVG = function (skin_md5ext) {
|
||||
var url =
|
||||
'https://cdn.assets.scratch.mit.edu/internalapi/asset/' +
|
||||
skin_md5ext +
|
||||
'/get/';
|
||||
var url = skin_md5ext;
|
||||
var instance = this;
|
||||
function gotSVG(err, response, body) {
|
||||
if (!err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue