Created
August 15, 2018 03:31
-
-
Save flushpot1125/56821741e65b3872b8f9b3106b8d50bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Skyboxは空間を覆う巨大な立方体なので、CreateBoxで箱を定義する | |
var skybox = BABYLON.MeshBuilder.CreateBox("skyBox", {size:5000.0}, scene); | |
//Skyboxのマテリアルを定義。実際はStandardMaterialでCubeTextureとテクスチャの設定によって、Skyboxを表現する | |
var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); | |
skyboxMaterial.backFaceCulling = false; | |
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("textures/night_star", 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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment