Skip to content

Commit 2b533d9

Browse files
committed
Renamed file
1 parent c5787cc commit 2b533d9

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ being passed to the simulation. The default value is 1 to remain consistent with
3232
* The RTree library (rbush) used by Phaser 3 suffered from violating CSP policies by dynamically creating Functions at run-time in an eval-like manner. These are now defined via generators. Fix #3441 (thanks @jamierocks @Colbydude)
3333
* BaseSound has had its `rate` and `detune` properties removed as they are always set in the overriding class.
3434
* BaseSound `setRate` and `setDetune` from the 3.3.0 release have moved to the WebAudioSound and HTML5AudioSound classes respectively, as they each handle the values differently.
35+
* The file `InteractiveObject.js` has been renamed to `CreateInteractiveObject.js` to more accurately reflect what it does and to avoid type errors in the docs.
3536

3637

3738

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
55
*/
66

7-
// Phaser.Input.InteractiveObject
8-
97
/**
108
* @callback HitAreaCallback
119
*
@@ -18,7 +16,7 @@
1816
*/
1917

2018
/**
21-
* @typedef {object} InteractiveObject
19+
* @typedef {object} Phaser.Input.InteractiveObject
2220
*
2321
* @property {Phaser.GameObjects.GameObject} gameObject - [description]
2422
* @property {boolean} enabled - [description]
@@ -40,16 +38,16 @@
4038
/**
4139
* [description]
4240
*
43-
* @method Phaser.Input.Pointer#positionToCamera
41+
* @function Phaser.Input.CreateInteractiveObject
4442
* @since 3.0.0
4543
*
4644
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
4745
* @param {*} hitArea - [description]
4846
* @param {HitAreaCallback} hitAreaCallback - [description]
4947
*
50-
* @return {InteractiveObject} [description]
48+
* @return {Phaser.Input.InteractiveObject} [description]
5149
*/
52-
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
50+
var CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)
5351
{
5452
return {
5553

@@ -83,4 +81,4 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
8381
};
8482
};
8583

86-
module.exports = InteractiveObject;
84+
module.exports = CreateInteractiveObject;

src/input/InputPlugin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var DistanceBetween = require('../math/distance/DistanceBetween');
1111
var Ellipse = require('../geom/ellipse/Ellipse');
1212
var EllipseContains = require('../geom/ellipse/Contains');
1313
var EventEmitter = require('eventemitter3');
14-
var InteractiveObject = require('./InteractiveObject');
14+
var CreateInteractiveObject = require('./CreateInteractiveObject');
1515
var PluginManager = require('../boot/PluginManager');
1616
var Rectangle = require('../geom/rectangle/Rectangle');
1717
var RectangleContains = require('../geom/rectangle/Contains');
@@ -23,7 +23,7 @@ var TriangleContains = require('../geom/triangle/Contains');
2323
* [description]
2424
*
2525
* @class InputPlugin
26-
* @extends EventEmitter
26+
* @extends Phaser.Events.EventEmitter
2727
* @memberOf Phaser.Input
2828
* @constructor
2929
* @since 3.0.0
@@ -1075,7 +1075,7 @@ var InputPlugin = new Class({
10751075
{
10761076
var gameObject = gameObjects[i];
10771077

1078-
gameObject.input = InteractiveObject(gameObject, shape, callback);
1078+
gameObject.input = CreateInteractiveObject(gameObject, shape, callback);
10791079

10801080
this.queueForInsertion(gameObject);
10811081
}
@@ -1171,7 +1171,7 @@ var InputPlugin = new Class({
11711171

11721172
if (width !== 0 && height !== 0)
11731173
{
1174-
gameObject.input = InteractiveObject(gameObject, new Rectangle(0, 0, width, height), callback);
1174+
gameObject.input = CreateInteractiveObject(gameObject, new Rectangle(0, 0, width, height), callback);
11751175

11761176
this.queueForInsertion(gameObject);
11771177
}

0 commit comments

Comments
 (0)