Search the Community

Showing results for tags 'Babylon'.

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

  1. I've been studying Babylon and my teacher asked me to do this application, which I have to get the matrix values and display on canvas linking these points with a cylinder. But everytime I run the code, it says that there is a Compilation Error: matrix is undefined, even though it shows exactly what I need Running on an HTML page it says that the problem is at the 93 line matObjects.diffuseColor = new BABYLON.Color3(matrix[i][6], matrix[i][7], matrix[i][8]); What could be wrong? Playground:
  2. Some background followed by several related questions. I have written a Javascript file myExtensionFile.js to submit for consideration as an extension. The current format of the file consists of a public function that calls several private functions and looks like this var private1 = function(a, b) { //code here } var private2 = function(a, b) { var myx = private1(c, d); //more code here } var myExtension = function(a, b, c) { //some code var myx = private1(m, n); //more code var myy = private2(p, q); //even more code } Once loaded you call it using myExtension(a, b, c). Now I have noticed that some files in the Babylon Extensions use BABYLONX Question 1 Should myExtensionFile.js be re-written so that it is called using BABYLONX.myExtension(a, b, c)? Question 2. If I changed to using BABYLONX is this the correct way to re-write myExtensionFile.js? var private1 = function(a, b) { //code here } var private2 = function(a, b) { var myx = private1(c, d); //more code here } var BABYLONX; (function (BABYLONX) { var myExtension = function(a, b, c) { //some code var myx = private1(m, n); //more code var myy = private2(p, q); //even more code } }()); Something to do with closures (I think) but haven't got to grips with them as yet. Question 3. Would using BABYLONX in this way clash with other extensions? Question 4. I can see that using BABYLONX rather than BABYLON shows in code that an extension is needed and should be loaded but would using just BABYLON be better for continuity? Is it possible to do that? Question 5. How would you format the myExtensionFile as typescript. I know I could just change the js file extension to ts but to be 'proper' typescript should I be using modules and classes? Question 6. For someone with a limited skill set (like me) would it be useful to have an 'How To Format A Babylon Extension for Javascript and Typescript' document? When I am clear whether there could be a standard format for writing extension code, what the format looks like and how to do it I wouldn't mind having a go at the documentation. Whether I will ever have sufficient clarity is another issue.
  3. In BabylonJs there are many constructors that require a name like var box1 = BABYLON.Mesh.CreateBox("Box1", 10.0, scene); Where "Box1" is the name. Why is this useful ? How can we use "Box1" later ?
  4. Hi All, I just found this framework babylon.js and see some example at babylon playground, i have been wondering is there some example how to insert new mesh at canvas with onclick button html ? what i mean is : when i click button, there will be new mesh (box) appear and it will always insert new mesh(box) every time i click the button thanks alot, wayan
  5. Hi, i'm trying to export from blender a shape key animation. I see animation in blender, but it isn't exported in babylon file. (i can't see animation in code, and in sandbox test too) Attached blander, babylon and log file.
  6. I know that Phaser is a 2D engine but I'm wondering if there might be some way to render 3D into a Sprite or DisplayObject? Our game would benefit from having a simple 3D element (a texture mapped wheel). It wouldn't work to do canned spritesheet animations for this case. Are the popular engines threejs and Babylon flexible enough to render into a Bitmap - or some other object that I can use as a texture for a Phaser sprite? Or perhaps some other way? Does Phaser offer a way to do a bitmap fill of a polygon that is drawn with a Graphics object? Thanks
  7. 3D realtime editor minimal proof of concept on Github. I put it on Github because some people were interested to see how it works. Maybe on this forum also. Note the poor code quality because it was a rapid prototype. The camera and the objects are the same in every tab open. Tested in Firefox and Chrome
  8. So I've checked the docs here: This is all cool and stuff, but I was wondering whether there could be a way of calling specific animation from the animations list of mesh? Thanks
  9. Hi everybody! I wanted to ask whether there was a way to integrate SoundCloud to Babylon.js? I'm making game in which I want to give players the ability to choose their favorite music from SoundCloud so that it will play in the background. I tried the code below but it didn't work and also crashed my browser var music = new BABYLON.Sound("Music", "", scene, null, { streaming: true, autoplay: true }); Any ideas?
  10. Here is my simple code: <html> <head></head> <body> <canvas id="renderCanvas"></canvas> <script src="jquery-2.1.4.min.js"></script> <script src="babylon.2.2.max.js"></script> <script> var canvas = $("#renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var camera = new BABYLON.ArcRotateCamera("Camera", 1, 2, 10, new BABYLON.Vector3(0, 0, 0), scene); scene.activeCamera.attachControl(camera); engine.runRenderLoop(function () { scene.render(); }); </script> </body></html>When I open that with jQuery and BabylonJS in the same directory, I get this error in Firebug: It works in neither Firefox nor Chrome. WebGL does otherwise work. I can, for example, run and the Three.js examples. I get this same problem on both my Windows and my Mac. Anyone have any idea what's wrong? Here is my Firefox-configuration on Windows:
  11. Hi everyone! We are developing a web page (Prestashop) which need a mug in 3d with some customizable areas. The customers can create their own designs, with pictures or text. They also can change the inside part of the mug and the handle with different colors. Then they can buy the mug with that design. (The handle and the inside part colors could be different) The main idea is to customize the front, the back or a mesh of 360º. thanks to the babylon library, we can attach the customization as a texture of a mesh. It is important that the mug has defined the different mesh in the babylon object. So we need the next elements: - A .babylon file with the mug, made in Blender or whatever. - A mug with the measures of the image. - The mug needs to have the follow different meshes (explained in the different photos): - A mesh exclusively with the inside part, to change the color of it. - A mesh exclusively with the handle, to change the color of it. - A full part of the outside of the mug. - A 360 printing zone: 220x90mm - A front printing zone 85x85 mm - A back printing zone 85x85mm - It is needed that the handle, the mug texture and the shadow will be exactly the same as that picture: - Inside the babylon world, we have to be able to rotate the mug in order to appreciate the design of every part of the mug. It would be perfect with the gradient of the previous picture, but with a 360º rotation. The size of the design zone for the customer, is the same to the mesh. It means that if we set the customized to the corresponding mesh, it have to appear correctly. We explain that, because of the UV mapping in the Blender mesh. It is not needed to make the functionality of change the meshes color or attach the picture to them. But we really need that the result mug and the babylon world, have the appearance of the previous picture ( the light, the shadow, the texture, the reflexes...) That is a very important and urgent project for us, and we can pay for the job. Please send us the total budget. We are able to pay by paypal or the way you prefer.
  12. Hi Guys, I am working with a custom model and I am attaching child meshes to it. I am trying to rectify a problem that I am having when I add colour to the model. I lose the 3d shape, the child meshes look flat and you cant differentiate between them When I remove the colour in the material, in greyscale it looks fine. see attached pictures for comparison. Also Multi Material doesnt seem to be working as expected. The next issue I am having is the orientation of the "base modal". When I init the script its rendering the base in an angle vs being upright, as per picture. If I apply a transformation to it, it does something funky to the rest of the world co-ord mapping and everything else breaks afterwards. I am new to this and in 3d programming in general. Any insights to help me solve these 2 issues would be helpful. My code can be found on
  13. Hey guys, is there a way of detecting a collision between a known mesh and an unknown one? For example here: Here we have box and let's say I want to check if this box collides with left or right box but without using box.intersectsMesh(mesh) considering that we actually don't know what we are colliding with and want to get the info about the object we are colliding with. I searched the docs yet couldn't find it, is there way to do it? Thanks
  14. Hi guys, does anybody here know whether Babylon.js supports material instancing or not? Thanks
  15. Hi All, I'm, still a newbie (-: I've got this sprite image, i want to wrap a box created using MeshBuilder.CreateBox with it, tried using this great walk throw no success change the sprite structure? do this in a different way? Thank you!
  16. Hello, The sample assets and index file is nice and all, but it should be part of a separate nuget package, not part of the core BabylonJS package. That would make things much clearer sharing integration, with BabylonJS dependency, into the rest of the application. I can "workaround" it for the moment by packaging only the Babylon bits from my integration package, which momentarily has a dependency on Babylon,JS for instance. Thank you... Regards, Michael Powell
  17. Hi guys, so I've just got myself a new google cardboard (yeay ) and now I'm testing it with Babylon.js. I created this "dull" demo scene just to test how this VR stuff works. Now the problem is that my VRDeviceOrientationFreeCamera doesn't really respond to device input (it's supposed to respond to device orientation isn't it?) Can somebody explain what's going on here? Thanks... Btw I'm using xperia compact z3 Edit: I'm also experiencing some rendering issues. For example the PG provided above shows 2 cubes side-by-side instead of showing only one.
  18. Hi everybody! I was wondering about which properties of particle systems are most resource-consuming and how we can optimize particle systems in general? Thanks...
  19. Hi everybody! So I've been working with Babylon's Animation system and I've been stuck with one issue lately. I'm trying to execute an animation but also trying to keep the current position as it is. I've been trying to get this to work here but failed miserably
  20. OMAR


    Can I lock the FPS of my Babylon.js app so it has 30 FPS instead of 60? -Thanks
  21. Hello, I'm a newbie to BJS, just starting (-: LOVE IT! Got a small question please: I've got a stack of box meshes. i can rotate the stack. but when i pick a box from the stack i want to rotate this single mesh only so the entire stack stay on place. Thank you!
  22. hello i am creating a website, and will be needing to have things like collada files being rendered on the page and will proberly have a lot of meshes and coding needed to be done, the site id for opensim and well basically its a virtual world, and i will need to be able to view avatars in the website and also be able to view products and also thinking of adding a shopping system where they can view what the avatar looks like with x on and so forth it systems are in meshes and textures, would this be possible with babylonjs?
  23. Hi, can we assign different materials to the instances of the same object so all instances have their own material? -Thanks
  24. Hi guys! So I've been checking out this demo here and one thing got me interested in is that this demo performs differently under different devices. In my desktop PC, only approx. 1/4 of the bars are getting scaled, while on my laptop 3/4 of all the bars are getting scaled up. And in my mobile phone none of the bars show any change. Can somebody explain how does this stuff work? Thanks
  25. Hi all I am experimenting with lights and shadows in Babylon JS and really liking it! I did stumble onto one thing that confuses me. Initially I was using an invisible box that I would use as a parent for a light source, a visible proxy for the light source, etc. Animate the invisible box and everything else follows nicely. This works fine for illumination. When I added shadows to the scene things broke down a little bit. If an object both receives and casts shadows then it fails to be illuminated. Reversing the parent relationship fixes things - if the light source is the parent then illumination, shadows and animation all work smoothly. Here are some playgrounds to show the different scenarios. I left out the animation as it doesn't seem relevant. Light as parent to the proxy - Everything works Proxy as parent to the light - casting shadows works but receiving shadows causes the blue box to lose illumination Proxy as parent to the light (receive only) - casting shadows works, removed receive so that illumination works So, am I missing something? Or is having the light as the parent just the way to go? Thanks - CT