12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import {Booth} from './booth'
- //计算点位分布
- let calcuSpread = (start, end, other=[], getRid=[] ) => {
- let arr = [];
- for (let i = 0; i <= end - start; i++) {
- if (!(getRid.indexOf(start + i)>-1)) {
- arr.push(start + i);
- }
- }
- return arr.concat(other);
- };
- //展区
- let region = [
- {
- id: "1",
- name: "综合展区",
- theme: "rgba(179, 104, 216, 1)",
- company: Booth.find(item=>item.id=='1').company, //综合展区ID
- spread: calcuSpread(0, 57,[344],[]),
- firstView: {
- panoId: "0",
- panoQuaternion: {
- x: 0.004201298516425423,
- y: 0.6983405631424313,
- z: -0.004099157345704842,
- w: 0.7157415805989583
- },
- },
- },
- {
- id: "2",
- name: "地方展区",
- theme: "rgba(187, 39, 39, 1)", //主题颜色
- company: Booth.find(item=>item.id=='2').company, //地方展区id
- spread: calcuSpread(58, 282,[],[254,257,258]),
- firstView: {
- panoId: "4",
- panoQuaternion: {
- x: -0.016484962519480128,
- y:0.7083437993857234,
- z: 0.016551859736091593,
- w: 0.7054809155529423
- },
- },
- },
- {
- id: "3",
- name: "互联网企业展区",
- theme: "rgba(113, 200, 82, 1)",
- company: Booth.find(item=>item.id=='3').company, //互联网企业ID
- spread: calcuSpread(283, 392,[254,257,258],[344]),
- firstView: {
- panoId: "47",
- panoQuaternion: {
- x:0.0008521342062728275,
- y:0.7237583641229127,
- z:-0.000893757162925398,
- w:0.6900523954291632
- },
- },
- }
- ];
- export { region };
|