Published
Edited
Jul 13, 2020
Importers
1 star
Insert cell
md`# Pixi Renderer`
Insert cell
width = 500
Insert cell
height = 500
Insert cell
backgroundColor = 0xEEEEEE
Insert cell
renderer = {
const renderer = new PIXI.Renderer({
antialias: false, // default: false
transparent: false, // default: false
resolution: 1, // default: 1
backgroundColor,
width,
height
});
invalidation.then(() => {
console.log("invalidation Renderer")
renderer.destroy(true, true);
});
return renderer;
}
Insert cell
viewof canvas = {
renderer.render(container)
return html`${renderer.view}`
}
Insert cell
container = {
const container = new PIXI.Container()
invalidation.then(() => {
console.log("invalidation container")
container.destroy(true, true);
});
return container;
}
Insert cell
PIXI = require("https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.2.1/pixi.js").catch(
() => window.PIXI
)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more