diff --git a/test/core/Plane.js b/test/core/Plane.js index ab2f460..9c428d3 100644 --- a/test/core/Plane.js +++ b/test/core/Plane.js @@ -22,4 +22,25 @@ expect(plane.verticesX).to.equal(100); expect(plane.verticesY).to.equal(100); }); + + describe('containsPoint', function () + { + it('should return true when point inside', function () + { + const point = new PIXI.Point(10, 10); + const texture = new PIXI.RenderTexture.create(20, 30); + const plane = new PIXI.mesh.Plane(texture, 100, 100); + + expect(plane.containsPoint(point)).to.be.true; + }); + + it('should return false when point outside', function () + { + const point = new PIXI.Point(100, 100); + const texture = new PIXI.RenderTexture.create(20, 30); + const plane = new PIXI.mesh.Plane(texture, 100, 100); + + expect(plane.containsPoint(point)).to.be.false; + }); + }); });