Tobi Reif

Members
  • Content Count

    14
  • Joined

  • Last visited

About Tobi Reif

  • Rank
    Member

Contact Methods

  • Website URL
    http://tobireif.com/
  • Twitter
    TobiReif

Profile Information

  • Gender
    Not Telling
  1. > how do you control resolution between pc and mobile..? All my latest code (and a link to the web-app) itself is at https://github.com/tobireif/boomchat For the HTML textarea text input: CSS: #messageInput { position: absolute; width: 34em; height: 2em; resize: none; font-family: 'BPMono'; font-size: 18px; line-height: 1em; } @media only screen and (max-width: 640px) { #messageInput { width: 18em; height: 3.4em; font-size: 17px; line-height: 1.15em; } } There are various aspects to consider: Users hitting enter, words outgrowing the textarea, etc. You can look at all my code, but it's a work-in-progress, and you need to test your use case thoroughly. There probably are some issues left to resolve.
  2. Depends ... eg https://bugzilla.mozilla.org/show_bug.cgi?id=626021 .
  3. I'll use ".position.x" and ".position.y", it could be a tiny bit faster because it's more direct than the short version.
  4. In a Pixi project I have many lines like this: spriteFoo.position.x = someValue; When I delete the ".position" in all of these lines spriteFoo.x = someValue; everything still works. What's the intended use of ".position" ?
  5. I'd check out whether HTML could be an option, see eg https://github.com/tobireif/boomchat .
  6. Tobi Reif

    stage.width

    Now I do - thanks! Is "renderer.width" the right base value for centering stuff?
  7. Tobi Reif

    stage.width

    In the demo http://codepen.io/TobiReif/full/JGGWZJ this code centers the tree: wavyTree.x = renderer.width / 2 - wavyTree.width / 2; In this version http://codepen.io/TobiReif/pen/84b4ad547bea8e35c04dad641bc890c8/ there's "stage.width" instead of "renderer.width", and the tree is not centered. wavyTree.x = stage.width / 2 - wavyTree.width / 2; The content rendered by "renderer.render(stage)" fills the whole width, so I thought the stage would have the full width as well.
  8. Check out my Christmas demo: http://codepen.io/TobiReif/full/JGGWZJ/
  9. BTW, Chad uses "derp" as a placeholder like "foo" or "bar", it came from an old meme and is not intended to offend the reader
  10. Thanks for the reply! The case where the expected texture is not in Pixi's cache anymore can't occur, right? ("Cache" typically implies that yes it might still be there but otherwise create it.) What I mean is - is the following true? For every loaded image there will be a texture in resources.foo (after load) , and that texture will always be there.
  11. Am I right in the assumption that calling PIXI.Texture.fromImage often (and inside animation frames) is OK (perf-wise) because the loader (on load) placed the textures in the cache? Or should I continue to create all textures on assets loaded? eg as in https://github.com/tobireif/boomchat/blob/master/web/js/main.js#L710 -> function onAssetsLoaded() where I keep the textures in my own array/object, in order to save computation later (for perf). But does this mean that each texture gets generated twice? Once by me and once by Pixi? Should I instead only rely on Pixi's cache, or can there be a performance hit? (eg if the respective texture is not in Pixi's cache anymore) (Info: I'm using Pixi v2 but I plan to switch to v3.)
  12. Hi I'm working on a test page for Pixi text. In order to check whether text and images line up (across OSs) I want to add an image. Unfortunately, thus far, I can't get Pixi to render it. Any idea? The code is at http://codepen.io/TobiReif/full/MYVaJY/ , feel free to fork it. Tobi