const PIXI = require("pixi.js")

// const App = new PIXI.Application();

// // The application will create a canvas element for you that you
// // can then insert into the DOM
// document.body.appendChild(App.view);

// // load the texture we need
// PIXI.loader.add('bunny', '/ui-assets/images/adore/miniheart-click.png').load((loader, resources) => {
//     // This creates a texture from a 'bunny.png' image
//     const bunny = new PIXI.Sprite(resources.bunny.texture);

//     // Setup the position of the bunny
//     bunny.x = App.renderer.width / 2;
//     bunny.y = App.renderer.height / 2;

//     // Rotate around the center
//     bunny.anchor.x = 0.5;
//     bunny.anchor.y = 0.5;

//     // Add the bunny to the scene we are building
//     App.stage.addChild(bunny);

//     // Listen for frame updates
//     App.ticker.add(() => {
//          // each frame we spin the bunny around a bit
//         bunny.rotation += 0.01;
//     });
// });

// Create the application
const App = new PIXI.Application()

// Add the view to the DOM

const whatEverDOM = document.getElementById("whatever")
if (!whatEverDOM) {
  console.log("???")
} else {
  whatEverDOM.appendChild(App.view)
}

// ex, add display objects
App.stage.addChild(PIXI.Sprite.fromImage("something.png"))

export default App
