import "./App.css";
import { KSJModelControlApi } from "bjksj-sdk";
function Model() {
    return (
        <div className="detail-content">
            <div className="detail-content-title">模型</div>
            <div className="detail-content-button">
                <button
                    onClick={async () => {
                        KSJModelControlApi.initializeIModel();
                    }}
                >
                    初始化
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.setWholeTransparency({ opacity: 0.5 });
                    }}
                >
                    设置模型透明
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.clearTransparencyAll();
                    }}
                >
                    恢复模型透明
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.setModelColor({ r: 0, g: 0, b: 255 });
                    }}
                >
                    设置模型颜色
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.resetModelColor();
                    }}
                >
                    恢复模型颜色
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.ClipXAxis({
                            pointx: 2.13,
                            pointy: 3.19,
                            pointz: 4.34,
                            clearExistingPlanes: true,
                        });
                    }}
                >
                    X轴面剖切
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.ClipYAxis({
                            pointx: 2.13,
                            pointy: 3.19,
                            pointz: 4.34,
                            clearExistingPlanes: true,
                        });
                    }}
                >
                    Y轴面剖切
                </button>
                <button
                    onClick={async () => {
                        KSJModelControlApi.ClipZAxis({
                            pointx: 2.13,
                            pointy: 3.19,
                            pointz: 4.34,
                            clearExistingPlanes: true,
                        });
                    }}
                >
                    Z轴面剖切
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.showClip();
                    }}
                >
                    显示剖切
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.hideClip();
                    }}
                >
                    隐藏剖切
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.clearClip();
                    }}
                >
                    删除剖切
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.ProjectLocationShow();
                    }}
                >
                    开启包围盒
                </button>
                <button
                    onClick={() => {
                        KSJModelControlApi.ProjectLocationHide();
                    }}
                >
                    关闭包围盒
                </button>
            </div>
        </div>
    );
}

export default Model;
