Skip to content

Releases: xShadowBlade/emath.js

Version 9.5.0

24 Aug 21:14
569a9e7
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces some changes including:

  • (ffc2a3e): Add inverseFunctionApprox configurable bounds
  • (b8d71cc): Rework roundingBase
  • (83e7c0c): Add configurable localStorage for Game / DataManager

Full Changelog: v9.4.0...v9.5.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.4.0

20 Jul 03:22
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces some changes including:

  • (9634ff0): Add item tier and deprecate item amount
  • (bf112fe): Change class generic names (this does not affect functionality)
  • (79e1f5b): Add templates and type checking for item ids, similar to upgrade ids. Also adds the item parameter in <Game>.addCurrency
    • This may introduce some backwards incompatible changes, as it also changes the order of the CurrencyStatic constructor, namely defaults is changed from the 3rd parameter to the 4th parameter, and added the item parameter in its place
  • (09108d4): Add <Grid>.resize and grid and data bug fixes
  • (e17bed6): Add callback events to EventManager
  • (32461dd): Made the tier parameter in <CurrencyStatic>.buyItem optional

Full Changelog: v9.3.0...v9.4.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.3.0

09 Jul 18:06
6ab5921
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces some changes including:

  • (2b202b0): Add grid overflow parameters to getAdjacent, getDiagonal, and getEncircling methods
  • (8665121): GameCurrency now extends CurrencyStatic and GameAttribute now extends AttributeStatic. Their methods are now included within the class, so you will no longer need to destruct the static property. For example:
import { myGame } from "./game.js";

const myCurrency = myGame.addCurrency("myCurrency");

// Old
// Note: You can still do it this way, but it is deprecated and will be removed in the future
myCurrency.static.gain();

// New
myCurrency.gain();

Full Changelog: v9.2.0...v9.3.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.2.0

07 Jul 03:08
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces some changes including:

  • (c686f40): Change the name of the file src/game/ResetLayer.ts to src/game/GameReset.ts (no new features)
  • (c7b2ce9): Add .runUpgradeEffect
  • (abfb3b8): Add currency items (upgrades that don't have levels)
  • Overhaul of Grid (useless)
    • (b7ac7e7): Add direction methods to GridCell
    • (62ee33f): Add GridCellCollectionclass (an array of grid cell with additional methods)
    • (ea299ca): Various improvements

Full Changelog: v9.1.0...v9.2.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.1.0

14 Jun 12:58
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces some changes including:

  • (aa61bec): Fix/change emath.js/presets CDN. No longer includes emath.js or emath.js/game, and instead sets eMathPresets to window.
  • (a7df1b0): Add more functionality to GameReset.
    • <GameReset>.condition: A function to determine whether you can do the reset
    • <GameReset>.reset: Add more parameters
    • GameReset.fromObject: A static method to construct a <GameReset> using an object
    • You can now also set extender, onReset, and condition in the constructor
  • (5b64ae8): Fix Grid template types
  • (209f475): Add parameters to <UpgradeStatic>.description and removes the old parameters of (...args: any[])
  • (acf029f): Optimizations to CurrencyStatic and Boost

Full Changelog: v9.0.1...v9.1.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.0.1

07 Jun 10:40
bea79fc
Compare
Choose a tag to compare

Release Notes

Overview

This patch version fixes and changes some things including:

  • CDN usage for emath.js/presets now also includes emath.js and emath.js/game
  • Update README.md

Full Changelog: v9.0.0...v9.0.1

Known Bugs

  • calculateUpgrade sometimes inaccurate

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 9.0.0

07 Jun 09:57
Compare
Choose a tag to compare

Release Notes

Overview

This major version introduces some backward incompatible changes such as:

  • Deprecated the use of E and ESource. For more info, visit the migration docs
  • Updates break_eternity.js from version 1.4.2 to version 2.0.0
  • Change numericalAnalysis to be more efficient, but slightly less accurate (fix coming soon)
  • Update dependency version

Full Changelog: v8.4.0...v9.0.0

Known Bugs

  • calculateUpgrade sometimes inaccurate

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 8.4.0

24 May 16:06
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces changes such as:

  • Remove pixiGame
  • Optimizations to numericalAnalysis
  • Various code optimizations
  • Update dependency version

Full Changelog: v8.3.0...v8.4.0

Known Bugs

  • calculateUpgrade slow for large numbers (above ~1e1000)

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 8.3.0

14 May 13:18
Compare
Choose a tag to compare

Release Notes

Overview

This minor version introduces changes such as:

  • Fix upgrade typing in <CurrencyStatic>
  • Fix upgrade maxLevel
  • Add currencyContext to <Upgrade>.effect
  • Update dependency version

Here is an example of the new upgrade typing system.

// CurrencyStatic usage (typescript)
import { E, CurrencyStatic } from "emath.js";
import type { UpgradeStatic, UpgradeInit } from "emath.js";

const upgsList = [
    {
        id: "upgId1",
        cost: (level: E): E => level.mul(10),
        effect: (level: E, upgradeContext: UpgradeStatic, currencyContext: CurrencyStatic): void => {
            currencyContext.boost.setBoost(
                // add boost here ...
            );
        }
    },
    {
        id: "upgId2",
        cost: (level: E): E => level.mul(20),
    },
] as const satisfies UpgradeInit[];

const myCurrency = new CurrencyStatic(undefined, upgsList);

const upgrade1 = myCurrency.getUpgrade("upgId1a"); // Typed upgrade get

// Game usage (typescript)
import { myGame } from "./game";

const myGameCurrency = myGame.addCurrency("myCurrency", upgsList);

const upgrade = myGameCurrency.static.getUpgrade("upgId1a"); // Typed upgrade get

Full Changelog: v8.2.1...v8.3.0

Known Bugs

  • TBD

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!

Version 8.2.1

07 May 13:13
Compare
Choose a tag to compare

Release Notes

Overview

This patch version introduces minor changes such as:

  • Added <CurrencyStatic>.getNextCostMax
  • Various type changes to CurrencyStatic and GameCurrency

Full Changelog: v8.2.0...v8.2.1

Known Bugs

  • <Upgrade>.maxLevel not working

Feedback

We value your feedback! If you encounter any issues or have suggestions for improvement, please open a new issue.

Thank you for using this project!