angry-pixel 2.0.6 → 2.0.7

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/lib/index.d.ts CHANGED
@@ -1917,14 +1917,16 @@ declare class PolygonCollider implements Collider {
1917
1917
 
1918
1918
  /**
1919
1919
  * The type of the rigid body to create:
1920
- * - Dynamic: This type of body is affected by gravity and velocity.
1921
- * - Static: This type of body is immovable, is unaffected by velocity and gravity.
1920
+ * - **Dynamic:** This type of body is affected by gravity and velocity and can be moved by other rigid bodies.
1921
+ * - **Kinematic:** This type of body is not affected by gravity and cannot be moved by other rigid bodies, but can be velocity applied.
1922
+ * - **Static:** This type of body is immobile, is not affected by velocity or gravity and cannot be moved by other rigid bodies.
1922
1923
  * @category Components
1923
1924
  * @public
1924
1925
  */
1925
1926
  declare enum RigidBodyType {
1926
1927
  Dynamic = 0,
1927
- Static = 1
1928
+ Kinematic = 1,
1929
+ Static = 2
1928
1930
  }
1929
1931
  /**
1930
1932
  * RigidBody configuration options
@@ -1940,6 +1942,14 @@ declare enum RigidBodyType {
1940
1942
  });
1941
1943
  * ```
1942
1944
  * @example
1945
+ * ```js
1946
+ const rigidBody = new RigidBody({
1947
+ rigidBodyType: RigidBodyType.Kinematic,
1948
+ velocity: new Vector2(1, 0),
1949
+ acceleration: new Vector2(1, 0)
1950
+ });
1951
+ * ```
1952
+ * @example
1943
1953
  * ```js
1944
1954
  const rigidBody = new RigidBody({
1945
1955
  rigidBodyType: RigidBodyType.Static,
@@ -1949,32 +1959,36 @@ declare enum RigidBodyType {
1949
1959
  interface RigidBodyOptions {
1950
1960
  /**
1951
1961
  * The type of the rigid body to create:
1952
- * - Dynamic: This type of body is affected by gravity and velocity.
1953
- * - Static: This type of body is immovable, is unaffected by velocity and gravity.
1962
+ * - **Dynamic:** This type of body is affected by gravity and velocity and can be moved by other rigid bodies.
1963
+ * - **Kinematic:** This type of body is not affected by gravity and cannot be moved by other rigid bodies, but can be velocity applied.
1964
+ * - **Static:** This type of body is immobile, is not affected by velocity or gravity and cannot be moved by other rigid bodies.
1954
1965
  * @public
1955
1966
  */
1956
1967
  type: RigidBodyType;
1957
1968
  /**
1958
- * Velocity applied to the x-axis and y-axis expressed in pixels per second. Only for Dynamic bodies
1969
+ * Velocity applied to the x-axis and y-axis expressed in pixels per second. For Dynamic and Kinematic bodies.
1959
1970
  * @public
1960
1971
  */
1961
1972
  velocity: Vector2;
1962
1973
  /**
1963
- * Gravity expressed in pixels per second squared. Only for Dynamic bodies
1974
+ * Gravity expressed in pixels per second squared. Only for Dynamic bodies.
1964
1975
  * @public
1965
1976
  */
1966
1977
  gravity: number;
1967
1978
  /**
1968
- * Acceleration expressed in pixels per second squared. Only for Dynamic bodies
1979
+ * Acceleration expressed in pixels per second squared. For Dynamic and Kinematic bodies.
1969
1980
  * @public
1970
1981
  */
1971
1982
  acceleration: Vector2;
1972
1983
  }
1973
1984
  /**
1974
1985
  * The RigidBody component puts the entity under simulation of the physics engine, where it will interact with other objects that have a RigidBody.\
1975
- * There are two types of bodies:
1976
- * - Dynamic = This type of body is affected by gravity, can be velocity-applied and collides with other rigid bodies.
1977
- * - Static = This type of body is immovable, no velocity can be applied to it and it is not affected by gravity. It is the body type that consumes the least processing resources.
1986
+ * There are three types of bodies:
1987
+ * - **Dynamic:** This type of body is affected by gravity and velocity and can be moved by other rigid bodies.
1988
+ * - **Kinematic:** This type of body is not affected by gravity and cannot be moved by other rigid bodies, but can be velocity applied.\
1989
+ * This type of body consumes less processing resources than the Dynamic.
1990
+ * - **Static:** This type of body is immobile, is not affected by velocity or gravity and cannot be moved by other rigid bodies.\
1991
+ * This is the body type that consumes the least processing resources.
1978
1992
  * @public
1979
1993
  * @category Components
1980
1994
  * @example
@@ -1987,6 +2001,14 @@ interface RigidBodyOptions {
1987
2001
  });
1988
2002
  * ```
1989
2003
  * @example
2004
+ * ```js
2005
+ const rigidBody = new RigidBody({
2006
+ rigidBodyType: RigidBodyType.Kinematic,
2007
+ velocity: new Vector2(1, 0),
2008
+ acceleration: new Vector2(1, 0)
2009
+ });
2010
+ * ```
2011
+ * @example
1990
2012
  * ```js
1991
2013
  const rigidBody = new RigidBody({
1992
2014
  rigidBodyType: RigidBodyType.Static,