Commit 41e6afe3 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/card/texture' into 'main'

Feat/card/texture

See merge request !22
parents 0b6eeba7 e9b058f8
Pipeline #18128 passed with stages
in 2 minutes and 49 seconds
......@@ -21,8 +21,11 @@ export default (hands: CardMeta[], scene: BABYLON.Scene) => {
);
// 材质
const handMaterial = new BABYLON.StandardMaterial("handMaterial", scene);
// 材质颜色
handMaterial.diffuseColor = CONFIG.HandColor();
// 材质贴纸
handMaterial.diffuseTexture = new BABYLON.Texture(
`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/${item.id}.jpg`,
scene
);
hand.material = handMaterial;
// 事件管理
hand.actionManager = new BABYLON.ActionManager(scene);
......
......@@ -68,12 +68,7 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建手牌
renderHands(hands, scene);
// 创建地板
const ground = BABYLON.MeshBuilder.CreateGround(
"ground",
CONFIG.GroundShape(),
scene
);
// 暂时不创建地板
// 渲染循环
engine.runRenderLoop(() => {
......
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