English / 中文 | Windows Server | Ubuntu Server | Web Demo
Note: The server is a compiled version with built-in mongodb, execute start.bat
or start.sh
to start, and
visit http://localhost:2020
in Google Chrome. Windows version
requires Visual C++ Redistributable for Visual Studio 2015
.
Good news! The version based on vite4 + vue3 + ts5 + ant-design-vue7 is coming soon. Click here to view more details.
- Name: Shadow Editor
- Version: v0.6.1 (Coming Soon)
- Description: Cross-platform 3D scene editor based on three.js, golang and mongodb.
- Source: GitHub Gitee | Document: Gitee | Demo: GitHub Gitee | Video: Weibo Bilibili | Assets: BaiduNetdisk(rfja)
- Technology Stack: html, css, javascript, rollup, react.js, webgl, three.js, golang, mongodb, nodejs, electron, protocol buffers.
- If helpful to you, please DOnate to support us. thank you!
Open Source Version
Starting from v0.6.1
, ShadowEditor only provides core features and extended APIs, and other features will be
provided in the extensions, just like VSCode. We will develop in the dev
branch.
- Fix the bug that some versions of go typeface management list report errors.
- Hide the model history version tab.
- When the sprite is selected, the border is no longer displayed.
- Fix searchfield dropdown style bug.
- Release Date: July 24, 2021
- Update Logs:
- Fix the bug that creates a new mongo connection when request.
- Check VR in the status bar to enable VR.
- Set scene transform.
- How to popup a window when click an object: https://gitee.com/tengge1/ShadowEditor/issues/I3APGI
- You can enable
https
in theconfig.toml
. - Add event in the mobile browser to the script:
onTouchStart
,onTouchEnd
,onTouchMove
. - Upgrade
three.js
to r130. - Add VR event to the script:
onVRConnected
,onVRDisconnected
,onVRSelectStart
,onVRSelectEnd
. - VR all-in-one handle controller supports, for example: htc vive.
- Fix the bug of deleting script.
- Fix a bug that
Geometry
can not be serialized due to the upgrade ofthree.js
. - Add material
polygonOffset
,polygonOffsetFactor
,polygonOffsetUnits
parameter visualization settings to solve the problem of depth conflict. - Fix a bug that component in mesh cannot save the
visible
attribute. Bin
type model is no longer supported.- Fix cube texture bug.
- Rewrite all the
prototype
to es6class
in the source code. - Remove the visual module.
- Fix a bug that not copy the skyball texture when export a scene.
- Fix rain and snow bug.
- Modify the background color and lighting, so as not to add the same color as the background and make it difficult to see clearly.
- Fix particle emitter bug.
- Fix cloth bug.
- Fix the bug of dynamic setting shadow.
- General
- Cross-platform
- Windows, Linux, Mac
- Desktop, Web
- Multi-language support
- English、中文、繁體中文、日本語、한국어、русский、Le français
- Assets management
- scene, mesh, texture, material, audio, animation, screenshot, video, typeface
- Authority management
- organization, user
- role, authority
- registration, login, password modification
- Version management
- Scene history and logs
- undo, redo, auto saving
- Player
- play animations in the scene in real time, and can play full screen and in new window
- Settings
- Display, renderer, helpers, filter, weather, control mode, select mode, add mode, language
- Cross-platform
- Small scene editing
- Add mesh
- 3ds, 3mf, amf, assimp, awd, babylon, bvh, collada, ctm
- draco, fbx, gcode, gltf, glb, js, kmz, lmesh, md2, pmd, pmx
- nrrd, obj, pcd, pdb, ply, prwm, sea3d, stl, vrm, vrml, vtk, X
- Built-in objects
- group
- plane, cube, circle, cylinder, sphere, icosahedron, torus, torus knot, teapot, lathe
- unscaled text, 3D text
- line segments, CatmullRom curve, quadratic Bezier curve, cubic Bezier curve, ellipse curve
- point marks
- arrow helper, axes helper
- sprite
- Built-in lights
- ambient light, directional light, point light, spotlight, hemispherical light, rect area light
- point light, hemispherical light, rect area light helper
- Built-in components
- background music, particle emitter
- sky, fire, water, smoke, cloth
- berlin terrain, sky sphere
- Materials editing
- LineBasicMaterial, LineDashedMaterial, MeshBasicMaterial, MeshDepthMaterial, MeshNormalMaterial
- MeshLambertMaterial, MeshPhongMaterial, PointsMaterial, MeshStandardMaterial, MeshPhysicalMaterial
- SpriteMaterial, ShaderMaterial, RawShaderMaterial
- Post-processing
- After-image, bokeh, dot screen, FXAA, glitch
- halftone, pixel, RGB shift, SAO
- SMAA, SSAA
- SSAO, TAA
- Text editing
- javascript editing with intelligence
- shader editing
- json file editing
- Mesh export
- gltf、obj、ply、stl、Collada、DRACO
- Scene publishment
- Publish scene as static resources, and can be embedded in iframe
- Examples
- Arkanoid, camera, particle, ping pong, shader
- General tools
- Select, pan, rotate, zoom
- Perspective view, front view, side view, top view, wireframe mode
- Screenshot, record
- Draw point, draw line, draw polygon, spray
- Measure distance
- Others
- VR:cardboard, htc vive, chrome, firefox
- Bullet physics engine
- Add mesh
- UI Controls
- Canvas
- Form: Button, CheckBox, Form, FormControls, IconButton, IconMenuButton, ImageButton, Input, Label, LinkButton, Radio, SearchField, Select, TextArea, Toggle
- Icon
- Image: Image, ImageList, ImageSelector, ImageUploader
- Layout: AbsoluteLayout, AccordionLayout, BorderLayout, HBoxLayout, TableLayout, VBoxLayout
- Menu: ContextMenu, MenuBar, MenuBarFiller, MenuItem, MenuItemSeparator, MenuTab.
- Panel
- Progress: LoadMask
- Property: ButtonProperty, ButtonsProperty, CheckBoxProperty, ColorProperty, DisplayProperty, IntegerProperty, NumberProperty, PropertyGrid, PropertyGroup, SelectProperty, TextProperty, TextureProperty
- SVG
- Table: DataGrid, Table, TableBody, TableCell, TableHead, TableRow
- Timeline
- Toolbar: Toolbar, ToolbarFiller, ToolbarSeparator
- Tree
- Window: Alert, Confirm, Message, Photo, Prompt, Toast, Video, Window
- MongoDB v3.6.8+
- Chrome 81.0+ or Firefox 75.0+
The following is only required when you want to build from source.
- Golang 1.14.2+
- NodeJS 14.1+
- gcc 9.3.0+ (
tdm-gcc
,MinGW-w64
orMinGW
on Windows, and make suregcc
can be accessed through the command line) - git 2.25.1+
Note: The version number is for reference only.
You can use git to download the source code.
git clone https://github.com/tengge1/ShadowEditor.git
In China, github
is really slow, you can use gitee
instead.
git clone https://gitee.com/tengge1/ShadowEditor.git
Web Version:
- If you are in
China
, runnpm run set-proxy
to set golang and nodejs proxy. - Run
npm install
to install nodejs dependencies. - Run
npm run build
to build the server and web. - Edit
build/config.toml
, and modify the mongodb host and port. - Run
npm start
to launch the server. You can now visit:http://localhost:2020
. - If you enable
https
in the config file. Please visit:https://localhost:2020
.
Desktop Version:
- Download
MongoDB
and unzip it in theutils/mongodb
folder. - Build web version.
- Run
npm run build-desktop
to build a desktop app in the folderbuild/desktop
.
- Open
PowerShell
orcmd
in thebuild
folder as administrator. - Run
.\ShadowEditor install
to install ShadowEditor as a service. - Run
.\ShadowEditor start
to start ShadowEditor service. - Now you can visit:
http://localhost:2020
. - You can also manage this service in the
Windows Services Manager
.
- Edit
./scripts/service_linux/shadoweditor.service
, set the right path. - Run
sudo cp ./scripts/service_linux/shadoweditor.service /etc/systemd/system/
. - Run
sudo systemctl daemon-reload
to reload the service daemon. - Run
sudo systemctl start shadoweditor
to start service. - Run
sudo systemctl enable shadoweditor
to auto start service.
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.
- Download and install
NodeJs
,golang
,MongoDB
andVisual Studio Code
. - It is recommended to install the following VSCode extensions which may be helpful.
ESLint, Go, Shader languages support for VS Code, TOML Language Support.
npm scripts usage:
npm install: install nodejs dependencies.
npm run build: build the server and web client.
npm run build-server: build only the server. (For development)
npm run build-web: build only the web client. (For development)
npm run build-desktop: build the desktoop version.
npm run dev: build the web client automatically when files changes.(For development)
npm run copy: Copy assets from web folder to build folder.
npm run start: start the web server.
npm run set-proxy: set golang and nodejs proxy. (In China only)
npm run unset-proxy: unset golang and nodejs proxy.
npm run install-dev: install golang development tools.
npm run eslint: check js files and fix errors automatically.
npm run clean: delete the web and desktop builds.
npm run clear: delete useless nodejs packages.
Expand to view details
ShadowEditor is a project for both users and developers. You can contribute and try your idea on this project. No pension, but a lot of fun. To contribute, you should:
- Fork the repository.
- Create Feat_xxx branch.
- Commit your code.
- Create Pull Request.
Note: DO NOT submit large binaries, or the Pull Request
may be rejected. If required, you can add the files or
directories to be ignored to the .gitignore
file.
Expand to view details
- Failed when upload models.
You need to compress the model assets into a zip
file, and the entry file cannot be nested in a folder. The server
will decompress and put it in the ./build/public/Upload/Model
folder, and add a record in the MongoDB _Mesh
collection.
- How to combine multiple models together?
Basic geometry supports multiple levels of nesting. You can add a group
(in the geometry menu), and then drag multiple
models onto the group
in the Hierachy
Panel.
- How to enable authority?
Edit config.toml
and set authority.enabled
to true
. The default administrator username is admin
and the password
is 123456
.
- The brower
report
asm.js has been disabled because the script debugger is connected. Please disconnect the debugger to enable asm.js.
Error.
Complete error: asm.js has been disabled because the script debugger is connected. Please disconnect the debugger to enable asm.js. ammo.js (1,1) SCRIPT1028: SCRIPT1028: Expected identifier, string or number ShadowEditor.js (3948,8) SCRIPT5009: 'Shadow' is not defined.
Solution: Tencent browser does not support ammo.js
(WebAssembly) compiled with Emscripten
, it is recommended to
use Chrome
or Firebox
instead.
- How can I upgrade from C# to golang version?
The data structure and web client is not changed, just copy ./ShadowEditor.Web/Upload/
folder to
build/public/Upload/
.
- The desktop version cannot be opened.
Windows requires Visual C++ Redistributable for Visual Studio 2015
. You can install
from: https://www.microsoft.com/en-us/download/details.aspx?id=48145
If the desktop version cannot be opened, you can view logs.txt
; if the port conflicts, you can modify the MongoDB and
website ports in resources/app/config.toml
.
- How can I create a https certificate?
Install openssl
, and git client already contains one; Open cmd
, Powershell
or shell
, and run the following
commands:
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
Among the generated files, certificate.pem
is the certificate, and privatekey.pem
is the key.
MIT License
Expand to view details
Thanks to the following open source projects.
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