Search the Community

Showing results for tags 'babylon js'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 21 results

  1. hi everyone,I want to get x and y from ground when I click and where I click to do click to move. I tried this but it not working to me: P.S scene.meshes[1] is a ground var pickInfo = scene.meshes[1].pick(ev.clientX,ev.clientY); error: Object doesn't support property or method 'pick'
  2. Hey guys, Love babylonjs, been using it to create arch-viz products and it's great. My questions is: I'm exporting from 3dsmax a scene that contains 4 specific house models each with specific materials, then I instanced the houses all over the map and changed the material on specific houses according to their location relative to my sunlight(directional light). I did this so that I could use different ambient maps for the different houses. My issue is that all the instances are exported with the same material even though some have a different material, example ; I want the mesh for House-South-1 to have material of House-South-1, and House-North-1 to have material House-North-1, but all the instances of the mesh are exported with the same material. Thanks,
  3. If we can, please explain with some steps! Thanks!
  4. Hello Everyone, I am seeing an error in chrome debug panel which says "Uncaught SyntaxError: Unexpected end of JSON input error on browser tool " I have also attached the screenshot of the error. I am using Babylon .5.4 exporter with the latest version of Babylon js on 2.78a blender. I am using screenimportmesh and asset manager to load 2 of my Babylon file. But Asset manager is failing to achieve onsuccess event. so scene is not rendering, But if i am calling render scene on assetmanager onerror scene is rendering which is a bit confusing, why The asset manager calling error when it is able to load models. For reproducing the issue : Reload the below link for 2nd time ,it will regenerate syntax error on browser debugger. https://s3.amazonaws.com/sudha.xyz/buggy/screen.html Reproducing scene not rendering problem : remove below code from line number 111(visual studio code) run(gamescene); This function is calling my scene rendering. But it should be fire up from mesh load onsuccess .if it is firing up from onerror . if i remove calling the above function from error call scene will never load I think it is linked to the Uncaught SyntaxError: Unexpected end of JSON input error on browser tool error. Kindly help me with this bug . please note: There are some other errors for manifest and one of startup function which I am aware of, and as much as I know manifest are not really responsible for this issue Thank you
  5. I am a newbie -- wanted to know how I can create a transparent cube that can contain other objects that are within it which are visible (kind of like hidden but visible objects) Could you please advise what I should be trying to create/search.
  6. Hi, I have created the object on Babylon Js and can able to rotate and view the object using arc rotate camera. My requirement is: 1. I positioned the camera on some position. 2. When the user click and move the mouse on canvas, can able to rotate the object. I have done the above things Whenever the user release the mouse on canvas while rotating, the camera back to the default position of initial stage.----> This is my requirement. Can anyone help on this?
  7. Arc rotate camera

    Hi, I have created the object on Babylon Js and can able to rotate and view the object using arc rotate camera. My requirement is: 1. I positioned the camera on some position. 2. When the user click and move the mouse on canvas, can able to rotate the object. I have done the above things Whenever the user release the mouse on canvas while rotating, the camera back to the default position of initial stage.----> This is my requirement. Can anyone help on this?
  8. Triggering animations

    Hi all I'm trying to make an animation play when i hit a button so far I've tried using an onclick attribute on the button tag but it didn't work and nothing on the forums looks like it would help. I'm trying to make it a bit like jigspace if that helps. }); project.js
  9. Hi Guys! So i'm starting with babylon a few days ago, so I have one doubt and I don't know how to do it right, so my question is. I have sphere1.position.x = 20; and sphere2.position.y = 30; , and I want create a cylinder that goes to sphere1 position.x to sphere2,position.y, How can I do that? Is it possible ? Something like the photo below. Plz! If someone know how to do it, plz! send a tutorial link
  10. Frist- Hi evryone, i'm newbie on Babylon Js. Second - i'm lookin for similar args , with no goal. - - sorry if alredy exist one Problem I'm looking for method to select all surface facets (basically I select the entire surface) My idea is: R1: "Facets with two vertices equal are contiguous" ( evaluate a set of coordinates) R2: "Valuate the same oriented 'Normal' facets " Evaluate true of R1 && R2, made well done job? Thanks 4 help
  11. Hi, babylon js developers! Please help me :). I want to detect particle collision with camera elipsoid, and when particle will collide - destroy this particle. Can i make this in particle system update function or how? Babylon js can make this for me?
  12. Hello, I am applying texture using my own uv2. This is the texture applied on a sphere (normal map): And this is the texture: So my problem is that on border of each parts there are seams due to the interpolation between one texel colored and another one at Color4(0,0,0,0). This is causing void then black till the right one value. I could expand the border of one texel (dilatation) to fix that but this is increasing padding in my texture... So first I would like to know if there is another way to cancel this interpolation. Thanks !
  13. Hi everyone, I have a big problem... I see when I execute my game with basic animations, some objetcs have location change...I had understood than the problem is the Babylon's exporter 4.6.1 merge animations objects like in this example : After creation animations in Blender : After export with Babylon Exporter : I saw this topc but I don't understand if there is a solution or not ... Anybody can explain me how can I resolve this problem ? Use previous release of Babylon Js or Blender ?? Thanks!
  14. Help with fur generator

    Hey people I'm new to the board and I wanted some help with an experiment I did. So, I wanted to see if the fur simulator worked well with cutom 3d models, so I exported a 3d model from a game. In this case I was testing with Donkey Kong. now, I have exported it in .babylon and it seems to work with sandbox. I downloaded the fur plgin and copied the debug layer to test, and after doing some tweaking I uploaded it to let the .babylon model load. After doing that I got http://goo.gl/fjm6w9 in the JS debug window I got an error saying "cannot set property material of undefined." dont bother the XML request error. Can anybody please help me?
  15. Cameras and angle limits

    Hey guys! thanks for all the answers in the other topic, those helped me a lot ;). I have a doubt, how can I set a min angle and max angle for my camera rotation? because I don't want my camera to rotate 360° . What I tried is to let a little box to follow the camera and it has a collision with some walls in order to stop showing the part I don't want to. it worked but the effects are really ugly. That's is solution, as I mentioned It's has some ugly effects and is not always exact. var prevTarget= jQuery.extend(true, {}, camera.getTarget()); //OP1 scene.registerBeforeRender(function () { for(var i in objs)//the walls I mentioned if (objs[i].intersectsMesh(sphere, true) && scene.isReady()) camera.setTarget(prevTarget); prevTarget= jQuery.extend(true, {}, camera.getTarget()); }); //or //OP2 (more precise) setInterval(function(){ for(var i in objs) //the walls I mentioned if (objs[i].intersectsMesh(sphere, true) && scene.isReady()) camera.setTarget(prevTarget); prevTarget= jQuery.extend(true, {}, camera.rotation); },0.1); I hope a better way to do it, thanks guys for supporting us
  16. I follow a Microsoft tutorial to show a scene that I exported from 3ds Max. The tutorial link is: https://blogs.msdn.microsoft.com/eternalcoding/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender/ The Babylon scene can be seen on the Sandbox, but not offline. Here is my page code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using babylon.js - How to load a scene</title> <script src="babylon.js"></script> <script src="hand.js"></script> <script src="cannon.js"></script> <!-- optional physics engine --> <script src="oimo.js"></script> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "TestExportFrom3dsMax.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } </script> </body> </html> How to show the Babylon scene on web browser offline?
  17. Multiplayer?

    Hi, I'ts possible to create a multiplayer game with Babylon JS? Maybe adding node js is possible? (example fps multiplayer, racing game)
  18. Hi All; i am creating simple box and some other mesh, when i am rotating camera jagged lines are visible, how to avoid aliasing. and i should pick the cube also..
  19. Hi everyone, I've been using the exporter for 3ds max to babylon to export simple models to viewing on html, everything works fine (with textures and all) but now I want to import a larger and more complex model but I cannot do it because the exporter to babylon has a limit of 65k vertices, I thought to divide the model into several .babylon files. My question is: how can I merge several .babylon files into one html? In this question (with my code to load one .babylon): http://stackoverflow.com/questions/27611416/load-multiple-babylon-files-in-one-html/27628095#27628095David Catuhe told me that it is possible to use instructions "BABYLON.SceneLoader.Append" but I dont know how to use it. I saw also in: http://www.html5gamedevs.com/topic/6436-load-mulpitle-objects-babylon-to-scene-with-heightmap-skybox-etc/page-3?hl=append it is possible to use "append" but not if this requires another version of babylon.js. I am new to babylon but I find quite interesting and would like to learn more. Sorry if something is misspelled, my native language is Spanish. Just in case: Im using the exporter for 3ds max because I cannot run the exporter for Blender (am 32 bits). Thank you very much.
  20. Fixing texture repeat

    Hi! I am a newbie to babylon js, and I already have problems. I have loaded textures to my object (stick/bar) and problem is when I resize my object, texture resizes too. I tried to apply texture after scaling object, but texture resizes anyway. I really don't want to create a new texture for every object just because its size changes. So, my questions are: Is there a way in babylon js to set its size to be fixed? Or is there a way to set texture to repeat itself rather than scale itself to wrap the object. Image is attached (mind the upper bar is longer and its texture is scaled <-- that's my problem).
  21. How do we identify the object whiel trigering a custom action?, See the example below window.onload = function () { // Check support if (!BABYLON.Engine.isSupported()) { window.alert('Browser not supported'); } else { //var canvas = document.getElementById("renderCanvas"); var canvas = document.getElementById("canvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, 1.0), scene); var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene); camera.setPosition(new BABYLON.Vector3(20, 70, 100)); light.position = new BABYLON.Vector3(0, 25, -50); var y = 0; i=0; var ddd2= BABYLON.Mesh.CreateBox('ddd', 20.0, scene, false); ddd2.position.y = y; y+= 45; ddd2.actionManager = new BABYLON.ActionManager(scene); ddd2.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,test)); var ddd3= BABYLON.Mesh.CreateBox('ddd4', 20.0, scene, false); ddd3.position.y = y; y+= 45; ddd3.actionManager = new BABYLON.ActionManager(scene); ddd3.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,test)); // Render camera.attachControl(canvas); engine.runRenderLoop(function () { scene.render(); }); } function test(){ console.log(this); }};