同步操作将从 tengge1/ShadowEditor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
English / 中文 | Windows桌面版 | Ubuntu桌面版 | Web演示
origin/v0.4.6-csharp
。v0.4.6-csharp
分支将在8月1日删除。下面的软件仅在从源码编译时才需要。
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 run start
启动服务端。现在你可以访问:http://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 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和网站端口。
感谢以下开源项目。
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
https://github.com/mapbox/mapbox-gl-js
https://github.com/CesiumGS/cesium
https://github.com/NASAWorldWind/WebWorldWind
https://github.com/OSGeo/gdal
https://github.com/mapnik/mapnik
https://github.com/go-spatial/tegola
https://github.com/Turfjs/turf
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。