Fix tests.
This commit is contained in:
parent
d32dc8485a
commit
46ef2c7a93
@ -110,7 +110,7 @@ describe ('Model Finalization', function() {
|
|||||||
var model = new OV.Model ();
|
var model = new OV.Model ();
|
||||||
var meshIndex = model.AddMesh (mesh);
|
var meshIndex = model.AddMesh (mesh);
|
||||||
assert.strictEqual (model.MaterialCount (), 0);
|
assert.strictEqual (model.MaterialCount (), 0);
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
assert.strictEqual (model.MaterialCount (), 1);
|
assert.strictEqual (model.MaterialCount (), 1);
|
||||||
var theMesh = model.GetMesh (meshIndex);
|
var theMesh = model.GetMesh (meshIndex);
|
||||||
assert.strictEqual (theMesh.NormalCount (), 1);
|
assert.strictEqual (theMesh.NormalCount (), 1);
|
||||||
@ -139,7 +139,7 @@ describe ('Model Finalization', function() {
|
|||||||
var model = new OV.Model ()
|
var model = new OV.Model ()
|
||||||
var meshIndex = model.AddMesh (mesh);
|
var meshIndex = model.AddMesh (mesh);
|
||||||
|
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
|
|
||||||
var theMesh = model.GetMesh (meshIndex);
|
var theMesh = model.GetMesh (meshIndex);
|
||||||
assert.strictEqual (theMesh.NormalCount (), 6);
|
assert.strictEqual (theMesh.NormalCount (), 6);
|
||||||
@ -172,7 +172,7 @@ describe ('Model Finalization', function() {
|
|||||||
var model = new OV.Model ()
|
var model = new OV.Model ()
|
||||||
var meshIndex = model.AddMesh (mesh);
|
var meshIndex = model.AddMesh (mesh);
|
||||||
|
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
|
|
||||||
var theMesh = model.GetMesh (meshIndex);
|
var theMesh = model.GetMesh (meshIndex);
|
||||||
assert.strictEqual (theMesh.NormalCount (), 9);
|
assert.strictEqual (theMesh.NormalCount (), 9);
|
||||||
|
|||||||
@ -148,7 +148,7 @@ module.exports =
|
|||||||
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
||||||
model.AddMesh (cube2);
|
model.AddMesh (cube2);
|
||||||
|
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
return model;
|
return model;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -163,11 +163,10 @@ module.exports =
|
|||||||
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
||||||
model.AddMesh (cube2);
|
model.AddMesh (cube2);
|
||||||
|
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
return model;
|
return model;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
GetTwoCubesConnectingInOneFaceModel ()
|
GetTwoCubesConnectingInOneFaceModel ()
|
||||||
{
|
{
|
||||||
let model = new OV.Model ();
|
let model = new OV.Model ();
|
||||||
@ -179,7 +178,7 @@ module.exports =
|
|||||||
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
|
||||||
model.AddMesh (cube2);
|
model.AddMesh (cube2);
|
||||||
|
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
return model;
|
return model;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -228,7 +227,7 @@ module.exports =
|
|||||||
{
|
{
|
||||||
var model = new OV.Model ();
|
var model = new OV.Model ();
|
||||||
model.AddMesh (mesh);
|
model.AddMesh (mesh);
|
||||||
OV.FinalizeModel (model, function () { new OV.Material () });
|
OV.FinalizeModel (model, function () { return new OV.Material () });
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user