• Content count

  • Joined

  • Last visited

About unrealnl

  • Rank

Recent Profile Visitors

87 profile views
  1. Adobe Animate Example Game

    Check this out: http://www.alexanderhare.com/experimental.html on your phone or on a desktop. Apparently Adobe is pushing hard for webgl content creation in Adobe Animate. Article here: https://blogs.adobe.com/creativecloud/creating-interactive-webgl-content-with-adobe-animate-cc/ Do you guys have experience with this? Is it still buggy? Does it work as advertised? Does it work on all browsers mobile/web? It runs for me on my S8 Chrome.
  2. bounds of pixi.graphic unexpected behavior

    Yes this is correct.
  3. bounds of pixi.graphic unexpected behavior

    No, im using the Graphics drawing API to draw the object in a new graphics object.
  4. bounds of pixi.graphic unexpected behavior

    Its exactly the same result, below you can see what i was trying to accomplish:
  5. bounds of pixi.graphic unexpected behavior

    I'm running the latest version 4.5.4
  6. bounds of pixi.graphic unexpected behavior

    Thanks for the info! I played both with .getBounds(true) and with .getBounds(false) with similar results. Anyways if its not worth further investigation on PIXI end, i leave it like that :)! Ps. small FYI: your twitter link below your avatar does not work, only if i copy the link and remove the '@' ;)!
  7. bounds of pixi.graphic unexpected behavior

    Thanks! Yeah i'm just pointing this out so that it might be fixed for future users and to save some headaches for people. I was spending way to much time on this. Also any idea on problem 1? Ps. im using the latest version. (4.5.4)
  8. Hi, I was playing around with a selection tool in my application and i wanted to highlight the current selected objects with a simple outline. However i noticed very strange behavior that i will illustrate below: this image was created using the (debug) code that you can find below, some observations and info: using sprite position + sprite width / height etc, has a weird offset that can see by comparing the blue line to the green line. using getbounds from PIXI and getbounds from box2d give the same result, yay! my graphic is drawn using coordinates around (0,0), so can be negative and positive coordinates body = this.selectedPhysicsBodies[i]; fixture = body.GetFixtureList(); while(fixture != null){ aabb.Combine(aabb, fixture.GetAABB()); fixture = fixture.GetNext(); } //BLUE LINE var sprite = body.myGraphic; this.graphics.lineStyle(2, 0x0000FF, 1); this.graphics.moveTo(sprite.x-sprite.width/2, sprite.y-sprite.height/2); this.graphics.lineTo(sprite.x+sprite.width/2, sprite.y-sprite.height/2); this.graphics.lineTo(sprite.x+sprite.width/2, sprite.y+sprite.height/2); this.graphics.lineTo(sprite.x-sprite.width/2, sprite.y+sprite.height/2); this.graphics.lineTo(sprite.x-sprite.width/2, sprite.y-sprite.height/2); bounds = sprite.getBounds(true); //GREEN LINE this.graphics.lineStyle(3, 0x00FF00, 1); this.graphics.moveTo(sprite.x+bounds.x, sprite.y+bounds.y); this.graphics.lineTo(sprite.x+bounds.x+bounds.width, sprite.y+bounds.y); this.graphics.lineTo(sprite.x+bounds.x+bounds.width, sprite.y+bounds.y+bounds.height); this.graphics.lineTo(sprite.x+bounds.x, sprite.y+bounds.y+bounds.height); this.graphics.lineTo(sprite.x+bounds.x, sprite.y+bounds.y); //RED LINE var lowerBoundPixi = getPIXIPointFromWorldPoint(aabb.lowerBound); var upperBoundPixi = getPIXIPointFromWorldPoint(aabb.upperBound); this.graphics.lineStyle(1, 0xFF0000, 1); this.graphics.moveTo(lowerBoundPixi.x, lowerBoundPixi.y); this.graphics.lineTo(upperBoundPixi.x, lowerBoundPixi.y); this.graphics.lineTo(upperBoundPixi.x, upperBoundPixi.y); this.graphics.lineTo(lowerBoundPixi.x, upperBoundPixi.y); this.graphics.lineTo(lowerBoundPixi.x, lowerBoundPixi.y); So we already found that using sprite position + width/height etc gives a weird result, but it will get funkier: Here you can find an object rotated 90 degree, some observations: blue line has become irrelevant as it doesn't account for rotation PIXI bounds are exactly the same as box2d bounds, again yay! But look at this! This is an object rotation around 45 degrees, observations: Uhh PIXI are you drunk? I tried to debug what is going on here, but i cant seem to figure it out. I tried also to just use positive coordinates in my drawing but didn't seem to change a thing. Any idea's what's going on here with any of these 2: Why do i have this weird offset in the first image with the blue line? Why is PIXI bounds not working for objects rotated around 45 degrees (or anywhere between the 90 degrees intervals)? Thanks in advance!
  9. parsing JSON in firefox fails

    Hi Ivan, you were right all along.. obviously i never doubted you Im using XAMPP as my local server, and it were indeed CORS issues. Create a file called ".htaccess" in the directory of my files and add the following to the file. Header set Access-Control-Allow-Origin "http://localhost:8080/" Works like a charm now! Thanks again!
  10. parsing JSON in firefox fails

    I couldn't find anything that answers my particular issue with the character being wrong. I did find several cors issues. After some more spitting , when i trace my json text in firefox within pixi.js i see the following characters: Im now looking i can fix my JSON ..
  11. parsing JSON in firefox fails

    Hi Ivan! so the file downloads normally and im not sure what i should look at? Thanks for helping out!
  12. parsing JSON in firefox fails

    Hey guys, I'm new to this forum! Use to be an oldschool flash developer (erik.newgrounds.com) and am now seriously looking at building games in HTML5. I had zero problems until i opened my game in Firefox (54.0.1 (32-bits), and Pixi v4.5.0..) and it threw the following error: TypeError: resources['assets/images/bodyparts.json'].textures is undefined[Meer info] After digging a bit deeper and logging the above mentioned resource object i see: Object { _flags: 2, name: "assets/images/bodyparts.json", url: "assets/images/bodyparts.json", extension: "json", data: null, crossOrigin: "", loadType: 1, xhrType: "json", metadata: Object, error: Error, nog 17… } When i click the Error message i see the following error: Error trying to parse loaded json: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data I cant find anything wrong with my json, even JSONLint tells me its ok. Also in Chrome everything works perfectly fine. JSON object is attached to this topic. Any idea whats going on here? Thanks for the help! Erik Firefox v bodyparts.json