-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## 3D组态编辑器(v0.2.0) | ||
|
||
### 场景操作 | ||
1.操作模式为框选时,鼠标左键绘制框图,鼠标右键旋转场景; | ||
2.其他操作模式,鼠标左键旋转场景,鼠标右键移动场景; | ||
3.点击场景方向盒轴线控制相机正朝向; | ||
|
||
### 自定义开发脚本 | ||
|
||
接收三个参数,local 是本地环境变量;services 为云端数据,model 为当前模型。 | ||
|
||
示例一:根据云端数据的 local 数据池改变模型外观,需要返回一个解除脚本的执行方法。 | ||
|
||
```typescript | ||
function changeColorByStatus(local: any, services: any, model: any) { | ||
if (!model.isMesh) { | ||
throw new Error('该模型不具备材质,该效果不会生效'); | ||
} | ||
|
||
const { status } = services.local; | ||
|
||
status.onChange = (val: any) => { | ||
switch (val) { | ||
case 'run': { | ||
model.material.color.set(0x008000); | ||
break; | ||
} | ||
|
||
case 'stop': { | ||
model.material.color.set(0x808080); | ||
break; | ||
} | ||
|
||
case 'alarm': { | ||
model.material.color.set(0xff0000); | ||
break; | ||
} | ||
|
||
default: | ||
break; | ||
} | ||
}; | ||
|
||
return () => { | ||
status.onChange = null; | ||
} | ||
|
||
``` | ||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
<script type="module" crossorigin src="./assets/index-79637d95.js"></script> | ||
<link rel="stylesheet" href="./assets/index-38d1c173.css"> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" | ||
/> | ||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> | ||
<link rel="stylesheet" href="/antd.chunk.css" /> | ||
<link rel="stylesheet" href="/umi.css" /> | ||
<script> | ||
window.routerBase = "/"; | ||
</script> | ||
<script> | ||
//! umi version: 3.5.27 | ||
</script> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
||
<script src="/lodash.js"></script> | ||
<script src="/antd.js"></script> | ||
<script src="/three.js"></script> | ||
<script src="/vendors.js"></script> | ||
<script src="/umi.js"></script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.