ConnorsFan

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Hi, I am trying to use the GUISlider element (from CastorGUI) in my Babylon game. It works well in Firefox, Chrome, and Opera. In IE11 however, the callback function is never called. In the source code of the slider (GUISlider.js), I see that the "oninput" event of the range control is monitored. According to this reference (http://www.impressivewebs.com/onchange-vs-oninput-for-range-sliders/), there is an issue with that event for the range element in IE; it is also observed that the onchange event is triggered in IE like oninput is triggered in other browsers. So, for the moment, I use this kind of code as a workaround: var sliderControl1 = new CASTORGUI.GUISlider('sliderControl1', { x: 100, y: 100, w: 240, h: 24, min: 0, max: 100, step: 1, value: 50 }, guisystem, function () { console.log('value: ' + this.value); }); var slider1 = document.getElementById('sliderControl1'); slider1.onchange = slider1.oninput; When moving the slider thumb and releasing it, the very last change of value is triggered twice in non-IE browsers but that may not be a big problem (it is not for me), especially since the oninput event itself can be triggered several times for the same value, even without my workaround code. Is it possible to make the correction to the CastorGUI library? Or to make another correction that would allow the control to work in IE? Thanks!
  2. iiceman : I agree with you. Your first post was simple but gave me the solution right away. I will let the "downvoter" correct himself before upvoting your answer on StackOverflow.
  3. Yeah, that's what happened yesterday, I will remember to come here first. Going to StackOverflow is a habit for me. It is the place where I usually ask my questions about programming but I noted that the babylonjs tag is not very popular over there.
  4. Hi iiceman, You got it! I had tried setting the specularColor to null previously, with bad results (as you can imagine). Setting it to "Black" (0, 0, 0) did the trick. Thanks a lot! P.S. If you have an account on StackOverflow, you can earn some points by answering my question there.
  5. I found one trick that works: setting the normal vector (nx, ny, nz) in the plane of the surface instead of... normal to it. Is it an acceptable solution or is there a more elegant way?
  6. Hi, Is it possible to get a matte surface? If I set a diffuseColor for a StandardMaterial, it is glossy. Thanks!