![]() Let me know if something don’t work (tested in two PCs, Chrome and Firefox), if there is a bug (to open the console: Shift+Ctrl+I in Chrome, Shift+Ctrl+K in Firefox), if the *. The bad side is that I have to access an object property directly, without method: to get the PIXI objects container of a layer, there is not a method getPIXIContainer() as in scenes, I need it because the GUI layer must not be affected by the filters other way, after the displacement, pixelate or twist filters, controlling the GUI becomes a nightmare We don't recommend going this route, as there are already libraries out there that can do this for you (such as CompressorJS, which uses this exact method. This involves utilizing the Javascript Blob and the HTML Canvas element. ![]() It is very easy to work with one or two filters, really: check the example given in the grayscale effect topic (link at the beginning of this message), that is a good example to help, this is not There is a way to do image compression in Javascript without using any external packages or APIs. I made it in this way (structures with info about filters, filters “dictionaries”, dynamic filters and properties names, indices, etc.) to work with multiple filters dynamically. I don’t post it in “Help for game creation” because it’s really a demo, it uses JavaScript and the code (JS and events) is a bit complex (so typical of me) but very efficient I thought. A value in range 0 to 1.0 specifying compression level of the result image. Under each filter you’ll find bars controlling the filters settings, drag them to modify the filters Third-party libraries like Pixi.js or Three.js wont work inside the worklet. The important thing is the GUI that controls the filters at the right, you can turn on/off every filter with the checkbox at the right of the filter name. You should find a platformer example (with a tiled background that achieves a parallax and infinite effects), use left-right-up to walk and jump Well, here it is (you need a device supporting WebGL):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |