Giter Club home page Giter Club logo

darlingjs's Issues

advanced recipes

concept

var recipe = darling.recipe(function(pipeline, ops) {
  return pipeline
    .pipe(system1(ops.system1))
    .pipe(system2(ops.system2));
});

tap into a pipeline chain

Tap into the pipeline chain in order to perform operations on intermediate results within the chain

concept

darling.world()
  .pipeline(system1())
  .pipeline({
    tap: function(entities, interval, world) {
      //do some magic in between system1 and system2
    }
  })
  .pipeline(system2());

get other entities by component(s)

Example:
request target for entities with ai.

concept

//version A
world
  .require('target')
  .pipe(dosometing())
  .pipe(onemore())
  .live(once())

//version B
entities
  .catch('target')
  .pipe(dosometing())
  .pipe(onemore())
  .live(once())

//version C
world
  .filter('target')
  .pipe(dosometing())
  .pipe(onemore())
  .live(once())

lazy systems updates on Promises / Async

support such use case:

darling.system({
  lazy: true,
  updateAll: function(entities) {
    return new Promise((resolve, reject) => {
      //TODO: do some lazy job
    });
  }
})

fps option depricated?

The documention indicates that the fps can be specified when creating the world object.... but from what I can tell the rate is dictated by the window.requestAnimationFrame function.

util function to squeeze sequence of pipes in one

useful to create common recipes for modules

concept:

var recipe = function(ops) {
  return  {
    ops: ops,
    sequence: [
      system1,
      system2
    ]
  };
};

alternative:

var recipe = darling.recipe(function(pipeline, ops) {
  return pipeline
    .pipe(system1(ops.system1))
    .pipe(system2(ops.system2));
});

alternative 2:

var recipe = darling.recipe.sequence([
  system1(),
  system2()
]);

usage:

darling.world()
  .pipe(recipe({
    system1: 'query',
    system2: 123
  })
  .pipe(doSomething());

plan darlingai

  • https://github.com/darlingai - there will be page (https://darlingai.github.io)
  • research existing virtual env for AI agents (which value I could bring with browser based env)
  • design modern API
  • make plans to support modern js (code style and env)
  • get simple example to train AI (for example pingpong)
  • heavily relay on node.js (to allow server side/headless simulation) but keep browser support
  • what should be MVP
  • stop using $
  • start using mocha
  • get read of grunt and use rollup

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.