dszidi

Members
  • Content Count

    11
  • Joined

  • Last visited

  1. dszidi

    Extend PIXI.Container in Angular

    I'm just going to have to revisit this inheritance problem later I think. For what I'm doing right now I only need to write less than a dozen classes so fixing it later won't be too big of a task.
  2. dszidi

    Extend PIXI.Container in Angular

    No, I just installed @types/pixi.js via npm
  3. dszidi

    Extend PIXI.Container in Angular

    Well, I've tried a few of the proposed solutions and they don't seem to work for me. Also it currently doesn't seem to make a difference if I import using the "declare const PIXI: any" method or the more usual import { Application, Container ...} from 'pixi.js'; In both cases, everything with PIXI seems to be working just fine except for my inability to extend imported PIXI classes.
  4. dszidi

    Extend PIXI.Container in Angular

    Just looked through the issues and things don't look good. Also, is it true that canvas support has been dropped?
  5. dszidi

    Extend PIXI.Container in Angular

    The version is PIXI.js v4.8.3
  6. dszidi

    Extend PIXI.Container in Angular

    Hmm, I found a workaround to make that "global is not defined" error go away but then I get another run time error. I suspect that perhaps there is something misconfigured at a lower level here. Is there some setting that I need to add to ts.config file?
  7. dszidi

    Extend PIXI.Container in Angular

    (I'm going to keep posting here in case somebody else runs into these issues in the future.) Seems it was a missing dependency. `npm install --save-dev path` made the compiler errors go away. Now I get runtime error `Uncaught ReferenceError: global is not defined at Object../node_modules/pixi.js/lib/polyfill/requestAnimationFrame.js `
  8. dszidi

    Extend PIXI.Container in Angular

    I'm trying to write an application using PIXI + Angular6/TypeScript. I'm getting stuck on how to extend PIXI classes. In particular I'm trying to extend PIXI.Container from typescript. I have both PIXI.js installed as well as the @types/pixi.js package. I'm importing using... import { Container } from 'pixi.js'; My text editor is not showing any signs of errors but when I try to compile I get a wall of red text . All messages are like this... Module not found: ERROR can't resolve 'path' in 'node_modules/pixi.js/lib/core/sprites/webgl'' ...and the path ends with sprites/foo , extras/foo, and filters Can somebody provide a little code snippet on how to do this. I can alternatively cheat a little and write a base class with getters/setters pointing at the various Container props, but I'd rather not do that.
  9. dszidi

    Multiple Canvas Renderers

    Forgot to mention, I have two use cases, 1 - multiple smaller charts based on canvas 2d 2 - A single complex chart which I can use Pixi's default webgl renderer
  10. dszidi

    Multiple Canvas Renderers

    Thanks for the replies. Definitely some food for thought. I've done some preliminary research into how I could use D3 with canvas but it involves doing some things like creating the would-be DOM structure in memory. There were some other complications around user interaction with canvas+D3, although those may have been fixed with more recent versions. Since I used to do a lot of Actionscript 3 back in the day, I'm not afraid of trying to do these charting tasks in pixi or even eventually figuring out how to get D3 to use pixi's classes/methods instead of SVG for drawing things out. Also like I mentioned in my original post, getting familiar with pixi will have other benefits outside of my charting needs. In any case, I think I will give pixi a shot and put together a proof of concept. I'll do a line chart with 1 line and a lot of points and see how many canvas elements I can get onto a page. If that fails I'll go with D3
  11. First off I would like to say hello to everybody. As a web developer that started off with AS3 I was very happy to discover pixi.js! Feels just like home. I was wondering about running multiple instances of PIXI.js using canvas instead of WebGL. I'm currently working on a project where we are using charts and data visualization and have been looking for alternative libraries. We're currently using SVG based C3.js and are running into performance issues. My options are: Switch to another charting library that is canvas based (These are performant but not very extendable) Make the jump to D3.js which could be made to use canvas (hacky + big learning curve) Use a general purpose library for canvas. PIXI.js would also offer the bonus of WebGL based solutions for full screen visualizations. I could also use these skills for other things I'm looking at #3. I know you can only have so many WebGL renderers on a page at once so I was wondering about forcing canvas. TL;DR How many canvases can I have up at once on a single page? Is this a bad idea? Just wanted to know before I invest a bunch of time on learning another library.