首页 文章 精选 留言 我的

精选列表

搜索[可视化工具],共10000篇文章
优秀的个人博客,低调大师

可视化页面搭建平台码良更新,新增组件封装功能

码良组件封装详解 最近码良迎来了一波新功能的上线,并毫无保留地继续进行了代码开源-赶紧star关注。新上线的功能有桌面端页面制作、”楼层模式“、”正宗“布局组件(容器组件)的开发能力、组件封装、word 文档解析、psd 解析等平台功能和能力。 资源难得赶紧先关注,然后后续学习。 本文将为您详细介绍组件封装。 什么是组件封装 组件封装就是对具有上下层级关系的组件进行合并,隐藏内部细节,只保留顶层组件的过程。表现在组件树中,被封装的组件只能看到顶层组件,并以“小盒子”图标进行标识;表现在页面操作区,被封装组件的内部组件(子孙组件)不可被点击选中,只能对顶层组件进行操作。在对封装组件进行缩放操作的时候,子孙组件的大小被等比缩放、位置被线性变换。 操作方式 右键菜单操作 右键菜单可以在组件树和场景区中在组件上单击鼠标右键呼出,点击菜单中的"封装"指令即可对组件及其所有子孙组件进行封装,相反的,点击菜单中的“解封”(只有已封装组件才有该项)指令即可对该封装组件进行解除封装,还原为原本的树状结构。 组件树操作 比起右键菜单方式进行封装操作,组件树独有的双击操作更加便捷。在组件树上双击待封装组件可以快速进行封装操作;在组件树上双击已封装组件可以进行快速解除封装操作。 使用场景 组件封装看似简单,带来的改变却是多重的。 优化页面结构 通过对整个组件树不同功能块合理划分,然后进行分别封装,页面结构变得简单清晰。 功能抽象,配置集中 码良具有强大的脚本编辑能力,可以通过脚本来接收用户配置、控制组件行为、串联业务逻辑。但是,如果不能合理使用脚本,尤其是如果开发者对用户配置不进行集中管理,会造成使用者面对散落到各个组件的自定义配置无从下手。有了组件封装功能,开发者在进行模板页面的开发时,通过合理划分功能块,将同属一个功能的局部组件们进行封装,同时将自定义用户配置编写在该功能块顶层组件上,内部组件通过“数据总线“来获取用户配置参数,实现了功能抽象、配置集中,使用者不用再面对复杂的页面结构和不知道去哪找的众多配置项。 权限控制 实际使用中,还有一种情况,由于页面结构过于复杂,页面模板使用者(通常是缺乏专业技术能力的运营人员)因为缺乏足够的了解而随意增减组件或调整组件位置等,造成页面功能被破坏,组件封装过后,一方面,运营通过集中配置对页面进行配置,降低认知难度。另一方面,可以通过禁止解除组件的封装来阻止对功能块内部的修改,虽然目前码良并没有实现根据用户职业角色来禁止解除封装功能,但是封装操作仍能使得组件被破坏的难度加大,一定程度上保证了页面功能的完整性。 组合组件 封装后的组件仅限于当前页面复用(复制使用),那么有没有一种方法使封装组件变成普通组件一样,无限制的在其他页面使用呢?答案当然是有,组合组件就是专门干这个的。 如图,通过类似前面组件封装的做法,打开右键菜单,点击”另存为组合组件“指令,按提示然后输入必要的信息,就可以将这个组件功能块存储到服务器,供他人使用了。 看到这里你也许会奇怪,组合组件和组件封装似乎没有什么关联。实际上,合成组件生成时,会自动进行组件封装,因此在其他页面使用了合成组件以后,在组件树中会看到一个标有小箱子图标(封装的标识)的组件。 支持我们 开源项目需要的是持续地坚持,而我们坚持的动力当然也来自于你们的支持来都来了,加个关注再走吧 项目代码:https://github.com/ymm-tech/gods-pen 项目代码(国内镜像):https://gitee.com/ymm-tech/gods-pen

优秀的个人博客,低调大师

可视化搭建系统码良 v1.0.6 发布,支持组件商城

Bug Fixes element-ui 降级,解决 codepanel 标题栏数据不更新问题 (ea0f350) vue-router 路由以后,页面适配错误 (63ad4b2) 不上传psd源文件 (cb835c1) 不上传psd源文件 (25e78b8) 修护psd导入资源动画设置失效bug (4a64a73) 修护编辑器在保存的时候,保存失败的bug (715266d) 修护预览页面没提前保存,以及保存过程截图性能慢的问题 (230d39d) 修改动画功能描述图片 (45f0661) 修改数据熟悉外部修改数据,不能同步到编辑器中的bug (9de8893) 修改点击按钮前往商城的逻辑 (f276d18) 删除无用代码 (35a812e) 动画编辑器禁止状态切换失败bug (23561fc) 升级vue版本到最新2.6.11 (b577ca5) 去除默认组件,添加添加组件的引导 (c6ba88c) 对tip添加最大宽度 (ab33be0) 引入vue最新版本 (fa809db) 比例调整 (a0e05ea) 添加商城文档更新 (3698035) 组件不可见时,不必重新计算尺寸;点击保存,mouse事件冒泡,引发组件位置错误计算 (0377aab) 适配Array取值#22(2198461) 颜色实时更新 (9f472b3) Features 属性编辑面板显示组件版本 (512cd75) 新添加动画编辑器,可实时预览 (af816ab) 样式设置添加文字大小控制面板 (3582df7) 添加图片裁剪功能 (bfb8401)

优秀的个人博客,低调大师

基于WebGL架构的3D可视化平台—新风系统演示

新风系统是根据在密闭的室内一侧用专用设备向室内送新风,再从另一侧由专用设备向室外排出,在室内会形成“新风流动场”,从而满足室内新风换气的需要。实施方案是:采用高风压、大流量风机、依靠机械强力由一侧向室内送风,由另一侧用专门设计的排风风机向室外排出的方式强迫在系统内形成新风流动场。在送风的同时对进入室内的空气进过滤、消毒、杀菌、增氧、预热(冬天)。 接下来就用ThingJs平台来搭建一个新风系统第一步,利用CampusBuilder搭建模拟场景。CampusBuilder的模型库有各种各样的模型,使我们搭建出的场景更逼真。 1 //加载场景代码 2 var app = new THING.App({ 3 // 场景地址 4 "url": "http://www.thingjs.com/./uploads/wechat/oLX7p05lsWJZUIxnIWsNXAzJ40X8/scene/新风演示2", 5 6 }); 第二步,创建三个数组来保存每个风的模型。 1 var hotWindGroup = []; 2 var coolWindGroup = []; 3 var newWindGroup = []; 4 var wind = null; 第三步,构造一个创建风的函数,为了方便创建风及其位置,我们选取排风设备为风的父物体,将创建出来的风的visiable属性设置为false(这里这个坐标问题可以看一下官网的教程中控制物体中的坐标转换)。 1 function createWind(parent, x, y, angle, localPosition, color, group) { 2 rs = app.query(parent)[0]; 3 wind = app.create({ 4 type: 'Thing', 5 name: 'hotWind', 6 url: 'http://model.3dmomoda.cn/models/4da706d8a37047298c0318a5b9546abd/0/gltf/', 7 localPosition: localPosition, 8 scale: [1, 2, 1], 9 angle: angle, 10 parent: rs, 11 }); 12 wind.style.color = color; 13 wind.visible = false; 14 wind.rotateX(x); 15 wind.rotateY(y); 16 group.push(wind); 17 } 第四步,开始创建风模型,并调整一下摄像机的角度及位置。 1 app.on('load', function () { 2 //摄像机角度 3 app.camera.position = [-22.91452445633646, 30.46296743148116, -23.83548169673341]; 4 app.camera.target = [-13.532807014407252, 5.6565539015865856, -3.3431546399681276]; 5 //hotWind 6 createWind('空调1', 0, 0, 0, [0, -2, 0], '#FF0000', hotWindGroup); 7 createWind('空调1', 0, 0, 0, [0, -2, 0.5], '#FF0000', hotWindGroup); 8 createWind('空调1', 0, 0, 0, [0, -2, 1], '#FF0000', hotWindGroup); 9 createWind('空调2', 0, 0, 0, [0, -2, 0], '#FF0000', hotWindGroup); 10 createWind('空调2', 0, 0, 0, [0, -2, 0.5], '#FF0000', hotWindGroup); 11 createWind('空调2', 0, 0, 0, [0, -2, 1], '#FF0000', hotWindGroup); 12 //coolWind 13 createWind('空调1', 0, 0, 0, [0, -2, 0], '#0000FF', coolWindGroup); 14 createWind('空调1', 0, 0, 0, [0, -2, 0.5], '#0000FF', coolWindGroup); 15 createWind('空调1', 0, 0, 0, [0, -2, 1], '#0000FF', coolWindGroup); 16 createWind('空调2', 0, 0, 0, [0, -2, 0], '#0000FF', coolWindGroup); 17 createWind('空调2', 0, 0, 0, [0, -2, 0.5], '#0000FF', coolWindGroup); 18 createWind('空调2', 0, 0, 0, [0, -2, 1], '#0000FF', coolWindGroup); 19 //newWind 20 createWind('排风1', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); 21 createWind('排风1', -50, 0, 0, [0, -0.5, 4], '#00FF00', newWindGroup); 22 createWind('排风1', -50, 0, 0, [0, -0.5, 6], '#00FF00', newWindGroup); 23 createWind('排风1', -50, 50, 50, [2, -0.5, 7], '#00FF00', newWindGroup); 24 createWind('排风1', -50, 50, 50, [4, -0.5, 8], '#00FF00', newWindGroup); 25 createWind('排风1', -50, 50, 50, [6, -0.5, 9], '#00FF00', newWindGroup); 26 createWind('排风1', -50, 50, 50, [8, -0.5, 12], '#00FF00', newWindGroup); 27 createWind('排风1', -50, 50, 50, [10, -0.5, 15], '#00FF00', newWindGroup); 28 createWind('排风1', -50, 50, 50, [12, -0.5, 18], '#00FF00', newWindGroup); 29 createWind('排风1', -50, 50, 50, [10, -0.5, 9], '#00FF00', newWindGroup); 30 createWind('排风1', -50, 50, 50, [14, -0.5, 9], '#00FF00', newWindGroup); 31 createWind('排风1', -50, 50, 50, [18, -0.5, 9], '#00FF00', newWindGroup); 32 createWind('排风1', -50, 50, 50, [22, -0.5, 9], '#00FF00', newWindGroup); 33 createWind('排风1', -50, 50, 50, [26, -0.5, 9], '#00FF00', newWindGroup); 34 createWind('排风2', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); 35 createWind('排风3', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); 36 createWind('排风4', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); 37 createWind('排风4', -50, 0, 0, [0, -0.5, 4], '#00FF00', newWindGroup); 38 createWind('排风4', -50, 0, 0, [0, -0.5, 6], '#00FF00', newWindGroup); 39 createWind('排风4', -50, 0, 0, [0, -0.5, 8], '#00FF00', newWindGroup); 40 createWind('排风4', -50, 0, 0, [0, -0.5, 10], '#00FF00', newWindGroup); 41 createWind('排风4', -50, 0, 0, [0, -0.5, 12], '#00FF00', newWindGroup); 42 createWind('排风4', -90, 50, 50, [2, -0.6, 12], '#00FF00', newWindGroup); 43 createWind('排风4', -90, 50, 50, [4, -0.7, 12], '#00FF00', newWindGroup); 44 createWind('排风4', -90, 50, 50, [6, -0.8, 13], '#00FF00', newWindGroup); 45 createWind('排风4', -90, 50, 90, [8, -0.8, 11], '#00FF00', newWindGroup); 46 createWind('排风4', -90, 50, 90, [12, -0.8, 9], '#00FF00', newWindGroup); 47 createWind('排风4', -90, 50, 90, [16, -0.8, 7], '#00FF00', newWindGroup); 48 createWind('排风4', -90, 50, 90, [20, -0.8, 5], '#00FF00', newWindGroup); 49 createWind('排风4', -90, 50, 90, [24, -0.8, 3], '#00FF00', newWindGroup); 50 createWind('排风4', -90, 0, 90, [8, -0.8, 13], '#00FF00', newWindGroup); 51 createWind('排风4', -90, 0, 90, [12, -0.8, 13], '#00FF00', newWindGroup); 52 createWind('排风4', -90, 0, 90, [16, -0.7, 13], '#00FF00', newWindGroup); 53 createWind('排风4', -90, 0, 90, [20, -0.6, 13], '#00FF00', newWindGroup); 54 //createWind('排风4', -90, 0, 90, [24, -0.5, 13], '#00FF00', newWindGroup); 55 56 //热风演示 57 new THING.widget.Button('热风演示', function () { 58 for (let i of coolWindGroup) { 59 i.visible = false; 60 }; 61 for (let i of hotWindGroup) { 62 i.visible = true; 63 }; 64 65 }); 66 67 //冷风演示 68 new THING.widget.Button('冷风演示', function () { 69 for (let i of coolWindGroup) { 70 i.visible = true; 71 }; 72 for (let i of hotWindGroup) { 73 i.visible = false; 74 }; 75 }); 76 77 //新风演示 78 new THING.widget.Button('新风演示', function () { 79 playNewWind(); 80 }); 81 82 function playNewWind() { 83 for (var i = 0; i < newWindGroup.length; i++) { 84 if(i==newWindGroup.length-1) 85 return; 86 newWindGroup[i].visible = true; 87 newWindGroup[i].moveTo({ 88 "time": 4000, 89 "position": newWindGroup[i+1].position, 90 }); 91 } 92 }); 第五步,运行项目。演示地址 思考与总结:首先就是空间坐标系下转父物体坐标真是弄晕了,看了官网的教程多少理解了一点。刚开始的时候我一直认为我的子物体以父物体坐标下放置的时候,子物体坐标轴的问题指向的问题。看了教程发现自己的担心多余了,就好像是人戴鸭舌帽帽子不管戴在谁的头上都一样。其次就是让风动起来,最初是想让一个模型在空间中运动,发现效果不好用。最后就创建了多个模型他们对应着有各自的点,让每一个模型向他下一个模型的位置移动实现运动。 完整代码 //加载场景代码 var app = new THING.App({ // 场景地址 "url": "http://www.thingjs.com/./uploads/wechat/oLX7p05lsWJZUIxnIWsNXAzJ40X8/scene/新风演示2", }); var hotWindGroup = []; var coolWindGroup = []; var newWindGroup = []; var wind = null; function createWind(parent, x, y, angle, localPosition, color, group) { rs = app.query(parent)[0]; wind = app.create({ type: 'Thing', name: 'hotWind', url: 'http://model.3dmomoda.cn/models/4da706d8a37047298c0318a5b9546abd/0/gltf/', localPosition: localPosition, scale: [1, 2, 1], angle: angle, parent: rs, }); wind.style.color = color; wind.visible = false; wind.rotateX(x); wind.rotateY(y); group.push(wind); } app.on('load', function () { //摄像机角度 app.camera.position = [-22.91452445633646, 30.46296743148116, -23.83548169673341]; app.camera.target = [-13.532807014407252, 5.6565539015865856, -3.3431546399681276]; //hotWind createWind('空调1', 0, 0, 0, [0, -2, 0], '#FF0000', hotWindGroup); createWind('空调1', 0, 0, 0, [0, -2, 0.5], '#FF0000', hotWindGroup); createWind('空调1', 0, 0, 0, [0, -2, 1], '#FF0000', hotWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 0], '#FF0000', hotWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 0.5], '#FF0000', hotWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 1], '#FF0000', hotWindGroup); //coolWind createWind('空调1', 0, 0, 0, [0, -2, 0], '#0000FF', coolWindGroup); createWind('空调1', 0, 0, 0, [0, -2, 0.5], '#0000FF', coolWindGroup); createWind('空调1', 0, 0, 0, [0, -2, 1], '#0000FF', coolWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 0], '#0000FF', coolWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 0.5], '#0000FF', coolWindGroup); createWind('空调2', 0, 0, 0, [0, -2, 1], '#0000FF', coolWindGroup); //newWind createWind('排风1', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); createWind('排风1', -50, 0, 0, [0, -0.5, 4], '#00FF00', newWindGroup); createWind('排风1', -50, 0, 0, [0, -0.5, 6], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [2, -0.5, 7], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [4, -0.5, 8], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [6, -0.5, 9], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [8, -0.5, 12], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [10, -0.5, 15], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [12, -0.5, 18], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [10, -0.5, 9], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [14, -0.5, 9], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [18, -0.5, 9], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [22, -0.5, 9], '#00FF00', newWindGroup); createWind('排风1', -50, 50, 50, [26, -0.5, 9], '#00FF00', newWindGroup); createWind('排风2', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); createWind('排风3', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 2], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 4], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 6], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 8], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 10], '#00FF00', newWindGroup); createWind('排风4', -50, 0, 0, [0, -0.5, 12], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 50, [2, -0.6, 12], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 50, [4, -0.7, 12], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 50, [6, -0.8, 13], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 90, [8, -0.8, 11], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 90, [12, -0.8, 9], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 90, [16, -0.8, 7], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 90, [20, -0.8, 5], '#00FF00', newWindGroup); createWind('排风4', -90, 50, 90, [24, -0.8, 3], '#00FF00', newWindGroup); createWind('排风4', -90, 0, 90, [8, -0.8, 13], '#00FF00', newWindGroup); createWind('排风4', -90, 0, 90, [12, -0.8, 13], '#00FF00', newWindGroup); createWind('排风4', -90, 0, 90, [16, -0.7, 13], '#00FF00', newWindGroup); createWind('排风4', -90, 0, 90, [20, -0.6, 13], '#00FF00', newWindGroup); //createWind('排风4', -90, 0, 90, [24, -0.5, 13], '#00FF00', newWindGroup); //热风演示 new THING.widget.Button('热风演示', function () { for (let i of coolWindGroup) { i.visible = false; }; for (let i of hotWindGroup) { i.visible = true; //playWind(i,[0,-0.6499999999999999,0],[0,-0.7234152255572697,0.46352549156242107],[0,-1.2683221215612903,1.2135254915624212],[0,-2.15,1.5]) }; }); //冷风演示 new THING.widget.Button('冷风演示', function () { for (let i of coolWindGroup) { i.visible = true; }; for (let i of hotWindGroup) { i.visible = false; }; }); //新风演示 new THING.widget.Button('新风演示', function () { playNewWind(); }); function playNewWind() { for (var i = 0; i < newWindGroup.length; i++) { if(i==newWindGroup.length-1) return; newWindGroup[i].visible = true; newWindGroup[i].moveTo({ "time": 4000, "position": newWindGroup[i+1].position, }); } } });

优秀的个人博客,低调大师

Python可视化: 历年中国大学学术排行榜

1. 作品介绍 这里先放一下这个动态表是什么样的: 不知道你看完是什么感觉,至少我是挺震惊的,想看看作者是怎么做出来的,于是追到了作者的B站主页,发现了更多有意思的动态视频: 这些作品的作者是:@Jannchie见齐,他的主页:https://space.bilibili.com/1850091/#/video 这些会动的图表是如何做出来的呢?他用到的是一个动态图形显示数据的JavaScript库:D3.js,一种前端技术。难怪不是一般地酷炫。 那么,如果不会D3.js是不是就做不出来了呢?当然不是,Jannchie非常Open地给出了一个手把手的简单教程: https://www.bilibili.com/video/av28087807 他同时还开放了程序源码,你只需要做2步就能够实现: ●到他的Github主页下载源码到本地电

资源下载

更多资源
Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册