jonforum

Members
  • Content Count

    356
  • Joined

  • Last visited

  • Days Won

    9

jonforum last won the day on September 14

jonforum had the most liked content!

2 Followers

About jonforum

Contact Methods

  • Website URL
    https://www.youtube.com/user/Learnbynet
  • Twitter
    djmisterjon
  • Skype
    jonLepage#7984

Profile Information

  • Gender
    Male
  • Location
    Canada/Quebec

Recent Profile Visitors

69692 profile views
  1. Hi, sorry but PIXI cant load multiPack from tp , but i asked Andreas Loew to add some meta to make this easier. So now you have 2 new meta named related_multi_packs and normal_map inside json to manage easier in PIXI. Check your version of Texture Packer pro, I can't remember what update where this added. here for you a example from my game loader core, it show you one way to manage and process multi-pack , normals, and animations. https://github.com/djmisterjon/ANFT/blob/e4002fab0428331fa5c5e844f1e9426a2795c5ec/js/game/global/loaders.js#L398 Sorry my example is very customised for my game engine and maybe not a good approche for you, i dont think you will can found a better free public demo code. Note this example is old and maybe have some weird code but it work. tips:look also for loader.pre https://pixijs.download/dev/docs/PIXI.Loader.html otherwise you would have to see with @xerver, (Autor) or @AndreasLoew , if they intends to implement a native multipack support in the PixiLoader with new metas from tp, but multi-pack remains a paid premium feature from tp. Sure , create a simple node programme to leech all your ressources files from a directory and build a register! no need to handwrite all your game resources ! Your will just need to have a good structures folders hierarchy. or use npm recursive-readdir https://www.npmjs.com/package/recursive-readdir
  2. i use Array() for the example only, in your case this should work const array = Object.values(this.myNodes).map( (node, index) => { //stuff... // you should have acces to id like this const id = node.node_id; node will be the current obj inside the iteration, and index is the index (number) of the current node inside this.myNodes More info about map https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/map
  3. Ok sorry for late, i took a few days off. This was not a pixijs issue but more a js issue. I think you should take a look on basic js before. Otherwise you will have difficulty progressing with pixi js. You have many way to perform this kind of stuff, here fixe version of your demo. https://www.pixiplayground.com/#/edit/a6ztud7gXnRoAnMU6kiUv You also have a plugin for devtool thats help you to debug pixijs (basic only) https://chrome.google.com/webstore/detail/pixijs-devtools/aamddddknhcagpehecnhphigffljadon This is maybe not the best way to learn js, but it should help you. https://developer.mozilla.org/en-US/docs/Learn/JavaScript hope this help PS: IF YOU NEED find a specific pixijs display.Object, yes use the .name=identity are a good way. I also use .name for connect some node ref with react app. Then you can performe somwhere in your app const found = container.children.find(el => el.name === name); pixijs have also it own search from display.Object https://pixijs.download/dev/docs/PIXI.Sprite.html#getChildAt container.getChildAt () container.getChildByName () container.getChildIndex ()
  4. make basic https://www.pixiplayground.com/ i can help
  5. at line 46 try add bunny.proj.affine = 2; // or = PIXI.projection.AFFINE.AXIS_X console.log(bunny.proj); // show current setup for your sprite console.log(PIXI.projection.AFFINE); // will show you all mode avaible (by no mutable key number) is the type of rotation your search ? I you want to keep the ratio and height, width. Also try ` bunny.proj.scaleAfterAffine = false` to fix deformation if is what you need. note that proj2d is limited, you will have to switch to proj3d for more possibilities and avoid some strange artifacts in some cases. from my point of view. Proj2d is more efficient and perfect for application engine. (with some limited transform behavior) And proj3d is heavier and need a more complex ecosystem but great for games engine. (fix all transforms issu in proj2d)
  6. You have some basics official demo provide by ivan ( Autor ) https://pixijs.io/examples/#/plugin-projection/iso-basic.js and i have some customs experimental playgrounds https://www.pixiplayground.com/#/edit/gqBdNMjJxm_eVh2ag87CH https://www.pixiplayground.com/#/edit/CRHMfHMsaM82X5EfCtNYe https://www.pixiplayground.com/#/edit/ziTqfWG24v3A2ROJm6Y0o and no, rotation should work both in 2d and 3d try look for proj.affine in 2d demo forget euler is in 3d proj only, sorry for this. https://pixijs.io/examples/#/plugin-projection/plane.js 3d + camera is maybe overkill for your need.
  7. use `ObservableEuler` https://github.com/pixijs/pixi-projection/blob/a33e4e7117694436d45705d544a0dd87663ae175/dist/pixi-projection.js#L2935 it in your sprite 3d sprite.euler[props] = value
  8. code look like obfuscated and minified https://obfuscator.io/ Nothing to understand here, you need the original code with comment. Otherwise you will try to study a mush of incomprehensible code for months. Not good for learn.
  9. sure , you can attach events to loaders loader.onComplete.add((loader, res) => { console.log('res: ', res); resolve(); // or start your app }); https://pixijs.download/dev/docs/PIXI.Loader.html
  10. @Shukant Pal Ho maybe you true, by experience I have seen a serious performance problem using multiple text transform. That's why I was talking about preferring a textures renderer. But I can be confused with talking about several nested texts elements. In my text engine, i use this approach , because each letter are pixi text + many hacky filter + animations..... So rendering as text only are unplayable, but when rendering pixi texts in texture + custom rendering, i have no issue. From what i remember in v4 , text and graphics was very low vs sprites, but maybe this changed in v5, i cant play with yet, with because v5 no have solution for normals map.
  11. rendering text sprite by generate texture should give you better perf. here for you https://www.pixiplayground.com/#/edit/HTCynNez9S1Lae0Hnekrh ps:for update maybe make a custom texture renderer. it should really more faster ! https://pixijs.io/examples/#/textures/render-texture-basic.js
  12. easy , here for you fast solution with mask https://www.pixiplayground.com/#/edit/w_pa_4vZNwKxe-Ni2Hpqj You will maybe need use a custom render for performance, mask cost ressources. using only half circle.
  13. in most case you will maybe prefer bind the objet, or pass this if you use classes bunny.on("onDragStart",onDragStart,bunny);
  14. Try play and learn the memory head snap tool. Is help you to found all deeps references of objets constructor in your projets. At bottom (Retainer) is the most important debug info, its all refs who retain yours objets and who prevent GC release (memory leaks culprits). So you can understand why some ref signature persiste in memory ,and why the GC no do is jobs. This tool is in my opinion important to mastery for all devellopers! You can also compare 2 snap and see the diff. I see you also use console log on texture, watch out, if i remember, the log can also prevent GC, and will appear in retainer. (but with special color). Also look if is not a closures somewhere who retains your refs, sometimes they are difficult to debug. Here a good example of hell of closures MemLeak, if this can help. https://www.lambdatest.com/blog/eradicating-memory-leaks-in-javascript/#:~:text=Closures&text
  15. Your array logic is more like a POOL , GC is not same thing, it based on nested ref. PIXI.TEXT , GRAFICS will also create texture referenceS in `PIXI.utils.TextureCache` So yes you memory will increase because the textures still existe as reference. Try it , create a pixi text and grafics, remove childs, destroy(), and look in PIXI.utils.TextureCache, Textures ref still existe ! https://www.pixiplayground.com/ Also `.destroy(true)` can be a solution, but cost a lot of ressources for a game logic, so you need think when to use it in your app or game context. In most cases you may prefer to build your own textures manager and your own method for destroy. (for a game or app logic, but maybe not for a website) Pixi is thinked for revolution the web rendering, before the rendering of video games or software! You must therefore sometimes remove some unnecessary stuff and do it yourself. (As for the textures manager and GC manager) If you able produce a basic playground, i can look .