Commit 03b929ca authored by Chunchi Che's avatar Chunchi Che

update ui

parent 3bef189a
Pipeline #18843 passed with stages
in 2 minutes and 30 seconds
......@@ -6,7 +6,7 @@ export default (scene: BABYLON.Scene) => {
const shape = CONFIG.CardSlotShape();
for (let i in xs) {
const slot = BABYLON.MeshBuilder.CreateBox(
const slot = BABYLON.MeshBuilder.CreatePlane(
`extraMonster${i}`,
shape,
scene
......@@ -24,7 +24,10 @@ export default (scene: BABYLON.Scene) => {
"extraMonsterMaterial",
scene
);
extraMonsterMaterial.diffuseColor = CONFIG.extraMonsterColor();
extraMonsterMaterial.diffuseTexture = new BABYLON.Texture(
`http://localhost:3030/images/card_slot.png`
);
extraMonsterMaterial.diffuseTexture.hasAlpha = true;
slot.material = extraMonsterMaterial;
}
};
......@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
const shape = CONFIG.CardSlotShape();
for (let i = 0; i < 5; i++) {
const slot = BABYLON.MeshBuilder.CreateBox(`magic${i}`, shape, scene);
const slot = BABYLON.MeshBuilder.CreatePlane(`magic${i}`, shape, scene);
// 位置
slot.position = new BABYLON.Vector3(
left + gap * i,
......@@ -18,7 +18,10 @@ export default (scene: BABYLON.Scene) => {
slot.rotation = CONFIG.CardSlotRotation();
// 材质
const magicMaterial = new BABYLON.StandardMaterial("magicMaterial", scene);
magicMaterial.diffuseColor = CONFIG.MagicColor();
magicMaterial.diffuseTexture = new BABYLON.Texture(
`http://localhost:3030/images/card_slot.png`
);
magicMaterial.diffuseTexture.hasAlpha = true;
slot.material = magicMaterial;
}
};
......@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
const shape = CONFIG.CardSlotShape();
for (let i = 0; i < 5; i++) {
const slot = BABYLON.MeshBuilder.CreateBox(`monster${i}`, shape, scene);
const slot = BABYLON.MeshBuilder.CreatePlane(`monster${i}`, shape, scene);
// 位置
slot.position = new BABYLON.Vector3(
left + gap * i,
......@@ -21,7 +21,10 @@ export default (scene: BABYLON.Scene) => {
"monsterMaterial",
scene
);
monsterMaterial.diffuseColor = CONFIG.MonsterColor();
monsterMaterial.diffuseTexture = new BABYLON.Texture(
`http://localhost:3030/images/card_slot.png`
);
monsterMaterial.diffuseTexture.hasAlpha = true;
slot.material = monsterMaterial;
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment