phaser/src/math/index.js

73 lines
2.1 KiB
JavaScript
Raw Normal View History

2018-02-07 21:58:23 +00:00
var CONST = require('./const');
var Extend = require('../utils/object/Extend');
2017-09-22 00:34:30 +00:00
2018-01-31 13:54:44 +00:00
/**
* @namespace Phaser.Math
*/
2018-02-07 21:58:23 +00:00
var PhaserMath = {
2017-09-22 00:34:30 +00:00
// Collections of functions
Angle: require('./angle/'),
Distance: require('./distance/'),
Easing: require('./easing/'),
Fuzzy: require('./fuzzy/'),
Interpolation: require('./interpolation/'),
Pow2: require('./pow2/'),
Snap: require('./snap/'),
// Single functions
Average: require('./Average'),
Bernstein: require('./Bernstein'),
Between: require('./Between'),
CatmullRom: require('./CatmullRom'),
CeilTo: require('./CeilTo'),
Clamp: require('./Clamp'),
DegToRad: require('./DegToRad'),
Difference: require('./Difference'),
Factorial: require('./Factorial'),
FloatBetween: require('./FloatBetween'),
FloorTo: require('./FloorTo'),
2017-10-17 20:32:00 +00:00
FromPercent: require('./FromPercent'),
GetSpeed: require('./GetSpeed'),
2017-06-27 22:23:09 +00:00
IsEven: require('./IsEven'),
IsEvenStrict: require('./IsEvenStrict'),
Linear: require('./Linear'),
MaxAdd: require('./MaxAdd'),
MinSub: require('./MinSub'),
Percent: require('./Percent'),
RadToDeg: require('./RadToDeg'),
RandomXY: require('./RandomXY'),
RandomXYZ: require('./RandomXYZ'),
RandomXYZW: require('./RandomXYZW'),
Rotate: require('./Rotate'),
RotateAround: require('./RotateAround'),
RotateAroundDistance: require('./RotateAroundDistance'),
RoundAwayFromZero: require('./RoundAwayFromZero'),
RoundTo: require('./RoundTo'),
SinCosTableGenerator: require('./SinCosTableGenerator'),
SmootherStep: require('./SmootherStep'),
SmoothStep: require('./SmoothStep'),
2018-01-04 15:21:15 +00:00
TransformXY: require('./TransformXY'),
Within: require('./Within'),
Wrap: require('./Wrap'),
// Vector classes
Vector2: require('./Vector2'),
Vector3: require('./Vector3'),
Vector4: require('./Vector4'),
Matrix3: require('./Matrix3'),
Matrix4: require('./Matrix4'),
2017-09-16 01:31:33 +00:00
Quaternion: require('./Quaternion'),
RotateVec3: require('./RotateVec3')
};
2018-02-07 21:58:23 +00:00
// Merge in the consts
PhaserMath = Extend(false, PhaserMath, CONST);
// Export it
module.exports = PhaserMath;