This is a Godot Script (GDScript) port of the Robert Penner's equations for easing.

Godot Easing Script

This is a Godot Script (GDScript) (http://www.godotengine.org/) port of the Robert Penner's equations for easing. You can find much more information about it on http://robertpenner.com/easing/.

This library is heavily based off:

#Disclaimer for Robert Penner's Easing Equations license:

TERMS OF USE - EASING EQUATIONS

Open source under the BSD License.

Copyright © 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Usage:

0 print(Easing.Cubic.easeOut(duration / 4.0, startValue, change, duration)) # --> 0.578125 print(Easing.Cubic.easeOut(duration / 2.0, startValue, change, duration)) # --> 0.875 print(Easing.Cubic.easeOut(duration / (3.0/4.0), startValue, change, duration)) # --> 1.037037 print(Easing.Cubic.easeOut(duration, startValue, change, duration)) # --> 1 ">
onready var Easing = preload("easing.gd")

func testEasing():
	var startValue = 0.0
	var endValue = 1.0
	var change = 1.0
	var duration = 1.0

	print(Easing.Cubic.easeOut(0, startValue, change, duration))						# --> 0
	print(Easing.Cubic.easeOut(duration / 4.0, startValue, change, duration))			# --> 0.578125
	print(Easing.Cubic.easeOut(duration / 2.0, startValue, change, duration))			# --> 0.875
	print(Easing.Cubic.easeOut(duration / (3.0/4.0), startValue, change, duration))		# --> 1.037037
	print(Easing.Cubic.easeOut(duration, startValue, change, duration))					# --> 1

All easing functions take these parameters:

  • t = time should go from 0 to duration
  • b = begin value of the property being ease.
  • c = change ending value of the property - beginning value of the property
  • d = duration

Some functions allow additional modifiers, like the elastic functions which also can receive an amplitud and a period parameters (defaults are included)

License

This Godot Script is licensed under the MIT license.

#Author

Owner
impmja
#indiedev #nodejs #angular #react #typescript #vscode | #atheist #humanist
impmja
Similar Resources

A fast port forwarding or reverse forwarding tool over HTTP1.0/HTTP1.1

A fast port forwarding or reverse forwarding tool over HTTP1.0/HTTP1.1

gogw What's gogw ? gogw is a port forwarding/reverse forwarding tool over HTTP implements by golang. port forwarding/port reverse forwarding support T

Sep 27, 2022

rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn (r[everse] conn[ection]) is a multiplatform program for creating reverse connections. It lets you consume services that are behind NAT and/or fi

Jan 1, 2023

Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

Nov 15, 2022

Partial port of Python difflib package to Go

go-difflib THIS PACKAGE IS NO LONGER MAINTAINED. At this point, I have no longer the time nor the interest to work on go-difflib. I apologize for the

Dec 10, 2022

A simple port scanner written in go

Scan27 A simple port scanner written in go Features: V1 it Scans the given Ip or Host name for open ports Usage ./scan27 Enter IP address or Host name

Jul 23, 2022

Yet another TCP Port Scanner, but lightning faster.

Fast TCP Port Scanner A highly concurrent TCP port scanner. Run Tests with Code Coverage (Linux) go test -cover Compile (Linux) go build -v -o fglps R

Jul 23, 2022

Port of HawkAPI's cloudscraper

hawk-go Port of HawkAPI's cloudscraper Everything is exposed to give access to modification, this is subject to change. Installation: go get github.co

Nov 11, 2022

port close check scanner. detects open ports, sends alert with slack.

aite9 (port close check scanner) サーバのポートが空いてないことを確認するポートスキャナー たくさんのサーバを管理していると設定ミスで内部利用ポートが外部に公開されてしまっている可能性があり、それに早く気付くためのチェックツールです。 サーバのリストを標準入力で渡すと

Feb 3, 2022
Comments
  • fixed some math ordering and added support for vector2

    fixed some math ordering and added support for vector2

    This was just what I was looking for. I did run into some issues using it so I took some time to fork and fix them. I am using Godot 3.1.

    I fixed a few of the lines to reorder the math better. the direct compute from lua was not always consistent in gdscript. I also added support for a Vector2 to reduce need to always split the x/y properties.

    Let me know if you have questions.

Related tags
Port-proxy - Temporary expose port for remote connections

Port proxy util Temporary expose port for remote connections. E.g. database/wind

Jan 27, 2022
A pure Unix shell script implementing ACME client protocol

An ACME Shell script: acme.sh An ACME protocol client written purely in Shell (Unix shell) language. Full ACME protocol implementation. Support ACME v

Jan 2, 2023
Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021
Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021

Crawl toàn bộ điểm thi THPTQG-2021 Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021, mình đã crawl sẵn toàn bộ ở đây: https://dri

Jul 18, 2022
Simple script fro DNS upload testing. Written in Go.

BENCH DNS Simple script fro DNS upload testing. Written in Go. Features Using local domain list file with -file argument Download from URL and then us

Dec 6, 2021
Simple installation script for grpc-gateway

Grpc-Gateway-installation Grpc-gateway is a plugin of Google protocol buffer compiler, it reads the definitions from .proto file and generates a rever

Dec 16, 2021
UFW-Autoblacklist - Script that allow you to ban-ip all spammers
UFW-Autoblacklist - Script that allow you to ban-ip all spammers

Setup: go build main.go tcptrack -i <interface> | ./main

Nov 1, 2022
Feb 10, 2022
grobotstxt is a native Go port of Google's robots.txt parser and matcher library.

grobotstxt grobotstxt is a native Go port of Google's robots.txt parser and matcher C++ library. Direct function-for-function conversion/port Preserve

Dec 27, 2022
Simple HTTP tunnel using SSH remote port forwarding

Simple HTTP tunnel using SSH remote port forwarding

Nov 18, 2022