0.1.47 • Published 3 years ago

thneed-gfx v0.1.47

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

thneed-gfx

A pure JS / Canvas Graphics and GUI lib, for simple apps and 2d games.

getting started

create a new surface, add a single button, draw it

import {COMMAND_ACTION, CanvasSurface, ActionButton} from "thneed-gfx"

let surface = new CanvasSurface(200,200, 1.0);
let button = new ActionButton()
button.set_caption('Greetings Earthling');
button.on(COMMAND_ACTION, () => {
    button.set_caption("you clicked on me")
})
let root = new LayerView()
root.add(button)
surface.set_root(root)
surface.start()

Use surface.start() to start with no repaint strategy. Use surface.start_input() to start with repainting after every key board and mouse event Use surface.start_game() to start with repainting at the default framerate (60fps for browser)

0.1.41

3 years ago

0.1.42

3 years ago

0.1.43

3 years ago

0.1.44

3 years ago

0.1.45

3 years ago

0.1.46

3 years ago

0.1.47

3 years ago

0.1.40

3 years ago

0.1.38

3 years ago

0.1.37

3 years ago

0.1.36

3 years ago

0.1.35

3 years ago

0.1.34

3 years ago

0.1.33

3 years ago

0.1.32

3 years ago

0.1.31

3 years ago

0.1.30

3 years ago

0.1.29

3 years ago

0.1.28

3 years ago

0.1.27

3 years ago

0.1.26

3 years ago

0.1.25

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.22

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago