RaananW

Members
  • Content count

    1,613
  • Joined

  • Last visited

  • Days Won

    42

RaananW last won the day on March 17

RaananW had the most liked content!

About RaananW

  • Rank
    retired time traveler
  • Birthday 07/04/1981

Contact Methods

  • Website URL
    https://blog.raananweber.com
  • Twitter
    RaananW
  • Skype
    raananw

Profile Information

  • Gender
    Male
  • Location
    Berlin

Recent Profile Visitors

3,830 profile views
  1. Hi @boston160, Welcome to the forum! Is there any error in the console? anything we can work with? Can we see the uploaded project live somewhere? Your code seems ok at first look, but there might be a different problem we cannot debug with code only.
  2. npm update

    Hi, All will probably be answered when I finish the doc. To answer your questions specifically: The way you use the imports should be working as well. But it will have no effect on tree shaking and I therefore see no reason to do that. The reason it doesn't do any tree shaking is because of the way babylon is currently built (as a large single unit). My first attempt at solving this was to transform the entire framework to an es6-import-based project. The problem was circular dependencies, that prevented commonjs from working correctly. We are serving a single minified file. So importing a single class will actually load the entire namespace (including executing loaded code) and send back the requested class. We can discuss this further if you wish, but it's not the scope here. Maybe I will find the time to write a blog post about it. The modules are extending the BABYLON namespace. The code is being executed after "requiring" babylonjs, which is a singleton holding BabylonJS's classes. When extending it, any code ran on this imported variable is simply executed, thus - the loaders should be registered automatically when you import them. If they don't, please let me know. Same things goes to materials, post processes, procedural textures, serializers. The GUI has its own namespace, so it can be imported independently. Hope this clear things a bit!
  3. Dynamic diffuseTexture path in babylon file

    Would that also change the texture insurance itself, or does it stay imutable? If it's just for url manipulations, it's the perfect place. But if you check texture.url it'll still be the original url and not the changed one.
  4. npm update

    Yes boss... 😁
  5. My first instinct would be using Rays to all four corners of the transparent rectangle. Check when those rays intersect with the video, and then you have the position in which they intersect on the video mesh itself. Afterwards, it is only a matter of understanding how you need to rescale, but (without really thinking it through) it seems relatively trivial, since you know which corner intersects with it. Of course, I assume that you are always looking from the front of the transparent rectangle. Note - the position from which the ray will be sent should also be calculated. I need to think about this one a bit more Edit 1 - 4 Rays from the four corners of the transparent in using the camera's direction variable will do the trick.
  6. Howdy @Tim_Rosskamp, is it by anc chance the first frame of the scene? In this case - just wait for the second one Simple example here - https://www.babylonjs-playground.com/#6XQZ4P The first frame is nan, probably because of the transformation matrix, but after everything is set, it is calculated correctly.
  7. interface html

    You can also use babylonjs-gui, documented here - http://doc.babylonjs.com/overviews/gui
  8. I assume so as well Are you sure you are not stuck in a mesh when the camera is created? try changing the radius to something much larger and see if it works.
  9. canvas.addEventListener("touchend", function() { engine.switchFullscreen(true); }); For example. See here - https://developer.mozilla.org/en-US/docs/Web/API/Touch_events for a list of events, OR (the better option) - use pointer events, which are integrated in BabylonJS using jQuery pep (https://github.com/jquery/PEP)
  10. Just my 2 cents here - ImportMesh would be better than an entire scene load. ImportMesh only import meshes, whereas Load is creating a whole new scene (hence the need to render the scene using the engine. Here is a quick example: https://www.babylonjs-playground.com/#T7ED1A#2
  11. Hi @JLHolmes, do you think you can reproduce it on the playground? Also - are you using the workers-collision, or the native collision?
  12. npm update

    Hi, before I finish the documentation, here is a quick overview: babylonjs 3.1.0-alpha3.4 and all of its modules (materials, serializers, loaders, GUI, post processes and procedural textures) are now npm (and webpack) compatible. To use it: npm install --save babylonjs babylonjs-gui If you are using TypeScript, the typing needs to be added to tsconfig.json: .... "types": [ "babylonjs", "babylonjs-gui", "iAmTheWalrus" ], .... Afterwards it can be imported to the project using: import * as BABYLON from 'babylonjs'; import * as GUI from 'babylonjs-gui'; The next step is you programming a mean game and showing us what came out!
  13. Dynamic diffuseTexture path in babylon file

    Hi @royibernthal, we will discuss it and let you know. Would be great to get the PR from you
  14. Child meshes don't work with physics?

    So, a quick answer before I dive into really understanding what's going on: The physics system is using Babylon's parent system to create compounds. For the physics engine the parent and all of its children (who have a physics impostor) are a single object. or SHOULD be a single object. if this is not the case, I need to find the problem and fix it. I will look at the examples now and will be able to give a better answer.
  15. Howdy! Welcome to the forum. Even thou sprite looks 2d, we are 3d in our core. You will need to update the position in all axes in order to place the sprite on top of the mesh. Here is an example how it can be done: https://www.babylonjs-playground.com/#87HQN6#1 If dealing with different types of nodes, ou could also use the parenting system (http://doc.babylonjs.com/tutorials/position,_rotation,_scaling , search for parenting).