madhurakhal

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hi I am working in one of the HTML5 app and trying to learn PIXI.js. While using .JPG Image every things works fine but not shown in the state. The same code shows other images in other format like .jpeg and .png Is there any thing i have to do to render the image Here is the code. 'use strict';/// <reference path="../typings/tsd.d.ts" />/*global $, PPT, Circle, Cross, CircleCross*/(function() { let Container = PIXI.Container, autoDetectRenderer = PIXI.autoDetectRenderer, loader = PIXI.loader, resources = PIXI.loader.resources, Sprite = PIXI.Sprite; let currentImageIndex = 0; let renderer = autoDetectRenderer(938, 800); let stage = new Container(); renderer.render(stage); document.getElementById('workspace-holder').appendChild(renderer.view); let runApp = () => { renderer.render(stage); requestAnimationFrame(runApp); } let setup = () => { let img = new Sprite(resources["assets/images/6.JPG"].texture); img.x = 0; img.y = 0; stage.addChild(img); renderer.render(stage); runApp(); }; let handleImageLoadingProgress = (loader, resources) => { // handle resources progress here } $(function() { loader .add("assets/images/6.JPG") .on('progress', handleImageLoadingProgress) .load(setup); })}()); ThanksMadhu Rakhal Magar