Popular Content

Showing content with the highest reputation on 11/30/18 in all areas

  1. 3 points

    Babylon.js Team Blog

    The Babylon.js dev team recently has been blogging about new features for Babylon.js on Medium. Here is the link to the medium page. We would love to get your feedback on the blog posts, any suggestions for new content, and are open to having guest blog posts from the community!
  2. 3 points
    Hi Guys and Gals, Last summer I went to the Technology & Innovation Lab at a well known IT consulting firm near railway station Utrecht Leidscherijn, The Netherlands (guess which one). Demo'd my game briefly there (in return for trying out their expensive VR headset in my game ๐Ÿ˜‰ ). The game ran awfully slow without any optimization yet but that didn't spoil the fun. Recently HansR, from that company, wrote a very short article about my Model Train Simulator: http://hansrontheweb.blogspot.com/2018/10/babylonjs-applied-model-train-simulator.html And here you can read more about the Wednesday Evening tech tryouts at that firm, for instance playing around with BabylonJS framework: http://hansrontheweb.blogspot.com/search/label/babylonjs Looks like a nice place to code collaboratively! So next time you feel lonely coding BabylonJS, cheer up... and call the innovation department of a major IT related company in your neighborhood. #happycoding Q
  3. 3 points
    Thanks Wingnut/bghgary. I got there in the end - just had to keep digging. metadata was my friend I ended up writing a whole custom loader....and then realised I didn't have to. Learning is fun, right!
  4. 3 points

    Question about isVisible

    You can use mesh.setEnabled(false๏ปฟ) and mesh.setEnabled(true๏ปฟ) instead of isVisible. The method setEnabled takes the mesh out of the rendering loop and so does not consume processing time. Whereas isVisible hides the mesh but keeps it in the rendering loop.
  5. 2 points
    Ok I've made my first test of two finger zoom https://www.babylonjs-playground.com/#2MDWH7#1 I had to disable the device orientation control for a while to test it properly
  6. 2 points
    This is a case that the code doesn't handle. I've filed an issue: https://github.com/BabylonJS/Babylon.js/issues/5579 In the meantime, you can do this a bit indirectly by using a blob with an object url. https://playground.babylonjs.com/#7F6S08#2 Note that your base64 encoded string was incorrect compared to the file you attached. I had to re-encoded the data.
  7. 2 points

    Crane Game

    What type of crane(s) do you want to make in your game? What do they have to do? What is the aim of your game? etc. (Need a bit more info then just 'a crane game'.) Then I can look up some of my code and see what's useful. In my game there are different types of cranes that operate differently. Thanks. I'll use Mesh.setParent(obj). Didn't know about that. Until now I used mesh.parent = null... good to know there a proper function for it ๐Ÿ™‚ Hehe. The more angry calls the better ๐Ÿ˜‰ No blood in my game indeed but that doesn't mean there will be no action. In contrary! The nice thing about virtual toys is that broken ones will be repaired again in a snap. I've recently learned the computer AI opponent to use the weaponry (cannons etc.) that you helped me with earlier, Wingnut. Q
  8. 2 points

    Crane Game

    This is what you are after: mesh2.setParent(null); That will unparent the mesh, while maintaining rotation and position in world co-ordinates (instead of local to the parent). If it doesn't work just post a PG. I've got lots of similar versions of it in my game If you have physics on your crane cargo this is where you would call .wakeUp(), too (ie: get crane cargo to fall). Cheers.
  9. 1 point
    Are you using Babylon 3.3 or preview ??? The inspector is not compatible with 3.3.
  10. 1 point

    Pop-Pop Jingle

    I love the polish in this game! And actually getting 3 stars can be challenging especially if the RNG (next bubble to shoot) is against you. But overall I just have to repeat again how insanely polished this is from the menu to the level intro animations and sound effects, just everything! Very inspiring to see this ๐Ÿ˜ฎ
  11. 1 point
    @Bladetrick I believe that is a transformNode so it will only have position/rotation/scale and no geometry data. Are you seeing it unexpectedly?
  12. 1 point
    My final intention is to create something like Marzipano (http://www.marzipano.net/) then why I don't want to use Marzipano itself? since I want to introduce 3d elements and so. I'll post lots of questions in this topic some of them will be replied by me when I archive to do the work and hopefully other people will contribute (without that people I'm sure I won't be able to do it!) First part the cameras: here is the base code: https://www.babylonjs-playground.com/#2MDWH7 that is a modified version of a code I've found in the forums but cannot locate no more so I cannot give proper credits to the author It has right now some initial problems: Zooming in a mobile device, I introduced zoom with the mouse wheel for computers but I still need to figure how to deal with two finger zooming in mobile devices (probably this is a good start http://www.html5gamedevs.com/topic/15369-panning-and-support-for-click-event-on-line-in-babylonjs/?page=2 ) first test made: https://www.babylonjs-playground.com/#2MDWH7#1 Mixing mobile orientation with drag-drop rotation, currently after onPointerUp and inertia is empty the mobile orientation takes the control again but it resets to the original orientation instead continue the current orientation. The same in VR mode. Second part resources: (code to come) If you need several cubemaps how to deal with the loading? It should be asynchronous? loading on demand? Can you use multi-resolution cubemaps like in Marzipano? The journey starts and I hope that I could design a functional solution.
  13. 1 point
    Sebavan, you're a genious!!! you saved me ๐Ÿ˜€ It works a charm! Thanks for the prompt reply. I appreciate it a lot! Rafael
  14. 1 point

    Anaglyph cameras and setTarget()

    So double check with @Deltakosh All good the target defines the focal point so it works exactly as expected.
  15. 1 point

    Slowly turning camera

    We have all the functions you want in the framework in the math class: https://github.com/BabylonJS/Babylon.js/blob/master/src/Math/babylon.math.ts For instance on the Matrix class: https://doc.babylonjs.com/api/classes/babylon.matrix#lookatlh And then on the Quaternion(https://doc.babylonjs.com/api/classes/babylon.quaternion top links might help if you do not know what it is), you have the fromRotationMatrix : https://doc.babylonjs.com/api/classes/babylon.quaternion#fromrotationmatrix I guess coupling both you could extract the required rotation.
  16. 1 point

    Add Texture to babylon sample project

    Your model does not have UVs and UVs are mandatory when you rely on textures: https://en.wikipedia.org/wiki/UV_mapping You should create them when you create the positions: https://www.babylonjs-playground.com/#4GBWI5#183 This is just an example, they should be created in a meaningful way. I just try to highlight the need of UVs here.
  17. 1 point

    Pop-Pop Jingle

    Get your winterfest on ... with the holiday season approaching we're offering limited edition licenses to our themed puzzle game "Pop-Pop Jingle". Or play for fun at: http://b10b.com/poppopjingle/
  18. 1 point
  19. 1 point

    How to do burst particle effect.

    @Madclaws Could you share a repro ? This should work
  20. 1 point

    Gif Creation

    Fixed ๐Ÿ™‚
  21. 1 point

    How to save & import project?

    I'll improve the documentation about importing meshes to a project. Because, importing meshes means that it will be saved in the .editorproject. So if you load the .editorproject and the .babylon scene together you'll get meshes doubleness.
  22. 1 point
    You can use game.device object to detect different devices. Type game.device to console to see all different possibilities. if (game.device.mobile) { // Game running on mobile device }
  23. 1 point

    Loading image from URL

    What is the page address in your browser? Remove this:
  24. 1 point

    How to do burst particle effect.

    @Madclaws I took a look at your playground and added a couple of things for debug. The first was to play the particle system on key press (spacebar) so that I don't have to rerun the scene every time to see what is happening. The second is that I commented out your manualEmitCount line as that will never allow more particles to spawn than the ones it spawns. It essentially says "emit only X particles all at once" which is why when you call start again nothing happens. You've already hit your particle limit on that system. I normally never use manualEmitCount just because of that limitation unless I am instantiating a system to be destroyed right after it's done. If you want a system that hangs around that you can turn on and off, you want to couple a high emitRate with a low targetStopDuration. This will simulate a burst, but you can time the emitRate to give some more pleasing gradients of speed than you get with a burst. Now your particle system plays when you reach each point or when you hit space, but it looks like your code needs a little massaging because the second collision continues to happen even after the cube is gone. To fix this I added a second isDestroyed boolean to prevent the particle system from running again like you do with your first collision. Let me know if you have more questions! Take care. https://www.babylonjs-playground.com/#5EGWMF#59
  25. 1 point
    The three common ways would be : - inheritance so that you can modify the base call functions - creating a proxy which encapsulates the sps and drives the rest of your code or in Typescript, you can extend any classes with class Augmentation: Look at Module augmentation: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
  26. 1 point
    Maybe both ways for Principled. I am not quite to Principled, but switching stuff there (or how it is interpreted by the 2 material classes) is clearly easier. If you have the older mix shader rats nest, am not sure how much can be done. Thinking the 2 material classes interpreting in different ways has obviously advantages. I think, I understand where you are coming from. If you are making your own materials with Principled, then you want to change between STD & PBR just using the world level, custom property, check box. People will also be importing stuff into Blender from various formats. If importers switch to principled, Makeuman included, they are going to use settings which look best for Blender. I do not want to hear a bunch of shit that it is not exporting right, when was imported to Blender by people with no clue about Blender. Probably unrealistic, but I can dream. I am almost done with non-principled, STD material processing, will use the principled topic when there. This one is solved.
  27. 1 point
    kill only deactivates and hides an object. You need destroy if you want to remove it permanently. Try pendingDestroy if destroying an object from a callback causes problems.
  28. 1 point
    Hi, You can try : yourMesh.dispose() ;