circle and sprites work with saves

This commit is contained in:
2023-09-26 22:07:51 +00:00
parent fe21b84785
commit 1143b9b3dc
9 changed files with 103 additions and 129 deletions

View File

@@ -333,7 +333,8 @@ Object.defineProperty(String.prototype, 'ext', {
Object.defineProperty(String.prototype, 'set_ext', {
value: function(val) {
return this.dir() + this.name() + val;
var s = this.strip_ext();
return s + val;
}
});
@@ -356,10 +357,16 @@ Object.defineProperty(String.prototype, 'dir', {
value: function() {
var e = this.lastIndexOf('/');
if (e === -1) return "";
return this.slice(0, e+1);
return this.slice(0, e);
}
});
Object.defineProperty(String.prototype, 'updir', {
value: function() {
var dir = this.dir();
return dir.dir();
}
});
/* ARRAY DEFS */