Jump to content

Texture render resolution


Recommended Posts

> width=100 , height=200 ..

either modify svg itself, either make sure that parameters for size of texture go through TextureResource.

  width: 400,
  height: 400,
  resourceOptions: {
    width: 400,
    height: 400,
  }

that's what i tried to add in the options, but it has a problem: fromUrl thinks that image is an Image and not SVG, so it doesnt create SVGResource , so SVGResource cant resize temporary canvas on fly. 

OK, so i I ditched fromUrl and created resource directly.

https://stackblitz.com/edit/pixijs-text-rendering-u4pfte

it still has problems, and its yours to debug, place breakpoints in SVGResource and enjoy the life :) basically, you have to pass correct args to drawImage somehow, and then make sure that BaseTexture size (actual gl texture!) is correct too.

Alternatively, you should search pixijs github issues for cases like that, because, honestly, by trying to use SVG with pixi you became member of club "how to get SVG working for everyone without a problem" :)

l use v6 because i honestly dont remember when in v5 we fixed issue with not passing resourceOptions to resource.

Edited by ivan.popelyshev
Link to post
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.

Guest
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.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...