Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the unnecessary "new" operator #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/src/3.24/actions/place on triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function preload ()

function create ()
{
// var triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
// var triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

var group = this.add.group({ key: 'ball', frameQuantity: 64 });

Expand Down
4 changes: 2 additions & 2 deletions public/src/3.24/actions/random triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function create ()
// Create 300 sprites (they all start life at 0x0)
var group = this.add.group({ key: 'orb', frameQuantity: 300 });

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
// var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
// var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

// Randomly position the sprites within the triangle
Phaser.Actions.RandomTriangle(group.getChildren(), triangle);
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/camera/world camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function create ()
rect2 = new Phaser.Geom.Rectangle(1010, 800, 60, 300);
circle1 = new Phaser.Geom.Circle(1200, 200, 160);
circle2 = new Phaser.Geom.Circle(400, 900, 80);
triangle1 = new Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);
triangle1 = Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);

drawScene();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function preload ()

function create ()
{
var tree = new Phaser.Geom.Triangle.BuildEquilateral(0, -250, 400);
var tree = Phaser.Geom.Triangle.BuildEquilateral(0, -250, 400);
var trunk = new Phaser.Geom.Rectangle(0, 0, 80, 140);
var baubles = new Phaser.Geom.Line(0, 0, 170, 60);
var baubles2 = new Phaser.Geom.Line(0, 0, 310, 70);
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/game objects/particle emitter/edge zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function create ()
var shape2 = new Phaser.Geom.Ellipse(0, 0, 500, 150);
var shape3 = new Phaser.Geom.Rectangle(-150, -150, 300, 300);
var shape4 = new Phaser.Geom.Line(-150, -150, 150, 150);
var shape5 = new Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
var shape5 = Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
var shapes = [ shape1, shape2, shape3, shape4, shape5 ];

var i = 0;
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/intersects/rectangle to triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function create ()
{
graphics = this.add.graphics();

triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);

rectangle = new Phaser.Geom.Rectangle(200, 150, 300, 200);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/intersects/triangle to circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function create ()
{
graphics = this.add.graphics();

triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);

circle = new Phaser.Geom.Circle(300, 400, 60);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/intersects/triangle to line.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function create ()
{
graphics = this.add.graphics();

triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
line = new Phaser.Geom.Line(260, 200, 450, 450);

graphics.lineStyle(2, 0x00ff00);
Expand Down
4 changes: 2 additions & 2 deletions public/src/3.24/geom/intersects/triangle to triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function create ()
{
graphics = this.add.graphics();

// triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);
triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 320, 40);
// triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 320, 40);

triangleB = new Phaser.Geom.Triangle(400, 200, 300, 300, 500, 300);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/bottom.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics();

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 400, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 400, 200);

graphics.lineStyle(2, 0x00aa00);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/build equilateral.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics({ lineStyle: { width: 2, color: 0x00ff00 } });

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);

graphics.strokeTriangleShape(triangle);
}
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/build from polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function create ()

var poly = [0,0, 400,0, 400,400, 0,400]; // rectangle

var triangles = new Phaser.Geom.Triangle.BuildFromPolygon(poly);
var triangles = Phaser.Geom.Triangle.BuildFromPolygon(poly);

for (var i = 0; i < triangles.length; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/build right.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics({ lineStyle: { width: 2, color: 0x00ff00 } });

var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

graphics.strokeTriangleShape(triangle);
}
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 4, color: 0xaaaa00, alpha: 0.6 } });

triangle = new Phaser.Geom.Triangle.BuildEquilateral(200, 50, 200);
triangle = Phaser.Geom.Triangle.BuildEquilateral(200, 50, 200);

triangles = [];
}
Expand Down
6 changes: 3 additions & 3 deletions public/src/3.24/geom/triangle/contains array.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function create ()
{
var graphics = this.add.graphics({ fillStyle: { color: 0xaaaa00 } });

var triangle1 = new Phaser.Geom.Triangle.BuildEquilateral(400, 25, 300);
var triangle2 = new Phaser.Geom.Triangle.BuildEquilateral(250, 285, 300);
var triangle3 = new Phaser.Geom.Triangle.BuildEquilateral(550, 285, 300);
var triangle1 = Phaser.Geom.Triangle.BuildEquilateral(400, 25, 300);
var triangle2 = Phaser.Geom.Triangle.BuildEquilateral(250, 285, 300);
var triangle3 = Phaser.Geom.Triangle.BuildEquilateral(550, 285, 300);

var circle = new Phaser.Geom.Circle(400, 300, 20);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/contains.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 2, color: 0xaaaa00 } });

triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 25, 450);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 25, 450);
}

function update ()
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/copy from.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 3, color: 0xaaaa00 } });

pointerTriangle = new Phaser.Geom.Triangle.BuildEquilateral(100, 100, 150);
pointerTriangle = Phaser.Geom.Triangle.BuildEquilateral(100, 100, 150);

triangles = [];

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/decompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 2, color: 0xaaaa00 } });

triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 25, 300);
triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 25, 300);

var points = Phaser.Geom.Triangle.Decompose(triangle);

Expand Down
4 changes: 2 additions & 2 deletions public/src/3.24/geom/triangle/get point.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 2, color: 0x00ff00 }, fillStyle: { color: 0xff0000 }});

// triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);
// triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);

// triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
// triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

// Random
var x1 = Phaser.Math.Between(50, 400);
Expand Down
4 changes: 2 additions & 2 deletions public/src/3.24/geom/triangle/get points.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function create ()
{
var graphics = this.add.graphics({ lineStyle: { width: 1, color: 0x00ff00 }, fillStyle: { color: 0xffff00 }});

// triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);
// triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);

// triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
// triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

// Random
var x1 = Phaser.Math.Between(50, 400);
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/left.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics();

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(200, 200, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(200, 200, 200);

graphics.lineStyle(2, 0x00aa00);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/random.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics({ lineStyle: { width: 2, color: 0x00ff00 }, fillStyle: { color: 0xffff00 } });

var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

graphics.strokeTriangleShape(triangle);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/right.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics();

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(200, 200, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(200, 200, 200);

graphics.lineStyle(2, 0x00aa00);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/rotate around xy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 2, color: 0xaaaa00 }, fillStyle: { color: 0x0000aa } });

triangle = new Phaser.Geom.Triangle.BuildRight(200, 360, 200, 200);
triangle = Phaser.Geom.Triangle.BuildRight(200, 360, 200, 200);
}

function update ()
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/rotate from center.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function create ()
{
graphics = this.add.graphics({ lineStyle: { width: 2, color: 0xaaaa00 } });

triangle = new Phaser.Geom.Triangle.BuildRight(300, 360, 300, 300);
triangle = Phaser.Geom.Triangle.BuildRight(300, 360, 300, 300);
}

function update ()
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/geom/triangle/top.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function create ()
{
var graphics = this.add.graphics();

var triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 30, 200);
var triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 30, 200);

graphics.lineStyle(2, 0x00aa00);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/input/camera/graphics contains.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function create ()
rect2 = new Phaser.Geom.Rectangle(1010, 800, 60, 300);
circle1 = new Phaser.Geom.Circle(1200, 200, 160);
circle2 = new Phaser.Geom.Circle(400, 900, 80);
triangle1 = new Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);
triangle1 = Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);

drawScene();

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/input/game object/debug hitarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function create ()

var sprite5 = this.add.sprite(850, 350, 'ship').setScale(8);

sprite5.setInteractive(new Phaser.Geom.Triangle.BuildEquilateral(sprite5.displayOriginX, 0, 32), Phaser.Geom.Triangle.Contains);
sprite5.setInteractive(Phaser.Geom.Triangle.BuildEquilateral(sprite5.displayOriginX, 0, 32), Phaser.Geom.Triangle.Contains);

// Specify a different debug outline color
this.input.enableDebug(sprite1, 0xff00ff);
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/input/mouse/shape hit tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function create ()

var sprite5 = this.add.sprite(850, 350, 'ship').setScale(8);

sprite5.setInteractive(new Phaser.Geom.Triangle.BuildEquilateral(16, 0, 30), Phaser.Geom.Triangle.Contains);
sprite5.setInteractive(Phaser.Geom.Triangle.BuildEquilateral(16, 0, 30), Phaser.Geom.Triangle.Contains);

// Input Event listeners

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.24/input/mouse/triangle hit area.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function create ()
{
var sprite = this.add.sprite(400, 300, 'ship').setScale(8);

var shape = new Phaser.Geom.Triangle.BuildEquilateral(16, 0, 30);
var shape = Phaser.Geom.Triangle.BuildEquilateral(16, 0, 30);

sprite.setInteractive(shape, Phaser.Geom.Triangle.Contains);

Expand Down
4 changes: 2 additions & 2 deletions public/src/3.24/tweens/shape morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function create ()
var balls = this.add.group({ key: 'ball', repeat: 59 });

var circle = new Phaser.Geom.Circle(400, 300, 160);
var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
var rect = new Phaser.Geom.Rectangle(200, 150, 400, 300);
var ellipse = new Phaser.Geom.Ellipse(400, 300, 200, 500);
var triangle2 = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);
var triangle2 = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 300);

// Store the position data for each shape:
Phaser.Actions.PlaceOnCircle(balls.getChildren(), circle);
Expand Down
4 changes: 2 additions & 2 deletions public/src/3.60/actions/place on triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ class Example extends Phaser.Scene

create ()
{
const triangle1 = new Phaser.Geom.Triangle.BuildEquilateral(200, 90, 280);
const triangle1 = Phaser.Geom.Triangle.BuildEquilateral(200, 90, 280);

const group1 = this.add.group({ key: 'ball', frameQuantity: 64 });

Phaser.Actions.PlaceOnTriangle(group1.getChildren(), triangle1);

const triangle2 = new Phaser.Geom.Triangle.BuildRight(400, 500, 300, 200);
const triangle2 = Phaser.Geom.Triangle.BuildRight(400, 500, 300, 200);

const group2 = this.add.group({ key: 'ball', frameQuantity: 64 });

Expand Down
4 changes: 2 additions & 2 deletions public/src/3.60/actions/random triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class Example extends Phaser.Scene
// Create 300 sprites (they all start life at 0x0)
const group = this.add.group({ key: 'orb', frameQuantity: 300 });

const triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
// var triangle = new Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);
const triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 100, 380);
// var triangle = Phaser.Geom.Triangle.BuildRight(200, 400, 300, 200);

// Randomly position the sprites within the triangle
Phaser.Actions.RandomTriangle(group.getChildren(), triangle);
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.60/camera/world camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Example extends Phaser.Scene
this.rect2 = new Phaser.Geom.Rectangle(1010, 800, 60, 300);
this.circle1 = new Phaser.Geom.Circle(1200, 200, 160);
this.circle2 = new Phaser.Geom.Circle(400, 900, 80);
this.triangle1 = new Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);
this.triangle1 = Phaser.Geom.Triangle.BuildEquilateral(800, 500, 200);

this.drawScene();
for (let i = 0; i < 32; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Example extends Phaser.Scene

create ()
{
const tree = new Phaser.Geom.Triangle.BuildEquilateral(0, -250, 400);
const tree = Phaser.Geom.Triangle.BuildEquilateral(0, -250, 400);
const trunk = new Phaser.Geom.Rectangle(0, 0, 80, 140);
const baubles = new Phaser.Geom.Line(0, 0, 170, 60);
const baubles2 = new Phaser.Geom.Line(0, 0, 310, 70);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Example extends Phaser.Scene
const shape2 = new Phaser.Geom.Ellipse(0, 0, 500, 150);
const shape3 = new Phaser.Geom.Rectangle(-150, -150, 300, 300);
const shape4 = new Phaser.Geom.Line(-150, -150, 150, 150);
const shape5 = new Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
const shape5 = Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
const shapes = [ shape1, shape2, shape3, shape4, shape5 ];

let i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Example extends Phaser.Scene
const shape2 = new Phaser.Geom.Ellipse(0, 0, 500, 150);
const shape3 = new Phaser.Geom.Rectangle(-150, -150, 300, 300);
const shape4 = new Phaser.Geom.Line(-150, -150, 150, 150);
const shape5 = new Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
const shape5 = Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);

const emitter = this.add.particles(400, 300, 'flares', {
frame: { frames: [ 'red', 'green', 'blue', 'white', 'yellow' ], cycle: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Example extends Phaser.Scene
const shape2 = new Phaser.Geom.Ellipse(0, 0, 500, 150);
const shape3 = new Phaser.Geom.Rectangle(-150, -150, 300, 300);
const shape4 = new Phaser.Geom.Line(-150, -150, 150, 150);
const shape5 = new Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);
const shape5 = Phaser.Geom.Triangle.BuildEquilateral(0, -140, 300);

const emitter = this.add.particles(400, 300, 'flares', {
frame: { frames: [ 'red', 'green', 'blue' ], cycle: true },
Expand Down
2 changes: 1 addition & 1 deletion public/src/3.60/geom/intersects/rectangle to triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Example extends Phaser.Scene
{
this.graphics = this.add.graphics();

this.triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);
this.triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 320, 140);

this.rectangle = new Phaser.Geom.Rectangle(200, 150, 300, 200);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.60/geom/intersects/triangle to circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Example extends Phaser.Scene
{
this.graphics = this.add.graphics();

this.triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
this.triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);

this.circle = new Phaser.Geom.Circle(300, 400, 60);

Expand Down
2 changes: 1 addition & 1 deletion public/src/3.60/geom/intersects/triangle to line.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Example extends Phaser.Scene
{
this.graphics = this.add.graphics();

this.triangle = new Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
this.triangle = Phaser.Geom.Triangle.BuildEquilateral(400, 200, 200);
this.line = new Phaser.Geom.Line(260, 200, 450, 450);

this.graphics.lineStyle(2, 0x00ff00);
Expand Down
Loading