Git Product home page Git Product logo

bom-pourtals.js's Introduction

c0redP.js

This is a placeholder. I need to write an async tasker. c0redP (Core-P aka Personality Core)

API


c0re

  • c0re( success_callback (function), failed_callback (function), options (object) ): returns c0re instance

    Constructor Function

    success_callback The callback to be executed when the queue is considered to be completed successfully. This is affected by options.determinative

    failed_callback The callback to be executed when the queue is considered to be completed unsuccessfully. This is affected by options.determinative

    options contains settings. Refer to 'Properties' below.

    Example: myc0re = new c0re(function(argIn){}, function(argIn){}, {'cycle_type':'pool', 'tasker_type': 'iterator','pool_size': 20});

  • c0re.has( key (string) ): returns boolean [true|false]

c0redP - Properties

  • determinative: readonly string ['all'|'~all'|'pos'] default all

    Completion Determinative

    determinative helps determine what threshold of successful calls to execute the success_callback or failed_callback

    • all when success rate is 100%

    • ~all when success rate is not 0%

    • pos when success rate is greater than failure rate

  • queue: readonly array [ c0reModel ]

    Callback Queue

    queue contains a list of models c0reModel.

  • temp_queue: readonly array [ c0reModel ]

    Temporary Queue

    temp_queue contains a list of models c0reModel. This jumps to the head of the queue and can only be accessed internally with enqueue_once()

  • silent: readonly boolean [true|false] default false

    Silent Mode

    silent if true enable extra warnings & debugging

  • pool_size: special-readonly number [>1] default 1

    Pool Size

    pool_size variable is readonly but can be changed with set_pool(). It changes async (in its own task queue). If cycle_type is 'queue' then it cannot be changed. Number must be greater than 1.

  • fixed_fps: readonly boolean [true|false] default true

    FPS Setting is Readonly

    fixed_fps determines if the c0redP.fps can be changed (below).

  • fps: special-readonly number [>1] default 15

    Frames Per Second

    fps determines the frames per second target.

  • cycle_type: readonly string ['iterator'|'generator'] default iterator

    Cycle Type

    cycle_type determines the frames per second target.

    • iterator Once completed it will stop

    • generator Once completed it will reset and run again

  • tasker_type: readonly string ['queue'|'pool'|'fuzzy'] default queue

    Tasker Type

    tasker_type determines how the tasks are ran.

    • queue forces the options.pool_size to always be one forcing tasks to be completed in sequence (WIP - Shouldn't have to use pool of 1 but rather call the completed in order)

    • pool allows for a number to tasks to be active based on the options.pool_size variable

    • fuzzy (WIP) not currently supported. Allows for idle task management

  • large_cycle: readonly object

    Large Cycle

    large_cycle is similar to small_cycle (below). (Coming Soon)

    • id aka. task/cycle id (the id returned from setTimeout(), setImmediate(), requestAnimationFrame() or setInterval())
  • small_cycle: readonly object

    Small Cycle

    small_cycle is similar to large_cycle (refer above). (Coming Soon)

  • unique_prefix: readonly string

    Unique Prefix

    unique_prefix passes through to c0reModel options

c0redP (Pourtals)

  • c0redP( options (object) ): returns c0redP instance

    Constructor Function

    options contains index keys of the initial set of callbacks. All options callbacks are both pass through c0redP.register() and c0redP.add()

    root (optional) the default 'this' when using ES5 function.apply(this,[]); (first argument in function.apply) when used in c0redP.icallback().

    Example: myc0redP = new c0redP({'init':function(argIn){}, 'destroy':function(argIn){}}, this);

c0re

[ x ] init

Suggested not required!

[ x ] ready

Suggested not required!

[ x ] start

Required!

[ x ] exit

Suggested not required!

[ ] bind - (low priority) data-binding

bom-pourtals.js's People

Contributors

bigorangemachine avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.