diff --git a/CHANGELOG.md b/CHANGELOG.md index 3734804d..78667f3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [15.4.2](https://github.com/seleb/bitsy-hacks/compare/v15.4.1...v15.4.2) (2021-02-12) + + +### Bug Fixes + +* add support for right stick as movement ([367bfb7](https://github.com/seleb/bitsy-hacks/commit/367bfb709f360673d9a3dc9230760a523f4e6eb5)) +* pull in gamepads update ([7da6114](https://github.com/seleb/bitsy-hacks/commit/7da6114ec5e41e5fb531ae5ecb8ce2ef7701187b)) +* various docs updates ([84419cf](https://github.com/seleb/bitsy-hacks/commit/84419cf25095602e241efdc9ccf32399508be8ec)) + ## [15.4.1](https://github.com/seleb/bitsy-hacks/compare/v15.4.0...v15.4.1) (2021-01-24) diff --git a/README.md b/README.md index b4eb4cb2..cc1ae25f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# @bitsy/hecks +# bitsy hacks + +```sh +npm i @bitsy/hecks +``` A collection of re-usable scripts for [Adam Le Doux](https://twitter.com/adamledoux)'s [Bitsy Game Maker](https://ledoux.itch.io/bitsy). @@ -122,7 +126,7 @@ then edit it to look like this: - [Writing hacks with this repo's source code](https://github.com/seleb/bitsy-hacks/wiki) - [Claire Morley's "A Bitsy Tutorial"](http://www.shimmerwitch.space/bitsyTutorial) - [Bitsy games!](https://itch.io/games/tag-bitsy) -- [Andrew Yolland's Borksy](https://ayolland.itch.io/borksy): Hack helper +- [AYolland's Borksy](https://ayolland.itch.io/borksy): Hack helper - [ruin's image-to-bitsy](https://ruin.itch.io/image-to-bitsy): Artistic aid - [Fontsy](https://seansleblanc.itch.io/Fontsy): Typographic tool diff --git a/dist/3d.js b/dist/3d.js index c7ff4d10..23d50ca2 100644 --- a/dist/3d.js +++ b/dist/3d.js @@ -3,7 +3,7 @@ @file 3d @summary bitsy in three dee @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.3 @author Sean S. LeBlanc & Elkie Nova diff --git a/dist/avatar-by-room.js b/dist/avatar-by-room.js index 9b558804..ec085abd 100644 --- a/dist/avatar-by-room.js +++ b/dist/avatar-by-room.js @@ -3,7 +3,7 @@ @file avatar by room @summary change the avatar in certain rooms @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.3 @author Sean S. LeBlanc diff --git a/dist/backdrops.js b/dist/backdrops.js index 551f229b..8725c855 100644 --- a/dist/backdrops.js +++ b/dist/backdrops.js @@ -3,7 +3,7 @@ @file backdrops @summary makes the game have a backdrop @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 7.2 @author Cephalopodunk & Sean S. LeBlanc @@ -15,6 +15,7 @@ Note: includes transparent background/sprites HOW TO USE: 1. Copy-paste this script into a script tag after the bitsy source 2. Edit hackOptions below as needed +3. You may need to add `background-size: cover` to the #game CSS up above to get the backdrop to fit correctly in the game screen */ this.hacks = this.hacks || {}; (function (exports, bitsy) { diff --git a/dist/basic-sfx.js b/dist/basic-sfx.js index 5dcf9e11..f34cc9a4 100644 --- a/dist/basic-sfx.js +++ b/dist/basic-sfx.js @@ -3,7 +3,7 @@ @file basic sfx @summary "walk" and "talk" sound effect support @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/bitsymuse.js b/dist/bitsymuse.js index 423c08f6..4d7bd408 100644 --- a/dist/bitsymuse.js +++ b/dist/bitsymuse.js @@ -3,7 +3,7 @@ @file bitsymuse @summary A variety of Bitsy sound and music handlers @license MIT -@version 15.4.1 +@version 15.4.2 @requires 4.8, 4.9 @author David Mowatt diff --git a/dist/canvas-replacement.js b/dist/canvas-replacement.js index 62da3944..6a21d442 100644 --- a/dist/canvas-replacement.js +++ b/dist/canvas-replacement.js @@ -3,7 +3,7 @@ @file canvas replacement @summary WebGLazy bitsy integration (this one's mostly just for me) @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/character-portraits-animated.js b/dist/character-portraits-animated.js index ae4cf773..000d1498 100644 --- a/dist/character-portraits-animated.js +++ b/dist/character-portraits-animated.js @@ -3,7 +3,7 @@ @file character portraits animated @summary high quality anime gifs @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.3 @author Sean S. LeBlanc diff --git a/dist/character-portraits.js b/dist/character-portraits.js index 0d5d8564..ee526c99 100644 --- a/dist/character-portraits.js +++ b/dist/character-portraits.js @@ -3,7 +3,7 @@ @file character portraits @summary high quality anime jpegs (or pngs i guess) @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.3 @author Sean S. LeBlanc diff --git a/dist/close-on-ending.js b/dist/close-on-ending.js index 6e3f56fc..86c08124 100644 --- a/dist/close-on-ending.js +++ b/dist/close-on-ending.js @@ -3,7 +3,7 @@ @file close on ending @summary Prevents from playing past an ending @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/corrupt.js b/dist/corrupt.js index dd9f6af4..bebc9aed 100644 --- a/dist/corrupt.js +++ b/dist/corrupt.js @@ -3,7 +3,7 @@ @file corrupt @summary corrupts gamedata at runtime @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.5 @author Sean S. LeBlanc diff --git a/dist/custom-exit-effects.js b/dist/custom-exit-effects.js index 62ead7f7..14fe6463 100644 --- a/dist/custom-exit-effects.js +++ b/dist/custom-exit-effects.js @@ -3,7 +3,7 @@ @file custom-exit-effects @summary make custom exit transition effects @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.0 @author Sean S. LeBlanc diff --git a/dist/custom-keyhandlers.js b/dist/custom-keyhandlers.js index a389cb8f..13c09764 100644 --- a/dist/custom-keyhandlers.js +++ b/dist/custom-keyhandlers.js @@ -3,7 +3,7 @@ @file custom-keyhandlers @summary run custom code on key inputs @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 7.0 @author Sean S. LeBlanc diff --git a/dist/custom-text-effect.js b/dist/custom-text-effect.js index 9f0f0489..c735f557 100644 --- a/dist/custom-text-effect.js +++ b/dist/custom-text-effect.js @@ -3,7 +3,7 @@ @file custom text effect @summary make {custom}text effects{custom} @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.3 @author Sean S. LeBlanc diff --git a/dist/dialog-audio-vocal-synth.js b/dist/dialog-audio-vocal-synth.js index dabae990..419b6592 100644 --- a/dist/dialog-audio-vocal-synth.js +++ b/dist/dialog-audio-vocal-synth.js @@ -3,7 +3,7 @@ @file dialog audio vocal synth @summary animal crossing-style audio powered by the pink trombone vocal synth @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/dialog-audio.js b/dist/dialog-audio.js index 5b900312..7a872568 100644 --- a/dist/dialog-audio.js +++ b/dist/dialog-audio.js @@ -3,7 +3,7 @@ @file dialog audio @summary animal crossing-style audio @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/dialog-box-transition.js b/dist/dialog-box-transition.js index d192d46d..fb2b363a 100644 --- a/dist/dialog-box-transition.js +++ b/dist/dialog-box-transition.js @@ -3,7 +3,7 @@ @file dialog box transition @summary adds an easing transition animation to display the dialog box text @license MIT -@version 15.4.1 +@version 15.4.2 @requires 4.8, 4.9 @author Delacannon diff --git a/dist/dialog-choices.js b/dist/dialog-choices.js index 70212007..1d444a3b 100644 --- a/dist/dialog-choices.js +++ b/dist/dialog-choices.js @@ -3,7 +3,7 @@ @file dialog choices @summary binary dialog choices @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/dialog-jump.js b/dist/dialog-jump.js index d99c01ae..ed21f79b 100644 --- a/dist/dialog-jump.js +++ b/dist/dialog-jump.js @@ -3,7 +3,7 @@ @file dialog jump @summary jump from one dialog entry to another @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/dialog-pause.js b/dist/dialog-pause.js index aa092704..f1a62f10 100644 --- a/dist/dialog-pause.js +++ b/dist/dialog-pause.js @@ -3,7 +3,7 @@ @file dialog pause @summary add pauses in between printing text @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/dialog-prompt.js b/dist/dialog-prompt.js index a5b7a4f7..635a2003 100644 --- a/dist/dialog-prompt.js +++ b/dist/dialog-prompt.js @@ -3,7 +3,7 @@ @file dialog prompt @summary prompt the user for text input in dialog @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.4 @author Sean S. LeBlanc diff --git a/dist/direction-in-dialog.js b/dist/direction-in-dialog.js index 7611c26e..b11eb3d9 100644 --- a/dist/direction-in-dialog.js +++ b/dist/direction-in-dialog.js @@ -3,7 +3,7 @@ @file direction in dialog @summary provides a variable with player direction @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.3 @author Sean S. LeBlanc diff --git a/dist/directional-avatar.js b/dist/directional-avatar.js index dbcb12d1..c5201370 100644 --- a/dist/directional-avatar.js +++ b/dist/directional-avatar.js @@ -3,7 +3,7 @@ @file directional avatar @summary flips the player's sprite based on directional movement @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.3 @author Sean S. LeBlanc diff --git a/dist/dynamic-background.js b/dist/dynamic-background.js index 9749997f..9280148f 100644 --- a/dist/dynamic-background.js +++ b/dist/dynamic-background.js @@ -3,7 +3,7 @@ @file dynamic background @summary HTML background matching bitsy background @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/edit-dialog-from-dialog.js b/dist/edit-dialog-from-dialog.js index 823c2bb4..e5eae3e4 100644 --- a/dist/edit-dialog-from-dialog.js +++ b/dist/edit-dialog-from-dialog.js @@ -3,7 +3,7 @@ @file edit dialog from dialog @summary edit dialog from dialog (yes really) @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/edit-image-from-dialog.js b/dist/edit-image-from-dialog.js index fe87c589..5cf65da1 100644 --- a/dist/edit-image-from-dialog.js +++ b/dist/edit-image-from-dialog.js @@ -3,7 +3,7 @@ @file edit image from dialog @summary edit sprites, items, and tiles from dialog @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.3 @author Sean S. LeBlanc diff --git a/dist/edit-player-from-dialog.js b/dist/edit-player-from-dialog.js index 13d8d2f0..cc2b2b61 100644 --- a/dist/edit-player-from-dialog.js +++ b/dist/edit-player-from-dialog.js @@ -3,7 +3,7 @@ @file edit player from dialog @summary change which sprite is controlled by the player @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/edit-room-from-dialog.js b/dist/edit-room-from-dialog.js index 05deebd8..eda91a61 100644 --- a/dist/edit-room-from-dialog.js +++ b/dist/edit-room-from-dialog.js @@ -3,7 +3,7 @@ @file edit room from dialog @summary modify the content of a room from dialog @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 6.1 @author Dana Holdampf diff --git a/dist/end-from-dialog.js b/dist/end-from-dialog.js index 250a291d..eaf11741 100644 --- a/dist/end-from-dialog.js +++ b/dist/end-from-dialog.js @@ -3,7 +3,7 @@ @file end-from-dialog @summary trigger an ending from dialog, including narration text @license WTFPL (do WTF you want) -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 7.0 @author @mildmojo diff --git a/dist/exit-from-dialog.js b/dist/exit-from-dialog.js index 2be3e4d3..a58284d3 100644 --- a/dist/exit-from-dialog.js +++ b/dist/exit-from-dialog.js @@ -3,7 +3,7 @@ @file exit-from-dialog @summary exit to another room from dialog, including conditionals @license WTFPL (do WTF you want) -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 7.0 @author @mildmojo diff --git a/dist/external-game-data.js b/dist/external-game-data.js index 1269c680..3ee2a377 100644 --- a/dist/external-game-data.js +++ b/dist/external-game-data.js @@ -3,7 +3,7 @@ @file external-game-data @summary separate Bitsy game data from your (modded) HTML for easier development @license WTFPL (do WTF you want) -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 4.5, 4.6 @author @mildmojo diff --git a/dist/favicon-from-sprite.js b/dist/favicon-from-sprite.js index eb7b0838..96a06abe 100644 --- a/dist/favicon-from-sprite.js +++ b/dist/favicon-from-sprite.js @@ -3,7 +3,7 @@ @file favicon-from-sprite @summary generate a browser favicon (tab icon) from a Bitsy sprite, including animation! @license WTFPL (do WTF you want) -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.5 @author @mildmojo diff --git a/dist/follower.js b/dist/follower.js index 95977cc4..6e93803e 100644 --- a/dist/follower.js +++ b/dist/follower.js @@ -3,7 +3,7 @@ @file follower @summary make sprites follow the player @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/gamepad-input.js b/dist/gamepad-input.js index 9774a089..359a8637 100644 --- a/dist/gamepad-input.js +++ b/dist/gamepad-input.js @@ -3,7 +3,7 @@ @file gamepad input @summary HTML5 gamepad support @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.1 @author Sean S. LeBlanc @@ -23,380 +23,335 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); -const nullGamepad = { - connected: false, - disabled: true, - down: [], - justDown: [], - justUp: [], - axes: [], - axesPrev: [], - buttons: [] +var Buttons; +(function (Buttons) { + // XBOX360 wired controller configuration + Buttons[Buttons["A"] = 0] = "A"; + Buttons[Buttons["X"] = 2] = "X"; + Buttons[Buttons["B"] = 1] = "B"; + Buttons[Buttons["Y"] = 3] = "Y"; + Buttons[Buttons["LB"] = 4] = "LB"; + Buttons[Buttons["RB"] = 5] = "RB"; + Buttons[Buttons["LT"] = 6] = "LT"; + Buttons[Buttons["RT"] = 7] = "RT"; + Buttons[Buttons["BACK"] = 8] = "BACK"; + Buttons[Buttons["START"] = 9] = "START"; + Buttons[Buttons["LHAT"] = 10] = "LHAT"; + Buttons[Buttons["RHAT"] = 11] = "RHAT"; + Buttons[Buttons["DPAD_UP"] = 12] = "DPAD_UP"; + Buttons[Buttons["DPAD_DOWN"] = 13] = "DPAD_DOWN"; + Buttons[Buttons["DPAD_LEFT"] = 14] = "DPAD_LEFT"; + Buttons[Buttons["DPAD_RIGHT"] = 15] = "DPAD_RIGHT"; +})(Buttons || (Buttons = {})); +var Axes; +(function (Axes) { + Axes[Axes["LSTICK_H"] = 0] = "LSTICK_H"; + Axes[Axes["LSTICK_V"] = 1] = "LSTICK_V"; + Axes[Axes["RSTICK_H"] = 2] = "RSTICK_H"; + Axes[Axes["RSTICK_V"] = 3] = "RSTICK_V"; +})(Axes || (Axes = {})); +var nullGamepad = { + original: { + axes: [], + buttons: [], + connected: false, + }, + disabled: true, + down: {}, + justDown: {}, + justUp: {}, + axesPrev: {}, }; -const gamepads = { - // XBOX360 wired controller configuration - // buttons - A: 0, - X: 2, - B: 1, - Y: 3, - LB: 4, - RB: 5, - LT: 6, - RT: 7, - BACK: 8, - START: 9, - LHAT: 10, - RHAT: 11, - DPAD_UP: 12, - DPAD_DOWN: 13, - DPAD_LEFT: 14, - DPAD_RIGHT: 15, - // axes - LSTICK_H: 0, - LSTICK_V: 1, - RSTICK_H: 2, - RSTICK_V: 3, - // settings - - /** if `abs(an axis value)` is < `deadZone`, returns 0 instead */ - deadZone: 0.25, - // - - /** if `abs(1-an axis value)` is < `snapZone`, returns 1 instead */ - snapZone: 0.25, - - /** axis values between `deadZone` and `snapZone` will be run through this function - * - * defaults to normalizing between the two thresholds */ - interpolate: function (value) { - const v = Math.max(0, Math.min(1, (value - this.deadZone) / (1.0 - this.snapZone - this.deadZone))); - return v; - }, - // internal vars - players: [], - available: false, - pollEveryFrame: false, - connected: false, - - /** - * initialize gamepads - * (only call once per session) - */ - init: function () { - if (navigator.getGamepads) { - this.available = true; - } else if (navigator.webkitGetGamepads) { - navigator.getGamepads = navigator.webkitGetGamepads; - this.available = true; - } - - if (this.available) { - console.log("Gamepad API available"); - - if (navigator.userAgent.includes('Firefox')) { - // listen to connection events for firefox - window.addEventListener("gamepadconnected", this.pollconnections.bind(this)); - window.addEventListener("gamepaddisconnected", this.pollconnections.bind(this)); - } else { - this.pollEveryFrame = true; - } - } else { - console.error("Gamepad API not available"); - } - }, - - /** - * update gamepads (clears arrays, polls connections, etc.) - */ - pollconnections: function () { - this.connected = false; // assume existing players' gamepads aren't enabled until they're found - - for (let i = 0; i < this.players.length; ++i) { - if (this.players[i]) { - this.players[i].disabled = true; - } - } - - const gps = navigator.getGamepads(); - - for (let i = 0; i < gps.length; ++i) { - const gp = gps[i]; - - if (gp) { - if (gp.connected) { - if (this.players[gp.index] == null) { - // new player - gp.down = []; - gp.justDown = []; - gp.justUp = []; - gp.axesPrev = []; - this.players[gp.index] = gp; - } else { - // returning player, copy old button states before replacing - gp.down = this.players[gp.index].down; - gp.justDown = this.players[gp.index].justDown; - gp.justUp = this.players[gp.index].justUp; - gp.axesPrev = this.players[gp.index].axesPrev; - this.players[gp.index] = gp; - } - - this.connected = true; - this.players[gp.index].disabled = false; - } else { - this.players[gp.index] = null; - } - } - } - }, - - /** - * update gamepads (clears arrays, polls connections, etc.) - */ - update: function () { - // store the previous axis values - // has to be done before pollConnections since that will get the new axis values - for (let i = 0; i < this.players.length; ++i) { - const p = this.getPlayer(i); - p.axesPrev = p.axes.slice(); - } // poll connections and update gamepad states every frame because chrome's a lazy bum - - - if (this.pollEveryFrame) { - this.pollconnections(); - } - - for (let i = 0; i < this.players.length; ++i) { - const p = this.getPlayer(i); - - if (p && p != null) { - for (let j = 0; j < p.buttons.length; ++j) { - if (p.buttons[j].pressed) { - p.justDown[j] = !(p.down[j] === true); - p.down[j] = true; - p.justUp[j] = false; - } else { - p.justUp[j] = p.down[j] === true; - p.down[j] = false; - p.justDown[j] = false; - } - } - } - } - }, - - /** - * @returns `player`'s gamepad - * - * if one doesn't exist, returns an object with gamepad properties reflecting a null state - */ - getPlayer: function (player) { - if (this.players[player] && this.players[player].connected && !this.players[player].disabled) { - return this.players[player]; - } else { - return nullGamepad; - } - }, - - /** - * @returns an array representing `length` axes for `player` at `offset` - * - * if `abs(an axis value)` is < `deadZone`, returns 0 instead - * if `abs(1-an axis value)` is < `snapZone`, returns 1/-1 instead - * otherwise, returns the axis value normalized between `deadZone` and `(1-snapZone)` - * @param {Number} offset axis index - * @param {Number} length number of axes to return - * @param {Number} player player index (`undefined` for "sum of all") - * @param {boolean} prev if `true` uses axis values from previous update - */ - getAxes: function (offset = 0, length = 2, player, prev = false) { - const axes = []; - - for (let i = 0; i < length; ++i) { - axes[i] = 0; - } - - if (player === undefined) { - for (let i = 0; i < this.players.length; ++i) { - const a = this.getAxes(offset, length, i, prev); - - for (let j = 0; j < a.length; ++j) { - axes[j] += a[j]; - } - } - } else { - const p = this.getPlayer(player); - let a = prev ? p.axesPrev : p.axes; - a = a.slice(offset, offset + length); - - for (let i = 0; i < a.length; ++i) { - if (Math.abs(a[i]) < this.deadZone) { - axes[i] += 0; - } else if (Math.abs(1.0 - a[i]) < this.snapZone) { - axes[i] += 1; - } else if (Math.abs(-1.0 - a[i]) < this.snapZone) { - axes[i] -= 1; - } else { - axes[i] += Math.sign(a[i]) * this.interpolate(Math.abs(a[i])); - } - } - } - - return axes; - }, - - /** - * @returns equivalent to `getAxes(axis, 1, player, prev)[0]` - */ - getAxis: function (axis, player, prev) { - return this.getAxes(axis, 1, player, prev)[0]; - }, - - /** - * @returns `true` if `axis` is past `threshold` in `direction` - * @param {Number} axis axis index - * @param {Number} threshold threshold (-1 to 1) - * @param {Number} direction direction (-1|1) (if `undefined`, assumes the sign of `theshold` is the direction (e.g. if `theshold` is -0.5, it will check if the axis is < -0.5)) - * @param {Number} player player index (`undefined` for "any") - * @param {boolean} prev if `true` uses axis values from previous update - */ - axisPast: function (axis, threshold, direction, player, prev) { - if (!threshold) { - throw new Error('must specify a non-zero threshold'); - } - - if (!direction) { - direction = Math.sign(threshold); - } - - const a = this.getAxis(axis, player, prev); - return direction < 0 ? a < threshold : a > threshold; - }, - - /** - * @returns `true` if `axis` is past `threshold` in `direction` and WAS NOT in previous update - * @param {Number} axis axis index - * @param {Number} threshold threshold (-1 to 1) - * @param {Number} direction direction (-1|1) (if `undefined`, assumes the sign of `theshold` is the direction (e.g. if `theshold` is -0.5, it will check if the axis is < -0.5)) - * @param {Number} player player index (`undefined` for "any") - */ - axisJustPast: function (axis, threshold, direction, player) { - return this.axisPast(axis, threshold, direction, player, false) && !this.axisPast(axis, threshold, direction, player, true); - }, - - /** - * @returns `[x,y]` representing the dpad for `player` - * @param {Number} player player index (`undefined` for "sum of all") - */ - getDpad: function (player) { - let x = 0; - let y = 0; - - if (player === undefined) { - for (let i = 0; i < this.players.length; ++i) { - const [ix, iy] = this.getDpad(i); - x += ix; - y += iy; - } - } else { - if (this.isDown(this.DPAD_RIGHT, player)) { - x += 1; - } - - if (this.isDown(this.DPAD_LEFT, player)) { - x -= 1; - } - - if (this.isDown(this.DPAD_UP, player)) { - y += 1; - } - - if (this.isDown(this.DPAD_DOWN, player)) { - y -= 1; - } - } - - return [x, y]; - }, - - /** - * @returns `true` if `player`'s `btn` is currently down - * @param {Number} btn button index - * @param {Number} player player index (`undefined` for "any") - */ - isDown: function (btn, player) { - if (btn === undefined) { - throw new Error('must specify a button'); - } - - if (player === undefined) { - for (let i = 0; i < this.players.length; ++i) { - if (this.isDown(btn, i)) { - return true; +var Gamepads = /** @class */ (function () { + /** + * initialize gamepads + */ + function Gamepads() { + var _this = this; + // settings + /** if `abs(an axis value)` is < `deadZone`, returns 0 instead */ + this.deadZone = 0.25; + /** if `abs(1-an axis value)` is < `snapZone`, returns 1 instead */ + this.snapZone = 0.25; + /** axis values between `deadZone` and `snapZone` will be run through this function + * + * defaults to normalizing between the two thresholds */ + this.interpolate = function (value) { + var v = Math.max(0, Math.min(1, (value - _this.deadZone) / (1.0 - _this.snapZone - _this.deadZone))); + return v; + }; + // internal vars + this.players = {}; + this.available = false; + this.pollEveryFrame = false; + this.connected = false; + /** + * update gamepads (clears arrays, polls connections, etc.) + */ + this.pollconnections = function () { + _this.connected = false; + // assume existing players' gamepads aren't enabled until they're found + Object.values(_this.players).forEach(function (player) { + player.disabled = true; + }); + var gps = navigator.getGamepads(); + for (var i = 0; i < gps.length; ++i) { + var gp = gps[i]; + if (gp) { + if (gp.connected) { + if (_this.players[gp.index] == null) { + // new player + _this.players[gp.index] = { + disabled: false, + original: gp, + down: {}, + justDown: {}, + justUp: {}, + axesPrev: {}, + }; + } + else { + // returning player, just assign the gamepad + _this.players[gp.index].original = gp; + } + _this.connected = true; + _this.players[gp.index].disabled = false; + } + else { + delete _this.players[gp.index]; + } + } + } + }; + /** + * update gamepads (clears arrays, polls connections, etc.) + */ + this.update = function () { + // store the previous axis values + // has to be done before pollConnections since that will get the new axis values + Object.keys(_this.players).forEach(function (i) { + var _a; + var p = _this.getPlayer(i); + if ((_a = p === null || p === void 0 ? void 0 : p.original) === null || _a === void 0 ? void 0 : _a.axes) { + p.axesPrev = p.original.axes.slice(); + } + }); + // poll connections and update gamepad states every frame because chrome's a lazy bum + if (_this.pollEveryFrame) { + _this.pollconnections(); + } + Object.keys(_this.players).forEach(function (i) { + var _a; + var p = _this.getPlayer(i); + if ((_a = p === null || p === void 0 ? void 0 : p.original) === null || _a === void 0 ? void 0 : _a.buttons) { + for (var j = 0; j < p.original.buttons.length; ++j) { + if (p.original.buttons[j].pressed) { + p.justDown[j] = !(p.down[j] === true); + p.down[j] = true; + p.justUp[j] = false; + } + else { + p.justUp[j] = p.down[j] === true; + p.down[j] = false; + p.justDown[j] = false; + } + } + } + }); + }; + /** + * @returns `player`'s gamepad + * + * if one doesn't exist, returns an object with gamepad properties reflecting a null state + */ + this.getPlayer = function (player) { + var _a, _b, _c; + if (((_b = (_a = _this.players[player]) === null || _a === void 0 ? void 0 : _a.original) === null || _b === void 0 ? void 0 : _b.connected) && !((_c = _this.players[player]) === null || _c === void 0 ? void 0 : _c.disabled)) { + return _this.players[player]; + } + return nullGamepad; + }; + /** + * @returns an array representing `length` axes for `player` at `offset` + * + * if `abs(an axis value)` is < `deadZone`, returns 0 instead + * if `abs(1-an axis value)` is < `snapZone`, returns 1/-1 instead + * otherwise, returns the axis value normalized between `deadZone` and `(1-snapZone)` + * @param {Number} offset axis index + * @param {Number} length number of axes to return + * @param {Number} player player index (`undefined` for "sum of all") + * @param {boolean} prev if `true` uses axis values from previous update + */ + this.getAxes = function (offset, length, player, prev) { + if (offset === void 0) { offset = 0; } + if (length === void 0) { length = 2; } + if (prev === void 0) { prev = false; } + var axes = []; + for (var i = 0; i < length; ++i) { + axes[i] = 0; + } + if (player === undefined) { + Object.keys(_this.players).forEach(function (i) { + var a = _this.getAxes(offset, length, i, prev); + for (var j = 0; j < a.length; ++j) { + axes[j] += a[j]; + } + }); + } + else { + var p = _this.getPlayer(player); + if (p === null || p === void 0 ? void 0 : p.original) { + var axesSource = prev ? p.axesPrev : p.original.axes; + var a = Object.values(axesSource).slice(offset, offset + length); + for (var i = 0; i < a.length; ++i) { + if (Math.abs(a[i]) < _this.deadZone) { + axes[i] += 0; + } + else if (Math.abs(1.0 - a[i]) < _this.snapZone) { + axes[i] += 1; + } + else if (Math.abs(-1.0 - a[i]) < _this.snapZone) { + axes[i] -= 1; + } + else { + axes[i] += Math.sign(a[i]) * _this.interpolate(Math.abs(a[i])); + } + } + } + } + return axes; + }; + /** + * @returns equivalent to `getAxes(axis, 1, player, prev)[0]` + */ + this.getAxis = function (axis, player, prev) { return _this.getAxes(axis, 1, player, prev)[0]; }; + /** + * @returns `true` if `axis` is past `threshold` in `direction` + * @param {Number} axis axis index + * @param {Number} threshold threshold (-1 to 1) + * @param {Number} direction direction (-1|1) (if `undefined`, assumes the sign of `theshold` is the direction (e.g. if `theshold` is -0.5, it will check if the axis is < -0.5)) + * @param {Number} player player index (`undefined` for "any") + * @param {boolean} prev if `true` uses axis values from previous update + */ + this.axisPast = function (axis, threshold, direction, player, prev) { + if (!threshold) { + throw new Error('must specify a non-zero threshold'); + } + if (!direction) { + direction = threshold > 0 ? 1 : -1; + } + var a = _this.getAxis(axis, player, prev); + return direction < 0 ? a < threshold : a > threshold; + }; + /** + * @returns `true` if `axis` is past `threshold` in `direction` and WAS NOT in previous update + * @param {Number} axis axis index + * @param {Number} threshold threshold (-1 to 1) + * @param {Number} direction direction (-1|1) (if `undefined`, assumes the sign of `theshold` is the direction (e.g. if `theshold` is -0.5, it will check if the axis is < -0.5)) + * @param {Number} player player index (`undefined` for "any") + */ + this.axisJustPast = function (axis, threshold, direction, player) { return _this.axisPast(axis, threshold, direction, player, false) + && !_this.axisPast(axis, threshold, direction, player, true); }; + /** + * @returns `[x,y]` representing the dpad for `player` + * @param {Number} player player index (`undefined` for "sum of all") + */ + this.getDpad = function (player) { + var x = 0; + var y = 0; + if (player === undefined) { + Object.keys(_this.players).forEach(function (i) { + var _a = _this.getDpad(i), ix = _a[0], iy = _a[1]; + x += ix; + y += iy; + }); + } + else { + if (_this.isDown(Buttons.DPAD_RIGHT, player)) { + x += 1; + } + if (_this.isDown(Buttons.DPAD_LEFT, player)) { + x -= 1; + } + if (_this.isDown(Buttons.DPAD_UP, player)) { + y += 1; + } + if (_this.isDown(Buttons.DPAD_DOWN, player)) { + y -= 1; + } + } + return [x, y]; + }; + /** + * @returns `true` if `player`'s `btn` is currently down + * @param {Number} btn button index + * @param {Number} player player index (`undefined` for "any") + */ + this.isDown = function (btn, player) { + if (btn === undefined) { + throw new Error('must specify a button'); + } + if (player === undefined) { + return Object.keys(_this.players).some(function (i) { return _this.isDown(btn, i); }); + } + return _this.getPlayer(player).down[btn]; + }; + /** + * @returns equivalent to `!isDown(btn, player)` + * @param {Number} btn button index + * @param {Number} player player index (`undefined` for "any") + */ + this.isUp = function (btn, player) { return !_this.isDown(btn, player); }; + /** + * @returns `true` if `player`'s `btn` is currently down and WAS NOT in previous update + * @param {Number} btn button index + * @param {Number} player player index (`undefined` for "any") + */ + this.isJustDown = function (btn, player) { + if (btn === undefined) { + throw new Error('must specify a button'); + } + if (player === undefined) { + return Object.keys(_this.players).some(function (i) { return _this.isJustDown(btn, i); }); + } + return _this.getPlayer(player).justDown[btn]; + }; + /** + * @returns `true` if `player`'s `btn` is currently NOT down and WAS down in previous update + * @param {Number} btn button index + * @param {Number} player player index (`undefined` for "any") + */ + this.isJustUp = function (btn, player) { + if (btn === undefined) { + throw new Error('must specify a button'); + } + if (player === undefined) { + return Object.keys(_this.players).some(function (i) { return _this.isJustUp(btn, i); }); + } + return _this.getPlayer(player).justUp[btn]; + }; + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + if (navigator.getGamepads) { + this.available = true; } - } - - return false; - } else { - return this.getPlayer(player).down[btn] === true; - } - }, - - /** - * @returns equivalent to `!isDown(btn, player)` - * @param {Number} btn button index - * @param {Number} player player index (`undefined` for "any") - */ - isUp: function (btn, player) { - return !this.isDown(btn, player); - }, - - /** - * @returns `true` if `player`'s `btn` is currently down and WAS NOT in previous update - * @param {Number} btn button index - * @param {Number} player player index (`undefined` for "any") - */ - isJustDown: function (btn, player) { - if (btn === undefined) { - throw new Error('must specify a button'); - } - - if (player === undefined) { - for (var i = 0; i < this.players.length; ++i) { - if (this.isJustDown(btn, i)) { - return true; + else if (navigator.webkitGetGamepads) { + navigator.getGamepads = navigator.webkitGetGamepads; + this.available = true; } - } - - return false; - } else { - return this.getPlayer(player).justDown[btn] === true; - } - }, - - /** - * @returns `true` if `player`'s `btn` is currently NOT down and WAS down in previous update - * @param {Number} btn button index - * @param {Number} player player index (`undefined` for "any") - */ - isJustUp: function (btn, player) { - if (btn === undefined) { - throw new Error('must specify a button'); - } - - if (player === undefined) { - for (let i = 0; i < this.players.length; ++i) { - if (this.isJustUp(btn, i)) { - return true; + if (this.available) { + if (navigator.userAgent.includes('Firefox')) { + // listen to connection events for firefox + window.addEventListener('gamepadconnected', this.pollconnections.bind(this)); + window.addEventListener('gamepaddisconnected', this.pollconnections.bind(this)); + } + else { + this.pollEveryFrame = true; + } } - } - - return false; } - - return this.getPlayer(player).justUp[btn] === true; - } -}; + return Gamepads; +}()); /** @file utils @@ -595,7 +550,7 @@ function reinitEngine() { -before('startExportedGame', gamepads.init.bind(gamepads)); +var gamepads = new Gamepads(); var empty = function () {}; var move = function (dpad, face, axis, axis2, axispast, axisdir, key) { @@ -604,6 +559,7 @@ var move = function (dpad, face, axis, axis2, axispast, axisdir, key) { gamepads.isJustDown(dpad) || gamepads.isJustDown(face) || gamepads.axisJustPast(axis, axispast, axisdir) + || gamepads.axisJustPast(axis2, axispast, axisdir) || ( bitsy.playerHoldToMoveTimer <= 0 && ( gamepads.isDown(dpad) @@ -624,6 +580,7 @@ var move = function (dpad, face, axis, axis2, axispast, axisdir, key) { gamepads.isJustUp(dpad) || gamepads.isJustUp(face) || gamepads.axisJustPast(axis, axispast, -axisdir) + || gamepads.axisJustPast(axis2, axispast, -axisdir) ) { bitsy.input.onkeyup({ keyCode: key, @@ -633,10 +590,10 @@ var move = function (dpad, face, axis, axis2, axispast, axisdir, key) { }; before('update', function () { - move(gamepads.DPAD_LEFT, gamepads.X, gamepads.LSTICK_H, gamepads.RSTICK_H, -0.5, -1, bitsy.key.left); - move(gamepads.DPAD_RIGHT, gamepads.B, gamepads.LSTICK_H, gamepads.RSTICK_H, 0.5, 1, bitsy.key.right); - move(gamepads.DPAD_UP, gamepads.Y, gamepads.LSTICK_V, gamepads.RSTICK_V, -0.5, -1, bitsy.key.up); - move(gamepads.DPAD_DOWN, gamepads.A, gamepads.LSTICK_V, gamepads.RSTICK_V, 0.5, 1, bitsy.key.down); + move(Buttons.DPAD_LEFT, Buttons.X, Axes.LSTICK_H, Axes.RSTICK_H, -0.5, -1, bitsy.key.left); + move(Buttons.DPAD_RIGHT, Buttons.B, Axes.LSTICK_H, Axes.RSTICK_H, 0.5, 1, bitsy.key.right); + move(Buttons.DPAD_UP, Buttons.Y, Axes.LSTICK_V, Axes.RSTICK_V, -0.5, -1, bitsy.key.up); + move(Buttons.DPAD_DOWN, Buttons.A, Axes.LSTICK_V, Axes.RSTICK_V, 0.5, 1, bitsy.key.down); }); after('update', function () { gamepads.update(); diff --git a/dist/gravity.js b/dist/gravity.js index 86346af1..b1159474 100644 --- a/dist/gravity.js +++ b/dist/gravity.js @@ -3,7 +3,7 @@ @file gravity @summary Pseudo-platforming/gravity/physics @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.3 @author Cole Sea diff --git a/dist/itsy-bitsy.js b/dist/itsy-bitsy.js index 2a91ac64..107b4d55 100644 --- a/dist/itsy-bitsy.js +++ b/dist/itsy-bitsy.js @@ -3,7 +3,7 @@ @file itsy-bitsy @summary for when bitsy's not small enough @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.1 @author Sean S. LeBlanc diff --git a/dist/javascript-dialog.js b/dist/javascript-dialog.js index 2b474ca8..09bd950a 100644 --- a/dist/javascript-dialog.js +++ b/dist/javascript-dialog.js @@ -3,7 +3,7 @@ @file javascript dialog @summary execute arbitrary javascript from dialog @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 4.5, 4.6 @author Sean S. LeBlanc diff --git a/dist/logic-operators-extended.js b/dist/logic-operators-extended.js index 550bc34e..0bb4d8a8 100644 --- a/dist/logic-operators-extended.js +++ b/dist/logic-operators-extended.js @@ -2,7 +2,7 @@ 🔀 @file logic-operators-extended @summary adds conditional logic operators -@version 15.4.1 +@version 15.4.2 @requires 7.2 @author @mildmojo diff --git a/dist/long-dialog.js b/dist/long-dialog.js index ab7d1856..31ba53b2 100644 --- a/dist/long-dialog.js +++ b/dist/long-dialog.js @@ -3,7 +3,7 @@ @file long dialog @summary put more words onscreen @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/multi-sprite-avatar.js b/dist/multi-sprite-avatar.js index 4083f319..bc4bbd4c 100644 --- a/dist/multi-sprite-avatar.js +++ b/dist/multi-sprite-avatar.js @@ -3,7 +3,7 @@ @file multi-sprite avatar @summary make the player big @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/noclip.js b/dist/noclip.js index af6c6179..cf7335aa 100644 --- a/dist/noclip.js +++ b/dist/noclip.js @@ -3,7 +3,7 @@ @file noclip @summary walk through wall tiles, sprites, items, exits, and endings @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/online.js b/dist/online.js index 5251d6b7..f25b668b 100644 --- a/dist/online.js +++ b/dist/online.js @@ -3,7 +3,7 @@ @file online @summary multiplayer bitsy @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc @description diff --git a/dist/opaque-tiles.js b/dist/opaque-tiles.js index 43c8cbe7..50bbd379 100644 --- a/dist/opaque-tiles.js +++ b/dist/opaque-tiles.js @@ -3,7 +3,7 @@ @file opaque tiles @summary tiles which hide the player @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/palette-maps.js b/dist/palette-maps.js index f4520780..951a75c2 100644 --- a/dist/palette-maps.js +++ b/dist/palette-maps.js @@ -3,7 +3,7 @@ @file palette maps @summary allows color pallettes to be defined on a tile-by-tile basis @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 6.1 @author Dana Holdampf diff --git a/dist/paragraph-break.js b/dist/paragraph-break.js index 35857420..c2249364 100644 --- a/dist/paragraph-break.js +++ b/dist/paragraph-break.js @@ -3,7 +3,7 @@ @file paragraph-break @summary Adds paragraph breaks to the dialogue parser @license WTFPL (do WTF you want) -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 5.0, 5.1 @author Sean S. LeBlanc, David Mowatt diff --git a/dist/permanent-items.js b/dist/permanent-items.js index 76341535..271f3d02 100644 --- a/dist/permanent-items.js +++ b/dist/permanent-items.js @@ -3,7 +3,7 @@ @file permanent items @summary prevent some items from being picked up @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/push-sprites.js b/dist/push-sprites.js index a7431e0c..c096ca63 100644 --- a/dist/push-sprites.js +++ b/dist/push-sprites.js @@ -3,7 +3,7 @@ @file push sprites @summary sokoban-style sprite pushing @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.4 @author jan0sc diff --git a/dist/replace-drawing.js b/dist/replace-drawing.js index 5056e90c..61418818 100644 --- a/dist/replace-drawing.js +++ b/dist/replace-drawing.js @@ -3,7 +3,7 @@ @file replace drawing @summary add name-tags to replace drawings when the game is loading @license MIT -@version 15.4.1 +@version 15.4.2 @requires 6.3 @author Elkie Nova diff --git a/dist/save.js b/dist/save.js index 9b86a232..07b6fb29 100644 --- a/dist/save.js +++ b/dist/save.js @@ -3,7 +3,7 @@ @file save @summary save/load your game @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.4 @author Sean S. LeBlanc diff --git a/dist/smooth-moves.js b/dist/smooth-moves.js index b60dc90f..5267bf9e 100644 --- a/dist/smooth-moves.js +++ b/dist/smooth-moves.js @@ -3,7 +3,7 @@ @file smooth moves @summary ease the player's movement @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 6.3 @author Sean S. LeBlanc diff --git a/dist/solid-items.js b/dist/solid-items.js index 5e5e8742..7b2befa2 100644 --- a/dist/solid-items.js +++ b/dist/solid-items.js @@ -3,7 +3,7 @@ @file solid items @summary treat some items like sprites that can be placed multiple times @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/sprite-effects.js b/dist/sprite-effects.js index 0dec6668..459e6347 100644 --- a/dist/sprite-effects.js +++ b/dist/sprite-effects.js @@ -3,7 +3,7 @@ @file sprite effects @summary like text effects, but for sprites @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.1 @author Sean S. LeBlanc diff --git a/dist/stopwatch.js b/dist/stopwatch.js index 0fd96ef5..d7f1f029 100644 --- a/dist/stopwatch.js +++ b/dist/stopwatch.js @@ -3,7 +3,7 @@ @file stopwatch @summary time player actions @license MIT -@version 15.4.1 +@version 15.4.2 @author Lenny Magner @description diff --git a/dist/text-to-speech.js b/dist/text-to-speech.js index b7ca1107..52cf751d 100644 --- a/dist/text-to-speech.js +++ b/dist/text-to-speech.js @@ -3,7 +3,7 @@ @file text-to-speech @summary text-to-speech for bitsy dialog @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.5 @author Sean S. LeBlanc diff --git a/dist/textbox-styler.js b/dist/textbox-styler.js index 9b2cf4ba..fd044eb2 100644 --- a/dist/textbox-styler.js +++ b/dist/textbox-styler.js @@ -3,7 +3,7 @@ @file textbox styler @summary customize the style and properties of the textbox @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 6.1 @author Dana Holdampf & Sean S. LeBlanc diff --git a/dist/tracery-processing.js b/dist/tracery-processing.js index fa47526d..fe89f93a 100644 --- a/dist/tracery-processing.js +++ b/dist/tracery-processing.js @@ -3,7 +3,7 @@ @file tracery processing @summary process all dialog text with a tracery grammar @license MIT -@version 15.4.1 +@version 15.4.2 @requires 7.0 @author Sean S. LeBlanc diff --git a/dist/transitions.js b/dist/transitions.js index 1efa3271..90b8593e 100644 --- a/dist/transitions.js +++ b/dist/transitions.js @@ -3,7 +3,7 @@ @file transitions @summary customizable WebGL transitions @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/transparent-background.js b/dist/transparent-background.js index 106b72d9..1e8d736e 100644 --- a/dist/transparent-background.js +++ b/dist/transparent-background.js @@ -3,7 +3,7 @@ @file transparent background @summary makes the game have a transparent background @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 7.2 @author Cephalopodunk & Sean S. LeBlanc diff --git a/dist/transparent-dialog.js b/dist/transparent-dialog.js index ea9c8c89..1d474005 100644 --- a/dist/transparent-dialog.js +++ b/dist/transparent-dialog.js @@ -3,7 +3,7 @@ @file transparent dialog @summary makes the dialog box have a transparent background @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/dist/transparent-sprites.js b/dist/transparent-sprites.js index 0c12f55b..88645a5b 100644 --- a/dist/transparent-sprites.js +++ b/dist/transparent-sprites.js @@ -3,7 +3,7 @@ @file transparent sprites @summary makes all sprites have transparent backgrounds @license MIT -@version 15.4.1 +@version 15.4.2 @requires Bitsy Version: 6.1 @author Sean S. LeBlanc diff --git a/dist/twine-bitsy-comms.js b/dist/twine-bitsy-comms.js index 28c179c4..dc9f8ed6 100644 --- a/dist/twine-bitsy-comms.js +++ b/dist/twine-bitsy-comms.js @@ -3,7 +3,7 @@ @file twine bitsy comms @summary interprocess communication for twine and bitsy @license MIT -@version 15.4.1 +@version 15.4.2 @requires 5.4 @author Sean S. LeBlanc diff --git a/dist/unique-items.js b/dist/unique-items.js index 79b6c813..6b8c9d6b 100644 --- a/dist/unique-items.js +++ b/dist/unique-items.js @@ -3,7 +3,7 @@ @file unique items @summary items which, when picked up, remove all other instances of that item from the game @license MIT -@version 15.4.1 +@version 15.4.2 @author Sean S. LeBlanc @description diff --git a/package-lock.json b/package-lock.json index 433e9915..cc5408af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bitsy/hecks", - "version": "15.4.1", + "version": "15.4.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cf3bf6fd..21bca707 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "hacks" ], "main": "index.mjs", - "version": "15.4.1", + "version": "15.4.2", "scripts": { "build": "rollup -c", "test": "jest --runInBand",