Skip to content

使用Threejs开源框架,实现WEB端三维模型的定制化展示

Notifications You must be signed in to change notification settings

TONKIA/V3D-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3dPlatform

使用Threejs开源框架,实现WEB端三维模型的定制化展示

项目源码地址:https://github.com/TONKIA/3dPlatform

项目运行

cnpm install
nodemon app

效果图

登录页面

用户主页

创建方案

方案分享

分享页面

接口

URL Method 请求JSON参数 描述 返回
/ get 请求主页 返回登录主页index.html文件
/ post {account, password} 登录验证 1:登录成功, 0:登录失败
/home get 请求用户主页 返回用户主页home.html文件
/home post 请求用户主页的数据 {user, schemeList{id, name, img, share_state, share_password}, shareLink}
/logout get 用户注销 重定向到 /
/create get 返回一个空的方案创建页面 返回createScheme.html页面
/create/:id get 返回指定id的方案修改页面 返回createScheme.html页面
/getScheme post 获得一个空的方案初始data数据 {name: '默认方案', components: [], img: null, id: null, maxHeight: 10, height: 2, maxDistance: 30, distance: 10 }
/getScheme/:id post 返回指定id的方案数据 { name, components, img, id, maxHeight, height, maxDistance, distance}
/changeShareConfig {id, share_password, share_state} 主页修改分享数据 {affectedRows}
/upload/:fileType post file 接受文件上传,并且返回文件名 {originalname, mimetype, size, destination, filename, path}
/files/thumbnail/:filename get 返回相应文件名贴图文件的缩略图 file
/files/:fileType/:fileName get 返回相应类型文件名的文件 file
/saveScheme post { name, components, img, id, maxHeight, height, maxDistance, distance} 方案保存 {affectedRows}
/share/:id get 返回分享页面 返回share.html页面
/share/:id post 获取分享的状态 0:不共享 1:共享 2:密码共享 3:当前分享页面不存在
/shareData/:id post {state, password} 获取分享页面的数据 {msg, data{name, components, img, id, maxHeight, height, maxDistance, distance}}

数据库

user

列名 数据类型 长度 默认 主键 非空 自增 注释
id int 11
account varchar 20
password varchar 20
name varchar 20

scheme

列名 数据类型 长度 默认 主键 非空 自增 注释
id int 11
uid int 11
name varchar 20
img longtext
data text
share_state int 11 0 0:不共享/1:共享/2:密码共享
share_password varchar 20

第三方开源

About

使用Threejs开源框架,实现WEB端三维模型的定制化展示

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published