Search the Community

Showing results for tags 'solved'.

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 1638 results

  1. Hello, Does anyone know why I get the error 'Earcut was not found, the polygon will not be built.' when using BABYLON.MeshBuilder.ExtrudePolygon? I created a PG with the exact same function, but on the PG it works fine: on the plane to create a shape. It does not work in my code though which is annoying.. here's the error: BJS - [06:47:49]: Earcut was not found, the polygon will not be built. Uncaught TypeError: i is not a function at (babylon.js:44) at Function.t.CreatePolygon (babylon.js:32) at Function.t.ExtrudePolygon (babylon.js:32) at r.scene.onPointerDown (scene.js:60) at r._processPointerDown (babylon.js:12) at HTMLCanvasElement._onPointerDown (babylon.js:13) Thank you.
  2. Language: TypeScript Physics Engine: CannonJS Hey all, I would appreciate it if someone would help me solve these 2 mesh physics problems that I feel are related. I spent a lot of time trying to solve these related issues on my own and could not figure out what was going wrong. RELEVANT NOTE: BOTH problems occur right after switching from 1 scene to another scene. They only happen right after a scene loads. I have a video that demonstrates the error below. Problem 1: After loading each mesh (each with its own physics impostor), each mesh jumps a little (and then afterwards, they start falling because of gravity). I was wondering why/how to prevent it from happening. Note: I suspected that it is because they load too close to the ground and bounce because the computer erroneously thinks that the meshes/ground are touching. I am able to lessen the jump by making the ground’s position.y = -0.5 (so it is even clearer to the computer that the objects are not touching because all objects right now load at position.y = 0 (and I move objects before the next object loads so they don't intersect and start a collision)), but the jump still occurs, just less of a jump and still noticeable. Problem 2: After loading a certain scene, after being loaded, each instance of a special object I created (a class I created that includes a mesh) jumps in opposite directions from each other. I’m not sure why. I have a feeling it has to do with having multiple instances of the same class, each with their own mesh. After the scene loads, I am able to individually access each mesh and have them move individually, so their movement isn’t intertwined. Code/Video in Link: Relevant code and 1 video demonstrating error are in the Dropbox link. Note: The video shows both errors happening at the same time. Note: The code in this folder are not in the same directory/folder structure that I normally use for this program (so that is not the cause of my issues) [Link Removed] Thank you to all who read/and might help me with this issue!
  3. I want to generate multiple textures from one base texture. The multiple textures would have different color of a specific attribute (skin, shirt, pants, hair..). I looked at one example (, but the bunnies it uses are extracted from the image and not dynamically generated with Pixi... So, how do I generate multiple textures with different color specific attributes with Pixi? Example code would be greatly appreciated.
  4. Hi, I am trying to import an animated character from but without success. I am a developer, not a 3D Designer so I don't really understand what happening ^^ I go on, select a character and an animation (walking) I check "in place" animation", export with ".dae" extension, 24 frames/s, uniform key frames reduction, with skin, and finally download the the character (zip), I import the .dae in Blender, then export it with the BabylonJS exporter I go an error in log : can't export because of armature I read I just have to ctrl+A in Blender then scale => indeed, after that, the export is working, but it breaks the animation If I continue, load the .babylon in babylon I see the character loaded, with textures But... animation make absurd things, the character is not "moving in place" but totally go away It is not a direct Babylon problem : the problem is this "ctrl +A > scale" that breaks the animation. My question is simple : after imported the .dae in Blender, what I have to do to export it correctly, with animation, in .babylon format ? My goal is just to load ANY animated character in BabylonJS, ideally, a character moving, jumping, and crouching. That could be another question : how to get many animations from mixamo in a single export ? I understood we then just have to select frame index and play the good animation. So, loading few times the same character for different animation seems not very smart ^^ Thank you for your help
  5. I was looking at the pg in the above post, and noticed that the near plane is positioned incorrectly. It seems that passing in a source plane to meshBuilder's createPlane function translates the plane in the wrong direction, and also rotates it so that it is facing the wrong way. For a plane with normal (0,0,1), and a point on the plane (0,0,10), meshBuilder will position the plane at (0,0,-10) and face it looking along the -ve Z axis. Example pg, with what I believe are fixes here.
  6. Hello everyone , I'm looking for help with getting a .FBX into my Babylon scene and applying textures to it. The original model was made by someone else, I am just tasked with putting it into the Babylon scene. I can not show the actual file either as it is not my property which I am very sorry about, I understand it would help a lot to post it here, that way you could all help me better, but I am not able to. Again sorry . Hopefully my description will be enough . I dont know very much about blender, so I'm not sure exactly what I am doing wrong. I have a model in blender, specifically a .FBX, which uses many different materials and pieces. When I try to export it to a .babylon and then import it into my scene it becomes mis aligned. As in, instead if all of the pieces being one on top the other and positioned correctly, they seem to be rotated or repositioned. Not only that but I get many errors that tell me I am missing materials, but when I look at the files directory for those missing materials I cannot find them. I am using blender version: Version 2.79b (2.79b 2018-03-22, Blender The Babylon exporter I am using is version: 4.6.1 The code I use to to import the model is: BABYLON.SceneLoader.ImportMesh("","models/","Test3.babylon",this.scene,(meshes)=>{ importFunc(meshes); }); The errors I get are: BJS - [11:10:38]: Error while trying to load image: models/AlbedoTransparency.png But 8 of these errors, all with different materials Any ideas what I am doing wrong? Thanks for reading
  7. I am trying to stop an object to pass through another object but the ball(centre sphere) is still going through another ball(left sphere). I am trying to slide the sphere in the middle towards the left in speed as soon as it collides with the pink sphere. I have tried how to increase decrease speed of the blue sphere but it still passes though the centre sphere. My source code file is attached and can be found below. Please help me. Thank You
  8. Hello everyone, I have a strange problem with waterMaterial in my scene, its hard to reproduce it in a playground so here are images : The problem is that the reflection part of the water becomes suddenly opaque. The ground becomes no more visible at some frontier (along x axis on this image). I made a video to make it more clear, focus on the transparency of the water : babylonjs.webm I don't know how to fix this 😕 Any idea ?
  9. Hey everyone, I was wondering is there a way to fill a gui image? What i mean by fill is if i set fill horizontal and 50% half of the image would be gone. something like this playground however gui and not textures/shaders: edit: it does not need to have the fade effect like this shaders.
  10. Hi, I would like to create an environment with several objects (in the playground, 2 objects) that cannot be at the same position at the same time (cannot be superimposed). I used the moveWithCollisions method for the Mesh objects, and while it works as expected, when two objects collide and the ellipsoids around them are not identical in size, one of the objects goes to the top or to the bottom of the other. I would like for them to just stay in the same vertical position, and if they collide, simply prevent them from moving, not moving to the top or to the bottom of the other object. Is there any thing you recommend? Playground: If you move the red object towards the purple one, when they contact, the red object moves to the top of the purple one, and I would like them to stay one next to the other. Thanks!
  11. Hi all, I was wondering if it was possible to access variables from a previous pass in the shader, i.e color of fragment or something along those lines. I want to have something that changes color over time after an event occurs. So if I can access a time delta plus a previous color then I can slowly modify it to a new state, is this possible? *Note this is my first time working with shaders, please excuse any stupid questions 😕 Thanks.
  12. Hi, Hey in fact there are problems in MANY GUI ELEMENTS, "text box", buttons, etc!!!
  13. Hello, I'm doing tests with playfab, when I use the LoginWithFacebookInstantGamesId in the postman program I get this error: I also included it in my project to see if it was something from the postman and it gives me an error of the CORS. This is the code I use to get the Facebook Instant Games Signature
  14. I must be doing something incorrect with the water, as it is rendering black: I pasted the code from this playground, and included the files for the waterbump.png and skybox: Here's my code, although its very similar to the PG. My guess is the error isn't in this code, though I'm not sure what else would affect the water. It is as if it has nothing in its render list -- but I can definitely see the sky, and the sky is added to the list. this.canvasEle = document.getElementById('main-canvas') this.engine = new BABYLON.Engine(this.canvasEle, true) this.engine.enableOfflineSupport = false this.engine.setHardwareScalingLevel(1) this.scene = new BABYLON.Scene(this.engine) //this.scene.freezeActiveMeshes() //this.scene.collisionsEnabled = true //this.scene.clearColor = new BABYLON.Color4(0.3, 0.5, 0.75, 1.0) this.scene.fogMode = BABYLON.Scene.FOGMODE_EXP this.scene.fogDensity = 0.0005 = new BABYLON.TargetCamera('camera', new BABYLON.Vector3(0, 0.5, 0), this.scene) = 0.8 = 0.1 //this.scene.autoClear = false //this.scene.autoClearDepthAndStencil = false var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0.66, -0.75, 1.25), this.scene) light.position = new BABYLON.Vector3(1, 40, 10) light.intensity = 0.5 var light3 = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-0.5, 0.75, -1.25), this.scene) light3.position = new BABYLON.Vector3(1, 40, 1) light3.intensity = 0.5 var light2 = new BABYLON.HemisphericLight('h', new BABYLON.Vector3(0, 1, 0), this.scene) light2.intensity = 0.6 var skybox = BABYLON.Mesh.CreateBox("skyBox", 5000.0, this.scene) var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", this.scene) skyboxMaterial.backFaceCulling = false skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("images/TropicalSunnyDay", this.scene) skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0) skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0) skyboxMaterial.disableLighting = true skybox.material = skyboxMaterial var waterMesh = BABYLON.Mesh.CreateGround("waterMesh", 2048, 2048, 16, this.scene, false) var water = new BABYLON.WaterMaterial("water", this.scene, new BABYLON.Vector2(512, 512)) water.backFaceCulling = true water.bumpTexture = new BABYLON.Texture("images/waterbump.png", this.scene) water.windForce = -10 water.waveHeight = 1.7 water.bumpHeight = 0.1 water.windDirection = new BABYLON.Vector2(1, 1) water.waterColor = new BABYLON.Color3(0, 0, 221 / 255) water.colorBlendFactor = 0.0 water.addToRenderList(skybox) waterMesh.material = water Any ideas?
  15. Hi, im having a problem with the material of a Ribbon Mesh when im in wireframe mode, it appears in black all. It should be modified because it is changing the color of the mesh with colorKing, heres an example but in my code all mesh is black. In the playground, if you take a look of the sides, it has color. In my example it doesnt Help me out 😃
  16. Hello everybody, I'm looking fore some advice using a PS4 (DS4) Contoller for mobiles. So far I've found at least one PLAYGROUND where the camera zoom is responding to my Controller keys. But I have no idea which type of WebVRController is instantiated and how the key-mapping happens (I'm not fit in debugging mobile applications) . Maybe there is one specific WebVRController already implemented or is the Generic type the right one? Does someone have experience with this topic? My hardware conection: Dualshock controller (DS4) paired with an android mobile. Thanks in advance
  17. I'm trying to get post process working on a project that also should run in VR, but unfortunately things break as soon as I add the scene.createDefaultVRExperience() to the project. This happens even if VR is not activated yet. Is there any way to use post process and VR together? Here is an playground highlighting the issue: (just uncomment line 9) Thanks!
  18. Hello, I am trying to access the absolute positions of meshes inside a GLTF scene. But for all the meshes getAbsolutePosition() always returns 0,0,0. I tried several things (computeWorldMatrix, etc.) but it did not help. What am I doing wrong? Playground Link: Thank you in advance
  19. Hi everybody, I would like to create an virtual visit in several rooms to show arts realisations. I've beginning but I don't know if I use good option. My first trie is to use layermask to switch between rooms. But I suppose that it's possible with better solution. Or it's better to just use visibility mesh property. I didn't find in forum or playground, exemples to do that... Perhaps it's possible to switch scene directly, or unload/reload objects of the rooms. If you have an idear how make better, thank you by advance.
  20. Header text does not start after the checkbox but on it. If we check a box, it comes back to normal.
  21. I'm trying to animate the scaling of a plane, but that doesn't seem to be possible? Am I doing something wrong here?
  22. Hi, I am looking for a solution to achieve some kind of 'shared' transparency for parent and child meshes. Here is my simple playground The idea is to make both boxes be transparent against the ground (and other meshes) but not transparent to themselves. Please see the picture below. Can you help me with this? Thanks for your kindness.
  23. I explain the problem: I record a first camera position in a variable. Then I move the camera to compare in the state the new position of the camera and the variable in the old position. The problem is that the variable is reassigned in real time when the camera is moving, which I find very strange. The variable should not be changed. See in this PG and the console. Click once on the button to save the variable. Then move the camera, the variable changes all alone. So at the second click on the button, the alert is never reached, because the variable has the same value as the new position of the camera, while the record was made on an old camera position. If we look at this PG more simple, it's the same thing : It's something I saw a long time ago, but that did not bother me, but here I can not record a camera position to compare it to a new position without the variable being rewritten by the Holy Spirit, LOL. [Edite] : This does not seem to be related to Chrome 71. I have tried FireFox and Opera too and it's the same thing. So I think that the Babylon reassigns the variables that it has to assign, maybe the light as well as something else in Babylon reassigns the variables that it has to assign. I will check it Yes, the lights too. As soon as the light is moved, it rewritten the variable that it has assigned previously. I think that all entities in Babylon are rewritten the variables automatically. So currently, we can no longer record transformations (position, rotation, scale and other modifications) in a variable to preserve previous states and compare them with new transformations. This is a big problem for the editor that one develops
  24. Hi Is it possible to make videoTexture with rtsp stream on it or shader that can show rtsp stream?
  25. Hi Can I somehow make distance for LODs to count from the target position of ArcRotateCamera? I'm making sort of map application and when I tilt the camera down, visible meshes on the map is under the camera and I want them to be where camera is looking