Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Advanced Spring lets you create spring class for every major Roblox & Luau datatype

License

NotificationsYou must be signed in to change notification settings

DervexDev/AdvancedSpring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Spring lets you create spring class for every major Roblox & Luau datatype

About

Supported datatypes:boolean,number,BrickColor,CFrame,Color3,ColorSequence,NumberRange,NumberSequence,Rect,UDim,UDim2,Vector2,Vector3. You can setinitial position,damping ratio andfrequency when creating new spring instance or by creating config file or by changingDEFAULT_SETTINGS.

API Usage

localSpring=require(path.to.this.module)-- Creates new spring class with optional initial position and settingslocalspring=Spring.new(Vector3.new())-- Sets new spring goalspring:Set(Vector3.new(4,2,0))-- Updates spring by delta secondsspring:Step(delta)-- Returns current spring positionpart.Position=spring:Get()-- Sets new goal, updates spring and returns current positionpart.Position=spring:All(Vector3.new(4,2,0),delta)

Limitations

  • CFrame - only position is supported (it may change in the future)
  • ColorSequence & NumberSequence - only first and last keypoints are supported

Credits

Part of this code was written by @Fraktality

About

Advanced Spring lets you create spring class for every major Roblox & Luau datatype

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp