Jump to content

CanvasRenderer problem


Recommended Posts

Hello, and Welcome to the forums

Just yesterday i was checking our sprite renderer code for canvas and found a strange thing.

I thought something is wrong with that code: https://github.com/pixijs/pixi.js/blob/f0a66e1410dd782a21fef03388b0d470f50e0d2c/packages/canvas/canvas-sprite/src/CanvasSpriteRenderer.js#L156

You can remove "floors" from it , override whole function:


PIXI.CanvasSpriteRenderer.prototype.render = function(sprite) { ... }

Use the same code, but remove "floors" in that drawImage.

I'll fix it next week probably

Link to comment
Share on other sites

Here's your demo but on pixi-playground: https://www.pixiplayground.com/#/edit/dviwM8_okZ91hhxBDbjrg

Uncomment first line to see the fix.

I reported an issue: https://github.com/pixijs/pixi.js/issues/6447 If you want to be mentioned in subsequent PR and in next pixijs release as one of contributors - please post a comment under your github account there.

This is a good report for the first forum post!

Our community will be glad to see more content from you!

Edited by ivan.popelyshev
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...