Remove all references to mat3 or mat4

This commit is contained in:
Chad Engler 2014-02-02 10:28:08 -08:00
parent 9509f43163
commit df8eb5f4fb
13 changed files with 130 additions and 882 deletions

View file

@ -1,40 +1,13 @@
function pixi_core_Matrix_confirmNewMat3(matrix) {
function pixi_core_Matrix_confirmNewMatrix(matrix) {
var expect = chai.expect;
expect(matrix).to.be.an.instanceof(PIXI.Matrix);
expect(matrix).to.not.be.empty;
expect(matrix[1]).to.equal(0);
expect(matrix[2]).to.equal(0);
expect(matrix[3]).to.equal(0);
expect(matrix[4]).to.equal(1);
expect(matrix[5]).to.equal(0);
expect(matrix[6]).to.equal(0);
expect(matrix[7]).to.equal(0);
expect(matrix[8]).to.equal(1);
}
function pixi_core_Matrix_confirmNewMat4(matrix) {
var expect = chai.expect;
expect(matrix).to.be.an.instanceof(PIXI.Matrix);
expect(matrix).to.not.be.empty;
expect(matrix[0]).to.equal(1);
expect(matrix[1]).to.equal(0);
expect(matrix[2]).to.equal(0);
expect(matrix[3]).to.equal(0);
expect(matrix[4]).to.equal(0);
expect(matrix[5]).to.equal(1);
expect(matrix[6]).to.equal(0);
expect(matrix[7]).to.equal(0);
expect(matrix[8]).to.equal(0);
expect(matrix[9]).to.equal(0);
expect(matrix[10]).to.equal(1);
expect(matrix[11]).to.equal(0);
expect(matrix[12]).to.equal(0);
expect(matrix[13]).to.equal(0);
expect(matrix[14]).to.equal(0);
expect(matrix[15]).to.equal(1);
}
expect(matrix.a).to.equal(1);
expect(matrix.b).to.equal(0);
expect(matrix.c).to.equal(0);
expect(matrix.d).to.equal(1);
expect(matrix.tx).to.equal(0);
expect(matrix.ty).to.equal(0);
}

View file

@ -33,10 +33,8 @@ function pixi_display_DisplayObject_confirmNew(obj) {
expect(obj).to.have.property('renderable');
expect(obj).to.have.property('stage');
expect(obj).to.have.deep.property('worldTransform.length', 9);
pixi_core_Matrix_confirmNewMat3(obj.worldTransform);
expect(obj).to.have.deep.property('localTransform.length', 9);
pixi_core_Matrix_confirmNewMat3(obj.localTransform);
expect(obj).to.have.deep.property('worldTransform');
pixi_core_Matrix_confirmNewMatrix(obj.worldTransform);
expect(obj).to.have.deep.property('color.length', 0);
expect(obj).to.have.property('dynamic', true);

View file

@ -2,29 +2,17 @@ describe('pixi/core/Matrix', function () {
'use strict';
var expect = chai.expect;
var mat3 = PIXI.mat3;
var mat4 = PIXI.mat4;
var Matrix = PIXI.Matrix;
/*
it('Ensure determineMatrixArrayType works', function () {
expect(Matrix).to.be.a('function');
});
*/
it('mat3 exists', function () {
expect(mat3).to.be.an('object');
it('Ensure determineMatrixArrayType exists', function () {
expect(PIXI.determineMatrixArrayType).to.be.a('function');
});
it('Confirm new mat3 matrix', function () {
var matrix = new mat3.create();
pixi_core_Matrix_confirmNewMat3(matrix);
it('Matrix exists', function () {
expect(PIXI.Matrix).to.be.an('function');
});
it('mat3 exists', function () {
expect(mat4).to.be.an('object');
});
it('Confirm new mat4 matrix', function () {
var matrix = new mat4.create();
pixi_core_Matrix_confirmNewMat4(matrix);
it('Confirm new Matrix', function () {
var matrix = new PIXI.Matrix();
pixi_core_Matrix_confirmNewMatrix(matrix);
});
});

View file

@ -20,7 +20,7 @@ describe('pixi/display/Stage', function () {
expect(obj).to.respondTo('setBackgroundColor');
expect(obj).to.respondTo('getMousePosition');
// FIXME: duplicate member in DisplayObject
pixi_core_Matrix_confirmNewMat3(obj.worldTransform);
pixi_core_Matrix_confirmNewMatrix(obj.worldTransform);
// FIXME: convert arg to bool in constructor
expect(obj).to.have.property('interactive', true);