All Projects → Reselim → Flipper

Reselim / Flipper

Licence: MIT License
A motion library for Roblox

Programming Languages

lua
6591 projects
CSS
56736 projects

Projects that are alternatives of or similar to Flipper

Stitch
A Roblox ECS - with an emphasis on simplicity and extendability
Stars: ✭ 16 (-80%)
Mutual labels:  roblox
t
A Runtime Typechecker for Roblox
Stars: ✭ 115 (+43.75%)
Mutual labels:  roblox
Chrome
This is the source of the Roblox+ Google Chrome extension!
Stars: ✭ 27 (-66.25%)
Mutual labels:  roblox
Axon
Unrestricted Lua Execution
Stars: ✭ 59 (-26.25%)
Mutual labels:  roblox
ex ray
An Elixir OpenTracing library based on Otter
Stars: ✭ 56 (-30%)
Mutual labels:  otter
roblox-requests
The simple, elegant way to send HTTP requests in Roblox.
Stars: ✭ 26 (-67.5%)
Mutual labels:  roblox
Rostar
Dead simple fully managed Rojo helper for Roblox projects
Stars: ✭ 26 (-67.5%)
Mutual labels:  roblox
matter
A modern ECS library for Roblox.
Stars: ✭ 39 (-51.25%)
Mutual labels:  roblox
Rboxlo
Roblox private server
Stars: ✭ 173 (+116.25%)
Mutual labels:  roblox
vscode-rojo
Visual Studio Code plugin for Rojo
Stars: ✭ 21 (-73.75%)
Mutual labels:  roblox
Otter-Iron
A TS100 USB-PD replacement PCB.
Stars: ✭ 444 (+455%)
Mutual labels:  otter
RbxRefresh
Syncs a local file structure to ROBLOX Studio.
Stars: ✭ 18 (-77.5%)
Mutual labels:  roblox
alfred-otter
Alfred workflow for searching and retrieving transcripts from Otter.ai
Stars: ✭ 20 (-75%)
Mutual labels:  otter
rbxlx-to-rojo
Tool to one time convert Roblox places to Rojo projects
Stars: ✭ 98 (+22.5%)
Mutual labels:  roblox
Aurora
(Deprecated) Aurora is a library that can manage status effects (known as "Auras") in your Roblox game.
Stars: ✭ 23 (-71.25%)
Mutual labels:  roblox
prefabs
Roblox plugin for making reuseable assets and keeping them in sync across your game
Stars: ✭ 16 (-80%)
Mutual labels:  roblox
tarmac
Command line tool to manage Roblox assets
Stars: ✭ 73 (-8.75%)
Mutual labels:  roblox
MockDataStoreService
Emulation of Roblox's DataStoreService for seamless offline development & testing
Stars: ✭ 39 (-51.25%)
Mutual labels:  roblox
Adonis
Roblox Server Administration System
Stars: ✭ 134 (+67.5%)
Mutual labels:  roblox
Pyblox
An API wrapper for Roblox written in Python. (Receives Updates)
Stars: ✭ 30 (-62.5%)
Mutual labels:  roblox


Flipper is an animation library for Roblox based around Motors and Goals.

Installation

Rojo

0.6.x+

Add this repository as a submodule into your packages directory. This example assumes the directory is packages.

git submodule add https://github.com/Reselim/Flipper packages/Flipper

0.5.x

Copy the src folder from this repository into your packages directory.

npm (for roblox-ts)

Install the @rbxts/flipper package using npm or yarn.

npm i @rbxts/flipper

Without Rojo

Download the latest .rbxm file from the releases page and drag it into studio.

Usage

With Roact

This example creates a button that shrinks when pressed.

local Example = Roact.Component:extend("Example")

function Example:init()
	self.motor = Flipper.SingleMotor.new(0)

	local binding, setBinding = Roact.createBinding(self.motor:getValue())
	self.binding = binding

	self.motor:onStep(setBinding)
end

function Example:render()
	return Roact.createElement("ImageButton", {
		Size = self.binding:map(function(value)
			return UDim2.new(0, 100, 0, 100):Lerp(UDim2.new(0, 80, 0, 80), value)
		end),
		Position = UDim2.new(0.5, 0, 0.5, 0),
		AnchorPoint = Vector2.new(0.5, 0.5),

		[Roact.Event.MouseButton1Down] = function()
			self.motor:setGoal(Flipper.Spring.new(1, {
				frequency = 5,
				dampingRatio = 1
			}))
		end,

		[Roact.Event.MouseButton1Up] = function()
			self.motor:setGoal(Flipper.Spring.new(0, {
				frequency = 4,
				dampingRatio = 0.75
			}))
		end
	})
end

return Example

Flipper works wonderfully with Roact on its own, but if you plan on using it for a lot of your components, roact-flipper will make that much easier.

Without Roact

Check out the demo script in the test project!

License

Flipper is licensed in full under the MIT license. Note that it contains code from another author, which is also under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].