0.1.2 • Published 5 years ago

lk-hteditor v0.1.2

Weekly downloads
84
License
ISC
Repository
-
Last release
5 years ago

图扑软件(hightopo) 封装模块

本模块是对第三方软件“hightopo” 基于lifekit的模块化封装,依赖于lifekit框架,可以直接将本模块安装到项目中进行使用

使用说明

安装

lifekit install lk-hteditor

在app.js中添加如下代码:

server.listen(port, function(){
    console.log("已启动服务监听,端口:" + port);

    //加载lifekit组件
    lifekit(app,server);

    //lk-hteditor模块初始化要做一些其他事情
    require(root_path+"/engine/lk-hteditor/src/init/initStatic.js")(app);
    require(root_path+"/engine/lk-hteditor/src/init/initSocketIo.js")();

});  

访问

http://localhost:1337/lk-hteditor

使用

ctx.render("lk-hteditor/web/ht.ejs",{template:"displays/clock1.json"});
  • 如上代码,在想要使用绘制好的图纸的地方直接引入"lk-hteditor/web/ht.ejs" 参数为template:图纸存储的路径(相对路径)