rails-physics 1.2.4 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -36,6 +36,7 @@ export const Rails = {
36
36
  },
37
37
 
38
38
  alignRailBody: function(body) {
39
+ console.log(body, body.deltaTime);
39
40
  if(body.plugin.centre_finder !== undefined) {
40
41
  console.log("sigma");
41
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails-physics",
3
- "version": "1.2.4",
3
+ "version": "1.3.1",
4
4
  "description": "A plugin for the matter-js physics library designed to efficiently simulate objects moving in a one-dimensional space whose projection onto the 2-dimensional space of the screen changes over time",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,7 +25,8 @@
25
25
  "files": [
26
26
  "ranges/segment.js",
27
27
  "ranges/segmenttree.js",
28
- "rails-physics.d.ts"
28
+ "rails-physics.d.ts",
29
+ "sliders/slider.js"
29
30
  ],
30
31
  "directories": {
31
32
  "test": "tests"
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Slider = /** @class */ (function () {
4
+ function Slider(mass, length_below, length_above, air_resistance, static_friction, dynamic_friction, initial_velocity, position) {
5
+ if (initial_velocity === void 0) { initial_velocity = 0; }
6
+ if (position === void 0) { position = 0; }
7
+ this.mass = mass;
8
+ this.length_below = length_below;
9
+ this.length_above = length_above;
10
+ this.density = mass / length;
11
+ this.air_resistance = air_resistance;
12
+ this.velocity = initial_velocity;
13
+ this.static_friction = static_friction;
14
+ this.dynamic_friction = dynamic_friction;
15
+ this.position = position;
16
+ }
17
+ return Slider;
18
+ }());
19
+ exports.default = Slider;