Last active
August 15, 2018 03:18
-
-
Save flushpot1125/4083d91ca1585b8cf01dbd78d65a69cc 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
//マテリアルの宣言 | |
var myBrickImageMaterial = new BABYLON.StandardMaterial("brick", scene); | |
//マテリアルの中にあるテクスチャプロパティに、テクスチャを設定 | |
myBrickImageMaterial.ambientTexture = new BABYLON.Texture("textures filepath", scene); | |
//オブジェクトのマテリアルプロパティと、先ほど宣言したマテリアルを対応づけ | |
box1.material = myBrickImageMaterial; | |
box2.material = myBrickImageMaterial; | |
box3.material = myBrickImageMaterial; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment