Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download 15.20 KB
Copy Edit Web IDE Raw Blame History
tengge1 authored 2021-04-10 09:36 . vr support

Shadow Editor

English / 中文    |    Windows Desktop    |    Ubuntu Desktop    |    Web Demo

image image image image image image image

  • Name: Shadow Editor
  • Version: v0.6.0 (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!

v0.6.0 is Coming Soon

  1. Fix the bug that creates a new mongo connection when request.
  2. Check VR in the status bar to enable VR.
  3. Set scene transform.
  4. How to popup a window when click an object:
  5. You can enable https in the config.toml.
  6. Add event in the mobile browser to the script: onTouchStart, onTouchEnd, onTouchMove.
  7. Upgrade three.js to the newest version, and may cause a lot of bugs.
  8. Add VR event to the script: onVRConnected, onVRDisconnected, onVRSelectStart, onVRSelectEnd.
  9. VR all-in-one handle controller supports, for example: htc vive.
  10. Fix the bug of deleting script.

v0.5.10 has Released

  • Release Date: October 17, 2020
  • Update Logs:
  1. Remove all GIS related features, and no longer provide GIS in the open source version in the future.

Feature List

  • 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
  • Small scene editing
    • Add mesh
      • 3ds, 3mf, amf, assimp, awd, babylon, binary, 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
      • Ray tracing rendering, voxel rendering
      • UV unwrap
      • Automatic pathfinding
      • Batch rendering
      • Occlusion culling
      • Split screen display
  • Data visualization
    • UI
      • Panel, tab panel
      • Button, radio, checkbox, dropdown, slider
      • Data table
    • Charts
      • Histogram
      • Pie chart
      • Line chart
    • Visualization config
      • Layout management
      • data source config
    • Real-time data
      • WebSocket
      • Ajax


  1. MongoDB v3.6.8+
  2. Chrome 81.0+ or ​​Firefox 75.0+

The following is only required when you want to build from source.

  1. Golang 1.14.2+
  2. NodeJS 14.1+
  3. gcc 9.3.0+ (tdm-gcc, MinGW-w64 or MinGW on Windows, and make sure gcc can be accessed through the command line)
  4. git 2.25.1+

Note: The version number is for reference only.

Download and Compile

You can use git to download the source code.

git clone

In China, github is really slow, you can use gitee instead.

git clone

Build on both Windows and Ubuntu

Web Version:

  1. If you are in China, run npm run set-proxy to set golang and nodejs proxy.
  2. Run npm install to install nodejs dependencies.
  3. Run npm run build to build the server and web.
  4. Edit build/config.toml, and modify the mongodb host and port.
  5. Run npm start to launch the server. You can now visit: http://localhost:2020.
  6. If you enable https in the config file. Please visit: https://localhost:2020.

Desktop Version:

  1. Download MongoDB and unzip it in the utils/mongodb folder.
  2. Build web version.
  3. Run npm run build-desktop to build a desktop app in the folder build/desktop.

Install as Windows Service

  1. Open PowerShell or cmd in the build folder as administrator.
  2. Run .\ShadowEditor install to install ShadowEditor as a service.
  3. Run .\ShadowEditor start to start ShadowEditor service.
  4. Now you can visit: http://localhost:2020.
  5. You can also manage this service in the Windows Services Manager.

Install as Ubuntu Service

  1. Edit ./scripts/service_linux/shadoweditor.service, set the right path.
  2. Run sudo cp ./scripts/service_linux/shadoweditor.service /etc/systemd/system/.
  3. Run sudo systemctl daemon-reload to reload the service daemon.
  4. Run sudo systemctl start shadoweditor to start service.
  5. Run sudo systemctl enable shadoweditor to auto start service.

Command Line Usage

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.

  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

      --config string   config file (default "./config.toml")
  -h, --help            help for ShadowEditor

Use "ShadowEditor [command] --help" for more information about a command.

Development Guide

  1. Download and install NodeJs, golang, MongoDB and Visual Studio Code.
  2. 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 you idea on this project. No pension, but a lot of fun. To contribute, you should:

  1. Fork the repository.
  2. Create Feat_xxx branch.
  3. Commit your code.
  4. 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.

Frequently Asked Questions

Expand to view details
  1. 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.

  1. 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.

  1. How to enable authority?

Edit config.toml and set authority.enabled to true. The default administrator username is admin and the password is 123456.

  1. 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.

  1. 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/.

  1. The desktop version cannot be opened.

Windows requires Visual C++ Redistributable for Visual Studio 2015. You can install from:
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.

  1. 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

Open Source Projects

Expand to view details

Thanks to the following open source projects.

Comment ( 0 )

Sign in for post a comment