phaser/v3/src/math/index.js

73 lines
2.2 KiB
JavaScript
Raw Normal View History

2017-09-22 00:34:30 +00:00
var RND = require('./random-data-generator/RandomDataGenerator');
module.exports = {
2017-09-22 00:34:30 +00:00
// Consts
PI2: Math.PI * 2,
TAU: Math.PI * 0.5,
EPSILON: 1.0e-6,
DEG_TO_RAD: Math.PI / 180,
RAD_TO_DEG: 180 / Math.PI,
// Random Data Generator
RND: new RND(),
// 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'),
Within: require('./Within'),
Wrap: require('./Wrap'),
2017-10-17 20:32:00 +00:00
// Classes
MinMax2: require('./MinMax2'),
MinMax4: require('./MinMax4'),
// 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')
};