Popular Content

Showing content with the highest reputation on 11/14/2017 in all areas

  1. 2 points

    What's next?

    Hello dear community, we are about to ship 3.1 (early december). I'm really proud of what we did so far but I want more for 3.2 SO I'm wondering what could be useful for you regarding ease of access and simplicity. Please use this thread to give me any idea / feedback. I cannot guarantee that everything will be developed but I can promise that everything will be considered seriously
  2. 2 points

    Please welcome the TransformNode

    I know this was a big ask from the community so I'm glad to announce that we finally support TransformNode! They are node with position / scaling / rotation like any mesh but without all the rendering. So they are just here to add transformation to a hierarchy. Example: https://www.babylonjs-playground.com/#JT0HN4 @JohnKsorry my friend because this could require some update to the doc (even if by itself everything will keep working the same as before)
  3. 2 points

    3D scatterplot on babylonjs

    Hi. As I promised, I'm back with a new application of babylonjs. Without any presentations a 3D scatterplot https://www.smarteam3d.com/portfolio/3DScatterPlot.html And here is the playground version: https://www.babylonjs-playground.com/#E3XJMU#26 And here is a very basic example how to do your own 3D grid to draw your own scatterplot. https://playground.babylonjs.com/#AFGPGD#1 PS: It's not fully optimized, and I'm sure it can be done better, but it's a begining.
  4. 1 point


    On last PB I'm getting error Line 92:28 - myout.cloneNode is not a function, Should be myout1.cloneNode https://www.babylonjs-playground.com/#WWCK0#61
  5. 1 point
    I would say no - by setting the sphereMesh as the parent groundMesh of you have linked the two meshes as parent-child. Now when the parent moves/rotates the child will also move/rotate. In this case, if you move the sphere (ie: sphere.position.x += 2) then the child mesh (ground) will move with it. Since you are asking about creating ground - submesh can be used for multi materials. Here are good links to show what submeshes are: https://www.eternalcoding.com/?p=283 https://doc.babylonjs.com/features/materials (scroll down to "More Than One Material on a Mesh" for Playground samples) https://makina-corpus.com/blog/metier/2014/how-to-use-multimaterials-with-a-tiled-ground-in-babylonjs
  6. 1 point

    question about load glb files

    Thank you very mach!I have changed the babylon.js to the latest version.and it works well.
  7. 1 point

    gltf/glb issue

    Works now Thx
  8. 1 point


    Should we try some vertical dragging? Perhaps write a sister to getGroundPosition()... called getBackgroundPosition(), and then put a vertical ground behind the scene? Try dragging some mesh upon the back-ground? In theory, pickedPoint.z should be inconsistent... just like pp.y is, now. hmm. Last I checked, collisions from above or below (on Y axis)... REALLY sucked. They "acted" like a rather large mesh.ellipsoidOffset.y was set, even though none was. You can do some Y-axis colliding with the Q/E keys. My tests show that when barrel1 is lowered (Q key) onto top of barrel2, impact happens when barrel2 is at Y = 24. It should be Y = 18. (50%-of-mesh-height too high) After that, perhaps we add the third ground plane... along one side? Add getWallPosition() and check for inconsistent pickedPoint.x? GetGroundPosition(whichGround)... makes it a re-usable func for all three drag-dimensions (all three grounds/planes). Investigation fun. Likely, we can determine the anomaly with the point-picker... WITHOUT needing to create a 3-Dimension Drag'n'Drop Demo. But we don't want to finish this adventure TOO quickly. It's too much fun and learning-filled... to end quickly. https://www.babylonjs-playground.com/#WWCK0#60 For SOME reason, you need to click RUN... AGAIN... after PG loads-in. Watch how the barrel shapes change... after that re-run. Weird! Drag some barrels, everyone. All 6 should be draggable. Recently, I set the wireframe-sphere .ellipsoidMesh tokens... .isPickable = false. But, it STILL seems like the wireframe spheres are allowing picking, sometimes. When it happens, the sphere sort-of jiggles-around inside the barrel, but generally-speaking, the drag fails. Play around... you might see a sphere attempt to allow being dragged... instead of its cylinder "host". The cylinders (barrels) should drag. The spheres simply "go along for the ride". On the walls... collisions from above happen 50% too high. Collisions from below happen 50% too high, too. I think that is a bug in collider processing... something to do with boundingBox measuring, I suspect. I'll find it, someday, maybe. Perhaps superhero @RaananW (or anyone else) will have some advice about where I should examine code. He has done some serious work with colliders, esp involving webworker forking. Look how solid (good) those picked point numbers in the last read-out line... look (when dragging anything). Symptom has disappeared! What the hell? Our outlaw is more elusive than we first thought, eh?
  9. 1 point
    Hello, the only way would be via physics engine The MeshImpostor is certainly the way to go (http://doc.babylonjs.com/how_to/using_the_physics_engine)
  10. 1 point

    Please welcome the TransformNode

    OK no worries All good.
  11. 1 point
    Yes, to replicate it in Blender you would select the end bone, add the IK constraint and then select a chain length of 2.
  12. 1 point
    Hello this is a more general web based question. You cannot directly serve your content from the file system because of security constraints You have to use a local webserver (like IIS express or Apache)
  13. 1 point
    So far the code you've posted is really weird. Did you look at https://github.com/kittykatattack/learningPixi ? I dont know why do you need CreateSprite2D in first place, the supposed way for you is to load all textures through loader, then create stage when loader finishes everything. In stage there can be many sprites with same texture,you can take textures either using "loader.resources[name].texture" either using ""Texture.fromImage" , also there are shortcuts like "Sprite.fromImage". There's no sense in creating sprite just after one texture load. Also CreateSprite2D looks just like "Sprite.fromImage" .
  14. 1 point

    Slow performance on mobile

    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimum-scale=1, width=device-width, height=device-height"> <meta name="apple-mobile-web-app-capable" content="yes"> Also make sure that you've enabled autoResize in renderer renderer = new PIXI.WebGLRenderer(window.innerWidth, window.innerHeight, { resolution: window.devicePixelRatio, autoResize: true)); That thing changes canvas CSS, of course you can do it manually, just check that in CSS width and height are innerWidth and innerHeight respectively. Remember that "renderer.screen" and all pixi elements are in CSS pixels. - use it. "renderer.view" (Canvas) and "renderer.width" are real pixels - dont use it. As a result, with pixelRatio=2, innerWidth=640, innerHeight=480, CSS pixels must be 640x480, while real 1280x960. Check everything one more time
  15. 1 point
    For TypeScript alone - you are right. But I would always recommend using something like webpack, due to the many features it brings. I will add a note to self so I will remember to update the doc to reflect that.
  16. 1 point

    Reverse Particle System

    So: -updateFunction is called once per static frame time - emitRate is the number of particles generated per static frame time - Age is in static frame time (but the updateSpeed property can change it) static frame time is running at 60fps (even if the rendering is not at 60fps) Here is the relevant code: https://github.com/BabylonJS/Babylon.js/blob/master/src/Particles/babylon.particleSystem.ts#L194 _scaledUpdateSpeed is compute like this: this.updateSpeed * animationRatio: https://github.com/BabylonJS/Babylon.js/blob/master/src/Particles/babylon.particleSystem.ts#L426 AnimationRatio is build like this:https://github.com/BabylonJS/Babylon.js/blob/fb232eca8e296b7cec94edc04b15fe3479638568/src/babylon.scene.ts#L3399 So at 60fps the scale is 1 Also: would love to get some help improving the doc if you have some free time:)
  17. 1 point

    Three.js or Babylon.js for room design

    I'm convinced it is not possible to satisfy everyone. But I assure you we are trying hard
  18. 1 point

    question about load glb files

    Hi @feilong, welcome to the forum Have you tried using the latest versions of both babylon and the gltf loader? I think you are using the latest GLTF loader, but not the latest babylon, which has a different API (the AddToMesh function was added in 3.1)
  19. 1 point

    Three.js or Babylon.js for room design

    If you could pass the function your own pickingInfo object then it could pass that to a new mesh.intersectsToRef and eliminate the creation of PickingInfo here: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1817 Like I said though, it might not be worth the trouble.
  20. 1 point
    Hey guys, I've added a bunch new images on this page: TXR - WOOD http://soundimage.org/txr-wood/ As always, feel free to edit / mash / use parts / combine with other things / etc. as needed. Enjoy!
  21. 1 point
    Hey @lagauche, To give you a quick answer, yes you should use the reflection probes like this: https://www.babylonjs.com/demos/refprobe/ (type F12 to see the code example)
  22. 1 point

    BabylonJS Toolkit: Space Shooter Demo

    Those are not really scripts intended to be part of toolkit... that just me farting around with using the the Character Controller (which is apart of toolkit). Thats the code you would create yourself to handle your character... My First TestPlayer controller was just me trying to mess around with basic movement and using the built in BabylonJS Follow Camera... Really simple, not really a production ready type class/component... But here you are: TestPlayer.cs TestPlayer.ts My next version is me playing around with my own camera rigging... Using mesh as a camera Holder with pivot child... that way I can simply move the main camera holder with player and rotate the pivot for LOOK AND TURN... Give a better ThirdPerson Camera Feel ... Especially when not moving... then can rotate the camera all around for LOOKING... when start moving... Snaps to moving direction, then rotate control the turn... Again these are just me playing around, but here you go: StrafePlayerController.cs StrafePlayerController.ts Have at it
  23. 1 point

    Pixi.js Showcase

    Wow, you guys really like to kill. I like the name crazypanda. Maybe I should change my nickname to it.
  24. 1 point

    Simple glLTF bone example

    @bghgary thank you for the response, yes I know all this examples, maybe my scenario is too far OFF from the glTF-reality, I'd like to bend a single mesh (with weighted vertices) only. In most of the examples I've seen so far the bones are connecting different meshes with full weight I think (even RiggedSimple.gltf seems to be using several meshes) Let me tell what I found out so far: Mesh1 (all vertices full weighted) ---bone--> Mesh2 (all vertices full weighted) : OK works. (blender glTF-exporter -> BJS-Sandbox) Mesh1 (from some vertices with no weight) --bone--> Mesh1(to other vertices full weighted) : NOT OK, vertices which are NOT full weighted are dropped. (blender glTF-exporter -> BJS-Sandbox) Also there is a difference between BJS-Sandbox and threejsviewer (https://gltf-viewer.donmccurdy.com/), which doesn't drop vertices bot also doesn't bend. Conclusion: it seems in glTF weighted skinning is NOT supported, but maybe I'm wrong??? A functional blender-file would be very hepful if I'm wrong. Cheers
  25. 1 point

    Simple glLTF bone example

    Hello, I'd like to import a blender animation (a simple plane skinned to a single bone) via glTF into BJS-sandbox, but it looks weird, I get a black animated triangle. To keep it simplest as possible, I removed the texture in the attached GLTF-file. Please can someone help or provide a functional sample (gltf or ideally in blender format) Thanks in advance armature.gltf