Coder Social home page Coder Social logo

forward's Introduction

๐Ÿƒ๐Ÿป Forward

TD movement library, specially created for MelonBytes Studio

Install

sumer9999dev/[email protected]

Credits

SUMER (@sumer_real) - developing this library

ecurtiss (@ecurtiss) - for creating CatRom library

Documentation

Create path:

-- Forward.Path(effect, alpha, tension, ...points)
local path = Forward.Path(
    render_stepped_effect, 0.5, 0.6,
    {
        Vector3.new(100, 10, 100),
        Vector3.new(110, 10, 150),
        Vector3.new(120, 10, 200)
    },
    workspace.point_4,
    {
        workspace.point_5,
        workspace.point_6
    }
)

Create effect for path:

local function render_stepped_effect(callback)
    local connection = game:GetService('RunService').RenderStepped:Connect(callback)

    return function() connection:Disconnect() end
end

Start path:

path:start()

Stop path:

path:stop()

Solve cframe at point:

path:solve_cframe(0.1)

Walker:

local walker = path:walker(10)  -- 10 is start speed

walker.speed = 15  -- you can edit speed in runtime

walker:on_update(function(point: CFrame)
    print(point.Position)
end)

walker:on_reached(function()
    print('reached')
end)

path:remove_walker(walker)  -- also you can remove walker

forward's People

Contributors

sumer9999dev avatar

Stargazers

 avatar jien avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.