DubMan

Members
  • Content Count

    10
  • Joined

  • Last visited

Everything posted by DubMan

  1. Yes. You have it. Any scale applied to the item minus perspective (camera) scale. Thanks Ivan.
  2. If this can't be done because of perspective in the distance, POINT_X will also work, I'll just live with the fact the circles are different sizes and scale them manually (IE. if they further from the camera, I'll scale them a bit larger, so they are the same size as the object nearer the screen)
  3. Here I was finally able to put up a demo of the problem I am having. https://www.pixiplayground.com/#/edit/ZsMfNFfmMn2gDwk-wlMXs You can change scale of the stage (it doesn't affect the POINT affine). The custom 123 above, you can see as well. What I need is a POINT affine that will scale (when stage is scaled, but have no perspective) as you can see 123 (POINT_X) in the distance is still smaller. I hope the demo clarified it. Thanks Charles.
  4. Thanks Ivan for the help. Will do a demo from now on.
  5. Here is the issue I"m facing, if this doesn't explain it properly I'll create a demo When the window is scaled really small, because of this. totalHolderContainer.proj.affine = PIXI.projection.AFFINE.POINT; I Get the above, when its larger, When scaled larger I get this So this would be perfect as long as scale is preserved somehow for the camera. I'm using PIXI.projection.AFFINE.AXIS_X at the moment and this looks like this: Which you can see if pretty decent, its just that the numbers in the distance are smaller now. So a mixture of AXIS_X and POINT would be what I'm looking for. Also how would I apply a hack to the proj.affine ( do I change source code)? Let me see what I can find as well. Thanks
  6. Hi Jon Forum, I did try this and it worked, but now if I resize my canvas the container stays much larger than the rest, Is there a way to work around this?
  7. Hi I want to know if this is possible, I have a 3D camera on the canvas, and I have the following scenario. So, as you can see the cards have a value associated with them. Is there a way to remove the perspective of the Total Holder (5) from the Dealer (so its a perfect circle). Its added to a camera. The only other way is to add them to a Separate view that isn't on a a camera but that becomes a headache then moving the card containers around etc, as I would have to move to Separate containers. It would be best if they could all be under a root view but some items don't have any perspective on them. Thanks
  8. Ivan You are a life saver, the copyTo2dor3d works.
  9. Thanks for the help. No problems, I realized if I add the item at 0,0 position, it looks like an exact copy. But then as soon as I try to move it somewhere on screen, the camera projection gets added to it. So if there was a way to an object to the screen and stop it from applying the camera projections that would work. I also noticed there is no decompose method for Matrix3D/Matrix2D which isn't nice, because then I need to first copy it to a PIXI.Matrix before getting a transform.
  10. PIXI.Projection problem Hello, I am battling with PIXI.Projection I want to get the Transform of one object and use its world transform to add it to another container with the same dimesions. Basically I want to copy the exact object and pasting it on the other container should then match. So all is fine if I get the worldTransform of one object, and prepend the world transformation of the container, then creating an object by decomposing into a Transform. Stack 1 is the object i am copying from let cont = new PIXI.projection.Container3d(); let cont1 = new PIXI.projection.Container3d(); cont.addChild(cont1); let stack1Obj = new TableGame.Widget.ChipStack({amount:10}); let stack1 =stack1Obj.view; stack1.y -= 200; cont1.addChild(stack1); cont1.scale.set(3); cont1.x = 0; tableCont.addChild(cont); cont.x = 500; cont.y = 800; cont.alpha = 0.5; let m = new PIXI.projection.Matrix3d(); stack1.worldTransform.copyTo(m); let wt = new PIXI.projection.Matrix3d(); tableCont.worldTransform.copyTo(wt); wt = wt.invert(); m.prepend(wt); let m2 = new PIXI.Matrix(); m.copyTo(m2); let t = new PIXI.Transform(); m2.decompose(t); let stack3Obj = new TableGame.Widget.ChipStack({amount: 10}); let stack3 = stack3Obj.view; stack3.setTransform(t.position.x, t.position.y, t.scale.x, t.scale.y, t.rotation, t.skew.x, t.skew.y, t.pivot.x, t.pivot.y); tableCont.addChild(stack3); This code all works above to create a replica of an object and copy it to the table container. The moment I add in a camera with a euler on the x, the above doesn't work anymore. let camera = new PIXI.projection.Camera3d(); camera.setPlanes(800, 10, 10000, false); // true if you want orthographics projection camera.position.set(gameWidth / 2, gameHeight / 2 - 200); camera.euler.x = Sys.MathUtils.degToRad(deg); // Works with this commented out //camera.position3d.z = 0; //camera.y = 220; camera.addChild(tableCont); I know it has do with the current camera not being taking into account with all the previous matrix calculations. Lines up, There are no real docs on PIXI.projection so I'm a bit stuck. With a camera and euler angle I get this: Can anyone help, or knows what else I need to do here.