Commit 3a6c9638 authored by Chunchi Che's avatar Chunchi Che

update drawing duel

parent 7d0f6506
......@@ -9,7 +9,7 @@ export const GroundShape = () => {
return { width: 9.9, height: 8 };
};
export const CardSlotShape = () => {
return { width: 1, height: 1.2, depth: 0.05 };
return { width: 0.8, height: 1, depth: 0.05 };
};
export const CardSlotRotation = () => {
return new BABYLON.Vector3(1.5, 0, 0);
......
......@@ -2,7 +2,7 @@ import * as BABYLON from "@babylonjs/core";
import * as CONFIG from "./config";
export default (scene: BABYLON.Scene) => {
const xs = [-1, 1];
const xs = [-1.1, 1];
for (let i in xs) {
const slot = BABYLON.MeshBuilder.CreateBox(
`extraMonster${i}`,
......@@ -10,7 +10,7 @@ export default (scene: BABYLON.Scene) => {
scene
);
// 位置
slot.position = new BABYLON.Vector3(xs[i], 0.5, -1);
slot.position = new BABYLON.Vector3(xs[i], 0.5, 0);
// 旋转
slot.rotation = CONFIG.CardSlotRotation();
// 材质
......
......@@ -2,8 +2,8 @@ import * as BABYLON from "@babylonjs/core";
import * as CONFIG from "./config";
export default (scene: BABYLON.Scene) => {
const left = -2;
const gap = 1;
const left = -2.15;
const gap = 1.05;
for (let i = 0; i < 5; i++) {
const slot = BABYLON.MeshBuilder.CreateBox(
`magic${i}`,
......@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
scene
);
// 位置
slot.position = new BABYLON.Vector3(left + gap * i, 0.5, -3);
slot.position = new BABYLON.Vector3(left + gap * i, 0.5, -2.5);
// 旋转
slot.rotation = CONFIG.CardSlotRotation();
// 材质
......
......@@ -58,13 +58,13 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
light.intensity = 0.7;
// 魔法陷阱区
// renderMagics(scene);
renderMagics(scene);
// 怪兽区
renderMonsters(scene);
// 创建额外怪兽区
// renderExtraMonsters(scene);
renderExtraMonsters(scene);
// 创建手牌
renderHands(hands, scene);
......
......@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
scene
);
// 位置
slot.position = new BABYLON.Vector3(left + gap * i, 0.5, -2.5);
slot.position = new BABYLON.Vector3(left + gap * i, 0.5, -1.35);
// 旋转
slot.rotation = CONFIG.CardSlotRotation();
// 材质
......
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