diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ddce7f..dc1f5f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [21.2.1](https://github.com/seleb/bitsy-hacks/compare/v21.2.0...v21.2.1) (2022-11-17) + + +### Bug Fixes + +* **utils:** `getRelativeNumber` ignores whitespace (fixes [#336](https://github.com/seleb/bitsy-hacks/issues/336)) ([a2dc72f](https://github.com/seleb/bitsy-hacks/commit/a2dc72f17d07750480a0e8875ba8b2d13320f09d)) + # [21.2.0](https://github.com/seleb/bitsy-hacks/compare/v21.1.0...v21.2.0) (2022-10-13) diff --git a/dist/avatar-by-room.js b/dist/avatar-by-room.js index f28c2289..1d0aec84 100644 --- a/dist/avatar-by-room.js +++ b/dist/avatar-by-room.js @@ -4,7 +4,7 @@ @summary change the avatar in certain rooms @license MIT @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -38,10 +38,6 @@ var hackOptions = { }, }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); - /** * Helper used to replace code in a script tag based on a search regex. * To inject code without erasing original string, using capturing groups; e.g. @@ -177,7 +173,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -240,7 +236,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -332,6 +328,4 @@ before('drawRoom', function () { exports.hackOptions = hackOptions; -Object.defineProperty(exports, '__esModule', { value: true }); - })(this.hacks.avatar_by_room = this.hacks.avatar_by_room || {}, window); diff --git a/dist/backdrops.js b/dist/backdrops.js index e1bba700..9323570b 100644 --- a/dist/backdrops.js +++ b/dist/backdrops.js @@ -4,7 +4,7 @@ @summary makes the game have a backdrop @license MIT @author Cephalopodunk & Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -42,10 +42,6 @@ var hackOptions = { }, }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); - /** * Helper used to replace code in a script tag based on a search regex. * To inject code without erasing original string, using capturing groups; e.g. @@ -181,7 +177,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -246,7 +242,7 @@ var after = kitsy.after; @summary makes all sprites have transparent backgrounds (deprecated) @license MIT @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -292,7 +288,7 @@ before('renderer.SetDrawings', function () { @summary makes the game have a transparent background @license MIT @author Cephalopodunk & Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -388,6 +384,4 @@ after('startNarrating', function (dialogStr, end) { exports.hackOptions = hackOptions; -Object.defineProperty(exports, '__esModule', { value: true }); - })(this.hacks.backdrops = this.hacks.backdrops || {}, window); diff --git a/dist/basic-sfx.js b/dist/basic-sfx.js index 76e67cfe..ea639cad 100644 --- a/dist/basic-sfx.js +++ b/dist/basic-sfx.js @@ -4,7 +4,7 @@ @summary "walk" and "talk" sound effect support @license MIT @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -33,10 +33,6 @@ var hackOptions = { talk: { src: './example talk filepath.mp3' }, }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); - /** * Helper used to replace code in a script tag based on a search regex. * To inject code without erasing original string, using capturing groups; e.g. @@ -172,7 +168,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -235,7 +231,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -327,6 +323,4 @@ after('dialogBuffer.FlipPage', function () { exports.hackOptions = hackOptions; -Object.defineProperty(exports, '__esModule', { value: true }); - })(this.hacks.basic_sfx = this.hacks.basic_sfx || {}, window); diff --git a/dist/bitsymuse.js b/dist/bitsymuse.js index 68f92818..b728b623 100644 --- a/dist/bitsymuse.js +++ b/dist/bitsymuse.js @@ -4,7 +4,7 @@ @summary A variety of Bitsy sound and music handlers @license MIT @author David Mowatt -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -67,10 +67,6 @@ var hackOptions = { resume: false, // If true, songs will pause/resume on change; otherwise, they'll stop/play (doesn't affect sound effects) }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); - /** * Helper used to replace code in a script tag based on a search regex. * To inject code without erasing original string, using capturing groups; e.g. @@ -206,7 +202,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -367,7 +363,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 */ @@ -514,6 +510,4 @@ addDualDialogTag('soundeffect', function (environment, parameters) { exports.hackOptions = hackOptions; -Object.defineProperty(exports, '__esModule', { value: true }); - })(this.hacks.bitsymuse = this.hacks.bitsymuse || {}, window); diff --git a/dist/canvas-replacement.js b/dist/canvas-replacement.js index 01d7264c..8799f9e6 100644 --- a/dist/canvas-replacement.js +++ b/dist/canvas-replacement.js @@ -4,7 +4,7 @@ @summary WebGLazy bitsy integration (this one's mostly just for me) @license MIT @author Sean S. LeBlanc -@version 21.2.0 +@version 21.2.1 @requires Bitsy 8.4 @@ -62,10 +62,6 @@ var hackOptions = { }, }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); - function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;is.timestep&&(s.render(),s.accumulator-=s.timestep),s.requestAnimationFrame(s.main);},this.sources=h,this.source=n||this.getSource(),this.hideSource=l,this.background=d,this.scaleMultiplier=m,this._scale=m,this.scaleMode=f,this.allowDownscaling=E,this.timestep=b,this.disableFeedbackTexture=!!y,this.disableMouseEvents=!!S,this.pixelate=L,this.vertex=M,this.fragment=k,R&&this.init();}return i(e,[{key:"getSource",value:function(){var t,e=[];for(t=0;t0&&void 0!==arguments[0]?arguments[0]:r,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;this.program&&this.gl.deleteProgram(this.program),this.shader=new n(t,e),this.shader.useProgram(),this.glLocations={position:this.gl.getAttribLocation(this.shader.program,"position"),tex0:this.gl.getUniformLocation(this.shader.program,"tex0"),tex1:this.gl.getUniformLocation(this.shader.program,"tex1"),time:this.gl.getUniformLocation(this.shader.program,"time"),resolution:this.gl.getUniformLocation(this.shader.program,"resolution")},this.gl.uniform1i(this.glLocations.tex0,0),this.gl.uniform1i(this.glLocations.tex1,1),this.gl.uniform2f(this.glLocations.resolution,this.size.x,this.size.y),this.gl.enableVertexAttribArray(this.glLocations.position),this.gl.vertexAttribPointer(this.glLocations.position,2,this.gl.FLOAT,!1,0,0);}},{key:"renderCanvas",value:function(){this.canvas2d.clearRect(0,0,this.size.x,this.size.y),this.canvas2d.drawImage(this.source,0,0);}},{key:"renderGL",value:function(){this.textureSource.update(),this.gl.uniform1f(this.glLocations.time,this.curTime),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT),this.shader.useProgram(),this.textureSource.bind(),this.disableFeedbackTexture||this.textureFeedback.bind(),this.gl.drawArrays(this.gl.TRIANGLES,0,this.vertices.length/2),this.disableFeedbackTexture||this.textureFeedback.update();}},{key:"onResize",value:function(){var t,e,i=this.canvasContainer.offsetWidth,s=this.canvasContainer.offsetHeight,n=i/s,o=this.constructor.SCALE_MODES,r=1;switch(ns.timestep&&(s.render(),s.accumulator-=s.timestep),s.requestAnimationFrame(s.main);},this.sources=h,this.source=n||this.getSource(),this.hideSource=l,this.background=d,this.scaleMultiplier=m,this._scale=m,this.scaleMode=f,this.allowDownscaling=E,this.timestep=b,this.disableFeedbackTexture=!!y,this.disableMouseEvents=!!S,this.pixelate=L,this.vertex=M,this.fragment=k,R&&this.init();}return i(e,[{key:"getSource",value:function(){var t,e=[];for(t=0;t0&&void 0!==arguments[0]?arguments[0]:r,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;this.program&&this.gl.deleteProgram(this.program),this.shader=new n(t,e),this.shader.useProgram(),this.glLocations={position:this.gl.getAttribLocation(this.shader.program,"position"),tex0:this.gl.getUniformLocation(this.shader.program,"tex0"),tex1:this.gl.getUniformLocation(this.shader.program,"tex1"),time:this.gl.getUniformLocation(this.shader.program,"time"),resolution:this.gl.getUniformLocation(this.shader.program,"resolution")},this.gl.uniform1i(this.glLocations.tex0,0),this.gl.uniform1i(this.glLocations.tex1,1),this.gl.uniform2f(this.glLocations.resolution,this.size.x,this.size.y),this.gl.enableVertexAttribArray(this.glLocations.position),this.gl.vertexAttribPointer(this.glLocations.position,2,this.gl.FLOAT,!1,0,0);}},{key:"renderCanvas",value:function(){this.canvas2d.clearRect(0,0,this.size.x,this.size.y),this.canvas2d.drawImage(this.source,0,0);}},{key:"renderGL",value:function(){this.textureSource.update(),this.gl.uniform1f(this.glLocations.time,this.curTime),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT),this.shader.useProgram(),this.textureSource.bind(),this.disableFeedbackTexture||this.textureFeedback.bind(),this.gl.drawArrays(this.gl.TRIANGLES,0,this.vertices.length/2),this.disableFeedbackTexture||this.textureFeedback.update();}},{key:"onResize",value:function(){var t,e,i=this.canvasContainer.offsetWidth,s=this.canvasContainer.offsetHeight,n=i/s,o=this.constructor.SCALE_MODES,r=1;switch(n