Giter VIP home page Giter VIP logo

tela.jl's Introduction

Tela.jl

Creative Coding with the Julia programming language.

Tela.jl is a Julia package inspired by Processing and p5.js, designed to be easy to use for programmers and non programmers (artists, students, etc) to build interactive applications, visualizations, simulations, games and computer generated art.

Warning: this project is in a very early stage and under development.

Installation

Tela is a   Julia Language   package. To install Tela, open Julia's interactive session (known as REPL) and press ] key in the REPL to use the package mode, then type the following command:

pkg> add https://github.com/dylanxyz/Tela.jl

Note that Tela is not yet at the public registry, installation is done directly from this repo.

Quick Example

using Tela

# Use the setting" macro to set common application settings,
# such as the window title, width, height, etc...

setting"title"  = "[Example] Basic"
setting"width"  = 800
setting"height" = 600

# setup will be called once the application is initialized.
setup(::App) = background(rgb(12))

# update will be called every frame.
function update(::App)
    # Check if a particular mouse button is being pressed
    if isdown(mouse"left")
        hue = 360 * (cos/12 * @seconds) + 1)
        fillcolor(hsl(hue, 0.75, 0.65))
        circle(@mouse[x], @mouse[y], 32, :fill)
    end

    isdown(mouse"right") && background(rgb(12))

    # Top header
    fillcolor(rgb(10))
    rect(0, 0, @width, 30, :fill)

    fillcolor(rgb(244))
    textalign(:top, :left)
    fontface("sans")
    text("Hold Mouse Left 🖱️ to draw | Press Mouse Right 🖱️ to clear", 10, 10)
end

# Runs the application.
#
# Basically, this macro will look at the functions you defined and
# add them as callback listeners to specific Tela events, based on
# their name.
#
# So for example, the setup and update functions defined above will
# be added to the setup and update Tela events, respectively.
Tela.@run()

Documentation

In progress...

License

Tela.jl is licensed under the MIT License.

Additional license for assets:

tela.jl's People

Contributors

dylanxyz avatar telavoid 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.