• Content count

  • Joined

  • Last visited

  1. Thanks Ranaan. FYI, the amd/requirejs works too for me. It would be great to have es6 native loading support in the future. Maybe 3.2?
  2. Thanks for the reply. What I was trying to do is a bit different from what was described in that doc section. A few more data on my env: - I am using 3.1.0-beta1.1.1 - In the tsconfig.json, compilerOptions.module is set to 'es6' The es6 module loading term here implies 2 things: - The dependency syntax at build/design time (the 'import'/'export' keywords etc) - The actual module loading at run-time on the browser (thus completely eliminating the external loader like webpack, require etc) The index.html loads my main component using <script type="module" src="./mymodule.js></script> tags. As mentioned previously, I was able to make the browser es6-loads my own modules (w/o any external loaders), but get errors when loading babylonjs. Here is some relevant link on the new es6 module loading: https://jakearchibald.com/2017/es-modules-in-browsers/
  3. How about using es6 module loading? I can load my own ts module using es6 but not babylonjs. I posted separate question on this.
  4. Hello, I have been using the amd/requires to load the babylonjs and it's been working just fine. Today I tried to use the new es6 module loading, though I can make it works for my own module, I can't seem to load the babylonjs. My TS module which imports babylonjs looks like this at the top //// import 'babylon' // this is the same format I use for amd loading /// and chrome gave me error like this: Uncaught TypeError: Failed to resolve module specifier 'babylon'. Then I tried the following format ('./xxx.js') which works with my own module: /// import './babylon.js' /// and chrome gave me the following error: Uncaught TypeError: Cannot set property 'BABYLON' of undefined If anyone has the es6 module loading working with babylonjs, please help! thanks.
  5. Glad to find this posting. I struggled for a couple of days until I saw the solution here. Would be nice if someone update the doc to reflect the correct sample codes (for typescript).
  6. How to rotate the WebVRFreeCamera

    @brianzinn thanks for the tips! I ended up having to do the following codes. Not sure if this is the most efficient one, but it seems all lines are needed to make it actually works. var y = camera.rotation.y + xVal/30; camera.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(-y, 0, 0); camera.rotation.y = y; camera.resetToCurrentRotation();
  7. How to rotate the WebVRFreeCamera

    I don't see the resetPose() method in camera. Did you mean the camera.resetToCurrentRotation() ? For the first time I am getting the real vr sickness after mucking around with headset rotation directly. Hehe, this has to be done carefully I guess
  8. How to rotate the WebVRFreeCamera

    Looks like the following does the trick camera.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(-x, 0, 0);
  9. Hello, I am trying to rotate or change the orientation of the web vr camera programmatically. I am using the WinMR controllers. The base codes are from the sponza/mansion teleportation where we can change the camera position. I wonder if it's possible to change the camera orientation using thumbstick as well (like teleportation in the cliff house). Setting the camera's rotation (x, y, z) does not seem to make any impact. There has to be a way right ? Please help. Thanks
  10. @davrous Yes it worked now. This is awesome! Thank you for the help!
  11. @brianzinn thanks for the feedback. I did try your suggestion. I copied the assets dir (including the meshes dir) onto my local web server. In my local web server's root directory, the file 'assets\meshes\controllers\microsoft\045E-065B\right.glb' or left glb actually exists. Then I set: BABYLON.WindowsMotionController.MODEL_BASE_URL = "/assets/meshes/controllers/microsoft/"; But I am still getting the 404 error, even though the actual path to the .glb file actually exists. Any idea what went wrong ?
  12. @aWeirdo Ah yes I just noticed that too. Thanks for the tip! Now it's working... however the controllers are not showing. Looking at the errors, it looks like it can't download the controller assets ? Any ideas ?
  13. Hello, I was trying the http://playground.babylonjs.com/#E0WY4U#, demo and clicked the 'zip' button to save the source files. I then tried to hit the saved pages using local webserver, but I was getting exception (see the attached file). The generated index.html (also attached here) has the following external references: <title>Babylon.js sample code</title> <!-- Babylon.js --> <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script> <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script> <script src="https://preview.babylonjs.com/cannon.js"></script> <script src="https://preview.babylonjs.com/oimo.js"></script> <script src="https://preview.babylonjs.com/babylon.js"></script> Looks like some GUI type is not defined, I guess the included gui.js is not correct ? Please help. Thanks. index.html
  14. Great, thanks for confirming that. I will look into the sample codes.
  15. Thanks for the reply! Ah yes I did read that great article. But the sample codes seem to be for oculus rift though, not specific to WinMR. I will re-read it again to see if it can be easily adapted for WinMR controller.