Skip to content

Commit 2200887

Browse files
committed
automatic inclusion of gl-matrix-min.js in builds
1 parent 1c89a86 commit 2200887

9 files changed

+91
-31616
lines changed

build/kiwi.d.ts

+28-98
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,7 @@ declare module Kiwi {
17321732
* @public
17331733
*/
17341734
public renderOption : number;
1735+
public bootCallbackOption: Function;
17351736
/**
17361737
* The type of device that you are targeting. This is either set to COCOON or BROWSER
17371738
* @property _deviceTargetOption
@@ -9789,14 +9790,6 @@ declare module Kiwi.Geom {
97899790
public toString(): string;
97909791
}
97919792
}
9792-
declare module Kiwi.Geom {
9793-
class Random {
9794-
static randomPointCirclePerimeter(): Geom.Point;
9795-
static randomPointCircle(): Geom.Point;
9796-
static randomPointSquare(): Geom.Point;
9797-
static randomPointSquarePerimeter(): Geom.Point;
9798-
}
9799-
}
98009793
/**
98019794
*
98029795
* @module Kiwi
@@ -14856,13 +14849,6 @@ declare module Kiwi.Renderers {
1485614849
*/
1485714850
private _currentRenderer;
1485814851
/**
14859-
* Camera offset in pixels from top left.
14860-
* @property _cameraOffset
14861-
* @type Float32Array
14862-
* @private
14863-
*/
14864-
private _cameraOffset;
14865-
/**
1486614852
* Tally of number of entities rendered per frame
1486714853
* @property _entityCount
1486814854
* @type number
@@ -14887,13 +14873,7 @@ declare module Kiwi.Renderers {
1488714873
* @private
1488814874
*/
1488914875
private _maxItems;
14890-
/**
14891-
* GL-Matrix.js provided 4x4 matrix used for matrix uniform
14892-
* @property mvMatrix
14893-
* @type Float32Array
14894-
* @public
14895-
*/
14896-
public mvMatrix: Float32Array;
14876+
public camMatrix: Float32Array;
1489714877
/**
1489814878
* The most recently bound texture atlas.
1489914879
* @property _currentTextureAtlas
@@ -14947,14 +14927,6 @@ declare module Kiwi.Renderers {
1494714927
* @public
1494814928
*/
1494914929
public requestRendererInstance(rendererID: string, params?: any): Renderers.Renderer;
14950-
/**
14951-
* Performs initialisation required for single game instance - happens once, at bootup
14952-
* Sets global GL state.
14953-
* Initialises managers for shaders and textures.
14954-
* Instantiates the default shared renderer (TextureAtlasRenderer)
14955-
* @method _init
14956-
* @private
14957-
*/
1495814930
private _init();
1495914931
/**
1496014932
* Performs initialisation required when switching to a different state. Called when a state has been switched to.
@@ -14980,34 +14952,15 @@ declare module Kiwi.Renderers {
1498014952
* @public
1498114953
*/
1498214954
public render(camera: Kiwi.Camera): void;
14983-
/**
14984-
* Recursively renders scene graph tree
14985-
* @method _recurse
14986-
* @param gl {WebGLRenderingContext}
14987-
* @param child {IChild}
14988-
* @param camera {Camera}
14989-
* @private
14990-
*/
14991-
private _recurse(gl, child, camera);
14992-
/**
14993-
* Processes a single entity for rendering. Ensures that GL state is set up for the entity rendering requirements
14994-
* @method _processEntity
14995-
* is the entity's required renderer active and using the correct shader? If not then flush and re-enable renderer
14996-
* this is to allow the same renderer to use different shaders on different objects - renderer can be configured on a per object basis
14997-
* this needs thorough testing - also the text property lookups may need refactoring
14998-
* @param gl {WebGLRenderingContext}
14999-
* @param entity {Entity}
15000-
* @param camera {Camera}
15001-
* @private
15002-
*/
15003-
private _processEntity(gl, entity, camera);
15004-
/**
15005-
* Draws the current batch and clears the renderer ready for another batch.
15006-
* @method _flushBatch
15007-
* @param gl {WebGLRenderingContext}
15008-
* @private
15009-
*/
15010-
private _flushBatch(gl);
14955+
private _sequence;
14956+
private _batches;
14957+
public collateRenderSequence(): void;
14958+
public collateChild(child: Kiwi.IChild): void;
14959+
public collateBatches(): void;
14960+
public renderBatches(gl: WebGLRenderingContext, camera: any): void;
14961+
public renderBatch(gl: WebGLRenderingContext, batch: any, camera: any): void;
14962+
public renderEntity(gl: WebGLRenderingContext, entity: any, camera: any): void;
14963+
public setupGLState(gl: WebGLRenderingContext, entity: any): void;
1501114964
/**
1501214965
* Switch renderer to the one needed by the entity that needs rendering
1501314966
* @method _switchRenderer
@@ -15094,7 +15047,7 @@ declare module Kiwi.Shaders {
1509415047
* @return {ShaderPair} a ShaderPair instance - null on fail
1509515048
* @public
1509615049
*/
15097-
public requestShader(gl: WebGLRenderingContext, shaderID: string): Shaders.ShaderPair;
15050+
public requestShader(gl: WebGLRenderingContext, shaderID: string, use?: boolean): Shaders.ShaderPair;
1509815051
/**
1509915052
* Tests to see if a ShaderPair property named ShaderID exists on Kiwi.Shaders. Can be used to test for the availability of specific shaders (for fallback)
1510015053
* @method shaderExists
@@ -15481,15 +15434,9 @@ declare module Kiwi.Renderers {
1548115434
}
1548215435
declare module Kiwi.Renderers {
1548315436
class Renderer {
15484-
constructor(gl: WebGLRenderingContext, shaderManager: Kiwi.Shaders.ShaderManager);
15437+
constructor(gl: WebGLRenderingContext, shaderManager: Kiwi.Shaders.ShaderManager, isBatchRenderer?: boolean);
1548515438
static RENDERER_ID: string;
15486-
/**
15487-
* GL-Matrix.js provided 4x4 matrix used for matrix uniform
15488-
* @property mvMatrix
15489-
* @type Float32Array
15490-
* @public
15491-
*/
15492-
public mvMatrix: Float32Array;
15439+
public camMatrix: Float32Array;
1549315440
public loaded: boolean;
1549415441
public shaderManager: Kiwi.Shaders.ShaderManager;
1549515442
public enable(gl: WebGLRenderingContext, params?: any): void;
@@ -15498,6 +15445,9 @@ declare module Kiwi.Renderers {
1549815445
public draw(gl: WebGLRenderingContext): void;
1549915446
public updateStageResolution(gl: WebGLRenderingContext, res: Float32Array): void;
1550015447
public updateTextureSize(gl: WebGLRenderingContext, size: Float32Array): void;
15448+
public shaderPair: Kiwi.Shaders.ShaderPair;
15449+
private _isBatchRenderer;
15450+
public isBatchRenderer : boolean;
1550115451
}
1550215452
}
1550315453
/**
@@ -15510,41 +15460,15 @@ declare module Kiwi.Renderers {
1551015460
class TextureAtlasRenderer extends Renderers.Renderer {
1551115461
constructor(gl: WebGLRenderingContext, shaderManager: Kiwi.Shaders.ShaderManager, params?: any);
1551215462
static RENDERER_ID: string;
15463+
public shaderPair: Kiwi.Shaders.TextureAtlasShader;
15464+
private _maxItems;
15465+
private _vertexBuffer;
15466+
private _indexBuffer;
1551315467
public enable(gl: WebGLRenderingContext, params?: any): void;
1551415468
public disable(gl: WebGLRenderingContext): void;
15515-
public shaderPair: Kiwi.Shaders.TextureAtlasShader;
1551615469
public clear(gl: WebGLRenderingContext, params: any): void;
1551715470
public draw(gl: WebGLRenderingContext): void;
1551815471
/**
15519-
* Maximum allowable sprites to render per frame
15520-
* @property _maxItems
15521-
* @type number
15522-
* @default 1000
15523-
* @private
15524-
*/
15525-
private _maxItems;
15526-
/**
15527-
* Storage for the xy (position) and uv(texture) coordinates that are generated each frame
15528-
* @property _xyuvBuffer
15529-
* @type GLArrayBuffer
15530-
* @private
15531-
*/
15532-
public xyuvBuffer: Renderers.GLArrayBuffer;
15533-
/**
15534-
* Storage for the polygon indices, pre generated to a length based on max items
15535-
* @property _indexBuffer
15536-
* @type GLElementArrayBuffer
15537-
* @private
15538-
*/
15539-
public indexBuffer: Renderers.GLElementArrayBuffer;
15540-
/**
15541-
* Storage for alpha values for each vertex on a sprite
15542-
* @property _alphaBuffer
15543-
* @type GLArrayBuffer
15544-
* @private
15545-
*/
15546-
public alphaBuffer: Renderers.GLArrayBuffer;
15547-
/**
1554815472
* Create prebaked indices for drawing quads
1554915473
* @method _generateIndices
1555015474
* @param numQuads {number}
@@ -15563,7 +15487,7 @@ declare module Kiwi.Renderers {
1556315487
* @public
1556415488
*/
1556515489
public addToBatch(gl: WebGLRenderingContext, entity: Kiwi.Entity, camera: Kiwi.Camera): void;
15566-
public concatBatch(xyuvItems: number[], alphaItems: number[]): void;
15490+
public concatBatch(vertexItems: number[]): void;
1556715491
}
1556815492
}
1556915493
/**
@@ -15626,6 +15550,8 @@ declare module Kiwi.Shaders {
1562615550
* @public
1562715551
*/
1562815552
public compile(gl: WebGLRenderingContext, src: string, shaderType: number): WebGLShader;
15553+
public uniforms: any;
15554+
public attributes: any;
1562915555
/**
1563015556
*
1563115557
* @property texture2DFrag
@@ -15640,6 +15566,10 @@ declare module Kiwi.Shaders {
1564015566
* @public
1564115567
*/
1564215568
public vertSource: any[];
15569+
public setParam(uniformName: string, value: any): void;
15570+
public applyUniforms(gl: WebGLRenderingContext): void;
15571+
public applyUniform(gl: WebGLRenderingContext, name: string): void;
15572+
public initUniforms(gl: WebGLRenderingContext): void;
1564315573
}
1564415574
}
1564515575
/**

build/kiwi.js

+31-2
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)