Jump to content

missing something very basic about pixi.js....trying and failing to render a single sprite


Recommended Posts

hi everyone. i am trying to render a single sprite, just to see if i can get this library working so i can then transition a bigger project to using it. i am using webpack. not getting any errors in chrome and really lost on what im doing wrong. heres my code:

import * as PIXI from 'pixi.js'
import { roomSceneManifest } from './image_imports.js'

async function loadAssets (){
  const app = new PIXI.Application()
  await app.init({ width: 800, height: 600 });

  PIXI.Assets.init({manifest: roomSceneManifest})

  const assets = await PIXI.Assets.loadBundle('png');
  const bg = PIXI.Sprite.from(assets.BackgroundImg);
  bg.x = app.screen.width / 2;
  bg.y = app.screen.height / 2;



export const roomSceneManifest =  {


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...