Jump to content


  • Content Count

  • Joined

  • Last visited

About ben0bi

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I just removed all jQuery references in v0.3. Thanks for your critics. Adjusting the original post to it. Regards
  2. stuff...I am a lazy person, that is why I made this whole thing. Why not use jQuery if it will be used anyway? (on my side) I can look for making a jQuery-free version, it is used right now for initializing and maybe some other stuff. **review-engine on...no fuel...later. ** Also, I am a general programmer, I can use almost every language but on the other side I don't know about the "tricks" a specific (JS)programmer would use. So, the code may be somewhat "naive", but it works...hope you like it, though. [EDIT] jQuery used for: + Check if the loop function param
  3. I created a little library which sets up all the minimal stuff I need to create a PIXI screen and "game loop". I am heavily relying to this in each of my projects. You just need to incorporate jQuery [edit: jQuery not needed anymore in v0.3], pixi and RUNPIXI (in that order), create a div or something with a given size and an id, and then call: <script> function myloop() {} // do your looping stuff here RUNPIXI.initialize("mypixidiv", myloop); // [edit] removed jQuerys # selector. </script> ..and that's it. I think this could be usefull for everyone who is new
  4. In other posts, it says that (HTML) getImageData is really slow. Also, if using the fast webGL, why use the lame DOM (canvas) stuff? I created a RenderTexture and rendered the screen on it. I can put that texture in a DOM element with $('#mydiv').html(tex.getImage()) and it is fast enough. Now I need to find out, how to get the pixel data from that texture, but first step is made. Here's some code: // render the screen to a texture. You need your pixi renderer and your root stage/container. var origTex = new PIXI.RenderTexture(renderer, renderer.width, renderer.heig
  5. ben0bi

    Resize Texture

    I effectively need a way to get the texture scaled on pixel basis, to output the created texture as array to a selfmade LED screen. I use a RenderTexture which renders the whole screen, and want to rescale the texture (on pixel data basis, as said before). I cannot get it to work: tex = new RenderTexture(renderer, mywidth, myheight, PIXI.SCALE_MODE_NEAREST, scale) => I scaled it down to myWidth, myHeight but it only takes the myWidth, myHeight part on the screen itself and scales that one down, much blank space left. tex = new RenderTexture(renderer, renderer.width, renderer.
  6. I found a solution to this. (Still using pixijs v3) In another post on another page, it stated that the first filter in the filter array does it wrong but if you add the shader a second time, it will work. I did NOT use that solution, because there is a .shader variable. Using this, vTexCoord works just fine. MySprite.filters = [shader, shader] <-- the mentioned fix, which I do NOT use. MySprite.shader = shader <-- This works just fine. But you can use just one shader. I need only one shader so this is fine. Maybe we can use multiple "simple" shaders in the .filt
  7. So, I have set up my first shaders which just change colours. Now I wanted to make a gradient shader but it won't work right. It says: vTextureCoord is between 0 and 1. It is not. I apply the shader to some 16x16 Images, scaled to 2, and coords are way under 0.5. To get the ALMOST right coordinate, I had to multiply it with 16. But also then, the gradient was a few pixels away from where they should be. With x, it works "almost" right, but with y it works...not right. It's 1 in about the first quarter. (with *16.0, else it is black) Can anyone explain that to me? PS: T
  • Create New...