DylanD

Members
  • Content Count

    416
  • Joined

  • Last visited

Everything posted by DylanD

  1. I think I found out how should be this. ar amigaTexture = new BABYLON.Texture("amiga.jpg", scene); myShaderMaterial.setTexture("textureSampler", amigaTexture);
  2. That would change the whole box uniformly as far as I know at least. I want to change the alpha, based on the plane. so one side of the plane is at alpha 1 and the opposite side is at alpha 0, slowly the middle being 0.5. Not only that but I need it like that permanently, it will never change once its made(as in not based off of frames, just the vuv.x of the plane). I cannot change the opacity of the texture either it needs to stay the exact same too. Which is why I think putting a shader onto a texture would be the way to go, just not sure if thats even a thing, but to quote you hehehe.
  3. Hello everyone, I have an image on a plane right now, and I want to make the plane to slowly fade away, any ideas how I could do that? I was wondering is there a way to put a shader and a texture together, because that would work. I could make the shader just reduce the a value as x or z increase. But I dont know how I could go about that... I bet @Pryme8 knows where I should start So I really just need to know how I can put the two together I can probably finish on my own, just need to figure out how to use them together.
  4. both of those are just a all white scene I dont know if it just didn't load or something went wrong 😕 Should it be scaling back up to the regular size of my canvas?
  5. thats a better solution! Well actually it might break if you moved the plane in the y axis. However you could just switch it to something like: https://www.babylonjs-playground.com/#31M2AP#27 https://www.babylonjs-playground.com/#31M2AP#28 This way it will "scale" with the plane moving. Nice job though! p.s. please mark as solved
  6. Hmmm maybe like this? https://www.babylonjs-playground.com/#31M2AP#25 I added it to the engine.runRenderLoop I added a check if they intersect.
  7. I dont think I fully understand the problem. How are you panning the camera? Could you recreate your scene in a playground? here
  8. engine.setHardWareScaling just seems to make my canvas smaller, not sure if thats intended but are there any other ways to change quality of something? Or is that intended, or am I doing something wrong? Defines the hardware scaling level. By default the hardware scaling level is computed from the window device ratio. if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas. just noticed, it is intended, how does that actually help though, if It increases quality but makes the screen much smaller why use it at all, smaller screen is much worse than a quality boost. I don't understand.
  9. Fixed by adding touch-action: none; to my css file, in the html, body{} check here for more details:
  10. Fixed this by adding touch-action: none; to my css file, in my html, body{}
  11. Update: I tried adding draggable="false" to my canvas html and it didn't change anything. Any ideas?
  12. How would one go about turning it off if it becomes a thing? Something like engine.turnOffAnalytics(true); or would it be something else?
  13. I don't know, it seems like a gateway drug to too much information... 😐 What other kind of data would you be collecting? Im very curious, but as long as I can disable it, then do it. Otherwise I would be against it. Also just because Sony and Microsoft does it, does not mean I would be more ok with it. Ps. I cannot wait to show everyone what I have been working on all summer.
  14. would there be a way to turn this off, that way it doesn't impact production? As in, I don't want this on all of my client side stuff. @Pryme8 how would this save time?
  15. Hello everyone, I am creating a Facebook instant game, when I pressing the screen controls my game. However when I press the screen and move my finger slightly it counts that as my finger coming off the screen. I asked the Babylonjs community, they told me to use pep, which works for everything except Facebook instant games it seems, as it worked on my phone when I ran it through a local server. So my problem only exists when I make a build, upload and play the build. Any ideas on how I can get around this game breaking problem? Heres how I setup pep and my html: <script src="https://code.jquery.com/pep/0.4.1/pep.js"></script> <canvas id="renderCanvas" touch-action="none" -ms-touch-action="none" -webkit-touch-action="none" -khtml-touch-action="none" -moz-touch-action="none" -o-touch-action="none"></canvas> Original post for those wondering:
  16. Oh no I was hoping you wouldn't say that. Was I right though do I need server side logic for Pep?
  17. Facebook does not support server side logic, that sounds like it could be the problem, any ideas how to get around this? Maybe I could put it into the javascript somehow? Edit: query is client side so maybe not?
  18. Bad news, I built it and tried it through messenger and the fix doesn't work. Now I bet it is because Facebook is trying to move, or something, idk. Maybe I should install a packaged version of pep instead of calling the link from the html.... Maybe pep is not compatible with whatever Facebook uses as a browser?
  19. So all I did was add this little piece of script: <script src="https://code.jquery.com/pep/0.4.1/pep.js"></script> <canvas id="renderCanvas" touch-action="none"></canvas> Now everything works really well! Thanks @brianzinn Also thanks @Pryme8 for trying XD
  20. I do not have pep, and I don't believe I have touch action turned off on canvas, not sure what that is, should I?
  21. Some more info: I'm using this in my html: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <script>document.addEventListener('contextmenu', event => event.preventDefault());</script>
  22. Lol. Thanks though, hopefully I can get the problem recreated XD