API Docs for: 1.4.0
Show:

Kiwi Module

Defined in: src\Kiwi.ts:308

Module - Kiwi (Core) The top level namespace in which all core classes and modules are defined.

This module provides the following classes:

This module is a rollup of the following modules:

  • Components
    Component's are a snipnets of code which are designed to provide extra functionality to various objects that contain a ComponentManager. Objects do not have to have Components in order to preform their main function, but are instead provided to make common task's that you may want to do with those Objects a bit easier. For example: Some times you would like to easily listen for when a GameObject has been 'clicked'. So you can attach a 'InputComponent' to a GameObject (Sprites have them by default) which will then do hit-detector code for you. All you have to do is Subscribe to the events on the InputComponent.
  • Files
    AudioFile which contains settings, loading, and processing details for Audio files to be used. Uses tag loading for devices not supporting the WebAudioAPI. Otherwise XHR + arraybuffer loading methods are used.
  • Geom
    Contains common classes whose applications deal with geometry or the collision of geometric shapes.
  • Input
    Section that contains the code related to handling user interaction with a game.
  • Renderers
    Contains the classes which are related to the rendering of GameObjects.
  • Shaders
    GLSL ES Shaders are used for WebGL rendering. ShaderPair objects encapsulate GLSL ES vertex and fragment shader programs. ShaderPairs contain the GLSL code, provide an interface to uniforms and attributes, and have the ability to link and compile the shaders. The ShaderManager keeps track of each ShaderPair, and controls which one is bound for use at any particular time. Only the ShaderManager can create ShaderPairs. When a renderer (see note on renderes below) requests a ShaderPair the ShaderManager will either 1) Return a reference to an already instantiated ShaderPair, and set the GL state to use the shader program or 2) Return a reference to a new ShaderPair, which will be linked and compiled and bound for use. All ShaderPairs must be housed as properties of the Kiwi.Shaders object. Kiwi.Renderer objects use a ShaderPair to draw. They must request a ShaderPair from the ShaderManager. Many renderers may use the same ShaderPair. Some renderers may at different times use multiple ShaderPairs (only one is possible at any given time)
  • Sound
    The namespace that holds all of the assets and functionality when dealing with Audio.
  • System
    Kiwi - System
  • Textures
    Contains Objects that are used when dealing specifically with Textures/Images. Majority of these classes are for Internal Kiwi use.
  • Time
    Contains ways of tracking time within a game or application. Each game will have a ClockManager, MasterClock and a single Clock automatically generated for them upon game creation.
  • Utils
    Utils is a space that holds a wide varity of useful methods.
  • Utils.
    A utilty class used to add management functionality to common console methods. You can use this class by either creating a new instance, or using the instance at the namespace 'Kiwi.Log'. log/error/warn methods contained on this class function just like their 'console' equivalents except that: - You can assign a tag to message by adding a '#' symbol to the front of a parameter. Example: this.log('Hi', '#welcome'); - Messages can have multiple tags. Example: this.log('Hi', '#welcome', '#greeting'); - Messages are recorded (by default) and you can then search through any messages saved. You can use the 'show' commands to search through recordings and find specific messages.