Functions for building and manipulating the canvas DOM element
Functions for building and manipulating the canvas DOM element
(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
(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
(make-stage {:keys [layers origins]
:or {layers [:backdrop :below :world :above :ui :effect]
origins {}}})
Layout the stage structure
Layout the stage structure
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close