Jump to content


  • Content Count

  • Joined

  • Last visited

About mrBRC

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

964 profile views
  1. mrBRC

    160,000 Bunnies!

    *thinks* (opps.. I started a 38 minute instructional video)... *...silently slips away into the interNETS from whence he came so abruptly..*
  2. well.. they will be seperate Texture objects.. you should probably consider using a Loader... I use an AssetLoader, which in turn calls a JsonLoader when the asset is a json file. This the sprite sheet, composed of several images of different frame sizes. http://www.iakarra.net/demo/polymer/WiAClient/ingame.png This is the json file that specifies the frames (by name) and has a meta property on the bottom that gives a relative uri to the spritesheet. http://www.iakarra.net/demo/polymer/WiAClient/ingame.json Lets assume you have a bunny file that has 2 frames 400 width and height each
  3. It would appear that setting the height and width on my DisplayObjectContainer was the root cause of the WebGL Rendering breaking..
  4. nevermind.. I found a method to do this.. however, it is not immediately obvious how you can bind and update the texture when the canvas changes.. at any rate.. the following code sample demonstrates how to use a separate canvas as a PIXI.BaseTexture // I created a canvas element with the id "drawpanel" on my page.// My renderer is WebGL, function LoadCanvasImage() { var c = document.getElementById("drawpanel"); pixiCanvasRenderer = new PIXI.CanvasRenderer(c.width,c.height,c,true); var grd=pixiCanvasRenderer.context.createRadialGradient(75,50,5,90,60,100); grd.addColorStop(0,"
  5. @Xerver, What do you mean exactly? how do you use a separate canvasContext as a PIXI.Texture or PIXI.BaseTexture?
  6. I made the edit above to remove the sentiment about the loaded EventListener.. this next code sample works... var source = new Image();source.src = "img/bird.jpg";TestBaseTexture = new PIXI.BaseTexture(source, PIXI.scaleModes.LINEAR);TestBaseTexture.addEventListener("loaded", function(e) { TestTexture = new PIXI.Texture(TestBaseTexture, new PIXI.Rectangle(0,0,400,400)); TestSprite = new PIXI.Sprite(TestTexture); stage.addChild(TestSprite);}); .. however, you're essentially attaching this event listener to TestBaseTexture while it is actively loading the source.. so I don't know how st
  7. The PIXI.BaseTexture is the image source, and a PIXI.Texture references the BaseTexture and specifies the Frames.. // "Image" Implements "HTMLImageElement" Interface: // Reference: http://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElementvar source = new Image(); source.src = "img/bird.jpg";// "HTMLImageElement" is the 'source' of BaseTextureTestBaseTexture = new PIXI.BaseTexture(source, PIXI.scaleModes.LINEAR);//The Rectangle is the FrameTestTexture = new PIXI.Texture(TestBaseTexture, new PIXI.Rectangle(0,0,400,400));//PIXI.Texture.FromFrame loads from cache.. in this method, we are
  8. which version was this.. 1.5.3? or the new 1.6.0?
  9. actually.. disregard that idea.. I incorrectly assumed you were calling that function in your manager when the setting of the shader was actually warranted.. I figured the currentid to shader id check was really just in case others attempted to use the method.
  10. Hmm.. I suspect the modifications to the Shader Manager is the cause of this webgl rendering issue. I see you added a UID to your Shaders And the method setShader: which runs a comparison against the UID. I think this is the root of the issue. Replace it with the following and run a test using WebGL rendering.. in my case.. it suceeds initially.. and than fails consistently while in the rendering loop. PIXI.WebGLShaderManager.prototype.setShader = function(shader){ if (this._currentId === shader._UID) { console.log("setShader False:", {"instance":this,"shader":shader}); return fals
  11. It is not rendering correctly.. most of my assets are sprites within DisplayObjectContainers. Most of those DisplayObjectContainers's WorldTransform (MATRIX) property have NaN values.. Also, The Loaders, Texture, and Base Texture values seem to be all correctly propagated and functional.
  12. this is interesting.. I thought for a moment that there was an existing example of this with the pixi source on git.. but I was only half right.. there is a Spine example that uses a file called dragonbones.... how confusing
  13. I've updated your jsFiddle: http://jsfiddle.net/8MawM/4/ An obvious issue with the fiddle you provided was that you didn't have an 'External Resource' reference to a pixi.js added. Perhaps that was an overlook... var stage = new PIXI.Stage(0xF2F2F2); var renderer = PIXI.autoDetectRenderer(400, 300); document.body.appendChild(renderer.view);var imageLoader = new PIXI.ImageLoader("http://www.goodboydigital.com/pixijs/logo_small.png", true);imageLoader.addEventListener("loaded", onComplete);imageLoader.load();renderer.render(stage);function onComplete(e) { console.log("event data: ", e);
  14. oh.. that's because the anchor isn't relative to the parent.. it's relative to x,y positioning of the sprite itself. if you want the sprite to be centered to the parent, leave the sprites anchor at 0.5,0.5 (centering the sprite texture and boundingbox to it's own x,y position) and adjust only the sprites positioning relative to it's parent. the anchor of the parent really should be at 0,0 because it's really only being used as a DisplayObjectContainer (which doesn't have a anchor property) neither does DisplayObject.. because neither of those objects have baseTextures/Textures associated to
  15. I actually haven't looked any more into this 'issue' but I suspect the bounding box needs to be updated after the primitives are drawn (i.e. drawRect method)..
  • Create New...