ivan.popelyshev

Members
  • Content count

    1,744
  • Joined

  • Last visited

  • Days Won

    10

ivan.popelyshev last won the day on September 15

ivan.popelyshev had the most liked content!

5 Followers

About ivan.popelyshev

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    https://gameofbombs.com/
  • Twitter
    ivanpopelyshev

Profile Information

  • Gender
    Male
  • Location
    Moscow, Russia
  • Interests
    Pixi.js, Topcoder, Codeforces, ninjas and bombers

Recent Profile Visitors

3,537 profile views
  1. baseTexture from loader alias

    5 dots! that's why I use local variables for that king of things, please don't copy & paste it over all the code
  2. Understand toLocal result

    You wrote code for bunny2 position in bunny1 coords, its (100,100)
  3. Scroll/clip rect in pixijs

    > one point per pixel, so my parent stage is at least 5k pixels wide I dont see how it can affect anything, also stage has no "width", there's no "wide" in pixi at all. When something is masked, bounds are calculated both of mask and what was inside, so really it only draws pixels that fit the mask rectangle bounds. You cant just change "width", it actually changes "scale", and .. I dont know how to explain that May be you actually changed the number of points in graphics - and that helped, but if you look at neighbour threads about graphics - there was a case like that just a week ago. Static graphics cost is different from dynamic graphics, please read it carefully.
  4. Understand toLocal result

    Its difficult to write that kind of abstractions in docs. I know of other places like this, for example Texture frame/orig/trim, I tried to rewrite it, may be I made it better but i cant judge Look at implementation, and may be we rewrite the docs together? https://github.com/pixijs/pixi.js/blob/dev/src/core/display/DisplayObject.js#L305 , https://github.com/pixijs/pixi.js/blob/dev/src/core/display/DisplayObject.js#L261
  5. Render with Creature Using the CreaturePack JS Runtime

    Spine has canvas fallback, its good if your model is made only with rectangles. Meshes have the problem I mentioned
  6. Load asset packages

    Btw, you'll have to unpack zip with js which is kinda bad. Better to store "tar" or something like that and ask web-server to gzip it, that way browser will unzip it natively and you get the pure data.
  7. PIXI sprites are blurry on mobile devices.

    There's no way it can be blurry in PC if devicePixelRatio is 1. As for mobile, if you use resolution=1 , then at least try to fix it with css: https://developer.mozilla.org/ru/docs/Web/CSS/image-rendering , apply that to canvas (app.view, renderer.view, same thing) You can also set resolution to "window.devicePixelRatio", then you have to understand what is difference between "renderer.width" and "renderer.screen.width" (same as "app.screen") Imagine that window.innerWidth=320, innerHeight=240, and you also set it as your "gs.width" and "gs.height". In that case, "renderer.screen" is (0,0,320,240). You can use those values to calculate coordinates for elements: position, scale, other stuff. Its also known as "CSS pixels", that is what "autoResize" option sets to canvas css parameters. Now we set resolution to 2. "renderer.view" is the canvas that has its width set to 640, and height to 480, and that's "renderer.width" and "renderer.height" - real number of pixels, that cannot be used to calculate any coordinates. Elements that are rendered in pixi can also have resolution: Texture, Text, others. If resolution is not the same as renderer's resolution, it might be blurry. Of course it can be fixed with scale There's also webgl filtering that manages the cases when image is scaled :"texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST" will give you crisp image ,and you can even set it by default: "PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST". I hope that you can find it all in docs.
  8. Render with Creature Using the CreaturePack JS Runtime

    Beware of black lines between triangles - as you see in that canvas2d example, its very difficult to draw meshes in 2d context without artifacts. Are you sure that you want to use Creature that has only meshes, and not Spine, that has simple rects too?
  9. PIXI sprites are blurry on mobile devices.

    I suspect that problem is in "resolution". However that way it could be problem only for android, not the PC. Lets fix PC first. Are you sure that page is not zoomed (100%) and that you didnt set something like "200% size" in windows display settings? Please type "window.devicePixelRatio" in the console, or "console.log" that value in your code. Is it 1 or something else?
  10. PIXI.particles.ParticleContainer

    Done, I've sent it to email specified in your profile (i'm a mod so i can do it)
  11. Render with Creature Using the CreaturePack JS Runtime

    Do you mean 2d context? @kestrelm Do you even have 2d context support in any of Creature runtimes?
  12. Load asset packages

    Make sure that you start your own loader after you test canonical ways, beware premature optimization! 1) combine many small images to atlas through https://github.com/Bibernull/spritesheetjs or https://renderhjs.net/shoebox/ or https://www.codeandweb.com/texturepacker - that enables batching optimizations and rendering process becomes much faster , also it loads faster 2) for PCs try convert textures to DDS (dxt3 or dxt5) format and load them through https://github.com/pixijs/pixi-compressed-textures - eats less videomemory (x0.25), that is not possible with png's 3) enable gzip on server - very effective for DDS, dds+gzip downloadsfaster than png both through network and loads faster in the app memory Only if it is not enough for your app, then go for gzipped packs.
  13. PIXI.particles.ParticleContainer

    No, but we have slack. Do you an invite?
  14. Understand toLocal result

    Bunny's position is (100,100). If you put that point in bunny2 local system, global coords are (300, 300). Relative to bunny1 its (200,200).
  15. Load asset packages

    Yep, you need your own loader for that. Though, you can use loader as XHR for zip. Here is the loader that is used in pixi : https://github.com/englercj/resource-loader/ Pixi bindings : https://github.com/pixijs/pixi.js/tree/dev/src/loaders Spritesheet and texture parsers are separated from loaders, so even if you build pixi without loader, you'll be able to use them. Pixi loader is enough for demos, prototyping and promo-games, but for serious app you need better loader and better caching system.