Merge pull request 'LJ' (#248) from LJ into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/248
This commit is contained in:
@@ -11,11 +11,11 @@ import addFunction from "./addEvent";
|
||||
import { editTunnelInit } from "./editTunnelInit";
|
||||
import { addEquipment, removeEquipment } from "./editEquipment";
|
||||
import previewtunnelModeInit from "./previewTunnelInit"
|
||||
import StreetSignTag from "./utils/StreetSignTag";
|
||||
import { StreetSignTag } from "./utils/StreetSignTag/StreetSignTag.js";
|
||||
export default class Demo {
|
||||
// 摄像机看向位置
|
||||
// 摄像机看向位置s
|
||||
origin = null;
|
||||
//附着点的模型
|
||||
//附着点的模型122
|
||||
points = [];
|
||||
//设备模型数组
|
||||
deviceModels = [];
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as THREE from "three";/**
|
||||
* @param {String} text
|
||||
* @param {String} param 传感器实时检测参数
|
||||
*/
|
||||
export default function (text = "", param = "", width = 250, height = 150) {
|
||||
export function StreetSignTag(text = "", param = "", width = 250, height = 150) {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
@@ -12,7 +12,7 @@ export default function (text = "", param = "", width = 250, height = 150) {
|
||||
ctx.fillStyle = "#003BA8";
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
ctx.fillStyle = "white";
|
||||
ctx.font = "15px serif";
|
||||
ctx.font = "20px serif";
|
||||
ctx.fillText('隧道简称:' + text, (100 - text.length * 1) / 50, 40);
|
||||
ctx.fillText('隧道长度:' + param + 'm', (100 - param.length * 1) / 50, 115);
|
||||
ctx.strokeStyle = "white";
|
||||
Reference in New Issue
Block a user