• Content count

  • Joined

  • Last visited

  • Days Won


ivan.popelyshev last won the day on November 17 2017

ivan.popelyshev had the most liked content!

About ivan.popelyshev

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

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

Recent Profile Visitors

4,437 profile views
  1. Mask issue with Webgl renderer

    Also, I like your description of the issue and I like all lights-related experiments. Its good for first post on our forum!
  2. Mask issue with Webgl renderer

    What I see in 10 seconds: 1. remove secondRenderer, use big graphics rectangle of screen size if you need a background. 2. if you want it to be more performant, you can use MULTIPLY blendmode instead stage.addChild(bg); stage.addChild(shadow); shadow.addChild(bigGrayRectangle); shadow.addChild(whiteCircle); shadow.filters = [ new PIXI.filters.AlphaFilter() ]; shadow.filters[0].blendMode = PIXI.BLEND_MODES_MULTIPLY; First bg is rendered on screen. Then shadow is rendered into separate framebuffer (because filters!) , then everything on screen is multiplied by that shadow. More sofisticated demo: http://pixijs.io/examples/#/layers/lighting.js , it uses 'pixi-layers' to render lights assigned to bunnies inside shadow.
  3. Access renderer from child classes

    Containers don't depend on renderer, that's why its possible to render same container on multiple canvases. You have to add that dependency somehow. Also containers dont know about root element (will be added in pixi-v5), so you have to look at `container.parent` multiple times to get the root of your tree. Store renderer reference in the root and make a method that finds that root.
  4. Smooth Follow Cursor

    Second `dt` assignment needs adjustment. You can remove it or fix it the way it works. I dont supply people with complete solutions. Google what "LERP" is in relation to game development and animations. Google "easing".

    ~1 Feb Its better to wait for it to save your precious time.

    As I remember, you have flash converter, right? You can adapt it for 4.6 that I remember you wanted to do anyway. In v5 we might have a Stage and proper `added` and `removed` events like in flash: https://github.com/pixijs/pixi.js/pull/4586 , also there might be changes in InteractionManager. I think that other major changes wont affect your project.
  7. Smooth Follow Cursor

    `app.renderer.plugins.interaction.mouse.global` , sorry, yeah, we have long path to current mouse coord
  8. Any tween library that can use shared ticker with PIXI?

    Sometimes they put entry so deep, that its easier to call pixi or yours game loop from inside of their lib
  9. Smooth Follow Cursor

    I mean exponential interpolation, it uses LERP every frame with same coefficient, if the frame is fixed (60fps), and you need to adjust "dt" by "delta" if your pc is slow, to take missed frames into account. This code supposed to be run in animation loop, not inside mousemove.
  10. Smooth Follow Cursor

    It looks like simple LERP (linear interpolation) speed = 0.1; dt = speed; // fixed step dt = 1.0 - Math.exp(1.0 - dt, delta); // if you have a delta time in frame. const position = sprite.position; const target = renderer.plugins.interaction.mouse.global; if (Math.abs(position.x - target.x) + Math.abs(position.y -target.y) < 1) { position.copy(target); } else { position.x = position.x + (target.x - position.x) * dt; position.y = position.y + (target.y - position.y) * dt; } I didnt test it. Please try to use it and fix it, and if you fail, I'll help. Also, not sure about formulaes, I'm doing it by my math sense.
  11. Pixi hitArea for whole stage

    I suggest to use toLocal instead of direct applyinverse.
  12. Pixi hitArea for whole stage

    According to https://github.com/pixijs/pixi.js/blob/dev/src/interaction/InteractionManager.js#L1092 , there's another way: override containsPoint and return true.
  13. Visual Studio Code Intellisense code completion

    Pixi typescript definitions dont have jsdocs inside, so no, its not The best way is to clone pixi github repo and open it in Idea in separate window, then ctrl+N to any class you want to look at. Source code contains more information than docs, and most of functions in pixi are small, its better if you have some understanding of pixi internals too Typescript definitions can lie.
  14. Spin a wheel and land on specific segment

    Hi! Do you have any experience with Flash or any engine/renderer based on it? Pixi doesnt have big tutorials except https://github.com/kittykatattack/learningPixi . Also pixi doesnt have any animation functions from the box, you should use something like https://greensock.com/?product-plugin=js-pixiplugin , or you can write down formulas for bounce, code some javascript and put it in animation ticker. Your task is too vague. Try to implement it, stumble across a bug, spend several hours on it, make a fiddle and post here, then people will help you
  15. Progressive texture upload

    Also, why do you use createImageBitmap inside a webworker? I thought its completely async and can run without it. May be you have webworker fallback?