@quenty/acceltween 2.0.0 → 2.0.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/CHANGELOG.md +8 -0
- package/LICENSE.md +1 -1
- package/README.md +5 -3
- package/package.json +2 -2
- package/src/Shared/AccelTween.lua +29 -29
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/acceltween@2.0.0...@quenty/acceltween@2.0.1) (2021-12-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/acceltween
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [2.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/acceltween@1.2.0...@quenty/acceltween@2.0.0) (2021-09-05)
|
|
7
15
|
|
|
8
16
|
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## AccelTween
|
|
2
2
|
<div align="center">
|
|
3
|
-
<a href="http://quenty.github.io/
|
|
4
|
-
<img src="https://
|
|
3
|
+
<a href="http://quenty.github.io/NevermoreEngine/">
|
|
4
|
+
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
|
|
5
5
|
</a>
|
|
6
6
|
<a href="https://discord.gg/mhtGUS8">
|
|
7
|
-
<img src="https://img.shields.io/
|
|
7
|
+
<img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href="https://github.com/Quenty/NevermoreEngine/actions">
|
|
10
10
|
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
|
|
@@ -15,6 +15,8 @@ Provides a means to, with both a continuous position and velocity,
|
|
|
15
15
|
accelerate from its current position to a target position in minimum time
|
|
16
16
|
given a maximum acceleration.
|
|
17
17
|
|
|
18
|
+
<div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/AccelTween">View docs →</a></div>
|
|
19
|
+
|
|
18
20
|
## Installation
|
|
19
21
|
```
|
|
20
22
|
npm install @quenty/acceltween --save
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/acceltween",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "AccelTween implementation for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d146c77d0a8e452824de0ab0b4b03ba0370bcc1b"
|
|
32
32
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
--[[
|
|
2
|
-
class AccelTween
|
|
3
|
-
--@author TreyReynolds/AxisAngles
|
|
4
|
-
|
|
5
|
-
Description:
|
|
1
|
+
--[=[
|
|
6
2
|
Provides a means to, with both a continuous position and velocity,
|
|
7
3
|
accelerate from its current position to a target position in minimum time
|
|
8
4
|
given a maximum acceleration.
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
Author: TreyReynolds/AxisAngles
|
|
7
|
+
|
|
8
|
+
API:
|
|
9
|
+
AccelTween = AccelTween.new(number maxaccel = 1)
|
|
10
|
+
maxaccel is the maximum acceleration applied to reach its target.
|
|
11
|
+
|
|
12
|
+
number AccelTween.p
|
|
13
|
+
Returns the current position.
|
|
14
|
+
number AccelTween.v
|
|
15
|
+
Returns the current velocity.
|
|
16
|
+
number AccelTween.a
|
|
17
|
+
Returns the maximum acceleration.
|
|
18
|
+
number AccelTween.t
|
|
19
|
+
Returns the target position.
|
|
20
|
+
number AccelTween.rtime
|
|
21
|
+
Returns the remaining time before the AccelTween attains the target.
|
|
13
22
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
AccelTween.p = number
|
|
24
|
+
Sets the current position.
|
|
25
|
+
AccelTween.v = number
|
|
26
|
+
Sets the current velocity.
|
|
27
|
+
AccelTween.a = number
|
|
28
|
+
Sets the maximum acceleration.
|
|
29
|
+
AccelTween.t = number
|
|
30
|
+
Sets the target position.
|
|
31
|
+
AccelTween.pt = number
|
|
32
|
+
Sets the current and target position, and sets the velocity to 0.
|
|
24
33
|
|
|
25
|
-
AccelTween
|
|
26
|
-
|
|
27
|
-
AccelTween.v = number
|
|
28
|
-
Sets the current velocity.
|
|
29
|
-
AccelTween.a = number
|
|
30
|
-
Sets the maximum acceleration.
|
|
31
|
-
AccelTween.t = number
|
|
32
|
-
Sets the target position.
|
|
33
|
-
AccelTween.pt = number
|
|
34
|
-
Sets the current and target position, and sets the velocity to 0.
|
|
35
|
-
]]
|
|
34
|
+
@class AccelTween
|
|
35
|
+
]=]
|
|
36
36
|
|
|
37
37
|
local AccelTween = {}
|
|
38
38
|
|