Jump to content

dmko

Members
  • Content Count

    101
  • Joined

  • Last visited

Everything posted by dmko

  1. I'm still a bit confused by the contradiction between these statements: Not nitpicking, just double-checking if there's some method I missed that would allow proper preloading the data before playback. Ultimately my goal would be to preload video data so that it can play immediately without fear of buffering. A video element doesn't work like that, and on iOS I think it won't even respect the preload attribute. Any ideas?
  2. Oh, maybe I misunderstood - how do you play a preloaded blob?
  3. Any advice for best practices to make a texture-based drawing util? I'm thinking to keep a Container (or ParticleContainer) around, and with each drawing movement, clear that container, add sprites to it, and then render it to a RenderTexture. However- is this really any better than just making the ParticleContainer visible and keep adding sprites? Additionally - it seems that RenderTexture doesn't allow additive renders.... In other words, if I clear that container, it just renders the latest sprites, wiping what was there before... though I have some sample code of an older version
  4. Seems like such a thing might be fragile/disallowed on iOS...https://discussions.apple.com/thread/5842398?tstart=0 ?
  5. Oh wow, didn't realize you're on top of the Spine plugin... so it seems that Spine has more of a chance of having PIXI support in general, compared to DragonBones (or any other similar framework)?
  6. For creating new artwork to use in PIXI - like talking head animation type stuff that runs for a while but uses the same base textures... is Spine or Dragonbones more supported? The idea is assuming the animator knows nothing about PIXI, and will just create the artwork in that tool without knowing much about gotchas and limitations to watch out for....
  7. Share some code - the fromVideoUrl stuff works for me
  8. Thanks! Using an array of floats did the trick: https://jsfiddle.net/jaab3wr6/1/ Followup questions: how to get from a float to int in shader? see line 19 in the HTML... seems like this is not so simple, e.g. http://www.john-smith.me/hassles-with-array-access-in-webgl--and-a-couple-of-workarounds Also, to use a shader for creating textures rather than modifying existing ones - is a sane/good way, i.e. a new graphics.drawRect() ? Gotta run, much appreciated!!
  9. I'm trying to pass an array of vec3's for use in a palette lookup... I tried the following but no dice: //SHADER CODE: precision mediump float; uniform vec3 palette[1]; varying vec2 vTextureCoord; void main() { vec3 pColor = palette[0]; gl_FragColor.r = pColor.r; gl_FragColor.g = pColor.g; gl_FragColor.b = pColor.b; gl_FragColor.a = 1.0; } //FILTER: var PaletteFilter = function(initPalettes) { var vertexShader = $("#default-vertex-shader").text(); var fragmentShader = $("#palette-fragment-shader").text(); PIXI.Filter.call(thi
  10. Uhoh, video fails in ie11.... I saw another post about rendering to canvas or something.... anyone have a cross-platform code snippet to just make video work? Preferably with looping and "end of playback" detection
  11. To go from PIXI to a video render and back to PIXI, what would be the best way - assuming the first frame of the video visually corresponds to the PIXI state? (it's not an exact match, let's say like black and white vs. colored version) Is there a way to pre-load the video and have it like paused and ready to instantly show? I don't mind if it hangs on the first frame for a bit before it actually plays. Assuming the answer to that is somehow yes - is there a way to do that without actually pre-loading the whole thing? Kinda like the way PIXI can start playing (with a small wait) befo
  12. Bump - also interested in this question and curious what's standard practice for pro web games?
  13. By the way - if you're like me, coming to PIXI from flash and trying to port some stuff over - this workflow is fantastic. Animate CC still allows some actionscript on the timeline, so you can write a few snippets to export configuration data to pass to pixi (x,y,width,height for the *sprites*). That's a game-logic kind of thing (configuration json, not texture atlas json), but I found it to be super awesome that I could use Flash as like a design stage, and then export a texture atlas and configuration data which PIXI uses to lay stuff out - and it matches 1:1
  14. JSON (not json-array) works out of the box, and you can reference the frames directly by id name Note though that Flash appends a bunch of "0000"s to the names. So if your movie clip is "ball" in the json it'll be "ball0000". Personally I just delete that 0000 from the json
  15. dmko

    Tint to color filter

    OK cool, I got it to work... calling this "colorfill".. no doubt there's a better way of inlining the shader code, but I didn't want to worry about browser issues etc... I used an "loose augmentation" structure so I can add more filters, and use the DefaultVert across them usage: var filter = new MY_SHADERS.ColorFill(0xFF0000); //fill with any hex color item.filters = [filter]; colorfill frag shader code: var MY_SHADERS = (function(exports) { var ColorFill = function(hexVal) { var str = ""; str += "precision mediump float;"; str += "varyi
  16. This might be helpful (scroll down the the actual function): https://github.com/kittykatattack/learningPixi#collision (edit: seems the anchors are currently out of whack, go up to the table of contents and click on The hitTestRectangle function)
  17. dmko

    Tint to color filter

    Thanks y'all! Followup question, are there docs somewhere for v4 shaders? I see it's been split off into a whole new subsystem for generic webgl stuff...
  18. dmko

    Tint to color filter

    Fwiw, haven't tried this with v4 but a quick glance of shaders seems this is pretty straightforward: http://codepen.io/anon/pen/PzXVGp
  19. I'd like to tint a sprite to a solid color, i.e. if it's a texture just turn all the opaque pixels to that particular value (Sprite.tint to white does not do this) From looking at http://pixijs.github.io/pixi-filters/examples/ it seems there's no built-in filter to do this. Do I need to write a new filter/shader for v4 in order to accomplish this? Not too scared, but just wanted to make sure this particular path hasn't been beaten down already Thanks!
  20. Well, problem seemed to disappear, maybe I was hallucinating
  21. Don't have ipad on me at the moment - but it was happening there too :\
  22. OK, strangely - I tried on a different computer today and it seems fine... but the .data.data seems super weird, and there was definitely a performance bottleneck last night! Are there any tooling options to pinpoint where that bottleneck might be? I.e. even to know what is actually happen with each frame update? If there is some recursive stack building somehow - it would be great to be able to see that
  23. Whoa - just noticed the same happens on the official example too! Must be a PIXI bug.. maybe listening for both touch and mouse causes some issue?
×
×
  • Create New...