Git Product home page Git Product logo

defold-wrap's Introduction

Defold Wrap Library

This tiny library is intended to help you change the way you code on Defold.

Instead of

local node = gui.get_node("my_node")
gui.set_alpha(node, 0.5)
gui.animate(node, "color.w", 1, gui.EASING_LINEAR, 2)
gui.set_enabled(node, true)

Write this

local wrap = require("wrap.wrap")

local node = wrap.node("my_node")
node:set_alpha(0.5):animate("color.w", 1, gui.EASING_LINEAR, 2):set_enabled(true)

You can also get a list of wrapped nodes

local w = wrap.node({ "my_node", title = "text_title", button = gui.get_node("button") })
w.my_node:set_alpha(0.5)
w.title:set_text("Admin")
w.button:set_size(vmath.vector3(100, 50, 0))

Currently, it has all methods working for GUI nodes & GO, besides, it supports some convenient methods you may need it sometimes, like

add_position(...),
get_position_x()
get_position_y()
get_position_z()
set_position_x(...)
set_position_y(...)
set_position_z(...)
add_position_x(...)
add_position_y(...)
add_position_z(...)
...

To use this library, simply add https://github.com/baochungit/defold-wrap/archive/master.zip as a dependency in your game.project file


defold-wrap's People

Contributors

baochungit avatar

Stargazers

Roman Silin avatar  avatar redoak 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.