• Content Count

  • Joined

  • Last visited

About babycarlitos

  • Rank
  • Birthday 09/30/1980

Profile Information

  • Gender
  • Location
  • Interests
    code, games, b-ball, code.. oh wait I said that already ;)

Recent Profile Visitors

1078 profile views
  1. Check out the code above, you would need to scale the container that has all the sprites and also resize the renderer.
  2. Doing PIXI.settings.RESOLUTION will change the res of the entire render. If you double the res then you would have to re-adjust your entire project. I think you just want the font to look better. I did a quick fiddle , This was done on pixi 3.0.11. I can do another one for 4.X since it uses slightly different calls for text although they are just deprecated not removed.
  3. Hello cnwerb, Yes that is pretty much what I did. I made a blackish sprite that is the size of the window and added events to it. You can take the code and expand on it to add more events. In my case my "stage" is a container and making the stage interactive has a different behavior. Adding a sprite seems much easier.
  4. I have no idea why I thought that you wanted drag. I just made this check it out to see if it is what you need
  5. Hello PainKKKiller, Just like themoonrat mentioned, .resolution is how you make the font crisp. You can do it two ways: var style = { font: 'bold italic 40px Arial', fill: '#ffffff', stroke: '#000000', strokeThickness: 2 }; var someText = new PIXI.Text('HELLO',style,2); OR var someText = new PIXI.Text('HELLO',style); someText.resolution = 2; They both do the same thing. Maybe you set RESOLUTION instead of resolution?
  6. Hello TimC, After looking at that link, the effect is not done by the person that made the jsfiddle, they are just loading the js from here If you go to you can see how to use it if you would like to try it.
  7. Hello forleafe, That does sound "simple". I suggest copying the code in the example and trying it out to see what it is that you are doing wrong. Hopefully that link helps you out.
  8. Hello sergiy-oliynik, This is how I do it 1- create a container and append it to the body 2- create your images but add them to the container not the body 3- setup a listener for your onResize , "window.addEventListener("resize", resizeMe); " 4- call the function when you are done loading the page. inside the resizeMe function , you would take the window.innerWidth and window.innerHeight and scale your stage and resize your renderer stage.scale.x = stage.scale.y = somecalculatedratio; renderer.resize(wwidth, hheight); hopefully this helps you out.
  9. babycarlitos

    scale mode

    Hello, I updated from 4.0.0 to 4.2.2 and now the scalemode does not seem to work. PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; or PIXI.settings.SCALE_MODE = 1 do nothing If I change renderer.smoothProperty to renderer.smoothProperty=""; it works BUT if I resize it comes back Is there a new change/addition that I should be doing? Did not see anything in the website or the docs
  10. thans ivan, that would be easier than me doing the math, just have to update to version 4. i will try that for the first question. For the future, should i do 2 posts separating the questions? I didn't do it since I figure they were somewhat related ( both deal with rotation)
  11. Hello everyone, I have 2 questions and I think they both deal with math. 1. How do i get the x,y, x+ width and y+ height of a sprite after setting a rotation (corners of sprite) image 1 (white background image) 2. how do i make a sprite look at the position of the mouse ( rotate to where the mouse is) I tried various version and this seems to give me the closes one var angle = Math.atan2(mouseX - (boxIMG.position.x), -(mouseY - boxIMG.position.y)); then set the rotation to that boxIMG.rotation = angle; but is not working correctly (black background image)
  12. No worries, thanks for answering my questions, in the meantime i will look into learning simple ray trace and reading some more about MRT since I don't really know much about webgl without using libraries.
  13. Thank you xerver for answering my questions: 1- I am looking into learning about ray tracing to see if I can mimic in a small example what you(or the presents example creator) have done . The only time I touched ray was in unity ( which you just call the function) and in 3d max (ray trace, which you also just call it) I have never actually tried to do the function myself. Any tips ( books, websites) that I can read that you can think of top of your head? 2- You are correct , it does honor the order, the "problem" that I am having is that I want the order to be render in the same order that the children were entered into the scene. Right now lets say that I do the following: create 4 sprites called A,B,C,D.Add them to the stage in that same order BUT I put a normal to sprites ACDBy doing that, ACD sprites will be in order but they will be behind B. Maybe that is the correct behavior, but I would like to know if I can have them stay in the same order ABCD. I can create an example of this if you would like, thanks again!
  14. Ok so you wanted to use existing pixi functions as I see containsPoint( vs doing it my way ( bounds). Glad it worked out for you!
  15. ok here is the link I copied your code and added some more to make it work.A few things: 1- At the beginning of your code you are not giving a size to the circle, so I just gave it the same size with a different color to tell the difference. 2- At the listener, I checked to see if the mouse is within the boundaries of the circle and if it is then make the change. 3- I kept the listener on the circle, but you dont have to. You can listen to just mouse movement and it would have been the same. 4- Notice that if you move the mouse from an angle, the color will still change because we are not checking for alpha values. Hopefully this helps you out!!