Search the Community

Showing results for tags 'mesh'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 277 results

  1. Hello community, I'm new to babylonjs and I have a question concerning to the collision detection of holes in meshes. I want to recognize that a sphere flies through a hole (any kind of shape possible). I prepared a example with an cylinder which contains some holes (different shapes) at a random position. A sphere is moving up and down to collide with the cylinder and I want to know, if that sphere collides with a hole or with the surface of the mesh object. At the moment, the collision with the mesh object changes the color of the sphere on any 'collision'. My goal is, that the sphere changes the color only passing/flying through a hole, but the holes can be random positioned and could also have a random shape. It would be great if you guys can help/teach me how to achieves this.
  2. Hello, I am new to babylonjs and am trying to extrude a non regular polygon towards the positive y direction. Going through the doc I couldn't find a way, it always extrudes it in the negative y direction. I found a hack using mesh.position.y += depth; but is there any other way of doing this ? Playground link : Thanks.
  3. Hi, I want to create city map with 3D buildings. I have GeoJSON with building data. I'm using this data to make 2D polygonal mesh (building shape). (I've used example values) Is there way to add 3'rd dimension to it? I want to use my 2D mesh as base for 3D Object. Is it possible to store this 3D object as Vector3? I want to map all verticles and keep them around for future use. (I'm starting with babylon.js, i don't know is this proper way to do it.) { "type":"FeatureCollection", "features":[ { "id":"w26358613", "properties":{ "levels":8 }, "geometry":{ "type":"Polygon", "coordinates":[ [ [ 13.426143, 52.51832 ], [ 13.426195, 52.518392 ], [ 13.426155, 52.518423 ], [ 13.426192, 52.518479 ], [ 13.426252, 52.518476 ], [ 13.426296, 52.51854 ], [ 13.426473, 52.518496 ], [ 13.426319, 52.518275 ], [ 13.426143, 52.51832 ] ] ] }, "type":"Feature" } ] }
  4. When creating a Box using BABYLON.MeshBuilder.CreateBox() I can pass it parameters like width, height and depth, but I don't see widthSegments, or heightSegments for example. Is there a way to do that?
  5. I've created a BoxGeometry and assigned it to a Mesh, then when I click on the Mesh I would like to trigger an update of the geometry, for example change its "size" parameter. Is there a method I need to call on the Mesh to update it? I can see that the size property of the geometry gets updated, but the Mesh is still using the cached version. This is probably an easy thing to do, but I'm struggling a bit as I'm very new to Babylon. I've created a PG here: Any help would be much appreciated
  6. Hi there, learning Babylon.js since 2 days I've created a "container" mesh (with no geometry), and then added to it 2 children meshes, a box and a sphere. I would like to pick the container mesh on mouseClick event, but actually either box or sphere get selected. Is there a way to ignore submeshes? I know there would be many workarounds, like for example creating the container as a box with a transparent material, but I was just wondering if there was a flag/parameter a can set when doing raycasting. Here you can find the PG:
  7. My scene meshes partially created uses ribbons. Orange meshes on picture. All meshes displayed good on screen , but when i try to export scene meshes to OBJ file, then ribbons created meshes not export to result file, without errors. Just nothing, except usual created meshes(black/gray on picture) in result OBJ file , after importing uses freecad/meshlab. And file size is tiny (looks like ribbons just not added to export flow). while i try export only ribbons , in import time i see error "no vertex field found" and file include only elements heading exported_wheel(4).obj
  8. for example i have: html button <button id="objButton" onclick="fileExport()"></button> result of var objtext = BABYLON.OBJExport.OBJ(OBJexport); // this is *.obj file syntax with meshes from scene what syntax should i use inside fileExport function, that popup window savefile in browser? I have syntax with link a href which work , but i need use button, because the program gui with buttons usually, but not with text links. this is a href syntax: function download(text, name, type) { var a = document.getElementById("a"); var file = new Blob([text], {type: type}); a.href = URL.createObjectURL(file); = name; } after this, click link and can save file. I need button way. If possible not way where button press call
  9. Strange flickering on a glTF mesh with DefaultEnvironment
  10. Hello, I noticed that when I am working with a pre-existing model in some 3D creating environment, like 3DS Max, there are a lot of objects have what appear to be layers or children (not sure what the terminology is here). In the environment you're able to turn on and off the visibility of these layers. Like in the picture attached. I want to emulate what is in the picture but using Babylon Js. So that a user can load up a model and decide which layers are visible. Is there an example that already exists that does this? Appreciate the help.
  11. Good day folks! Im completely brand new to Babylon (3D site building in general) and have become an instant fan! Im having a few issues and would like to see if folks can help: 1. I want to have 4 boxes on my site and align 2 on the right and 2 on the left (Such as the "Fashion Show" demo on the main page), how to go about doing this? 2. I want to make my logo and place it between the boxes, any recommendations on how to make this happen? 3. Also I want to place images on the boxes and link them to another site when a person clicks them, how do an ahref in this type enviorment? 4. I would like to change the canvas to black, how to do this? Thank you for all your helpđź’‹ Meka
  12. Hi everybody ! I'm importing .obj files in my application, and I want to change their color. However, the color seems to be changed when the page is loading, but when it's finally loaded the mesh still has its basic grey material (so while the whole scene is loading we can see the mesh being pink for half a second and then takes back its basic color/texture/material). I've seen something about UV maps etc.. but I checked it in Blender and it is activated when I import into obj. Here's a pg trying to reproduce my problem ( first you will need to help me importing my object into the pg because it doesn't seem to be working, I can't see it on scene); I added a skull.babylon to show that the code I provide is supposed to work : Thanks for your time !
  13. shen

    clone mesh from GLTF

    I tried to clone meshes imported from GLTF file and found that meshes were cloned twice. use the debug layer, you can find that the original root mesh was used as the parent of a set of cloned meshes. I also wonder whether the scale of the cloned meshes is correct?
  14. Hey everyone I'm back! I have a mesh that rotates around the Y axis whenever I click and drag along the screen: var currRotationY = 0, currPositionX = 0, clicked = false, originalRotation; canvas.addEventListener("pointerdown", function(evt) { currPositionX = evt.clientX; currRotationY = player.mesh.rotation.y; originalRotation = player.axis.rads; clicked = true; }); canvas.addEventListener("pointermove", function(evt) { if (!clicked) return; //player.mesh is my mesh player.mesh.rotation.y = currRotationY + (evt.clientX - currPositionX) / 500.0; }); canvas.addEventListener("pointerup", function(evt) { clicked = false; }); Whenever my mesh completes a 360deg turn, its rotation.y value continues to grow beyond Math.PI*2. I'd like it to be reset to 0 whenever that happens.
  15. Doug

    Hi Rich.  @rgk mentioned that you might be able to please add a "patron" badge to my forum profile?  Thanks very much!

  16. Hi, I would like to animate a big machine and I have got some questions. The machine has got some rigid bodies (like a robot) and each other have some kinematic relations. rotation/translation ....depending on the physic axis Can I load the whole scene in blender and then export it to a babylon file or is it better to load each mesh as single components in a js file scene ? . Or any other way ? at moment, the machine comtains almost 10 meshes ,that are almost 1 to 2Mbytes stl ascii files each. Once the machine is loaded, there will be animation. The position values of each meshes are computed by a cnc post processor and the positions are available in an array for each ms. I don't know exactly how I will share these values to the babylon js model at the moment . any idea ? Regarding the vision of this project, I would need some advices on the way to implement it right in babylonjs . To give you a better overview of what I want ot achieve , here is a video of my actual project : Regards, Steph
  17. Hi everyone hope you doing great ! I'm doing a project where I want to create complex objects from more simple or "atomic" ones. For example, I create a vertical rectangle and a horizontal rectangle, I merge them and I have a "L" shape. But when I try to merge my "L" shape with another rectangle to make a "U" for example it doesn't work :/ My question is : is there any way to do what I want to do or am I stuck with only one level of merging ? Thanks a lot for your time
  18. hi i am new to babylonjs,this is the first post i made. my problem is that i make a camera,no matter the ArcRotate Camera ,FollowCamera or ArcFollowCamera the target mesh just fixed the position in the center of the screen that is very good for lots of game however i just want to make my game the target mesh a little offset at the center of screen like :at the middle bottom left screen. or any other position i want is there a simply way or a api to make it ? thanks
  19. Hi everyone, I'm just discovering BabylonJS and this is my first post ever on a forum so please be patient with me So, I'm working on a small project which consists at the moment in creating meshes via a funtion addMesh(), and I wanted to add a "selection animation" to all my meshes, basically by changing their color to an emissive white one. However, this seems not to be working, and I saw on other topics that I needed to create an actionManager for every mesh of my scene. Is there any way to make my code bellow work and have an actionManager associated to all meshes created by my function addMesh()? Here are the 2 main functions : var makeOverOut = function (mesh) { mesh.actionManager.registerAction(new BABYLON.SetValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh.material, "emissiveColor", mesh.material.emissiveColor)); mesh.actionManager.registerAction(new BABYLON.SetValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh.material, "emissiveColor", BABYLON.Color3.White())); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOutTrigger, mesh, "scaling", new BABYLON.Vector3(1, 1, 1), 150)); mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction (BABYLON.ActionManager.OnPointerOverTrigger, mesh, "scaling", new BABYLON.Vector3(1.1, 1.1, 1.1), 150)); } function addMesh() { var box = BABYLON.Mesh.CreateBox('box', 100, scene); box.position = new BABYLON.Vector3( Math.random() * 480, 50, Math.random() * 480, ); makeOverOut(box); } Thank you for you time, any suggestion would be appreciated ! ps : Sorry for my English .
  20. Hello, Say I have ParentName > ChildName1 > ChildName2 > ChildName3, is there a quick way to have Babylon tell me the name of the ultimate parent, no matter which child I choose? I can get immediate parent using... scene.meshes[i].parent ... but I need to go right to the top. Cheers,
  21. This playground makes 9 meshes and tries to delete them all at once in a loop. It does not work. Am I missing something? I defeated the problem via this unholy function ... function deleteAllMeshes(scene){ var countMesh = 0; scene.meshes.forEach(function(m) { countMesh++; console.log(; m.dispose(); }); console.log(countMesh + " meshes deleted"); var x = countMeshes(scene); if(x > 0) { deleteAllMeshes(scene); } } Here is the output of the unholy function proving only half of the meshes are deleted per function call.
  22. Emiya0306

    Mesh instance Question

    Hey everyone! Here is another demo to show that I failed to create the instance from mesh. Is something I missing? Please give me a hand, thanks!
  23. lars

    Spine and mesh

    Hello First of all. I m so glad to see Panda on the road again :-) I have just bought the full version and playing around with Spritesheets developed in Spine 3.6.52 professional. It seems like mesh is not supported in panda 2 version 1.5.0. When I export from spine as a spritesheet with mesh animations it won´t show the spritesheet, If i remove the Mesh animation it shows the animation fine: game.module( 'game.main' ) .require( 'plugin.spine' ) .body(function() { //game.addAsset('panda.png'); game.addAsset('sheep.atlas'); game.addAsset('sheep.json'); game.createScene('Main', { init: function() { var player = new game.Player(); player.sprite.addTo(this.stage); } }); game.createClass('Player', { init: function() { //this.sprite = new game.Sprite('panda.png'); this.sprite = new game.Spine('sheep.json'); this.sprite.position.x = 200; this.sprite.position.y = 800;'idle', true); } }); });
  24. Hi, is it possible to show a timer indicator when the gaze is pointing at a plane in VR mode? Would like to do it like the video that i've attached here loading.mp4
  25. Hello everyone After a long time i am back and with something for you maybe a banal issue but for me it's a nightmare . I am trying to make little adventure game and I have issue with my charakter.babylon... when i import him to the game without skeleton everything is ok but with skeleton is wrong everything, like some parts of his clothes is missing... the console is showing me endless error lines etc. I am struggling with this 1/2 weeks . I tried everything like remake my charakter.babylon and skeleton ....I treid google, youtube ... ect. Can you guys help me ? ... sorry for my bad english . I added a photo and a blende file helpblend.rar