luka_friend

Members
  • Content Count

    15
  • Joined

  • Last visited

About luka_friend

  • Rank
    Member

Contact Methods

  • Twitter
    luka_friend

Recent Profile Visitors

822 profile views
  1. Oh my God. You have no idea how much you have helped me. I was stuck with this problem. I can only say thank you, but it cannot express my gratitude enough. I have tried both of your solution (Luaacro and Wingnut) and bot of them actually worked. Unfortunately by the time I logged in back to forum, there were already both of your replays - and I can only thick one of you answers as solved. I have choosen Luaacro, because he was the first one (don't resent me Wingnut). Thank you both (both of your solution work)!
  2. Hi! Does anybody know if there is a way to set color of the plane to transparency? If i set hex value of plane to "#80FFFFFF" (should have 50% transparency) it just becomes black. How can I set not to have background color only BLACK text. Or if I set alpha value to transparent, everything becomes transparent. But I want only transparent background. You can see the problem in the picture (white rectangle - on which text is on is my problem):
  3. Is there a way to set color of the plane to transparency? If i set hex value of plane to "#80FFFFFF" (should have 50% transparency) it just becomes black. How can I set not to have background color only BLACK text. You can see the problem in the picture (white rectangle on which text is on is my problem):
  4. Almost forgot to thank you - - > THANK YOU WINGNUT
  5. Thank you so much Wingnut (and Deltakosh of course)! I was really concerned if this is even possible in babylon js! Thank you again it really means a lot when my questions are quickly answered.
  6. Hi! I was wondering if in Babylon js exists rendering 2D text on screen? I would need this for my 3D model dimensions. Here is an example URL: http://www.cadstudio.cz/img/ext/ai-dim3d.gif (numbers for dimensions are what I want to achive). I am familiar with DynamicTextures but in DynamicTextures I would require a 3D model so I could display my text. And in my model I would like to see text always perpendicular to the camera. Here is what I have in my mind URL: http://drivingdimensions.com/uploads/img/65_rectangle8.png If you look at first URL and second URL, you notice that text in second URL rotates so that it is always perpendicular to the camera. To simplify my question I need to render 2D text and the text needs to be perpendicular to the camera (even If I would rotate the camera around the object it would still stay perpendicular). Can anyone help me with this?
  7. Hello! I am trying to create a grid of bar elements (to form some kind of net) and I was wondering if there is a way to group these bars, so when I want to move the net, all of the children objects would move also. EXAMPLE: var bar1 = new BABYLON.Mesh.CreateBox(name, 1, scene); var bar2 = new BABYLON.Mesh.CreateBox(name, 1, scene); var bar3 = new BABYLON.Mesh.CreateBox(name, 1, scene); <-- how do I group bar1, bar2, bar3 so that I could use : group.position.x = 10;
  8. Still the same problem. Didn't work!
  9. Thanks I will try your suggestion.
  10. Thank you, I really appreciate quick response, but your solution implies that I need 2 standard materials (or in another words each new materal for bar with different length). So if I want to have 40 bars with different lengths, this would meant 40 new standard materials. And this is a lot of unnecessary overload of code(not mentioning the additional code if user want's copy bars and then resize them). But if you have any solution (even crazy one) about how to achieve having only 1 standard material for diffrent bar lengths, I am open for ideas. Thanks
  11. Ok. Here is my example URL: http://www.babylonjs-playground.com/#1EJRYH#2 I tried to add my own textures but I didn't know how to upload them, so I just used texture of the tree from official Babylon js website tutorial. You can see the difference in the size of leaves. And for Raananw: Yes you assumed correctly. What I meant by resizing was setting higher value (length) for 2nd bar the the first one - I created second bar longer than first one (there was no scaling afterward). I appologise for my misuse of words.
  12. Ok. First of all I appologise for replying so long. I have a lot of work and little free time for by Babylon js project. I have tried both of your solutions, and the problem is still the same. The texture always resizes, no matter what I do (yes I set uScale/vScale). This time I am posting my code if maybe you see my problem in code. Code for creating models and applying textures: for (var i = 0; i < number1; i++) { var cylinder = BABYLON.Mesh.CreateCylinder("rebarGrayZAxis" + i, length, this.diameter, this.diameter, this.subdivs, this.scene, false); cylinder.material = this.textures['RebarGray']; // APPLYING MY TEXTURE cylinder.position.z = z1; cylinder.position.y = y1; cylinder.position.x = x1 + (i * divisions); cylinder.rotation.x = Math.PI / 2; } divisions = length / number2; for (var i = 0; i < number2; i++) { // Rebar name, height, diamTop, diamBottom, tessellation, [optional height subdivs], scene, updatable var cylinder = BABYLON.Mesh.CreateCylinder("rebarGrayXAxis" + i, width, this.diameter, this.diameter, this.subdivs, this.scene, false); cylinder.material = this.textures['RebarGray']; APPLYING MY TEXTURE () cylinder.position.z = z2; cylinder.position.y = y2; cylinder.position.z = z2 + (i * divisions); cylinder.rotation.x = Math.PI / 2; cylinder.rotation.y = Math.PI / 2; }And my code for texture load - init: var myTexture = new BABYLON.Texture("Images/Textures/rebar.jpg", scene); myTexture.uScale = 2.0; myTexture.vScale = 2.0; textures['Gray'] = new BABYLON.StandardMaterial('barMaterial', scene) textures['Gray'].diffuseTexture = myTexture;
  13. 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).
  14. Hello! Recently I have found out about Babylon js, and I have been pretty satisfied with it's simplicity once I started using this framework. But I have also encountered some problems. When I try to move my ArcRotateCamera around 3D object, I get weird animation when rotating. For example: when i press left mouse button and quickly drag away, my camera still rotates (for second or less) after I have released my mouse button. I belive this is meant for games to have smoother camera rotation. But what if i want my camera to immediately stop after i release mouse button? How can I stop my camera animation? I don't need Babylon js for games, I need it to display some construction objects and then edit their positions via mouse. This animation just makes moving objects with my mouse much harder. Any idea? SHORT STORY: I dont want smooth slowing camera rotation -> I want to stop it immediately after releasing mouse button!