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

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

Feat/card/texture

See merge request mycard/Neos!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) => { ...@@ -21,8 +21,11 @@ export default (hands: CardMeta[], scene: BABYLON.Scene) => {
); );
// 材质 // 材质
const handMaterial = new BABYLON.StandardMaterial("handMaterial", 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.material = handMaterial;
// 事件管理 // 事件管理
hand.actionManager = new BABYLON.ActionManager(scene); hand.actionManager = new BABYLON.ActionManager(scene);
......
...@@ -68,12 +68,7 @@ export default class SimpleDuelPlateImpl implements IDuelPlate { ...@@ -68,12 +68,7 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建手牌 // 创建手牌
renderHands(hands, scene); renderHands(hands, scene);
// 创建地板 // 暂时不创建地板
const ground = BABYLON.MeshBuilder.CreateGround(
"ground",
CONFIG.GroundShape(),
scene
);
// 渲染循环 // 渲染循环
engine.runRenderLoop(() => { 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