Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//マテリアルの宣言
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