• Content count

  • Joined

  • Last visited

  1. thank you so much for your help @JohnK, so it means for the time being, there's no solution as elegant as three did. i can use shader builder first, at least it works pretty good
  2. thanks @JohnK and @NasimiAsl, as you said that shaderbulider did solved my problem,but let's see if there's any simpler solution. if not,would you pls make some comments about the magic shaderbuilder code for me? And i'm wondering if this is the best way to achieve my goal,i mean to use ExtrudeShape, are there any other options?
  3. @JohnK thanks for you replay, here is the playground http://www.babylonjs-playground.com/#TF811Y#3 what i expected is something like this(ingor the shape just the tile ):
  4. hi all, i just want to migrate my project from threejs to babylon, the first problem i have is that how to generate shape mesh. i have floor shape point in 2d [{"x":-4.72,"y":-1.955},{"x":-4.72,"y":3.015},{"x":5.47,"y":3.015},{"x":5.47,"y":-1.955},{"x":0,"y":-3.955}] In threejs: var geometry = new THREE.ShapeGeometry( floorshape); var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); var mesh = new THREE.Mesh( geometry, material ) ; for babylon: var shape= []; $.each(area.points, function (index, point) { shape.push(new BABYLON.Vector3(point.x, -0.1 ,point.y)); }) shape.push(new BABYLON.Vector3(area.points[0].x,-0.1, area.points[0].y )); var path = [new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(0,0.1 ,0 )] var s = BABYLON.MeshBuilder.ExtrudeShape('extruded', { shape: shape, path:path, cap: BABYLON.Mesh.CAP_ALL }, scene); i have the following img as texture mat.diffuseTexture = new BABYLON.Texture("images/floor.jpg", scene); the shape is ok but material is not showing correctly would you guys please tell me the right way to achieve my goal?