|
@@ -97,6 +97,7 @@ const startAnimation = () => {
|
|
|
|
|
|
// 鼠标点击、松开事件
|
|
|
const mouseEvent = (event) => {
|
|
|
+ if (!model) return;
|
|
|
if (event.button == 0) {
|
|
|
mouseDownFn(model, group, event, (intersects) => {
|
|
|
if (windowType === 'ddFc5' && ddFc5) {
|
|
@@ -140,6 +141,7 @@ const addMouseEvent = () => {
|
|
|
// model.canvasContainer?.addEventListener('pointerup', mouseUp);
|
|
|
};
|
|
|
export const addMonitorText = (selectData) => {
|
|
|
+ if (!model) return;
|
|
|
if (windowType === 'ddFc5' && ddFc5) {
|
|
|
return ddFc5.addMonitorText.call(ddFc5, selectData);
|
|
|
} else if (windowType === 'ddFc1' && ddFc1) {
|
|
@@ -174,6 +176,7 @@ export const addMonitorText = (selectData) => {
|
|
|
};
|
|
|
|
|
|
export function computePlay(data, maxarea, isFirst = false) {
|
|
|
+ if (!model) return;
|
|
|
const isJz = data.windowModal == 'sdFc4';
|
|
|
if (windowType === 'singleXkWindow') {
|
|
|
const acosToAngle = (cosValue) => {
|
|
@@ -262,6 +265,7 @@ export function computePlay(data, maxarea, isFirst = false) {
|
|
|
}
|
|
|
|
|
|
export const play = (rotationParam, flag) => {
|
|
|
+ if (!model) return;
|
|
|
if (windowType === 'ddFc5' && ddFc5) {
|
|
|
return ddFc5.play.call(ddFc5, rotationParam, flag);
|
|
|
} else if (windowType === 'ddFc1' && ddFc1) {
|
|
@@ -297,6 +301,7 @@ export const play = (rotationParam, flag) => {
|
|
|
|
|
|
// 切换风窗类型
|
|
|
export const setModelType = (type) => {
|
|
|
+ if (!model) return;
|
|
|
// if (!model || !model.scene) return;
|
|
|
windowType = type;
|
|
|
const windowConfigurations = {
|