English / 中文 | Windows 服务端 | Linux 服务端 | Web 演示
说明:服务端为编译版本,内置 mongodb,执行start.bat
或start.sh
启动,在谷歌浏览器中访问http://localhost:2020
。Windows 版需要Visual C++ Redistributable for Visual Studio 2015
支持。
好消息!基于 vite4 + vue3 + ts5 + ant-design-vue7 的版本即将到来,点击此处 查看详情。
从v0.6.1
开始,ShadowEditor 仅提供核心功能和扩展 API,其他功能将在扩展中实现,类似 VSCode。 扩展化改造将在dev
分支进行。
config.toml
中启用https
。onTouchStart
、onTouchEnd
、onTouchMove
。three.js
到最新版 r130。onVRConnected
、onVRDisconnected
、onVRSelectStart
、onVRSelectEnd
。three.js
升级,导致Geometry
无法序列化的 bug。polygonOffset
、polygonOffsetFactor
、polygonOffsetUnits
参数可视化设置,解决深度冲突问题。bin
类型模型。prototype
改写为 es6 class
。下面的软件仅在从源码编译时才需要。
tdm-gcc
、MinGW-w64
或MinGW
。请保证gcc
可以通过命令行访问)注意 版本号仅供参考。
你可以使用 git 下载源码。
git clone https://github.com/tengge1/ShadowEditor.git
在国内,由于github
比较慢,可以使用 gitee。
git clone https://gitee.com/tengge1/ShadowEditor.git
Web 版:
npm run set-proxy
设置 go 语言和 nodejs 代理。npm install
安装 nodejs 依赖。npm run build
构建服务端和 Web 端。build/config.toml
,修改 MongoDB 的 host 和 port 设置。npm start
启动服务端。现在你可以访问:http://localhost:2020
。https
,请访问:https://localhost:2020
。桌面版:
MongoDB
,解压到utils/mongodb
文件夹中。npm run build-desktop
可以在文件夹build/desktop
中创建一个桌面版应用。build
文件夹中打开PowerShell
或cmd
。.\ShadowEditor install
,将 ShadowEditor 安装为服务。.\ShadowEditor start
,启动 ShadowEditor 服务。http://localhost:2020
。Windows服务管理器
中管理这个服务。./scripts/service_linux/shadoweditor.service
,设置正确的路径。sudo cp ./scripts/service_linux/shadoweditor.service /etc/systemd/system/
。sudo systemctl daemon-reload
重新加载服务守护程序。sudo systemctl start shadoweditor
启动服务。sudo systemctl enable shadoweditor
设置开机自启动。PS E:\github\ShadowEditor\build\> .\ShadowEditor
ShadowEditor is a 3D scene editor based on three.js, golang and mongodb.
This application uses mongodb to store data.
Usage:
ShadowEditor [command]
Available Commands:
debug Debug service on Windows
help Help about any command
install Install service on Windows
serve Start server
start Start service on Windows
stop Stop service on Windows
version Print the version number
Flags:
--config string config file (default "./config.toml")
-h, --help help for ShadowEditor
Use "ShadowEditor [command] --help" for more information about a command.
NodeJs
, golang
, MongoDB
和 Visual Studio Code
.ESLint, Go, Shader languages support for VS Code, TOML Language Support.
npm 脚本使用:
npm install: 安装nodejs依赖。
npm run build: 构建服务端和web客户端。
npm run build-server: 只构建服务端。(用于开发)
npm run build-web: 只构建web客户端。(用于开发)
npm run build-desktop: 构建桌面版。
npm run dev: 文件改变后自动构建web客户端。(用于开发)
npm run copy: 将资源从web文件夹拷贝到build文件夹。
npm run start: 启动web服务端。
npm run set-proxy: 设置golang和nodejs代理。(仅在国内使用)
npm run unset-proxy: 取消设置golang和nodejs代理。
npm run install-dev: 安装golang开发工具。
npm run eslint: 检查js文件,自动修复错误。
npm run clean: 删除构建的web版和桌面版。
npm run clear: 删除没用的nodejs包。
ShadowEditor 是一个为用户和开发者而生的项目。在这个项目上,你可以提交代码,尝试你的想法。没有报酬,但是有很多乐趣。提交代码,你需要:
注意: 不要提交大的二进制文件,否则可能会被拒绝。如果需要,你可以把想忽略的文件或目录添加到.gitignore
文件中。
需要把模型贴图等资源压缩成一个 zip 包,而且入口文件不能嵌套文件夹。服务端会解压上传的 zip 包到./build/public/Upload/Model
文件夹,并在 MongoDB _Mesh
表里添加一条记录。
基本几何体都支持多层嵌套。可以添加一个组
(在几何体菜单中),然后在场景树状图上,将多个模型拖动到组
上。
编辑config.toml
文件,将authority.enabled
设置为true
。默认管理员用户名是admin
,密码是123456
。
asm.js 已被禁用,因为脚本调试程序已连接。请断开调试程序的连接,以启用 asm.js。
的错误。完整错误:asm.js 已被禁用,因为脚本调试程序已连接。请断开调试程序的连接,以启用 asm.js。 ammo.js (1,1) SCRIPT1028: SCRIPT1028: Expected identifier,
string or number ShadowEditor.js (3948,8) SCRIPT5009: 'Shadow' is not defined。
解决方法:腾讯浏览器不支持使用Emscripten
编译的ammo.js
(WebAssembly),建议换成谷歌浏览器或火狐浏览器。
数据结构和客户端都没变,只需要把文件夹./ShadowEditor.Web/Upload/
复制到build/public/Upload/
即可。
说明:Windows 需要Visual C++ Redistributable for Visual Studio 2015
。你可以从这安装:https://www.microsoft.com/en-us/download/details.aspx?id=48145
说明:如果桌面版打不开,可以查看logs.txt
;如果端口冲突,可以修改resources/app/config.toml
中的 MongoDB 和网站端口。
安装openssl
,git 客户端已经自带一个。打开cmd
、Powershell
或shell
,运行以下命令:
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
在生成的文件中,certificate.pem
是证书,privatekey.pem
是密钥。
感谢以下开源项目。
https://github.com/golang/go
https://github.com/BurntSushi/toml
https://github.com/dgrijalva/jwt-go
https://github.com/dimfeld/httptreemux
https://github.com/inconshreveable/mousetrap
https://github.com/json-iterator/go
https://github.com/mozillazg/go-pinyin
https://github.com/otiai10/copy
https://github.com/sirupsen/logrus
https://github.com/spf13/cobra
https://github.com/spf13/viper
https://github.com/urfave/negroni
https://go.mongodb.org/mongo-driver
https://github.com/facebook/react
https://github.com/mrdoob/three.js
https://github.com/rollup/rollup
https://github.com/babel/babel
https://github.com/eslint/eslint
https://github.com/rollup/rollup-plugin-babel
https://github.com/rollup/rollup-plugin-commonjs
https://github.com/rollup/rollup-plugin-json
https://github.com/rollup/rollup-plugin-node-resolve
https://github.com/egoist/rollup-plugin-postcss
https://github.com/rollup/rollup-plugin-replace
https://github.com/mjeanroy/rollup-plugin-strip-banner
https://github.com/andyearnshaw/rollup-plugin-bundle-worker
https://github.com/tweenjs/tween.js
https://github.com/JedWatson/classnames
https://github.com/d3/d3-dispatch
https://github.com/i18next/i18next
https://github.com/js-cookie/js-cookie
https://github.com/facebook/prop-types
https://github.com/codemirror/CodeMirror
https://github.com/jquery/esprima
https://github.com/tschw/glslprep.js
https://github.com/zaach/jsonlint
https://github.com/acornjs/acorn
https://github.com/kripken/ammo.js
https://github.com/dataarts/dat.gui
https://github.com/toji/gl-matrix
https://github.com/squarefeet/ShaderParticleEngine
https://github.com/mrdoob/stats.js
https://github.com/mrdoob/texgen.js
https://github.com/yomotsu/VolumetricFire
https://github.com/jonbretman/amd-to-as6
https://github.com/chandlerprall/ThreeCSG
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。