Jump to content

Search the Community

Showing results for tags 'javascirpt'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. I am trying to load a sprite sheet for PIXI js. I have a png and json file in one folder, I am pretty sure there are fine on their own. But I can't get it to load. got this from http://pixijs.download/release/docs/PIXI.Spritesheet.html ... PIXI.Loader.shared.add("spritesheet.json").load(this.setup()); ... ... this.sheet = PIXI.Loader.shared.resources["spritesheet.json"].spritesheet; console.log(this.sheet) ... the log will say that the sheet is undefined. I think it either doesn't find the json or png file. Probably neither. I'm not sure what path "spritesheet.json" should be, relative to this file it woulde be "../assets/spritesheet.json". But that also fails. This is my webpack config: const path = require("path"); module.exports = { mode: "development", devtool: "eval-cheap-source-map", entry: "./app/index.js", output: { filename: "bundle.js", path: path.resolve(__dirname, "client"), }, module: { rules: [ { test: /\.(png|svg|jpg|jpeg|gif)$/i, loader: "file-loader", options: { name: '[name].[ext]', }, }, ], }, }; And this is how the bundle looks. spritesheet.png is loaded when I put it as an <img> in the html. So I know it is being received by the client. I also get this if I console.log(this.sheet) with this.sheet = PIXI.Loader.shared.resources["spritesheet.json"]; Looks like it can't find the json file either. So I guess my question is, what are the paths of the json and png file?
  2. Hi Everyone, So I'm attempting to learn Javascript as well as can be expected, and I'm considering what are the absolute best assets where I could learn it? Books, sites whatever you folks figure its the most ideal approach to learn without anyone else please I am truly getting a charge out of learning and I might want to seek after this as a lifelong one day.
×
×
  • Create New...