irrationnelle

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. @ivan.popelyshev Thanks to your response! I am not confused now!😃
  2. Hello, I use pixi v5 for Angular v6 on my project. Recently, my customers who have devices without WebGL rendering asked me they would like to use my project. So I decided that my project use pixi v5 and pixi-legacy together. First, I think I can use ApplicationLegacy of pixi-legacy instead of Application of pixi v5 like below import { Application as ApplicationLegacy } from 'pixi.js-legacy'; import { Application, Sprite, Container, Texture, BLEND_MODES, Renderer, TilingSprite, utils } from 'pixi.js'; constructor( ) { try { this.pixi = new Application({ view: this.canvas, width: CANVAS_WIDTH, height: split ? SPLIT_CANVAS_HEIGHT : CANVAS_HEIGHT, backgroundColor: BACKGROUND_COLOR, antialias: true, preserveDrawingBuffer: true }); initPixiSetting(); } catch (error) { this.pixi = new ApplicationLegacy({ view: this.canvas, width: CANVAS_WIDTH, height: split ? SPLIT_CANVAS_HEIGHT : CANVAS_HEIGHT, backgroundColor: BACKGROUND_COLOR, antialias: true, preserveDrawingBuffer: true }); initPixiSetting(); } } But, My project did not enter in catch statement when WebGL is not supported And then, I knew that I imported just 'pixi-legacy' and my project is worked as canvas mode, not WebGL like this import 'pixi.js-legacy'; import { Application, Sprite, Container, Texture, BLEND_MODES, Renderer, TilingSprite, utils } from 'pixi.js'; So I have a question in this case, does my project use pixi v5 with devices which support WebGL but use pixi-legacy with device without WebGL? Or, my project always uses pixi-legacy whenever my users deal with any devices which support WebGL or do not support WebGL? Thank you in advance for your response