<commit_before>import { compose } from 'stampit';
import { isObject } from './helpers';

import EventEmitter from './EventEmitter';
import State from './State';
import Engine from './Engine';
import Ticker from './Ticker';
import Query from './Query';

import EntityStore from './EntityStore';
import ComponentStore from './ComponentStore';
import SystemStore from './SystemStore';

// welcome message
console.log(...[
  '%c %c %c Entropy 0.1.0 - Entity System Framework for JavaScript %c %c ',
  'background: rgb(200, 200,200);',
  'background: rgb(80, 80, 80);',
  'color: white; background: black;',
  'background: rgb(80, 80, 80);',
  'background: rgb(200, 200, 200);',
]);

/**
 * Main framework factory method. This is the only factory, that needs to be called by user.
 *
 * @class Entropy
 * @borrows ComponentStore#register as Entropy#registerComponent
 * @borrows ComponentStore#registerMany as Entropy#registerComponents
 * @borrows ComponentStore#create as Entropy#createComponent
 * @borrows EntityStore#register as Entropy#registerEntity
 * @borrows EntityStore#registerMany as Entropy#registerEntitys
 * @borrows EntityStore#create as Entropy#createEntity
 * @borrows SystemStore#register as Entropy#registerSystem
 * @borrows SystemStore#registerMany as Entropy#registerSystems
 * @borrows SystemStore#create as Entropy#createSystem
 * @extends EventEmitter
 * @param {Object} config
 * @param {Boolean} config.pauseOnVisibilityChange
 *
 * @example
 * const game = Entropy() // creating game with default configuration
 * game.addEntity('Ball', {
 *   x: 0,
 *   y: 0,
 * })
 */
const Entropy = compose(EventEmitter, {
  /**
   * @constructs
   */
  init(opts) {
    /**
     * Stores components for later reuse.
     *
     * @memberof Entropy#
     * @name component
     * @type ComponentStore
     */
    this.component = ComponentStore();

    /**
     * Stores entities for later reuse.
     *
     * @memberof Entropy#
     * @name entity<commit_msg>Add stampit as static property of library Mainly for use with plugins<commit_after>import * as stampit from 'stampit';
import { isObject } from './helpers';

import EventEmitter from './EventEmitter';
import State from './State';
import Engine from './Engine';
import Ticker from './Ticker';
import Query from './Query';

import EntityStore from './EntityStore';
import ComponentStore from './ComponentStore';
import SystemStore from './SystemStore';

// welcome message
console.log(...[
  '%c %c %c Entropy 0.1.0 - Entity System Framework for JavaScript %c %c ',
  'background: rgb(200, 200,200);',
  'background: rgb(80, 80, 80);',
  'color: white; background: black;',
  'background: rgb(80, 80, 80);',
  'background: rgb(200, 200, 200);',
]);

/**
 * Main framework factory method. This is the only factory, that needs to be called by user.
 *
 * @class Entropy
 * @borrows ComponentStore#register as Entropy#registerComponent
 * @borrows ComponentStore#registerMany as Entropy#registerComponents
 * @borrows ComponentStore#create as Entropy#createComponent
 * @borrows EntityStore#register as Entropy#registerEntity
 * @borrows EntityStore#registerMany as Entropy#registerEntitys
 * @borrows EntityStore#create as Entropy#createEntity
 * @borrows SystemStore#register as Entropy#registerSystem
 * @borrows SystemStore#registerMany as Entropy#registerSystems
 * @borrows SystemStore#create as Entropy#createSystem
 * @extends EventEmitter
 * @param {Object} config
 * @param {Boolean} config.pauseOnVisibilityChange
 *
 * @example
 * const game = Entropy() // creating game with default configuration
 * game.addEntity('Ball', {
 *   x: 0,
 *   y: 0,
 * })
 */
const Entropy = stampit.compose(EventEmitter, {
  statics: {
    stampit,
  },
  /**
   * @constructs
   */
  init(opts) {
    /**
     * Stores components for later reuse.
     *
     * @memberof Entropy#
     * @name component
     * @type ComponentStore
     */
    this.component = ComponentStore();

    /**
     * Stores entities for later reuse.
     *
     * @memberof Entropy#
     * @name entity
{'fraction_non_alphanumeric': 0.12438180019782394, 'fraction_numerical': 0.01730959446092977, 'mean_word_length': 4.024844720496894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3657257', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1169, 'n_words': 367}