leorus

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. I have tried diffuse, specular and emmisive , but the same thing happens.web links:| www.namchennai.com/babylone/Breakout/BOut/index.html ( with diffuse color) and www.namchennai.com/babylone/Breakout/BOut/index1.html ( with diffuse Texture). The code is attached: applyTextures(); function applyTextures() { var ballTex = new BABYLON.StandardMaterial("texture1", scene); ballTex.diffuseTexture = new BABYLON.Texture("ball2.png", scene); //ballTex.diffuseColor = new BABYLON.Color3(1.0, 0, 0); ball.material = ballTex; var wallTex = new BABYLON.StandardMaterial("texture1", scene); wallTex.diffuseColor = new BABYLON.Color3(0, 0, 1.0); wallTex.alpha = 0.5; //wallTex.diffuseTexture = new BABYLON.Texture("Wall.jpg", scene); Lwall.material = wallTex; Rwall.material = wallTex; ceiling.material = wallTex; ground.material = wallTex; }
  2. the ball2.png file is in the same dir as the html file. I have also placed the same file in its parent dir also. There is no error message in the console. The html file is in babylon\breakout\bout\index.html. the png file is in both babylon\breakout and babylo9n\breakout\bout dirs. I tries to apply texture to other object also. but, same thing happens - that object alos vanishes from the scene. leorus
  3. I have recently started to make a simple game with babylon.js. I have created a scene and a sphere(ball). When I tried to apply texture to the sphere with the following code: var ballTex = new BABYLON.StandardMaterial("texture1", scene); ballTex.diffuseTexture = new BABYLON.Texture("ball2.png", scene); ball.material = ballTex; But the sphere is not visible. I tried full path and then also same thing happened. But when I applied color with ballTex.diffuseColor = new BABYLON.Color3(1.0, 0, 0); ball.material = ballTex; the sphere is viosibel. What and where is the problem? leorus