Jump to content

How to load skybox object and texture for android device game?


vishnu
 Share

Recommended Posts

Hey, i have creating android hybrid games. i have babylonJS javascript framework for game. The skybox object textures does not loading properly. other object are loading normally in my game. 

var skybox = BABYLON.MeshBuilder.CreateBox("skyBox", {size:100.0}, game_scene);
    skybox.position = new BABYLON.Vector3(0, 0, 0);
var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", game_scene);
    skyboxMaterial.backFaceCulling = false;
    skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("textures/hills", game_scene);
    skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
    skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
    skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
    skybox.material = skyboxMaterial;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...