Liking cljdoc? Tell your friends :D

infinitelives.pixi.canvas

Functions for building and manipulating the canvas DOM element

Functions for building and manipulating the canvas DOM element
raw docstring

add!cljs

(add! canvas)
(add! key canvas)
source

add-fullscreen-button!cljs

(add-fullscreen-button! {:keys [fullscreen-fn]})
source

canvas-storecljs

source

getcljs

(get)
(get key)
source

initcljs

(init opts)

Initialise the canvas element. Pass in optional keys

:background background colour (default 0x000000) :expand if true makes the canvas take the entire window :engine can be :webgl :canvas or :auto (default :auto) :layers A list of keywords to refer to layers, from bottom to top :origins A mapping of layer names to their origin positions. Default position is center. Positions can be :center :top :bottom :left :right :top-left :top-right :bottom-left :bottom-right

and either:

:canvas a DOM element to use as the canvas

or:

:x x position for the new canvas :y y position for the new canvas :width width of new canvas :height height of new canvas

Initialise the canvas element. Pass in optional keys

:background    background colour (default 0x000000)
:expand        if true makes the canvas take the entire window
:engine        can be :webgl :canvas or :auto (default :auto)
:layers        A list of keywords to refer to layers, from bottom to top
:origins       A mapping of layer names to their origin positions. Default
               position is center. Positions can be :center :top :bottom
               :left :right :top-left :top-right :bottom-left :bottom-right

and either:

:canvas        a DOM element to use as the canvas

or:

:x             x position for the new canvas
:y             y position for the new canvas
:width         width of new canvas
:height        height of new canvas
sourceraw docstring

makecljs

(make {:keys [expand x y width height canvas engine background]
       :or {expand false
            x 0
            y 0
            width 800
            height 600
            background 5242880
            engine :auto}})

make a new pixi canvas, or initialise pixi with an existing canvas.

Pass in...

:expand if true makes the canvas take the entire window :engine can be :webgl :canvas or :auto (default :auto)

and either:

:canvas a DOM element to use as the canvas

or:

:x x position for the new canvas :y y position for the new canvas :width width of new canvas :height height of new canvas

make a new pixi canvas, or initialise pixi with an existing canvas.

Pass in...

:expand        if true makes the canvas take the entire window
:engine        can be :webgl :canvas or :auto (default :auto)

and either:

:canvas        a DOM element to use as the canvas

or:

:x             x position for the new canvas
:y             y position for the new canvas
:width         width of new canvas
:height        height of new canvas
sourceraw docstring

make-stagecljs

(make-stage {:keys [layers origins]
             :or {layers [:backdrop :below :world :above :ui :effect]
                  origins {}}})

Layout the stage structure

Layout the stage structure
sourceraw docstring

remove!cljs

(remove! key)
source

rendercljs

(render)
source

set-default-once!cljs

(set-default-once! canvas)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close