Guest User

Untitled

a guest
Feb 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. scope.$on('$destroy', function()
  2. {
  3. cleanPixi();
  4. });
  5.  
  6. function cleanPixi()
  7. {
  8. if (typeof(application) !== "undefined" && application !== null)
  9. {
  10.  
  11. if (application.renderer !== null)
  12. {
  13. application.stage.destroy(true);
  14. application.destroy();
  15. }
  16.  
  17. }
  18. }
  19.  
  20. "Cannot read property 'renderer' of null".
  21.  
  22. application = new PIXI.Application(
  23. {
  24. width: appDisplayDiv.clientWidth,
  25. height: appDisplayDiv.clientHeight,
  26. forceCanvas: true,
  27. backgroundColor: color,
  28. roundPixels: true,
  29. view: document.getElementById("appCanvas"),
  30. sharedTicker: false,
  31. sharedStage: true
  32. });
Add Comment
Please, Sign In to add comment