Graphics
package basics
import kotlin.browser.document
import kotlin.js.json
fun main(args: Array<String>) {
val app = PIXI.Application(800, 600, json(
"antialias" to true,
"height" to 600,
"width" to 800
))
document.body!!.appendChild(app.view)
val graphics = PIXI.Graphics()
graphics.beginFill(0xFF3300)
graphics.lineStyle(4, 0xffd900, 1)
graphics.moveTo(50, 50)
graphics.lineTo(250, 50)
graphics.lineTo(100, 100)
graphics.lineTo(50, 50)
graphics.endFill()
graphics.lineStyle(2, 0x0000FF, 1)
graphics.beginFill(0xFF700B, 1)
graphics.drawRect(50, 250, 120, 120)
graphics.lineStyle(2, 0xFF00FF, 1)
graphics.beginFill(0xFF00BB, 0.25)
graphics.drawRoundedRect(150, 450, 300, 100, 15)
graphics.endFill()
graphics.lineStyle(0)
graphics.beginFill(0xFFFF0B, 0.5)
graphics.drawCircle(470, 90, 60)
graphics.endFill()
app.stage.addChild(graphics)
}