Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
3D lighting changes as window is resized in HTML5 - Gideros Forum

3D lighting changes as window is resized in HTML5

Hey, folks. This isn't a major problem, but possibly a minor bug I found interesting.

If you have a Gideros app with a 3D scene, export it to HTML5 and view it, it looks fine. But if you then change the size of the browser window, the lighting changes dramatically. Restoring the size of the browser window doesn't reverse the effect.

You can see the effect here: http://www.pishtech.com/cg_lures

You'll see fishing lures in a variety of colors. If you reduce the browser window, it acts as though the light source is moved further left and back, until the visible side of the lure is solid black. Refreshing the window at any size brings the lighting back to normal. Here's a screenshot of the same moment in the app before and after resizing the window:



It might be possible to avoid this issue within the app code, by checking for changes in the screen resolution and rebuilding the scene, or at least the lighting, when that happens. It's not a problem for my purposes, but I thought it might be worth noting.

Paul

PS - In case you're curious, this app creates fishing lures with dynamic shapes and textures. A game I'm working on will have an infinite variety of lures, each with a unique set of attributes (varying degrees of realism, action, visibility, casting range, resistance to snagging, etc.) to make building a lure collection an ongoing activity for the players, and this code will eventually be used in the game to create lures of one category. During real time gameplay the lure will be rendered with a 2D sprite, but 3D graphics are used to create the lures under the hood, and to give players a 3D view when they inspect a lure.

before2.png
200 x 166 - 17K
after2.png
200 x 158 - 11K

Comments

  • PS - In case you're curious, this app creates fishing lures with dynamic shapes and textures. A game I'm working on will have an infinite variety of lures...
    Diablo 2 item creation logic of mobile fishing game >:) Perfect idea, hope you will be successfull, repeatability in playing the game over and over will be so much high.
  • PaulHPaulH Member
    Thanks! I've wanted to do this for many years, and I'm finally doing it. Lakes are also procedurally generated, so players will have new waters to explore all the time.
Sign In or Register to comment.