vihanagarwal

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Sprite not rendering when I add it's image texture to a folder

    I fixed it. For some reason changing "/resources/..." to "resources/..." made it work. I'm quite confused why
  2. I am having a really weird issue. I am creating a sprite from an image as follows: var grid1_texture = new PIXI.Texture.fromImage("whiteSquare.jpg"); Now this works fine and I am able to add this to the stage. I basically want to add all my images to a folder called resources. So I changed the code to this: var grid1_texture = new PIXI.Texture.fromImage("/resources/whiteSquare.jpg"); When I do this, I can see in Brackets editor that the link is being made however, the sprites do not get rendered on the stage. Please help!
  3. I have a dictionary of sprites displayed on the screen. I am trying to remove the sprite that the user clicks on. To do this I am trying to get the location of the mouse click, and get the sprite at that location. Is there a function to get a sprite on a stage based on location?
  4. I am a student currently working on a simple Picture Reveal Game. The way it works is this: A picture is hidden behind a grid of squares. Each time you click on a square a trivia question pops up and if you answer it correctly part of that picture is revealed, if not, you lose points. The aim is to guess the picture. We will use an online API for the questions. That being said here are my concerns: I understand PixiJS is only a rendered with capabilities of taking input. Will pixiJS be sufficient for the game I am planning to build? I will need some sort of database that holds a collection of images (as I do not want to use Flickr API), and will also need to keep a track of the state of the game. Will PixiJS and regular JS be enough for this task? Or do I need another library as well?