• Content count

  • Joined

  • Last visited

About agmcleod

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

794 profile views
  1. That did the trick. The shadows dont look as good when the cubes are higher up as they did. But it works well enough for this purpose. I'll check out 3.1 changes once they come. Thanks again.
  2. i'll try it to keep simple, or maybe average it. I'm applying to two cubes moving independently.
  3. Ahh good to know. Adjusting the blur would apply to whole shadow map eh? Btw thanks for replying to all my questions. You're a champ on here.
  4. Lift your arm high over your table if you're inside, and bring it down towards the surface. As you do this, the shadow becomes more in focus, and more crisp. I'm wondering if it's possible to replicate this behaviour using the shadow maps or not. I have a setup fairly similar to the example here: But even when you toy with the Y position of the torus in that example, the shadow keeps the same level of blur, regardless of distance from light.
  5. Fitting the scene to canvas?

    Not really an answer to the original question, but kind of a solution. Since changing horizontally, it does solve the landscape problem, clearly the camera just needs to see more of the scene. So I pulled the camera up about 5 units. I also adjust the FOV angle depending on aspect ratio. Definitely seems to operate better than before.
  6. Fitting the scene to canvas?

    Here's one with horizontal:
  7. Fitting the scene to canvas?

    I indeed gave that a try yesterday, though i would never see the right green wall on screen. Like it was hard to keep the scene within the viewport at all. But it did some what solve the above issue. With your playground link, I can also tell that it clips the viewport when shrinking vertically. I dont think we'd lose too much with that, but If dice get cut off by landing higher or lower on the screen, that's bad. I realize this is a tricky thing, as perspective usually fixes one of the two directions for FOV.
  8. Fitting the scene to canvas?

    I am yep! I have it in the handler for the window resize event. On first load the scene seems to fit in the canvas, but on changing the size it no longer does. Though I have doubts on first load the mouse clicks will work properly. Here's a gif:
  9. Hi there. I'm working on a 3d piece for a client project where there will be both desktop & mobile users. The scene itself is a landscape setup, so it sits wider than it is tall. I have an on resize event to call the engine.resize(). The canvas is set to width: 100vw; height: 100vh, and does resize quite well. However once i shrink it so the bottom of the scene is touching the bottom of the window, and then shrink it horizontally, the scene gets cut off. I've tried playing with the fovMode, but that hasn't helped. Is there a way for me to allow to be more fluid to the canvas size, even though it will look skewed? I think it's more varying sizes of mobile screens that I need to adapt for, so it shouldnt be too much of a negative effect, or at least i hope not. Main thing is that we noticed things would appear off screen on our phones, but only by a little.
  10. Hi there, I was trying to generate some quat values i can use for fixing the rotation of a cube. Though I found that: (new BABYLON.Vector3(0, 0, degToRad(90))).toQuaternion() Results in the same quaternion as: (new BABYLON.Vector3(degToRad(90), 0, 0)).toQuaternion() Is this intended? Or is there a bug in the function?
  11. Install & Setup through npm?

    Gave it a try, having both BABYLON & CANNON setup through the expose-loader seems to cause an infinite loop of rebuilds from webpack. I tried just putting in cannon, and removing my window hoist, but it doesn't seem to get found by babylon. May just keep my window hoist hack instead.
  12. Install & Setup through npm?

    Oh damn, that's pretty cool. I actually just tried hacking it with: window.CANNON = CANNON, which worked :D. But I feel like that's a more modern way of doing things.
  13. Install & Setup through npm?

    @Hersir Yep! Using webpack2 & yarn. I added the babylonjs and cannon packages as dependencies. At the entry file, i would have import BABYLON from 'babylonjs' import 'cannon' The BABYLON instance seemed to work okay, but yeah things fell apart when it tries to load the inspector. As it expects BABYLON to be global. I suppose I could hoist it to WINDOW maybe, but that sounds not so smart Giving it another try this morning, seem to have trouble loading the physics plugin. The version I did with just injecting the script tag, is using a build i downloaded, which includes cannonjs. So not sure if I need to bootstrap that into Babylon somehow.
  14. Hi there, I'm using babylon for a little prototype project, and I tried getting it through npm. It & cannonjs installed just fine, but pulling them in for a project leads to some issues. The inspector panel throws errors do to BABYLON not being global for example. I like having it through the package, as the tooling is better around it, VSCode autocomplete for example. For now i've just gone the route of including the script files.
  15. Swapping and managing containers

    Ah, just responded to your PM. Yeah you should be able to simply do:; That will keep the container itself intact, but just detached from the game world.