1.0.2 • Published 6 years ago

aep-lib v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

README

aep-lib (A&E Process library, or Assimilation & Equalization process library) is a library for game development, which solves a problem, described in "Thesis.md" file (RUS lang).

See github page for Thesis.md and other files

Usage

npm i aep-lib --save
const aep = require("aep-lib");

const aepDescriptor = new index.AEProcessDescriptor(
    (object) => true,
    new aep.SignDescriptor("num", 10 /* threshold */, 5 /* accept time */, aep.utilFunctions.getLinearConvergentImpact("num", 1 /* converge rate */))
);

const objects = [
    { num : 100 },
    { num : 102 },
    { num : 104 }
];

const aeProcess = new aep.AEProcess(aepDescriptor);

for (let i = 0; i < 5; i++) {
    aeProcess.process(1 /* time units passed */, objects);
}

/**
 * objects[0].num = 101
 * objects[1].num = 102
 * objects[2].num = 103
 */

See library tests in aep-lib/test/indexSpec.js for more examples.

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago