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

render exclusion

parent 8dfbb50c
Pipeline #18139 passed with stages
in 3 minutes and 4 seconds
......@@ -20,6 +20,9 @@ export const ExtraDeckSlotShape = () => {
export const CemeterySlotShape = () => {
return { width: 0.8, height: 1, depth: 0.2 };
};
export const ExclusionSlotShape = () => {
return { width: 0.8, height: 1, depth: 0.2 };
};
export const CardSlotRotation = () => {
return new BABYLON.Vector3(1.5, 0, 0);
};
......@@ -29,6 +32,9 @@ export const DeckSlotRotation = () => {
export const CemeterySlotRotation = () => {
return new BABYLON.Vector3(1.5, 0, 0);
};
export const ExclusionSlotRotation = () => {
return new BABYLON.Vector3(1.5, 0, 0);
};
// 手牌
export const HandShape = () => {
......@@ -67,3 +73,8 @@ export const ExtraDeckColor = () => {
export const CemeteryColor = () => {
return BABYLON.Color3.Teal();
};
// 除外区
export const ExclusionColor = () => {
return BABYLON.Color3.Black();
};
import * as BABYLON from "@babylonjs/core";
import * as CONFIG from "./config";
export default (scene: BABYLON.Scene) => {
// 除外区
const exclusion = BABYLON.MeshBuilder.CreateBox(
"exclusion",
CONFIG.ExclusionSlotShape()
);
// 位置
exclusion.position = new BABYLON.Vector3(3.2, 0.5, -0.7);
// 旋转
exclusion.rotation = CONFIG.ExclusionSlotRotation();
// 材质
const exclusionMaterial = new BABYLON.StandardMaterial(
"exclusionMaterial",
scene
);
exclusionMaterial.diffuseColor = CONFIG.ExclusionColor();
exclusion.material = exclusionMaterial;
};
......@@ -14,6 +14,7 @@ import renderExtraMonsters from "./extraMonsters";
import renderMagics from "./magics";
import renderDeck from "./deck";
import renderCemetery from "./cemetery";
import renderExclusion from "./exclusion";
import * as CONFIG from "./config";
import { CardMeta } from "../../../api/cards";
......@@ -77,6 +78,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建墓地
renderCemetery(scene);
// 创建除外区
renderExclusion(scene);
// 创建地板
const ground = BABYLON.MeshBuilder.CreateGround(
"ground",
......
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