├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .travis.yml ├── .vscode ├── launch.json └── settings.json ├── LICENSE ├── README.md ├── README_new.md ├── README_zh.md ├── docs └── index.html ├── images ├── 20241009.png ├── scene20200301.jpg ├── scene20200503_en.jpg └── vr.jpg ├── package.json ├── scripts ├── README.md ├── build.js ├── build_desktop.js ├── build_server.js ├── clean.js ├── copy.js ├── exec.js ├── install_dev.js ├── service_linux │ └── shadoweditor.service ├── set_proxy.js ├── start.js ├── unset_proxy.js └── watch.js ├── server ├── README.md ├── cmd │ ├── root.go │ ├── serve.go │ ├── version.go │ └── win │ │ ├── debug.go │ │ ├── empty.go │ │ ├── install.go │ │ ├── remove.go │ │ ├── start.go │ │ ├── stop.go │ │ └── win.go ├── config-dev.toml ├── config.toml ├── go.mod ├── go.sum ├── helper │ ├── config.go │ ├── config_test.go │ ├── copy.go │ ├── copy_test.go │ ├── encoder │ │ ├── primitive_d_encoder.go │ │ ├── primitive_d_encoder_test.go │ │ ├── primitive_objectid_encoder.go │ │ ├── primitive_objectid_encoder_test.go │ │ ├── time_encoder.go │ │ └── time_encoder_test.go │ ├── http.go │ ├── http_test.go │ ├── json.go │ ├── json_test.go │ ├── md5.go │ ├── md5_test.go │ ├── mongo.go │ ├── mongo_test.go │ ├── mysql.go │ ├── mysql_test.go │ ├── pinyin.go │ ├── pinyin_test.go │ ├── postgresql.go │ ├── postgresql_test.go │ ├── redis.go │ ├── redis_test.go │ ├── sqlite.go │ ├── sqlite_test.go │ ├── time.go │ ├── time_test.go │ ├── zip.go │ └── zip_test.go ├── main.go ├── server │ ├── assets │ │ ├── animation │ │ │ ├── handle_add.go │ │ │ ├── handle_animation_test.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── audio │ │ │ ├── handle_add.go │ │ │ ├── handle_audio_test.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── character │ │ │ ├── handle_character_test.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_get.go │ │ │ ├── handle_list.go │ │ │ ├── handle_save.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── exports.go │ │ ├── material │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_get.go │ │ │ ├── handle_list.go │ │ │ ├── handle_material_test.go │ │ │ ├── handle_save.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── mesh │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_download.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── handle_mesh_test.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── particle │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_get.go │ │ │ ├── handle_list.go │ │ │ ├── handle_particle_test.go │ │ │ ├── handle_save.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── prefab │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_get.go │ │ │ ├── handle_list.go │ │ │ ├── handle_prefab_test.go │ │ │ ├── handle_save.go │ │ │ ├── model.go │ │ │ └── type.go │ │ ├── scene │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_history_list.go │ │ │ ├── handle_list.go │ │ │ ├── handle_load.go │ │ │ ├── handle_save.go │ │ │ ├── handle_scene_test.go │ │ │ └── model.go │ │ ├── screenshot │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── handle_screenshot_test.go │ │ │ └── model.go │ │ ├── summary │ │ │ ├── handle_list.go │ │ │ └── handle_list_test.go │ │ ├── texture │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── handle_texture_test.go │ │ │ ├── model.go │ │ │ └── type.go │ │ └── video │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── handle_video_test.go │ │ │ └── model.go │ ├── category │ │ ├── handle_category_test.go │ │ ├── handle_delete.go │ │ ├── handle_list.go │ │ ├── handle_save.go │ │ ├── model.go │ │ └── type.go │ ├── constant.go │ ├── context.go │ ├── context_test.go │ ├── export │ │ ├── examples │ │ │ ├── export_animation.go │ │ │ ├── export_audio.go │ │ │ ├── export_category.go │ │ │ ├── export_character.go │ │ │ ├── export_config.go │ │ │ ├── export_material.go │ │ │ ├── export_mesh.go │ │ │ ├── export_particle.go │ │ │ ├── export_prefab.go │ │ │ ├── export_scene.go │ │ │ ├── export_screenshot.go │ │ │ ├── export_summary.go │ │ │ ├── export_texture.go │ │ │ ├── export_tools.go │ │ │ ├── export_upload.go │ │ │ ├── export_video.go │ │ │ └── handler.go │ │ ├── exports.go │ │ └── scene │ │ │ └── handle_scene.go │ ├── middleware_crossorigin.go │ ├── middleware_crossorigin_test.go │ ├── middleware_gzip.go │ ├── middleware_gzip_test.go │ ├── middleware_validate_token.go │ ├── middleware_validate_token_test.go │ ├── result.go │ ├── server.go │ ├── server_test.go │ ├── system │ │ ├── authority │ │ │ ├── handle_get.go │ │ │ ├── handle_save.go │ │ │ └── handle_test.go │ │ ├── config.go │ │ ├── config │ │ │ ├── handle_config_test.go │ │ │ ├── handle_get.go │ │ │ └── handle_save.go │ │ ├── department.go │ │ ├── department │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_department_test.go │ │ │ ├── handle_edit.go │ │ │ └── handle_list.go │ │ ├── exports.go │ │ ├── initialize │ │ │ ├── handle_initialize.go │ │ │ ├── handle_initialize_test.go │ │ │ └── handle_reset.go │ │ ├── login │ │ │ ├── handle_login.go │ │ │ ├── handle_login_test.go │ │ │ └── handle_logout.go │ │ ├── register │ │ │ ├── handle_register.go │ │ │ └── handle_register_test.go │ │ ├── role.go │ │ ├── role │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ └── handle_role_test.go │ │ ├── role_authority.go │ │ ├── user.go │ │ └── user │ │ │ ├── handle_add.go │ │ │ ├── handle_change_password.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ ├── handle_reset_password.go │ │ │ └── handle_user_test.go │ ├── tools │ │ ├── backup_database │ │ │ └── handler.go │ │ ├── clean_scenes │ │ │ └── handler.go │ │ ├── exports.go │ │ ├── plugin │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_edit.go │ │ │ ├── handle_list.go │ │ │ └── model.go │ │ └── typeface │ │ │ ├── handle_add.go │ │ │ ├── handle_delete.go │ │ │ ├── handle_list.go │ │ │ └── model.go │ ├── upload │ │ ├── handle_upload.go │ │ └── handle_upload_test.go │ ├── user.go │ └── user_test.go ├── test │ └── README.md └── three │ ├── README.md │ ├── box2.go │ ├── box3.go │ ├── color.go │ ├── cylindrical.go │ ├── euler.go │ ├── frustum.go │ ├── line3.go │ ├── mathutils.go │ ├── matrix3.go │ ├── matrix4.go │ ├── plane.go │ ├── quaternion.go │ ├── ray.go │ ├── sphere.go │ ├── spherical.go │ ├── sphericalharmonics3.go │ ├── triangle.go │ ├── vector2.go │ ├── vector3.go │ └── vector4.go ├── utils ├── certificate │ ├── certificate.pem │ ├── certrequest.csr │ └── privatekey.pem ├── chrome │ └── README.md ├── electron │ ├── README.md │ ├── main.js │ ├── package.json │ └── toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ └── lib │ │ ├── compiler.js │ │ └── parser.js ├── mongodb │ ├── README.md │ └── db │ │ └── README.md ├── proto │ ├── example │ │ ├── foo.js │ │ ├── generate.bat │ │ ├── test.js │ │ ├── test.pb.go │ │ └── test.proto │ ├── go.mod │ ├── go.sum │ └── main.go ├── translate │ ├── README.md │ └── translate.py └── vscode │ ├── README.md │ └── shadoweditor │ ├── .eslintrc.json │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ └── launch.json │ ├── .vscodeignore │ ├── CHANGELOG.md │ ├── README.md │ ├── extension.js │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── test │ ├── runTest.js │ └── suite │ │ ├── extension.test.js │ │ └── index.js │ └── vsc-extension-quickstart.md └── web ├── .eslintrc ├── README.md ├── assets ├── css │ ├── addon │ │ ├── dialog.css │ │ ├── show-hint.css │ │ └── tern.css │ ├── codemirror.css │ ├── icon │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── theme │ │ └── monokai.css ├── examples │ ├── arkanoid.json │ ├── camera.json │ ├── particle.json │ ├── pong.json │ └── shader.json ├── fonts │ ├── LICENSE │ ├── README │ ├── droid │ │ ├── NOTICE │ │ ├── README.txt │ │ ├── droid_sans_bold.typeface.json │ │ ├── droid_sans_mono_regular.typeface.json │ │ ├── droid_sans_regular.typeface.json │ │ ├── droid_serif_bold.typeface.json │ │ └── droid_serif_regular.typeface.json │ ├── gentilis_bold.typeface.json │ ├── gentilis_regular.typeface.json │ ├── helvetiker_bold.typeface.json │ ├── helvetiker_regular.typeface.json │ ├── optimer_bold.typeface.json │ ├── optimer_regular.typeface.json │ └── ttf │ │ └── kenpixel.ttf ├── image │ ├── front-view.png │ ├── icon.png │ ├── loading.gif │ ├── perspective-view.png │ ├── side-view.png │ └── top-view.png ├── js │ ├── WebGL.js │ ├── acorn │ │ ├── acorn.js │ │ ├── acorn_loose.js │ │ └── walk.js │ ├── addon │ │ ├── dialog.js │ │ ├── show-hint.js │ │ └── tern.js │ ├── animation │ │ ├── AnimationClipCreator.js │ │ ├── CCDIKSolver.js │ │ ├── MMDAnimationHelper.js │ │ └── MMDPhysics.js │ ├── cameras │ │ └── CinematicCamera.js │ ├── codemirror.js │ ├── controls │ │ ├── DeviceOrientationControls.js │ │ ├── DragControls.js │ │ ├── EditorControls.js │ │ ├── FirstPersonControls.js │ │ ├── FlyControls.js │ │ ├── OrbitControls.js │ │ ├── PointerLockControls.js │ │ ├── TrackballControls.js │ │ ├── TransformControls.js │ │ └── experimental │ │ │ └── CameraControls.js │ ├── curves │ │ ├── CurveExtras.js │ │ ├── NURBSCurve.js │ │ ├── NURBSSurface.js │ │ └── NURBSUtils.js │ ├── effects │ │ ├── AnaglyphEffect.js │ │ ├── AsciiEffect.js │ │ ├── OutlineEffect.js │ │ ├── ParallaxBarrierEffect.js │ │ ├── PeppersGhostEffect.js │ │ └── StereoEffect.js │ ├── esprima.js │ ├── exporters │ │ ├── ColladaExporter.js │ │ ├── DRACOExporter.js │ │ ├── GLTFExporter.js │ │ ├── MMDExporter.js │ │ ├── OBJExporter.js │ │ ├── PLYExporter.js │ │ ├── STLBinaryExporter.js │ │ ├── STLExporter.js │ │ ├── TypedGeometryExporter.js │ │ └── USDZExporter.js │ ├── geometries │ │ ├── BoxLineGeometry.js │ │ ├── ConvexGeometry.js │ │ ├── DecalGeometry.js │ │ ├── LightningStrike.js │ │ ├── ParametricGeometries.js │ │ ├── RoundedBoxGeometry.js │ │ └── TeapotGeometry.js │ ├── glslprep.min.js │ ├── helpers │ │ ├── LightProbeHelper.js │ │ ├── PositionalAudioHelper.js │ │ ├── RectAreaLightHelper.js │ │ ├── VertexNormalsHelper.js │ │ └── VertexTangentsHelper.js │ ├── interactive │ │ ├── HTMLMesh.js │ │ ├── InteractiveGroup.js │ │ ├── SelectionBox.js │ │ └── SelectionHelper.js │ ├── jsonlint.js │ ├── libs │ │ ├── SPE.js │ │ ├── SPE.min.js │ │ ├── TexGen.js │ │ ├── VolumetricFire.js │ │ ├── ammo.js │ │ ├── ammo.wasm.js │ │ ├── ammo.wasm.wasm │ │ ├── basis │ │ │ ├── README.md │ │ │ ├── basis_transcoder.js │ │ │ └── basis_transcoder.wasm │ │ ├── chevrotain.min.js │ │ ├── ctm.js │ │ ├── dat.gui.min.js │ │ ├── draco │ │ │ ├── README.md │ │ │ ├── draco_decoder.js │ │ │ ├── draco_decoder.wasm │ │ │ ├── draco_encoder.js │ │ │ ├── draco_wasm_wrapper.js │ │ │ └── gltf │ │ │ │ ├── draco_decoder.js │ │ │ │ ├── draco_decoder.wasm │ │ │ │ ├── draco_encoder.js │ │ │ │ └── draco_wasm_wrapper.js │ │ ├── fflate.min.js │ │ ├── gl-matrix.js │ │ ├── gunzip.min.js │ │ ├── inflate.min.js │ │ ├── jszip.min.js │ │ ├── lottie_canvas.js │ │ ├── lzma.js │ │ ├── meshopt_decoder.js │ │ ├── mmdparser.min.js │ │ ├── opentype.js │ │ ├── opentype.min.js │ │ ├── pako.js │ │ ├── rbush.js │ │ ├── rbush.min.js │ │ ├── react-dom.js │ │ ├── react-dom.min.js │ │ ├── react.js │ │ ├── react.min.js │ │ ├── stats.min.js │ │ └── timeliner_gui.min.js │ ├── lights │ │ ├── LightProbeGenerator.js │ │ └── RectAreaLightUniformsLib.js │ ├── lines │ │ ├── Line2.js │ │ ├── LineGeometry.js │ │ ├── LineMaterial.js │ │ ├── LineSegments2.js │ │ ├── LineSegmentsGeometry.js │ │ ├── Wireframe.js │ │ └── WireframeGeometry2.js │ ├── loaders │ │ ├── 3DMLoader.js │ │ ├── 3MFLoader.js │ │ ├── AMFLoader.js │ │ ├── AWDLoader.js │ │ ├── AssimpLoader.js │ │ ├── BVHLoader.js │ │ ├── BabylonLoader.js │ │ ├── BasisTextureLoader.js │ │ ├── BinaryLoader.js │ │ ├── ColladaLoader.js │ │ ├── DDSLoader.js │ │ ├── DRACOLoader.js │ │ ├── EXRLoader.js │ │ ├── FBXLoader.js │ │ ├── GCodeLoader.js │ │ ├── GLTFLoader.js │ │ ├── HDRCubeTextureLoader.js │ │ ├── KMZLoader.js │ │ ├── KTXLoader.js │ │ ├── LDrawLoader.js │ │ ├── LUT3dlLoader.js │ │ ├── LUTCubeLoader.js │ │ ├── LWOLoader.js │ │ ├── LoaderSupport.js │ │ ├── LottieLoader.js │ │ ├── MD2Loader.js │ │ ├── MDDLoader.js │ │ ├── MMDLoader.js │ │ ├── MTLLoader.js │ │ ├── NRRDLoader.js │ │ ├── OBJLoader.js │ │ ├── OBJLoader2.js │ │ ├── PCDLoader.js │ │ ├── PDBLoader.js │ │ ├── PLYLoader.js │ │ ├── PRWMLoader.js │ │ ├── PVRLoader.js │ │ ├── RGBELoader.js │ │ ├── RGBMLoader.js │ │ ├── STLLoader.js │ │ ├── SVGLoader.js │ │ ├── TDSLoader.js │ │ ├── TGALoader.js │ │ ├── TTFLoader.js │ │ ├── TiltLoader.js │ │ ├── VOXLoader.js │ │ ├── VRMLLoader.js │ │ ├── VRMLoader.js │ │ ├── VTKLoader.js │ │ ├── XLoader.js │ │ ├── XYZLoader.js │ │ ├── ctm │ │ │ ├── CTMLoader.js │ │ │ ├── CTMWorker.js │ │ │ ├── ctm.js │ │ │ ├── license │ │ │ │ ├── OpenCTM.txt │ │ │ │ ├── js-lzma.txt │ │ │ │ └── js-openctm.txt │ │ │ └── lzma.js │ │ ├── deprecated │ │ │ ├── LegacyGLTFLoader.js │ │ │ └── LegacyJSONLoader.js │ │ ├── lwo │ │ │ ├── IFFParser.js │ │ │ ├── LWO2Parser.js │ │ │ └── LWO3Parser.js │ │ └── sea3d │ │ │ ├── SEA3D.js │ │ │ ├── SEA3DDeflate.js │ │ │ ├── SEA3DDraco.js │ │ │ ├── SEA3DLZMA.js │ │ │ ├── SEA3DLegacy.js │ │ │ ├── SEA3DLoader.js │ │ │ ├── o3dgc │ │ │ └── SEA3DGC.js │ │ │ └── physics │ │ │ ├── SEA3DAmmo.js │ │ │ ├── SEA3DAmmoLoader.js │ │ │ └── SEA3DRigidBody.js │ ├── math │ │ ├── Capsule.js │ │ ├── ColorConverter.js │ │ ├── ConvexHull.js │ │ ├── ImprovedNoise.js │ │ ├── Lut.js │ │ ├── MeshSurfaceSampler.js │ │ ├── OBB.js │ │ ├── Octree.js │ │ └── SimplexNoise.js │ ├── misc │ │ ├── ConvexObjectBreaker.js │ │ ├── GPUComputationRenderer.js │ │ ├── Gyroscope.js │ │ ├── MD2Character.js │ │ ├── MD2CharacterComplex.js │ │ ├── MorphAnimMesh.js │ │ ├── MorphBlendMesh.js │ │ ├── Ocean.js │ │ ├── ProgressiveLightMap.js │ │ ├── RollerCoaster.js │ │ ├── TubePainter.js │ │ ├── Volume.js │ │ └── VolumeSlice.js │ ├── mode │ │ ├── glsl.js │ │ └── javascript.js │ ├── modifiers │ │ ├── CurveModifier.js │ │ ├── EdgeSplitModifier.js │ │ ├── ExplodeModifier.js │ │ ├── SimplifyModifier.js │ │ ├── SubdivisionModifier.js │ │ └── TessellateModifier.js │ ├── objects │ │ ├── Fire.js │ │ ├── Lensflare.js │ │ ├── LightningStorm.js │ │ ├── MarchingCubes.js │ │ ├── Reflector.js │ │ ├── ReflectorForSSRPass.js │ │ ├── ReflectorRTT.js │ │ ├── Refractor.js │ │ ├── ShadowMesh.js │ │ ├── Sky.js │ │ ├── Water.js │ │ └── Water2.js │ ├── offscreen │ │ ├── jank.js │ │ ├── offscreen.js │ │ └── scene.js │ ├── pako.min.js │ ├── postprocessing │ │ ├── AdaptiveToneMappingPass.js │ │ ├── AfterimagePass.js │ │ ├── BloomPass.js │ │ ├── BokehPass.js │ │ ├── ClearPass.js │ │ ├── CubeTexturePass.js │ │ ├── DotScreenPass.js │ │ ├── EffectComposer.js │ │ ├── FilmPass.js │ │ ├── GlitchPass.js │ │ ├── HalftonePass.js │ │ ├── LUTPass.js │ │ ├── MaskPass.js │ │ ├── OutlinePass.js │ │ ├── Pass.js │ │ ├── RenderPass.js │ │ ├── SAOPass.js │ │ ├── SMAAPass.js │ │ ├── SSAARenderPass.js │ │ ├── SSAOPass.js │ │ ├── SSRPass.js │ │ ├── SSRrPass.js │ │ ├── SavePass.js │ │ ├── ShaderPass.js │ │ ├── TAARenderPass.js │ │ ├── TexturePass.js │ │ └── UnrealBloomPass.js │ ├── renderers │ │ ├── CSS2DRenderer.js │ │ ├── CSS3DRenderer.js │ │ ├── Projector.js │ │ └── SVGRenderer.js │ ├── shaders │ │ ├── ACESFilmicToneMappingShader.js │ │ ├── AfterimageShader.js │ │ ├── BasicShader.js │ │ ├── BleachBypassShader.js │ │ ├── BlendShader.js │ │ ├── BokehShader.js │ │ ├── BokehShader2.js │ │ ├── BrightnessContrastShader.js │ │ ├── ColorCorrectionShader.js │ │ ├── ColorifyShader.js │ │ ├── ConvolutionShader.js │ │ ├── CopyShader.js │ │ ├── DOFMipMapShader.js │ │ ├── DepthLimitedBlurShader.js │ │ ├── DigitalGlitch.js │ │ ├── DotScreenShader.js │ │ ├── FXAAShader.js │ │ ├── FilmShader.js │ │ ├── FocusShader.js │ │ ├── FreiChenShader.js │ │ ├── FresnelShader.js │ │ ├── GammaCorrectionShader.js │ │ ├── GodRaysShader.js │ │ ├── HalftoneShader.js │ │ ├── HorizontalBlurShader.js │ │ ├── HorizontalTiltShiftShader.js │ │ ├── HueSaturationShader.js │ │ ├── KaleidoShader.js │ │ ├── LuminosityHighPassShader.js │ │ ├── LuminosityShader.js │ │ ├── MMDToonShader.js │ │ ├── MirrorShader.js │ │ ├── NormalMapShader.js │ │ ├── OceanShaders.js │ │ ├── ParallaxShader.js │ │ ├── PixelShader.js │ │ ├── RGBShiftShader.js │ │ ├── SAOShader.js │ │ ├── SMAAShader.js │ │ ├── SSAOShader.js │ │ ├── SSRShader.js │ │ ├── SSRrShader.js │ │ ├── SepiaShader.js │ │ ├── SobelOperatorShader.js │ │ ├── SubsurfaceScatteringShader.js │ │ ├── TechnicolorShader.js │ │ ├── TerrainShader.js │ │ ├── ToneMapShader.js │ │ ├── ToonShader.js │ │ ├── TranslucentShader.js │ │ ├── TriangleBlurShader.js │ │ ├── UnpackDepthRGBAShader.js │ │ ├── VerticalBlurShader.js │ │ ├── VerticalTiltShiftShader.js │ │ ├── VignetteShader.js │ │ ├── VolumeShader.js │ │ └── WaterRefractionShader.js │ ├── tern-threejs │ │ └── threejs.js │ ├── ternjs │ │ ├── comment.js │ │ ├── def.js │ │ ├── doc_comment.js │ │ ├── infer.js │ │ ├── polyfill.js │ │ ├── signal.js │ │ └── tern.js │ ├── three.js │ ├── three.min.js │ ├── utils │ │ ├── BufferGeometryUtils.js │ │ ├── CameraUtils.js │ │ ├── GeometryCompressionUtils.js │ │ ├── GeometryUtils.js │ │ ├── RoughnessMipmapper.js │ │ ├── SceneUtils.js │ │ ├── ShadowMapViewer.js │ │ ├── SkeletonUtils.js │ │ ├── TypedArrayUtils.js │ │ └── UVsDebug.js │ └── vr │ │ └── HelioWebXRPolyfill.js ├── models │ └── fbx │ │ ├── OculusHand_L.fbx │ │ ├── OculusHand_L_low.fbx │ │ ├── OculusHand_R.fbx │ │ └── OculusHand_R_low.fbx ├── svg │ ├── guard.svg │ ├── home.svg │ ├── moon.svg │ ├── plane.svg │ ├── sun.svg │ ├── sunrise.svg │ ├── sunset.svg │ └── water.svg └── textures │ ├── MilkyWay │ ├── dark-s_nx.jpg │ ├── dark-s_ny.jpg │ ├── dark-s_nz.jpg │ ├── dark-s_px.jpg │ ├── dark-s_py.jpg │ └── dark-s_pz.jpg │ ├── SPE │ └── smokeparticle.png │ ├── VolumetricFire │ ├── firetex.png │ ├── nzw.png │ └── smoke.png │ ├── air.jpg │ ├── crate.gif │ ├── decal │ ├── LICENSE.TXT │ ├── decal-diffuse.png │ └── decal-normal.jpg │ ├── earth.jpg │ ├── grass.jpg │ ├── grid.png │ ├── lava │ ├── cloud.png │ └── lavatile.jpg │ ├── lensflare │ ├── LICENSE.txt │ ├── hexangle.png │ ├── lensflare0.png │ ├── lensflare0_alpha.png │ ├── lensflare1.png │ ├── lensflare2.png │ └── lensflare3.png │ ├── metal.jpg │ ├── particles │ ├── raindrop-1.png │ ├── raindrop-2.png │ ├── raindrop-3.png │ ├── snowflake1.png │ ├── snowflake2.png │ ├── snowflake3.png │ ├── snowflake4.png │ └── snowflake5.png │ ├── patterns │ ├── bright_squares256.png │ ├── circuit_pattern.png │ └── readme.txt │ ├── terrain │ ├── backgrounddetailed6.jpg │ ├── grasslight-big-nm.jpg │ ├── grasslight-big.jpg │ ├── grasslight-thin.jpg │ └── readme.txt │ ├── tri_pattern.jpg │ └── wood.jpg ├── babel.config.js ├── favicon.ico ├── index.html ├── locales ├── en-US.json ├── fr-FR.json ├── ja-JP.json ├── ko-KR.json ├── ru-RU.json ├── zh-CN.json └── zh-TW.json ├── manifest.json ├── rollup.config.js ├── src ├── Application.js ├── Options.js ├── command │ ├── AddObjectCommand.js │ ├── Command.js │ ├── History.js │ ├── MoveObjectCommand.js │ ├── MultiCmdsCommand.js │ ├── RemoveObjectCommand.js │ ├── SetColorCommand.js │ ├── SetGeometryCommand.js │ ├── SetGeometryValueCommand.js │ ├── SetMaterialColorCommand.js │ ├── SetMaterialCommand.js │ ├── SetMaterialMapCommand.js │ ├── SetMaterialValueCommand.js │ ├── SetPositionCommand.js │ ├── SetRotationCommand.js │ ├── SetScaleCommand.js │ ├── SetSceneCommand.js │ ├── SetUuidCommand.js │ └── SetValueCommand.js ├── controls │ ├── BaseControls.js │ ├── ControlsManager.js │ ├── EditorControls.js │ ├── FirstPersonControls.js │ ├── FreeControls.js │ └── OrthographicCameraControls.js ├── editor │ ├── Editor.jsx │ ├── Loader.jsx │ ├── assets │ │ ├── AnimationPanel.jsx │ │ ├── AssetsPanel.jsx │ │ ├── AudioPanel.jsx │ │ ├── CharacterPanel.jsx │ │ ├── LogPanel.jsx │ │ ├── MapPanel.jsx │ │ ├── MaterialPanel.jsx │ │ ├── ModelPanel.jsx │ │ ├── ParticlePanel.jsx │ │ ├── PrefabPanel.jsx │ │ ├── ScenePanel.jsx │ │ ├── ScreenshotPanel.jsx │ │ ├── VideoPanel.jsx │ │ ├── css │ │ │ ├── AssetsPanel.css │ │ │ ├── LogPanel.css │ │ │ └── MapPanel.css │ │ └── window │ │ │ ├── AddSkyBoxWindow.jsx │ │ │ ├── CategoryEditWindow.jsx │ │ │ ├── CategoryWindow.jsx │ │ │ ├── EditMapWindow.jsx │ │ │ ├── EditModelWindow.jsx │ │ │ ├── EditSceneWindow.jsx │ │ │ ├── EditWindow.jsx │ │ │ └── css │ │ │ ├── AddSkyBoxWindow.css │ │ │ ├── CategoryEditWindow.css │ │ │ ├── CategoryWindow.css │ │ │ ├── EditMapWindow.css │ │ │ ├── EditModelWindow.css │ │ │ ├── EditSceneWindow.css │ │ │ └── EditWindow.css │ ├── component │ │ ├── BasicComponent.jsx │ │ ├── CameraComponent.jsx │ │ ├── FireComponent.jsx │ │ ├── LMeshComponent.jsx │ │ ├── LightComponent.jsx │ │ ├── MMDComponent.jsx │ │ ├── MaterialComponent.jsx │ │ ├── MultiMaterialComponent.jsx │ │ ├── ParticleEmitterComponent.jsx │ │ ├── ReflectorComponent.jsx │ │ ├── SceneComponent.jsx │ │ ├── ScriptComponent.jsx │ │ ├── ShadowComponent.jsx │ │ ├── SmokeComponent.jsx │ │ ├── TransformComponent.jsx │ │ ├── animation │ │ │ ├── BasicAnimationComponent.jsx │ │ │ └── TweenAnimationComponent.jsx │ │ ├── audio │ │ │ ├── AudioListenerComponent.jsx │ │ │ └── BackgroundMusicComponent.jsx │ │ ├── control │ │ │ ├── ControlComponent.jsx │ │ │ ├── FirstPersonControlComponent.jsx │ │ │ ├── FlyControlComponent.jsx │ │ │ ├── OrbitControlComponent.jsx │ │ │ ├── PointerLockControlComponent.jsx │ │ │ └── TrackballControlComponent.jsx │ │ ├── geometry │ │ │ ├── BoxGeometryComponent.jsx │ │ │ ├── BufferGeometryComponent.jsx │ │ │ ├── CircleGeometryComponent.jsx │ │ │ ├── CylinderGeometryComponent.jsx │ │ │ ├── IcosahedronGeometryComponent.jsx │ │ │ ├── LatheGeometryComponent.jsx │ │ │ ├── PlaneGeometryComponent.jsx │ │ │ ├── SphereGeometryComponent.jsx │ │ │ ├── TeapotGeometryComponent.jsx │ │ │ ├── TorusGeometryComponent.jsx │ │ │ └── TorusKnotGeometryComponent.jsx │ │ ├── gis │ │ │ └── GisBasicComponent.jsx │ │ ├── line │ │ │ ├── CatmullRomCurveComponent.jsx │ │ │ ├── CubicBezierCurveComponent.jsx │ │ │ ├── EllipseCurveComponent.jsx │ │ │ ├── LineCurveComponent.jsx │ │ │ └── QuadraticBezierCurveComponent.jsx │ │ ├── material │ │ │ ├── LineBasicMaterialComponent.jsx │ │ │ ├── LineDashedMaterialComponent.jsx │ │ │ ├── MeshBasicMaterialComponent.jsx │ │ │ ├── MeshDepthMaterialComponent.jsx │ │ │ ├── MeshDistanceMaterialComponent.jsx │ │ │ ├── MeshFaceMaterialComponent.jsx │ │ │ ├── MeshLambertMaterialComponent.jsx │ │ │ ├── MeshMatcapMaterialComponent.jsx │ │ │ ├── MeshNormalMaterialComponent.jsx │ │ │ ├── MeshPhongMaterialComponent.jsx │ │ │ ├── MeshPhysicalMaterialComponent.jsx │ │ │ ├── MeshStandardMaterialComponent.jsx │ │ │ ├── MeshToonMaterialComponent.jsx │ │ │ ├── PointsMaterialComponent.jsx │ │ │ ├── RawShaderMaterialComponent.jsx │ │ │ ├── ShaderMaterialComponent.jsx │ │ │ ├── ShadowMaterial.jsx │ │ │ └── SpriteMaterialComponent.jsx │ │ ├── object │ │ │ ├── ClothComponent.jsx │ │ │ ├── PerlinTerrainComponent.jsx │ │ │ ├── SkyComponent.jsx │ │ │ └── WaterComponent.jsx │ │ ├── physics │ │ │ ├── PhysicsTypeComponent.jsx │ │ │ ├── PhysicsWorldComponent.jsx │ │ │ ├── RigidBodyComponent.jsx │ │ │ ├── SoftVolumeComponent.jsx │ │ │ └── helper │ │ │ │ ├── BoxShapeHelper.js │ │ │ │ ├── BvhTriangleMeshShapeHelper.js │ │ │ │ ├── CapsuleShapeHelper.js │ │ │ │ ├── CapsuleShapeXHelper.js │ │ │ │ ├── CapsuleShapeZHelper.js │ │ │ │ ├── CollisionShapeHelper.js │ │ │ │ ├── CompoundShapeHelper.js │ │ │ │ ├── ConcaveShapeHelper.js │ │ │ │ ├── ConeShapeHelper.js │ │ │ │ ├── ConeShapeXHelper.js │ │ │ │ ├── ConeShapeZHelper.js │ │ │ │ ├── ConvexHullShapeHelper.js │ │ │ │ ├── ConvexShapeHelper.js │ │ │ │ ├── ConvexTriangleMeshShapeHellper.js │ │ │ │ ├── CylinderShapeHelper.js │ │ │ │ ├── CylinderShapeXHelper.js │ │ │ │ ├── CylinderShapeZHelper.js │ │ │ │ ├── HeightfieldTerrainShapeHelper.js │ │ │ │ ├── SphereShapeHelper.js │ │ │ │ ├── StaticPlaneShapeHelper.js │ │ │ │ └── TriangleMeshShapeHelper.js │ │ ├── postProcessing │ │ │ ├── AfterimageComponent.jsx │ │ │ ├── BokehComponent.jsx │ │ │ ├── DotScreenComponent.jsx │ │ │ ├── FxaaComponent.jsx │ │ │ ├── GlitchComponent.jsx │ │ │ ├── HalftoneComponent.jsx │ │ │ ├── PixelComponent.jsx │ │ │ ├── RgbShiftComponent.jsx │ │ │ ├── SaoComponent.jsx │ │ │ ├── SmaaComponent.jsx │ │ │ ├── SsaaComponent.jsx │ │ │ ├── SsaoComponent.jsx │ │ │ └── TaaComponent.jsx │ │ ├── shader │ │ │ ├── raw_shader_material_fragment.glsl │ │ │ ├── raw_shader_material_vertex.glsl │ │ │ ├── shader_material_fragment.glsl │ │ │ └── shader_material_vertex.glsl │ │ └── window │ │ │ ├── TextureSettingWindow.jsx │ │ │ └── css │ │ │ └── TextureSettingWindow.css │ ├── css │ │ ├── Editor.css │ │ └── Loader.css │ ├── menu │ │ ├── AssetsMenu.jsx │ │ ├── ComponentMenu.jsx │ │ ├── EditMenu.jsx │ │ ├── EditorMenuBar.jsx │ │ ├── ExampleMenu.jsx │ │ ├── HelpMenu.jsx │ │ ├── LightMenu.jsx │ │ ├── LoginMenu.jsx │ │ ├── ObjectMenu.jsx │ │ ├── OptionsMenu.jsx │ │ ├── PlayMenu.jsx │ │ ├── SceneMenu.jsx │ │ ├── SystemMenu.jsx │ │ ├── ToolMenu.jsx │ │ ├── ViewMenu.jsx │ │ ├── css │ │ │ ├── HelpMenu.css │ │ │ └── LoginMenu.css │ │ ├── scene │ │ │ ├── BaseSceneTemplate.js │ │ │ ├── DistrictSceneTemplate.js │ │ │ ├── EmptySceneTemplate.js │ │ │ └── GISSceneTemplate.js │ │ └── window │ │ │ ├── Add3DTextWindow.jsx │ │ │ ├── CleanUpScenesWindow.jsx │ │ │ ├── ExtensionWindow.jsx │ │ │ ├── OptionsWindow.jsx │ │ │ ├── PluginsWindow.jsx │ │ │ ├── RendererAttributesWindow.jsx │ │ │ ├── SaveSceneWindow.jsx │ │ │ ├── TextureGeneratorWindow.jsx │ │ │ ├── ThreeJsInformationWindow.jsx │ │ │ ├── TypefaceConverterWindow.jsx │ │ │ ├── TypefaceManagementWindow.jsx │ │ │ ├── css │ │ │ ├── Add3DTextWindow.css │ │ │ ├── CleanUpScenesWindow.css │ │ │ ├── ExtensionWindow.css │ │ │ ├── OptionsWindow.css │ │ │ ├── PluginsWindow.css │ │ │ ├── RendererAttributesWindow.css │ │ │ ├── SaveSceneWindow.css │ │ │ ├── TextureGeneratorWindow.css │ │ │ ├── TypefaceConverterWindow.css │ │ │ └── TypefaceManagementWindow.css │ │ │ └── options │ │ │ ├── DisplayPanel.jsx │ │ │ ├── FilterPanel.jsx │ │ │ ├── HelperPanel.jsx │ │ │ ├── RendererPanel.jsx │ │ │ ├── WeatherPanel.jsx │ │ │ └── css │ │ │ ├── DisplayPanel.css │ │ │ ├── FilterPanel.css │ │ │ ├── HelperPanel.css │ │ │ ├── RendererPanel.css │ │ │ └── WeatherPanel.css │ ├── script │ │ ├── ScriptEditor.js │ │ └── code │ │ │ ├── FragmentShaderStarter.js │ │ │ ├── JavaScriptStarter.js │ │ │ ├── JsonStarter.js │ │ │ └── VertexShaderStarter.js │ ├── sidebar │ │ ├── AnimationPropertyPanel.jsx │ │ ├── EditorSideBar.jsx │ │ ├── HierarchyPanel.jsx │ │ ├── HistoryPanel.jsx │ │ ├── PropertyPanel.jsx │ │ ├── ScriptPanel.jsx │ │ ├── css │ │ │ ├── AnimationPropertyPanel.css │ │ │ ├── EditorSideBar.css │ │ │ ├── HierarchyPanel.css │ │ │ ├── HistoryPanel.css │ │ │ ├── PropertyPanel.css │ │ │ └── ScriptPanel.css │ │ └── window │ │ │ ├── ScriptWindow.jsx │ │ │ └── css │ │ │ └── ScriptWindow.css │ ├── status │ │ ├── EditorStatusBar.jsx │ │ ├── css │ │ │ └── EditorStatusBar.css │ │ └── window │ │ │ ├── VRSettingWindow.jsx │ │ │ └── css │ │ │ └── VRSettingWindow.css │ ├── system │ │ ├── AuthorityManagementWindow.jsx │ │ ├── ChangePasswordWindow.jsx │ │ ├── DepartmentManagementWindow.jsx │ │ ├── LoginWindow.jsx │ │ ├── RegisterWindow.jsx │ │ ├── RoleManageWindow.jsx │ │ ├── SystemSettingWindow.jsx │ │ ├── UserManageWindow.jsx │ │ ├── css │ │ │ ├── AuthorityManagementWindow.css │ │ │ ├── ChangePasswordWindow.css │ │ │ ├── DepartmentManagementWindow.css │ │ │ ├── LoginWindow.css │ │ │ ├── RegisterWindow.css │ │ │ ├── RoleManageWindow.css │ │ │ ├── SystemSettingWindow.css │ │ │ └── UserManageWindow.css │ │ ├── dept │ │ │ ├── EditDeptWindow.jsx │ │ │ ├── SelectDeptWindow.jsx │ │ │ └── css │ │ │ │ ├── EditDeptWindow.css │ │ │ │ └── SelectDeptWindow.css │ │ ├── role │ │ │ └── EditRoleWindow.jsx │ │ └── user │ │ │ ├── EditUserWindow.jsx │ │ │ ├── ResetPasswordWindow.jsx │ │ │ ├── SelectUserWindow.jsx │ │ │ └── css │ │ │ ├── EditUserWindow.css │ │ │ ├── ResetPasswordWindow.css │ │ │ └── SelectUserWindow.css │ ├── timeline │ │ ├── TimelinePanel.jsx │ │ └── css │ │ │ └── TimelinePanel.css │ ├── toolbar │ │ ├── DrawTools.jsx │ │ ├── EditTools.jsx │ │ ├── EditorToolbar.jsx │ │ ├── GeneralTools.jsx │ │ ├── MarkTools.jsx │ │ ├── MeasureTools.jsx │ │ ├── TerrainTools.jsx │ │ └── css │ │ │ └── EditorToolbar.css │ ├── tools │ │ ├── AngleTool.js │ │ ├── AreaTool.js │ │ ├── BaseTool.js │ │ ├── DigTool.js │ │ ├── DistanceTool.js │ │ ├── LineMarkTool.js │ │ └── PointMarkTool.js │ └── viewport │ │ ├── ScriptEditorPanel.jsx │ │ ├── Viewport.jsx │ │ └── css │ │ ├── ScriptEditorPanel.css │ │ └── Viewport.css ├── event │ ├── AutoSaveEvent.js │ ├── BaseEvent.js │ ├── EventDispatcher.js │ ├── EventList.js │ ├── FilterEvent.js │ ├── GPUPickEvent.js │ ├── LoadSceneEvent.js │ ├── ObjectEvent.js │ ├── PhysicsEvent.js │ ├── PickEvent.js │ ├── RaycastEvent.js │ ├── RenderEvent.js │ ├── ResizeEvent.js │ ├── ScriptChangedEvent.js │ ├── TransformControlsEvent.js │ ├── ViewEvent.js │ ├── WeatherEvent.js │ ├── WebSocketEvent.js │ └── shader │ │ ├── depth_fragment.glsl │ │ ├── depth_vertex.glsl │ │ ├── pick_fragment.glsl │ │ └── pick_vertex.glsl ├── global.js ├── helper │ ├── BaseHelper.js │ ├── CameraHelper.js │ ├── GridHelper.js │ ├── Helpers.js │ ├── HoverHelper.js │ ├── SelectHelper.js │ ├── ViewHelper.js │ ├── animation │ │ └── SkeletonHelpers.js │ ├── light │ │ ├── DirectionalLightHelpers.js │ │ ├── GodRaysHelpers.js │ │ ├── HemisphereLightHelpers.js │ │ ├── PointLightHelpers.js │ │ ├── RectAreaLightHelper.js │ │ ├── RectAreaLightHelpers.js │ │ ├── SpotLightHelpers.js │ │ ├── VolumeDirectionalLightHelper.js │ │ ├── VolumeHemisphereLightHelper.js │ │ ├── VolumePointLightHelper.js │ │ ├── VolumeRectAreaLightHelper.js │ │ └── VolumeSpotLightHelper.js │ ├── line │ │ └── SplineHelper.js │ ├── shader │ │ ├── copy_fragment.glsl │ │ ├── copy_vertex.glsl │ │ ├── edge_fragment.glsl │ │ ├── edge_vertex.glsl │ │ ├── mask_fragment.glsl │ │ ├── mask_vertex.glsl │ │ ├── outline_fragment.glsl │ │ └── outline_vertex.glsl │ └── view │ │ ├── ArrowFragment.glsl │ │ └── ArrowVertex.glsl ├── index.js ├── loader │ ├── AMFLoader.js │ ├── AWDLoader.js │ ├── AssimpLoader.js │ ├── BVHLoader.js │ ├── BabylonLoader.js │ ├── BaseLoader.js │ ├── BinaryLoader.js │ ├── CTMLoader.js │ ├── ColladaLoader.js │ ├── DRACOLoader.js │ ├── FBXLoader.js │ ├── GCodeLoader.js │ ├── GLTFLoader.js │ ├── JsonLoader.js │ ├── KMZLoader.js │ ├── LOLLoader.js │ ├── MD2Loader.js │ ├── MMDLoader.js │ ├── ModelLoader.js │ ├── NRRDLoader.js │ ├── OBJLoader.js │ ├── ObjectLoader.js │ ├── PCDLoader.js │ ├── PDBLoader.js │ ├── PLYLoader.js │ ├── PRWMLoader.js │ ├── SEA3DLoader.js │ ├── STLLoader.js │ ├── VRMLLoader.js │ ├── VRMLoader.js │ ├── VTKLoader.js │ ├── XLoader.js │ ├── _3DSLoader.js │ ├── _3MFLoader.js │ └── lol │ │ ├── Animation.js │ │ ├── AnimationBone.js │ │ ├── BaseAnimations.js │ │ ├── Bone.js │ │ ├── DataView2.js │ │ ├── HiddenBones.js │ │ ├── Model.js │ │ ├── Texture.js │ │ └── Vertex.js ├── object │ ├── BaseObject.js │ ├── component │ │ ├── Cloth.js │ │ ├── Fire.js │ │ ├── ParticleEmitter.js │ │ ├── Sky.js │ │ ├── SkyBall.js │ │ ├── Smoke.js │ │ ├── Water.js │ │ └── shader │ │ │ ├── heightmap_fragment.glsl │ │ │ ├── sky_ball_fragment.glsl │ │ │ ├── sky_ball_vertex.glsl │ │ │ ├── smoke_fragment.glsl │ │ │ ├── smoke_vertex.glsl │ │ │ ├── smooth_fragment.glsl │ │ │ └── water_vertex.glsl │ ├── geometry │ │ ├── Box.js │ │ ├── Circle.js │ │ ├── Cylinder.js │ │ ├── Group.js │ │ ├── Icosahedron.js │ │ ├── Lathe.js │ │ ├── Plane.js │ │ ├── Sphere.js │ │ ├── Sprite.js │ │ ├── Teapot.js │ │ ├── Torus.js │ │ └── TorusKnot.js │ ├── light │ │ ├── HemisphereLightHelper.js │ │ ├── PointLightHelper.js │ │ ├── RectAreaLightHelper.js │ │ └── shader │ │ │ ├── hemisphere_fragment.glsl │ │ │ └── hemisphere_vertex.glsl │ ├── line │ │ ├── CatmullRomCurve.js │ │ ├── CubicBezierCurve.js │ │ ├── EllipseCurve.js │ │ ├── LineCurve.js │ │ └── QuadraticBezierCurve.js │ ├── mark │ │ ├── LineStringMarker.js │ │ ├── PointMarker.js │ │ └── shader │ │ │ ├── point_marker_fragment.glsl │ │ │ └── point_marker_vertex.glsl │ ├── polygon │ │ └── Polygon.js │ ├── shape │ │ ├── UnscaledTriangle.js │ │ └── shader │ │ │ ├── unscaled_triangle_fragment.glsl │ │ │ └── unscaled_triangle_vertex.glsl │ ├── terrain │ │ ├── PerlinTerrain.js │ │ ├── PhysicsTerrain.js │ │ ├── ShaderTerrain.js │ │ └── shader │ │ │ ├── height_fragment.glsl │ │ │ └── height_vertex.glsl │ ├── text │ │ ├── ScaledText.js │ │ ├── ThreeDText.js │ │ ├── UnscaledText.js │ │ └── shader │ │ │ ├── unscaled_text_fragment.glsl │ │ │ └── unscaled_text_vertex.glsl │ └── weather │ │ ├── Rain.js │ │ └── Snow.js ├── package │ ├── PackageList.js │ └── PackageManager.js ├── player │ ├── EventList.js │ ├── Player.js │ ├── animator │ │ ├── MMDAnimator.js │ │ ├── ParticleAnimator.js │ │ └── TweenAnimator.js │ └── component │ │ ├── GISLoader.js │ │ ├── PlayerAnimation.js │ │ ├── PlayerAudio.js │ │ ├── PlayerComponent.js │ │ ├── PlayerControl.js │ │ ├── PlayerEvent.js │ │ ├── PlayerLoadMask.js │ │ ├── PlayerLoader.js │ │ ├── PlayerPhysics.js │ │ ├── PlayerRenderer.js │ │ ├── WebVR.js │ │ └── physics │ │ └── ThrowBallEvent.js ├── polyfills.js ├── render │ ├── BaseRenderer.js │ ├── EffectRenderer.js │ └── shader │ │ ├── ShaderChunk.js │ │ ├── geo │ │ ├── mercator.glsl │ │ └── mercatorInvert.glsl │ │ ├── mat4 │ │ ├── compose.glsl │ │ ├── decomposeMatrix.glsl │ │ ├── determinant.glsl │ │ ├── makeOrthographic.glsl │ │ ├── makePerspective.glsl │ │ └── makePerspective2.glsl │ │ ├── material │ │ ├── basic_fragment.glsl │ │ ├── basic_fragment_img.glsl │ │ ├── basic_vertex.glsl │ │ ├── basic_vertex_img.glsl │ │ ├── lambert_fragment.glsl │ │ ├── lambert_fragment_img.glsl │ │ ├── lambert_vertex.glsl │ │ ├── lambert_vertex_img.glsl │ │ ├── phong_fragment.glsl │ │ ├── phong_fragment_img.glsl │ │ ├── phong_vertex.glsl │ │ ├── phong_vertex_img.glsl │ │ ├── standard_fragment.glsl │ │ ├── standard_fragment_img.glsl │ │ ├── standard_vertex.glsl │ │ └── standard_vertex_img.glsl │ │ ├── material_instanced │ │ ├── basic_fragment.glsl │ │ ├── basic_vertex.glsl │ │ ├── lambert_fragment.glsl │ │ ├── lambert_vertex.glsl │ │ ├── phong_fragment.glsl │ │ ├── phong_vertex.glsl │ │ ├── standard_fragment.glsl │ │ └── standard_vertex.glsl │ │ ├── material_simple │ │ ├── basic_fragment.glsl │ │ ├── basic_vertex.glsl │ │ ├── lambert_fragment.glsl │ │ ├── lambert_vertex.glsl │ │ ├── phong_fragment.glsl │ │ ├── phong_vertex.glsl │ │ ├── standard_fragment.glsl │ │ └── standard_vertex.glsl │ │ └── vec3 │ │ ├── angleTo.glsl │ │ ├── applyMatrix4.glsl │ │ └── lengthSq.glsl ├── serialization │ ├── BaseSerializer.js │ ├── Converter.js │ ├── Metadata.js │ ├── app │ │ ├── AnimationSerializer.js │ │ ├── OptionsSerializer.js │ │ └── ScriptSerializer.js │ ├── audio │ │ ├── AudioListenerSerializer.js │ │ └── AudioSerializer.js │ ├── camera │ │ ├── CameraSerializer.js │ │ ├── CamerasSerializer.js │ │ ├── OrthographicCameraSerializer.js │ │ └── PerspectiveCameraSerializer.js │ ├── core │ │ ├── BoneSerializer.js │ │ ├── GroupSerializer.js │ │ ├── MeshSerializer.js │ │ ├── Object3DSerializer.js │ │ ├── SceneSerializer.js │ │ ├── ServerObject.js │ │ ├── SpriteSerializer.js │ │ ├── WebGLRenderTargetSerializer.js │ │ ├── WebGLRendererSerializer.js │ │ └── WebGLShadowMapSerializer.js │ ├── geometry │ │ ├── BoxBufferGeometrySerializer.js │ │ ├── BufferGeometrySerializer.js │ │ ├── CircleBufferGeometrySerializer.js │ │ ├── ConeBufferGeometrySerializer.js │ │ ├── CylinderBufferGeometrySerializer.js │ │ ├── DodecahedronBufferGeometrySerializer.js │ │ ├── ExtrudeBufferGeometrySerializer.js │ │ ├── GeometriesSerializer.js │ │ ├── GeometrySerializer.js │ │ ├── IcosahedronBufferGeometrySerializer.js │ │ ├── InstancedBufferGeometrySerializer.js │ │ ├── LatheBufferGeometrySerializer.js │ │ ├── OctahedronBufferGeometrySerializer.js │ │ ├── ParametricBufferGeometrySerializer.js │ │ ├── PlaneBufferGeometrySerializer.js │ │ ├── PolyhedronBufferGeometrySerializer.js │ │ ├── RingBufferGeometrySerializer.js │ │ ├── ShapeBufferGeometrySerializer.js │ │ ├── SphereBufferGeometrySerializer.js │ │ ├── TeapotBufferGeometrySerializer.js │ │ ├── TetrahedronBufferGeometrySerializer.js │ │ ├── TextBufferGeometrySerializer.js │ │ ├── TorusBufferGeometrySerializer.js │ │ ├── TorusKnotBufferGeometrySerializer.js │ │ └── TubeBufferGeometrySerializer.js │ ├── light │ │ ├── AmbientLightSerializer.js │ │ ├── DirectionalLightSerializer.js │ │ ├── HemisphereLightSerializer.js │ │ ├── LightSerializer.js │ │ ├── PointLightSerializer.js │ │ ├── RectAreaLightSerializer.js │ │ ├── SpotLightSerializer.js │ │ └── shadow │ │ │ ├── DirectionalLightShadowSerializer.js │ │ │ ├── LightShadowSerializer.js │ │ │ ├── LightShadowsSerializer.js │ │ │ └── SpotLightShadowSerializer.js │ ├── line │ │ ├── CatmullRomCurveSerializer.js │ │ ├── CubicBezierCurveSerializer.js │ │ ├── EllipseCurveSerializer.js │ │ ├── LineCurveSerializer.js │ │ └── QuadraticBezierCurveSerializer.js │ ├── material │ │ ├── LineBasicMaterialSerializer.js │ │ ├── LineDashedMaterialSerializer.js │ │ ├── MaterialSerializer.js │ │ ├── MaterialsSerializer.js │ │ ├── MeshBasicMaterialSerializer.js │ │ ├── MeshDepthMaterialSerializer.js │ │ ├── MeshDistanceMaterialSerializer.js │ │ ├── MeshFaceMaterialSerializer.js │ │ ├── MeshLambertMaterialSerializer.js │ │ ├── MeshNormalMaterialSerializer.js │ │ ├── MeshPhongMaterialSerializer.js │ │ ├── MeshPhysicalMaterialSerializer.js │ │ ├── MeshStandardMaterialSerializer.js │ │ ├── MeshToonMaterialSerializer.js │ │ ├── MultiMaterialSerializer.js │ │ ├── ParticleBasicMaterialSerializer.js │ │ ├── ParticleSystemMaterialSerializer.js │ │ ├── PointCloudMaterialSerializer.js │ │ ├── PointsMaterialSerializer.js │ │ ├── RawShaderMaterialSerializer.js │ │ ├── ShaderMaterialSerializer.js │ │ ├── ShadowMaterialSerializer.js │ │ ├── SpriteCanvasMaterialSerializer.js │ │ ├── SpriteMaterialSerializer.js │ │ └── UniformsSerializer.js │ ├── objects │ │ ├── ClothSerializer.js │ │ ├── FireSerializer.js │ │ ├── ParticleEmitterSerializer.js │ │ ├── PerlinTerrainSerializer.js │ │ ├── ReflectorSerializer.js │ │ ├── SkySerializer.js │ │ ├── SmokeSerializer.js │ │ ├── WaterSerializer.js │ │ ├── mark │ │ │ └── PointMarkerSerializer.js │ │ └── text │ │ │ ├── ThreeDTextSerializer.js │ │ │ └── UnscaledTextSerializer.js │ └── texture │ │ ├── CanvasTextureSerializer.js │ │ ├── CompressedTextureSerializer.js │ │ ├── CubeTextureSerializer.js │ │ ├── DataTextureSerializer.js │ │ ├── DepthTextureSerializer.js │ │ ├── TextureSerializer.js │ │ ├── TexturesSerializer.js │ │ └── VideoTextureSerializer.js ├── third_party.js ├── ui │ ├── Config.css │ ├── canvas │ │ ├── Canvas.jsx │ │ └── css │ │ │ └── Canvas.css │ ├── common │ │ ├── Accordion.jsx │ │ ├── Buttons.jsx │ │ ├── Column.jsx │ │ ├── Content.jsx │ │ ├── Item.jsx │ │ ├── Menu.jsx │ │ ├── Row.jsx │ │ └── Rows.jsx │ ├── form │ │ ├── Button.jsx │ │ ├── CheckBox.jsx │ │ ├── Form.jsx │ │ ├── FormControl.jsx │ │ ├── IconButton.jsx │ │ ├── IconMenuButton.jsx │ │ ├── ImageButton.jsx │ │ ├── Input.jsx │ │ ├── Label.jsx │ │ ├── LinkButton.jsx │ │ ├── Radio.jsx │ │ ├── SearchField.jsx │ │ ├── Select.jsx │ │ ├── TextArea.jsx │ │ ├── Toggle.jsx │ │ └── css │ │ │ ├── Button.css │ │ │ ├── CheckBox.css │ │ │ ├── Form.css │ │ │ ├── FormControl.css │ │ │ ├── IconButton.css │ │ │ ├── IconMenuButton.css │ │ │ ├── ImageButton.css │ │ │ ├── Input.css │ │ │ ├── Label.css │ │ │ ├── LinkButton.css │ │ │ ├── Radio.css │ │ │ ├── SearchField.css │ │ │ ├── Select.css │ │ │ ├── TextArea.css │ │ │ └── Toggle.css │ ├── icon │ │ ├── Icon.jsx │ │ └── css │ │ │ └── Icon.css │ ├── image │ │ ├── Image.jsx │ │ ├── ImageList.jsx │ │ ├── ImageSelector.jsx │ │ ├── ImageUploader.jsx │ │ └── css │ │ │ ├── Image.css │ │ │ ├── ImageList.css │ │ │ ├── ImageSelector.css │ │ │ └── ImageUploader.css │ ├── index.js │ ├── layout │ │ ├── AbsoluteLayout.jsx │ │ ├── AccordionLayout.jsx │ │ ├── BorderLayout.jsx │ │ ├── HBoxLayout.jsx │ │ ├── TabLayout.jsx │ │ ├── VBoxLayout.jsx │ │ ├── css │ │ │ ├── AbsoluteLayout.css │ │ │ ├── AccordionLayout.css │ │ │ ├── BorderLayout.css │ │ │ ├── Content.css │ │ │ ├── HBoxLayout.css │ │ │ ├── TabLayout.css │ │ │ └── VBoxLayout.css │ │ └── private │ │ │ ├── AccordionPanel.jsx │ │ │ └── css │ │ │ └── AccordionPanel.css │ ├── menu │ │ ├── ContextMenu.jsx │ │ ├── MenuBar.jsx │ │ ├── MenuBarFiller.jsx │ │ ├── MenuItem.jsx │ │ ├── MenuItemSeparator.jsx │ │ ├── MenuTab.jsx │ │ └── css │ │ │ ├── ContextMenu.css │ │ │ ├── MenuBar.css │ │ │ ├── MenuBarFiller.css │ │ │ ├── MenuItem.css │ │ │ ├── MenuItemSeparator.css │ │ │ └── MenuTab.css │ ├── panel │ │ ├── Panel.jsx │ │ └── css │ │ │ └── Panel.css │ ├── progress │ │ ├── LoadMask.jsx │ │ └── css │ │ │ └── LoadMask.css │ ├── property │ │ ├── ButtonProperty.jsx │ │ ├── ButtonsProperty.jsx │ │ ├── CheckBoxProperty.jsx │ │ ├── ColorProperty.jsx │ │ ├── DisplayProperty.jsx │ │ ├── IntegerProperty.jsx │ │ ├── NumberProperty.jsx │ │ ├── PropertyGrid.jsx │ │ ├── PropertyGroup.jsx │ │ ├── SelectProperty.jsx │ │ ├── TextProperty.jsx │ │ ├── TextureProperty.jsx │ │ └── css │ │ │ ├── ButtonProperty.css │ │ │ ├── ButtonsProperty.css │ │ │ ├── CheckBoxProperty.css │ │ │ ├── ColorProperty.css │ │ │ ├── DisplayProperty.css │ │ │ ├── IntegerProperty.css │ │ │ ├── NumberProperty.css │ │ │ ├── PropertyGrid.css │ │ │ ├── PropertyGroup.css │ │ │ ├── SelectProperty.css │ │ │ ├── TextProperty.css │ │ │ └── TextureProperty.css │ ├── svg │ │ ├── SVG.jsx │ │ └── css │ │ │ └── SVG.css │ ├── table │ │ ├── DataGrid.jsx │ │ ├── Table.jsx │ │ ├── TableBody.jsx │ │ ├── TableCell.jsx │ │ ├── TableHead.jsx │ │ ├── TableRow.jsx │ │ └── css │ │ │ ├── DataGrid.css │ │ │ ├── Table.css │ │ │ ├── TableBody.css │ │ │ ├── TableCell.css │ │ │ ├── TableHead.css │ │ │ └── TableRow.css │ ├── timeline │ │ ├── Timeline.jsx │ │ └── css │ │ │ └── Timeline.css │ ├── toolbar │ │ ├── Toolbar.jsx │ │ ├── ToolbarFiller.jsx │ │ ├── ToolbarSeparator.jsx │ │ └── css │ │ │ ├── Toolbar.css │ │ │ ├── ToolbarFiller.css │ │ │ └── ToolbarSeparator.css │ ├── tree │ │ ├── Tree.jsx │ │ └── css │ │ │ └── Tree.css │ └── window │ │ ├── Alert.jsx │ │ ├── Confirm.jsx │ │ ├── Message.jsx │ │ ├── Photo.jsx │ │ ├── Prompt.jsx │ │ ├── Toast.jsx │ │ ├── Video.jsx │ │ ├── Window.jsx │ │ └── css │ │ ├── Alert.css │ │ ├── Confirm.css │ │ ├── Message.css │ │ ├── Photo.css │ │ ├── Prompt.css │ │ ├── Toast.css │ │ ├── Video.css │ │ └── Window.css ├── utils │ ├── Ajax.js │ ├── CanvasUtils.js │ ├── Converter.js │ ├── CookieUtils.js │ ├── CoordinateUtils.js │ ├── CssLoader.js │ ├── CssUtils.js │ ├── DownloadUtils.js │ ├── Earcut.js │ ├── Ease.js │ ├── GeometryUtils.js │ ├── ImageUtils.js │ ├── JsLoader.js │ ├── LanguageLoader.js │ ├── MIMETypeUtils.js │ ├── MaterialUtils.js │ ├── MathUtils.js │ ├── MeshUtils.js │ ├── Server.js │ ├── Storage.js │ ├── StringUtils.js │ ├── TimeUtils.js │ ├── TypefaceUtils.js │ ├── UploadUtils.js │ └── VideoRecorder.js ├── webvr │ ├── VRButton.js │ ├── XRControllerModelFactory.js │ ├── XRHandModelFactory.js │ ├── XRHandOculusMeshModel.js │ ├── XRHandPrimitiveModel.js │ └── motion-controllers.module.js └── worker │ ├── MyWorker.js │ └── Workers.js ├── sw.js ├── test ├── README.md └── webxr │ └── index.html └── view.html /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [tengge1] 4 | 5 | #github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 6 | #patreon: # Replace with a single Patreon username 7 | #open_collective: # Replace with a single Open Collective username 8 | #ko_fi: # Replace with a single Ko-fi username 9 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 10 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 11 | #liberapay: # Replace with a single Liberapay username 12 | #issuehunt: # Replace with a single IssueHunt username 13 | #otechie: # Replace with a single Otechie username 14 | #custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - language: go 4 | go: 5 | - 1.14.x 6 | env: 7 | - GO111MODULE=on 8 | before_script: 9 | - cd server 10 | script: 11 | - go build . 12 | 13 | - language: node_js 14 | node_js: 15 | - 14 16 | before_install: 17 | - cd web 18 | install: 19 | - npm install 20 | script: 21 | - npm run build 22 | 23 | notifications: 24 | email: 25 | - 930372551@qq.com 26 | 27 | services: 28 | - mongodb -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "protoc": { 3 | "options": [ 4 | "--proto_path=${workspaceRoot}/server/gis/model/pb/proto" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /README_new.md: -------------------------------------------------------------------------------- 1 | # Shadow Editor Pro 2 | 3 | - 版本:0.0.1_alpha20241009 4 | - 简介:基于 Three.js 的三维场景编辑器。 5 | - 端口:3000 6 | - 下载地址:https://pan.baidu.com/s/1W21jWApDhJfqskm_F2XJrQ?pwd=cfz0 7 | - 测试数据包:https://pan.baidu.com/s/15r3dyz0FdXUcsJBj1yI9Sg?pwd=l4tg    8 | ![image](images/20241009.png) 9 | - 官方网站:https://www.hylab.cn/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/%E8%B6%85%E8%85%BE%E4%B8%89%E7%BB%B4%E7%BC%96%E8%BE%91%E5%99%A8/ 10 | 11 | ## 技术栈 12 | 13 | - electron: ^31.1.0 14 | - nest.js:^10.3.9 15 | - typescript: ^5.5.2 16 | - vite:^4.0.0 17 | - vue:^3.4.31 18 | - ant-design-vue:^4.2.3 19 | - three.js:^0.166.0 20 | 21 | ## 商业授权 22 | 23 | 如果您有需要,请联系: 24 | QQ:930372551 25 | 微信号:fwlabr 26 | 27 | ## 常见问题 28 | 29 | 跟开源版的主要区别是什么? 30 | 31 | 1、鼠标控制跟地图差不多,适合大场景; 32 | 2、支持 WebGPU 渲染; 33 | 3、上传模型支持上传文件夹; 34 | 4、代码编辑器改为 monaco-editor; 35 | 5、服务端用 node.js 重写,改为文件存储,不再需要数据库; 36 | 6、新增数据可视化功能。 37 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Shadow Editor Document 8 | 11 | 12 | 13 | 14 | Jump to the document 15 | 16 | 17 | -------------------------------------------------------------------------------- /images/20241009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/images/20241009.png -------------------------------------------------------------------------------- /images/scene20200301.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/images/scene20200301.jpg -------------------------------------------------------------------------------- /images/scene20200503_en.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/images/scene20200503_en.jpg -------------------------------------------------------------------------------- /images/vr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/images/vr.jpg -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Scripts 2 | 3 | These are scripts that are useful to deal with this project. DO NOT run 4 | the scripts in this folder. Instead, use `npm run ...` in the parent 5 | folder. 6 | -------------------------------------------------------------------------------- /scripts/service_linux/shadoweditor.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Shadow Editor Server 3 | 4 | [Service] 5 | ExecStart=/home/liteng/github/ShadowEditor/build/ShadowEditor serve --config config.toml 6 | WorkingDirectory=/home/liteng/github/ShadowEditor/build 7 | 8 | [Install] 9 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /scripts/start.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | 11 | const os = require('os'); 12 | const exec = require('./exec'); 13 | 14 | /** 15 | * The main function 16 | */ 17 | async function main() { 18 | await exec('./ShadowEditor', ['serve', '--config', './config.toml'], { 19 | cwd: './build' 20 | }); 21 | } 22 | 23 | main(); -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # ShadowEditor Server 2 | 3 | This is the server. The main programming language is golang. 4 | 5 | It uses mongodb to store data, and google protocol buffers to 6 | transfer data. 7 | 8 | ## Structure 9 | 10 | | folder | | 11 | | --- | --- | 12 | | cmd | providers shell commands | 13 | | help | helper tools | 14 | | remote | remove editing, useless now | 15 | | server | api controllers | 16 | | test | you can test golang features or packages here | 17 | | three | rewrite three.js math module with golang | 18 | | config.toml | server config | 19 | | config-dev.toml | config file when use vscode to launch server | 20 | | go.mod | go module file | 21 | | go.sum | go third-party packages version | 22 | | main.go | entry point for the server, register sub modules here | 23 | -------------------------------------------------------------------------------- /server/cmd/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package cmd 9 | 10 | import ( 11 | "fmt" 12 | 13 | "github.com/spf13/cobra" 14 | ) 15 | 16 | // versionCmd displays the version number. 17 | // 18 | // TODO: Move the version number tegother with the front-end, 19 | // then it is easy to modify when we publish new version. 20 | var versionCmd = &cobra.Command{ 21 | Use: "version", 22 | Short: "Print the version number", 23 | Long: `All software has versions. This is ShadowEditor's`, 24 | Run: func(cmd *cobra.Command, args []string) { 25 | fmt.Println("ShadowEditor version: v0.6.1") 26 | }, 27 | } 28 | 29 | func init() { 30 | AddCommand(versionCmd) 31 | } 32 | -------------------------------------------------------------------------------- /server/cmd/win/debug.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | // Reference URL: https://github.com/andrewkroh/sys/blob/master/windows/svc/example/main.go 9 | 10 | // +build windows 11 | 12 | package win 13 | 14 | import ( 15 | "github.com/spf13/cobra" 16 | "github.com/tengge1/shadoweditor/cmd" 17 | ) 18 | 19 | // debugCmd debug ShadowEditor service on Windows. 20 | var debugCmd = &cobra.Command{ 21 | Use: "debug", 22 | Short: "Debug service on Windows", 23 | Long: `Debug service on Windows`, 24 | Run: func(cmd *cobra.Command, args []string) { 25 | runService(ServiceName, true) 26 | }, 27 | } 28 | 29 | func init() { 30 | cmd.AddCommand(debugCmd) 31 | } 32 | -------------------------------------------------------------------------------- /server/cmd/win/empty.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package win 9 | 10 | // This is an empty file for ubuntu only. DO NOT delete. 11 | // If all file in this package is built on Windows, it will output an error: 12 | // main.go:14:2: build constraints exclude all Go files in ShadowEditor/server/cmd/win 13 | -------------------------------------------------------------------------------- /server/helper/encoder/primitive_d_encoder_test.go: -------------------------------------------------------------------------------- 1 | package encoder 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | 7 | jsoniter "github.com/json-iterator/go" 8 | "go.mongodb.org/mongo-driver/bson/primitive" 9 | ) 10 | 11 | func TestPrimitiveDEncoder(t *testing.T) { 12 | jsoniter.RegisterTypeEncoder( 13 | reflect.TypeOf(primitive.D{}).String(), 14 | PrimitiveDEncoder{}, 15 | ) 16 | 17 | val := primitive.D{ 18 | {Key: "foo", Value: "bar"}, 19 | {Key: "hello", Value: "world"}, 20 | } 21 | 22 | bytes, err := jsoniter.Marshal(val) 23 | if err != nil { 24 | t.Error(err) 25 | } 26 | 27 | got := string(bytes) 28 | expect := `{"foo":"bar","hello":"world"}` 29 | if got != expect { 30 | t.Errorf("expect %v, got %v", expect, got) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server/helper/encoder/primitive_objectid_encoder_test.go: -------------------------------------------------------------------------------- 1 | package encoder 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | 7 | jsoniter "github.com/json-iterator/go" 8 | "go.mongodb.org/mongo-driver/bson/primitive" 9 | ) 10 | 11 | func TestPrimitiveObjectIDEncoder(t *testing.T) { 12 | jsoniter.RegisterTypeEncoder( 13 | reflect.TypeOf(primitive.NewObjectID()).String(), 14 | PrimitiveObjectIDEncoder{}, 15 | ) 16 | 17 | val, err := primitive.ObjectIDFromHex("5ea82000e8cbe4f02f0259ab") 18 | if err != nil { 19 | t.Error(err.Error()) 20 | } 21 | 22 | bytes, err := jsoniter.Marshal(val) 23 | if err != nil { 24 | t.Error(err) 25 | } 26 | 27 | got := string(bytes) 28 | expect := `"5ea82000e8cbe4f02f0259ab"` 29 | if got != expect { 30 | t.Errorf("expect %v, got %v", expect, got) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /server/helper/encoder/time_encoder_test.go: -------------------------------------------------------------------------------- 1 | package encoder 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | "time" 7 | 8 | jsoniter "github.com/json-iterator/go" 9 | ) 10 | 11 | func TestTimeEncoder(t *testing.T) { 12 | jsoniter.RegisterTypeEncoder( 13 | reflect.TypeOf(time.Now()).String(), 14 | TimeEncoder{}, 15 | ) 16 | 17 | val := time.Date(2020, 5, 23, 21, 30, 12, 0, time.Local) 18 | 19 | bytes, err := jsoniter.Marshal(val) 20 | if err != nil { 21 | t.Error(err) 22 | } 23 | 24 | got := string(bytes) 25 | expect := `"2020-05-23 21:30:12"` 26 | if got != expect { 27 | t.Errorf("expect %v, got %v", expect, got) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /server/helper/md5.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package helper 9 | 10 | import ( 11 | "crypto/md5" 12 | "encoding/hex" 13 | ) 14 | 15 | // MD5 convert a string to md5 encrypt string. 16 | // 17 | // TODO: Using md5 to encrypt passwords is not very secure. 18 | func MD5(str string) string { 19 | h := md5.New() 20 | h.Write([]byte(str)) 21 | return hex.EncodeToString(h.Sum(nil)) 22 | } 23 | -------------------------------------------------------------------------------- /server/helper/md5_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package helper 9 | 10 | import "testing" 11 | 12 | func TestMD5(t *testing.T) { 13 | str := "The fog is getting thicker!" 14 | result := MD5(str) 15 | if result != "bd009e4d93affc7c69101d2e0ec4bfde" { 16 | t.Errorf("md5: expect bd009e4d93affc7c69101d2e0ec4bfde, got %v", result) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/helper/redis_test.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 4 | // Use of this source code is governed by a MIT-style 5 | // license that can be found in the LICENSE file. 6 | // 7 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | 10 | package helper 11 | 12 | import "testing" 13 | 14 | func TestRedis(t *testing.T) { 15 | redis, err := Redis{}.Create("localhost:6379", 0) 16 | if err != nil { 17 | t.Error(err) 18 | return 19 | } 20 | err = redis.Set("foo", []byte("bar")) 21 | if err != nil { 22 | t.Error(err) 23 | return 24 | } 25 | bytes, hit, err := redis.Get("foo") 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | if !hit { 31 | t.Error("redis not hit") 32 | return 33 | } 34 | result := string(bytes) 35 | if result != "bar" { 36 | t.Errorf("expect bar, %v get", result) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /server/server/assets/animation/type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package animation 9 | 10 | // Type animation type 11 | type Type string 12 | 13 | const ( 14 | // Unknown unknown type 15 | Unknown Type = "unknown" 16 | // Mmd mmd animation 17 | Mmd Type = "mmd" 18 | // MmdCamera mmd camera animation 19 | MmdCamera Type = "mmdCamera" 20 | ) 21 | -------------------------------------------------------------------------------- /server/server/assets/audio/handle_audio_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package audio 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestAudioList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/audio/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package audio 9 | 10 | import "time" 11 | 12 | // Model is the audio model. 13 | type Model struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Category ID 19 | CategoryID string 20 | // Category Name 21 | CategoryName string 22 | // Total PinYin 23 | TotalPinYin string 24 | // The First Letters of Total PinYin 25 | FirstPinYin string 26 | // Audio Type 27 | Type string 28 | // Download URL 29 | URL string `json:"Url"` 30 | // Version Number 31 | Version int 32 | // Create Time 33 | CreateTime time.Time 34 | // Last Update Time 35 | UpdateTime time.Time 36 | // Thumbnail 37 | Thumbnail string 38 | } 39 | -------------------------------------------------------------------------------- /server/server/assets/audio/type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package audio 9 | 10 | // Type the audio type 11 | type Type string 12 | 13 | const ( 14 | // Unknown unknown type 15 | Unknown Type = "unknown" 16 | // Ambient ambient audio type 17 | Ambient Type = "ambient" 18 | // Effect audio effect type 19 | Effect Type = "effect" 20 | ) 21 | -------------------------------------------------------------------------------- /server/server/assets/character/handle_character_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package character 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestCharacterList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/character/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package character 9 | 10 | import "time" 11 | 12 | // Model character model 13 | type Model struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Category ID 19 | CategoryID string 20 | // Category Name 21 | CategoryName string 22 | // Total PinYin 23 | TotalPinYin string 24 | // The First Letters of Total PinYin 25 | FirstPinYin string 26 | // Create Time 27 | CreateTime time.Time 28 | // Update Time 29 | UpdateTime time.Time 30 | // Character Data 31 | Data string 32 | // Thumbnail 33 | Thumbnail string 34 | } 35 | -------------------------------------------------------------------------------- /server/server/assets/character/type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package character 9 | 10 | // Type Character Type 11 | type Type string 12 | 13 | const ( 14 | // Mesh Mesh Character Type 15 | Mesh Type = "Mesh" 16 | ) 17 | -------------------------------------------------------------------------------- /server/server/assets/exports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // IMPORTANT: You should not register sub packages here, register in the file 11 | // `github.com/tengge1/shadoweditor/cmd/imports.go` instead. 12 | -------------------------------------------------------------------------------- /server/server/assets/material/handle_material_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package material 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestMaterialList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/material/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package material 9 | 10 | import ( 11 | "time" 12 | 13 | "go.mongodb.org/mongo-driver/bson" 14 | ) 15 | 16 | // Model is material model. 17 | type Model struct { 18 | // ID 19 | ID string 20 | // Name 21 | Name string 22 | // Category ID 23 | CategoryID string 24 | // Category Name 25 | CategoryName string 26 | // Total PinYin 27 | TotalPinYin string 28 | // The First Letters of Total PinYin. 29 | FirstPinYin string 30 | // Create Time 31 | CreateTime time.Time 32 | // Update Time 33 | UpdateTime time.Time 34 | // Material Data 35 | Data bson.M 36 | // Thumbnail 37 | Thumbnail string 38 | } 39 | -------------------------------------------------------------------------------- /server/server/assets/mesh/handle_mesh_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package mesh 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestMeshList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/particle/handle_particle_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package particle 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestParticleList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/particle/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package particle 9 | 10 | import ( 11 | "time" 12 | ) 13 | 14 | // Model is particle list. 15 | type Model struct { 16 | // ID 17 | ID string 18 | // Name 19 | Name string 20 | // Category ID 21 | CategoryID string 22 | // Category Name 23 | CategoryName string 24 | // Total PinYin 25 | TotalPinYin string 26 | // The First Letters of Total PinYin 27 | FirstPinYin string 28 | // Create Time 29 | CreateTime time.Time 30 | // Update Time 31 | UpdateTime time.Time 32 | // Thumbnail 33 | Thumbnail string 34 | } 35 | -------------------------------------------------------------------------------- /server/server/assets/particle/type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package particle 9 | 10 | // Type is particle type. 11 | type Type string 12 | 13 | const ( 14 | // Light light type 15 | Light Type = "light" 16 | // Fire fire type 17 | Fire Type = "fire" 18 | // Water water type 19 | Water Type = "water" 20 | ) 21 | -------------------------------------------------------------------------------- /server/server/assets/prefab/handle_prefab_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package prefab 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestPrefabList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/prefab/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package prefab 9 | 10 | import ( 11 | "time" 12 | ) 13 | 14 | // Model is prefab model. 15 | type Model struct { 16 | // ID 17 | ID string 18 | // Name 19 | Name string 20 | // Category ID 21 | CategoryID string 22 | // Category Name 23 | CategoryName string 24 | // Total PinYin 25 | TotalPinYin string 26 | // The First Letters of Total PinYin 27 | FirstPinYin string 28 | // Create Time 29 | CreateTime time.Time 30 | // Update Time 31 | UpdateTime time.Time 32 | // Prefab Data 33 | Data string 34 | // Thumbnail 35 | Thumbnail string 36 | } 37 | -------------------------------------------------------------------------------- /server/server/assets/prefab/type.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package prefab 9 | 10 | // Type is prefab type. 11 | type Type string 12 | 13 | const ( 14 | // Mesh mesh prefab 15 | Mesh Type = "mesh" 16 | ) 17 | -------------------------------------------------------------------------------- /server/server/assets/scene/handle_scene_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package scene 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestSceneList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/screenshot/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package screenshot 9 | 10 | import ( 11 | "time" 12 | ) 13 | 14 | // Model is screenshot model. 15 | type Model struct { 16 | // ID 17 | ID string 18 | // Name 19 | Name string 20 | // Category ID 21 | CategoryID string 22 | // Category Name 23 | CategoryName string 24 | // Total PinYin 25 | TotalPinYin string 26 | // First PinYin 27 | FirstPinYin string 28 | // Download URL 29 | URL string `json:"Url"` 30 | // Create Time 31 | CreateTime time.Time 32 | // Update Time 33 | UpdateTime time.Time 34 | // Thumbnail 35 | Thumbnail string 36 | } 37 | -------------------------------------------------------------------------------- /server/server/assets/summary/handle_list_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package summary 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/texture/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package texture 9 | 10 | import "time" 11 | 12 | // Model is texture model. 13 | type Model struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Category ID 19 | CategoryID string 20 | // Category Name 21 | CategoryName string 22 | // Total PinYin 23 | TotalPinYin string 24 | // The First Letters of Total PinYin. 25 | FirstPinYin string 26 | // Texture Type 27 | Type string 28 | // Download URL 29 | URL string `json:"Url"` 30 | // Version 31 | Version int 32 | // Create Time 33 | CreateTime time.Time 34 | // Update Time 35 | UpdateTime time.Time 36 | // Thumbnail 37 | Thumbnail string 38 | } 39 | -------------------------------------------------------------------------------- /server/server/assets/video/handle_video_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package video 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestVideoList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/assets/video/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package video 9 | 10 | import ( 11 | "time" 12 | ) 13 | 14 | // Model is video model. 15 | type Model struct { 16 | // ID 17 | ID string 18 | // Name 19 | Name string 20 | // Category ID 21 | CategoryID string 22 | // Category Name 23 | CategoryName string 24 | // Total PinYin 25 | TotalPinYin string 26 | // The First Letters of Total PinYin 27 | FirstPinYin string 28 | // Download URL 29 | URL string `json:"Url"` 30 | // Create Time 31 | CreateTime time.Time 32 | // Update Time 33 | UpdateTime time.Time 34 | // Thumbnail 35 | Thumbnail string 36 | } 37 | -------------------------------------------------------------------------------- /server/server/category/handle_category_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package category 9 | 10 | import ( 11 | "io/ioutil" 12 | "net/http" 13 | "net/http/httptest" 14 | "testing" 15 | 16 | "github.com/tengge1/shadoweditor/server" 17 | ) 18 | 19 | func TestCategoryList(t *testing.T) { 20 | server.Create("../config.toml") 21 | 22 | ts := httptest.NewServer(http.HandlerFunc(List)) 23 | defer ts.Close() 24 | 25 | res, err := http.Get(ts.URL) 26 | if err != nil { 27 | t.Error(err) 28 | return 29 | } 30 | defer res.Body.Close() 31 | 32 | bytes, err := ioutil.ReadAll(res.Body) 33 | if err != nil { 34 | t.Error(err) 35 | return 36 | } 37 | 38 | t.Log(string(bytes)) 39 | } 40 | -------------------------------------------------------------------------------- /server/server/category/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package category 9 | 10 | // Model category model 11 | type Model struct { 12 | ID string `bson:"_id"` 13 | Name string 14 | Type string 15 | } 16 | -------------------------------------------------------------------------------- /server/server/export/examples/export_tools.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package examples 9 | 10 | // TODO export tools. 11 | func exportTools(path string) { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /server/server/export/exports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package export 9 | 10 | // IMPORTANT: You should not register sub packages here, register in the file 11 | // `github.com/tengge1/shadoweditor/cmd/imports.go` instead. 12 | -------------------------------------------------------------------------------- /server/server/middleware_crossorigin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package server 9 | 10 | import ( 11 | "net/http" 12 | 13 | "github.com/tengge1/shadoweditor/helper" 14 | ) 15 | 16 | // CrossOriginMiddleware add cross-origin header to the response. 17 | // 18 | // TODO: It may be dangerous not checking the origin. 19 | func CrossOriginMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 20 | helper.EnableCrossDomain(w, r) 21 | next.ServeHTTP(w, r) 22 | } 23 | -------------------------------------------------------------------------------- /server/server/result.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package server 9 | 10 | // Result present a server handler result. 11 | type Result struct { 12 | // The Response Code: 200 - ok; 300 -error; 301 - not authorized. 13 | Code int `json:"Code" bson:"Code"` 14 | // The Response Message 15 | Msg string `json:"Msg" bson:"Msg"` 16 | // The Response Data 17 | Data interface{} `json:"Data,omitempty" bson:"Data,omitempty"` 18 | } 19 | -------------------------------------------------------------------------------- /server/server/system/config.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // Config is mongodb config collection model. 11 | type Config struct { 12 | ID string 13 | Initialized bool 14 | DefaultRegisterRole string 15 | } 16 | -------------------------------------------------------------------------------- /server/server/system/department.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // Department is user department model. 11 | type Department struct { 12 | // ID 13 | ID string 14 | // Parent Department ID 15 | ParentID string 16 | // Name 17 | Name string 18 | // Administrator ID 19 | AdminID string 20 | // Administrator Name (won't store in db) 21 | AdminName string 22 | // Status( 0: normal, -1: deleted) 23 | Status int 24 | } 25 | -------------------------------------------------------------------------------- /server/server/system/exports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // IMPORTANT: You should not register sub packages here, register in the file 11 | // `github.com/tengge1/shadoweditor/cmd/imports.go` instead. 12 | -------------------------------------------------------------------------------- /server/server/system/role.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | import "time" 11 | 12 | // Role is a role's model. 13 | type Role struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Create Time 19 | CreateTime time.Time 20 | // Update Time 21 | UpdateTime time.Time 22 | // Description. 23 | Description string 24 | // Status(0: normal, -1: deleted) 25 | Status int 26 | } 27 | -------------------------------------------------------------------------------- /server/server/system/role_authority.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // RoleAuthority presents a role's one authority. 11 | type RoleAuthority struct { 12 | // RoleID is a role's _id. 13 | RoleID string 14 | // AuthorityID is an authority ID. 15 | AuthorityID string 16 | } 17 | -------------------------------------------------------------------------------- /server/server/tools/exports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package system 9 | 10 | // IMPORTANT: You should not register sub packages here, register in the file 11 | // `github.com/tengge1/shadoweditor/cmd/imports.go` instead. 12 | -------------------------------------------------------------------------------- /server/server/tools/plugin/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package plugin 9 | 10 | import "time" 11 | 12 | // Model is a plugin model. 13 | type Model struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Source 19 | Source string 20 | // Create Time 21 | CreateTime time.Time 22 | // Update Time 23 | UpdateTime time.Time 24 | // Description 25 | Description string 26 | // Status (1: enabled, 0: disabled, -1: deleted) 27 | Status int 28 | } 29 | -------------------------------------------------------------------------------- /server/server/tools/typeface/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package typeface 9 | 10 | import "time" 11 | 12 | // Model is a typeface model. 13 | type Model struct { 14 | // ID 15 | ID string 16 | // Name 17 | Name string 18 | // Total PinYin. 19 | TotalPinYin string 20 | // The First Letters of Total PinYin. 21 | FirstPinYin string 22 | // Downloaded URL 23 | URL string `json:"Url"` 24 | // Create Time 25 | CreateTime time.Time 26 | // Update Time 27 | UpdateTime time.Time 28 | } 29 | -------------------------------------------------------------------------------- /server/server/upload/handle_upload_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // For more information, please visit: https://github.com/tengge1/ShadowEditor 6 | // You can also visit: https://gitee.com/tengge1/ShadowEditor 7 | 8 | package upload 9 | -------------------------------------------------------------------------------- /server/test/README.md: -------------------------------------------------------------------------------- 1 | This is not a part of server. You can test some golang features or packages here. 2 | 3 | The contents of this folder will be cleared from time to time. -------------------------------------------------------------------------------- /server/three/README.md: -------------------------------------------------------------------------------- 1 | We translate three.js math folder to golang, which will be useful in the future. 2 | 3 | THREE.js version: v105 -------------------------------------------------------------------------------- /utils/certificate/certrequest.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIB3TCCAUYCAQAwgYUxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFuZG9uZzEN 3 | MAsGA1UEBwwEWmlibzEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRk 4 | MRAwDgYDVQQDDAd0ZW5nZ2UxMR8wHQYJKoZIhvcNAQkBFhA5MzAzNzI1NTFAcXEu 5 | Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBrMMQDQcLkzY0v2xGI7O4 6 | axS7ZXCk53QDuv0GOHD3izJS+V9xw0f5y0oRk57mOUFs75zVelTOFhxT/gR+8xZ7 7 | 38n6bisEsOQJzOBikAX/V+9hJqfJj3iEnQub9ROCDoSQTGh87/7Agl8neqaIIuSw 8 | Lt5GcNUSB11t3HRI4UjD0QIDAQABoBcwFQYJKoZIhvcNAQkHMQgMBjEyMzQ1NjAN 9 | BgkqhkiG9w0BAQsFAAOBgQCCr0FqS+3P4EWBXQN2bFXQzB79gbyzG9jbHY5P7sMu 10 | eIW9B2ZKIdaYPQtwdJcOKmUvUih//DmovPWtSQp0b9iDNmAnLtVvVU3Src52K8Tj 11 | 4c4Fik6q3JAsz+KRhVwcQKxgHVWbOIoxyXZsewxfSfEOIUw+TWHym0hWIPu5sdUQ 12 | +Q== 13 | -----END CERTIFICATE REQUEST----- 14 | -------------------------------------------------------------------------------- /utils/certificate/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQDBrMMQDQcLkzY0v2xGI7O4axS7ZXCk53QDuv0GOHD3izJS+V9x 3 | w0f5y0oRk57mOUFs75zVelTOFhxT/gR+8xZ738n6bisEsOQJzOBikAX/V+9hJqfJ 4 | j3iEnQub9ROCDoSQTGh87/7Agl8neqaIIuSwLt5GcNUSB11t3HRI4UjD0QIDAQAB 5 | AoGBAIUUGNSmnvitJsoH3nYzggJuUciSY1xsTaNikQn9LmJqGyI4iAS7knFp5nM9 6 | ZCn9nZ8k5jcp36vcNYrhOGWi0wcJNKkVJd7GKO6yW4VEqPCxKKmyVbBEA1uaiy+1 7 | Su/YSg5XJbBDzfVOD3h/Ti1eHVTAIgJ4BqstIeDwV1J2qx2BAkEA383kBn0tJnO7 8 | FyMdBKhSq1o/2+lIe+61qcssBsTt9LcaP95GDh2Rbu84q/VK76qOfUrDEYR3atr6 9 | 6Lfjj2SsBQJBAN2JST1vbDvDGMDeeSlqMju99Cj0+RXKqc5Ub2HmIUtFzkVdjr0k 10 | k746dT/lg1l1mf/aLCHpfEFjCL8dkWZ2Dl0CQB/cfeP2miDpRO9MTmtFU0+Vr5Wt 11 | JmaOW0pq5D+qdX3rO09wY2TLDNNQNy8z4pEwJMztgcvSofWSazoKQ9k8KckCQBRP 12 | GZ/ALzPrVsGXo5PgYGqJp3B5xLvysE5x/yQCbNrxs084nHVKfSDbSxRoffodhdim 13 | r5UMSo/T/GFI3KN//yECQGGr6xMeHqMbz2YFhyLSRVXxton0pq/+b8frBcgB0V3r 14 | E4Qkdrf+VIjbBqSbop7nOXsG4eg4cfuVxpL7svBb1kk= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /utils/chrome/README.md: -------------------------------------------------------------------------------- 1 | chrome扩展 -------------------------------------------------------------------------------- /utils/electron/README.md: -------------------------------------------------------------------------------- 1 | # Electron 2 | 3 | This script is used by `Electron` to create a desktop app. 4 | -------------------------------------------------------------------------------- /utils/electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shadow-editor-desktop", 3 | "version": "0.0.1", 4 | "description": "Cross-platform 3D scene editor based on three.js, golang and mongodb.", 5 | "main": "main.js", 6 | "scripts": { 7 | "start": "electron ." 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/tengge1/ShadowEditor.git" 12 | }, 13 | "author": "tengge", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/tengge1/ShadowEditor/issues" 17 | }, 18 | "homepage": "https://github.com/tengge1/ShadowEditor#readme" 19 | } -------------------------------------------------------------------------------- /utils/electron/toml/index.js: -------------------------------------------------------------------------------- 1 | var parser = require('./lib/parser'); 2 | var compiler = require('./lib/compiler'); 3 | 4 | module.exports = { 5 | parse: function(input) { 6 | var nodes = parser.parse(input.toString()); 7 | return compiler.compile(nodes); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /utils/mongodb/README.md: -------------------------------------------------------------------------------- 1 | # MongoDB 2 | 3 | 1. Download mongodb zip package from `https://www.mongodb.com/try/download/community`. 4 | 5 | Windows: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2012plus-4.2.8.zip 6 | 7 | Ubuntu: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.8.tgz 8 | 9 | 2. Unzip mongodb-win32-x86_64-2012plus-4.2.7.zip in this folder. -------------------------------------------------------------------------------- /utils/mongodb/db/README.md: -------------------------------------------------------------------------------- 1 | MongoDB Data Directory, DO NOT DELETE. -------------------------------------------------------------------------------- /utils/proto/example/foo.js: -------------------------------------------------------------------------------- 1 | // source: test.proto 2 | /** 3 | * @fileoverview 4 | * @enhanceable 5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or 6 | * field starts with 'MSG_' and isn't a translatable message. 7 | * @public 8 | */ 9 | // GENERATED CODE -- DO NOT EDIT! 10 | 11 | goog.provide('proto.example.FOO'); 12 | 13 | /** 14 | * @enum {number} 15 | */ 16 | proto.example.FOO = { 17 | X: 17 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /utils/proto/example/generate.bat: -------------------------------------------------------------------------------- 1 | protoc --go_out=. --js_out=. ./test.proto -------------------------------------------------------------------------------- /utils/proto/example/test.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package example; 4 | 5 | enum FOO { X = 17; }; 6 | 7 | message Test { 8 | required string label = 1; 9 | optional int32 type = 2 [default=77]; 10 | repeated int64 reps = 3; 11 | } 12 | -------------------------------------------------------------------------------- /utils/proto/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/proto 2 | 3 | go 1.14 4 | 5 | require github.com/golang/protobuf v1.3.5 6 | 7 | replace example.com/proto => ./ -------------------------------------------------------------------------------- /utils/proto/go.sum: -------------------------------------------------------------------------------- 1 | github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= 2 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 3 | -------------------------------------------------------------------------------- /utils/proto/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "example.com/proto/example" 7 | 8 | "github.com/golang/protobuf/proto" 9 | ) 10 | 11 | func main() { 12 | test := &example.Test{ 13 | Label: proto.String("hello"), 14 | Type: proto.Int32(17), 15 | Reps: []int64{1, 2, 3}, 16 | } 17 | data, err := proto.Marshal(test) 18 | if err != nil { 19 | log.Fatal("marshaling error: ", err) 20 | } 21 | newTest := &example.Test{} 22 | err = proto.Unmarshal(data, newTest) 23 | if err != nil { 24 | log.Fatal("unmarshaling error: ", err) 25 | } 26 | // Now test and newTest contain the same data. 27 | if test.GetLabel() != newTest.GetLabel() { 28 | log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) 29 | } 30 | // etc. 31 | } 32 | -------------------------------------------------------------------------------- /utils/translate/README.md: -------------------------------------------------------------------------------- 1 | 利用谷歌翻译将`ShadowEditor`翻译成其他语言。 -------------------------------------------------------------------------------- /utils/vscode/README.md: -------------------------------------------------------------------------------- 1 | # vscode扩展 2 | 3 | 模板:https://github.com/Microsoft/vscode-generator-code 4 | 5 | 输入以下代码,在新窗口中打开该扩展项目。 6 | 7 | ```sh 8 | cd shadoweditor 9 | code . 10 | ``` -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "commonjs": true, 5 | "es6": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | "parserOptions": { 10 | "ecmaVersion": 2018, 11 | "ecmaFeatures": { 12 | "jsx": true 13 | }, 14 | "sourceType": "module" 15 | }, 16 | "rules": { 17 | "no-const-assign": "warn", 18 | "no-this-before-super": "warn", 19 | "no-undef": "warn", 20 | "no-unreachable": "warn", 21 | "no-unused-vars": "warn", 22 | "constructor-super": "warn", 23 | "valid-typeof": "warn" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode-test/ 3 | *.vsix 4 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | }, 17 | { 18 | "name": "Extension Tests", 19 | "type": "extensionHost", 20 | "request": "launch", 21 | "runtimeExecutable": "${execPath}", 22 | "args": [ 23 | "--extensionDevelopmentPath=${workspaceFolder}", 24 | "--extensionTestsPath=${workspaceFolder}/test/suite/index" 25 | ] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | test/** 4 | .gitignore 5 | vsc-extension-quickstart.md 6 | **/jsconfig.json 7 | **/*.map 8 | **/.eslintrc.json 9 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "shadoweditor" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "checkJs": true, /* Typecheck .js files. */ 6 | "lib": [ 7 | "es6" 8 | ] 9 | }, 10 | "exclude": [ 11 | "node_modules" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shadoweditor", 3 | "displayName": "ShadowEditor", 4 | "description": "3d editor based on three.js.", 5 | "version": "0.0.1", 6 | "engines": { 7 | "vscode": "^1.42.0" 8 | }, 9 | "categories": [ 10 | "Other" 11 | ], 12 | "activationEvents": [ 13 | "onCommand:extension.helloWorld" 14 | ], 15 | "main": "./extension.js", 16 | "contributes": { 17 | "commands": [ 18 | { 19 | "command": "extension.helloWorld", 20 | "title": "Hello World" 21 | } 22 | ] 23 | }, 24 | "scripts": { 25 | "lint": "eslint .", 26 | "pretest": "npm run lint", 27 | "test": "node ./test/runTest.js" 28 | }, 29 | "devDependencies": { 30 | "@types/glob": "^7.1.1", 31 | "@types/mocha": "^7.0.1", 32 | "@types/node": "^12.11.7", 33 | "@types/vscode": "^1.42.0", 34 | "eslint": "^6.8.0", 35 | "glob": "^7.1.6", 36 | "mocha": "^7.0.1", 37 | "typescript": "^3.7.5", 38 | "vscode-test": "^1.3.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/test/runTest.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const { runTests } = require('vscode-test'); 4 | 5 | async function main() { 6 | try { 7 | // The folder containing the Extension Manifest package.json 8 | // Passed to `--extensionDevelopmentPath` 9 | const extensionDevelopmentPath = path.resolve(__dirname, '../'); 10 | 11 | // The path to the extension test script 12 | // Passed to --extensionTestsPath 13 | const extensionTestsPath = path.resolve(__dirname, './suite/index'); 14 | 15 | // Download VS Code, unzip it and run the integration test 16 | await runTests({ extensionDevelopmentPath, extensionTestsPath }); 17 | } catch (err) { 18 | console.error('Failed to run tests'); 19 | process.exit(1); 20 | } 21 | } 22 | 23 | main(); 24 | -------------------------------------------------------------------------------- /utils/vscode/shadoweditor/test/suite/extension.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | 3 | // You can import and use all API from the 'vscode' module 4 | // as well as import your extension to test it 5 | const vscode = require('vscode'); 6 | // const myExtension = require('../extension'); 7 | 8 | suite('Extension Test Suite', () => { 9 | vscode.window.showInformationMessage('Start all tests.'); 10 | 11 | test('Sample test', () => { 12 | assert.equal(-1, [1, 2, 3].indexOf(5)); 13 | assert.equal(-1, [1, 2, 3].indexOf(0)); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /web/README.md: -------------------------------------------------------------------------------- 1 | # ShadowEditor Web Client 2 | 3 | This directory is the web client. The main programming language 4 | is javascript. 5 | 6 | ## Structure 7 | 8 | | directory | | 9 | | ---| --- | 10 | | assets | third-party assets, such as css, js, images | 11 | | locales | language packages | 12 | | src | source code | 13 | | test | test files | 14 | | .eslintrc | eslint config files | 15 | | babel.config.js | babel config files | 16 | | favicon.ico | website icon | 17 | | index.html | web client home page | 18 | | manifest.json | | 19 | | rollup.config.js | rollup config file | 20 | | sw.js | | 21 | | view.html | home page when play in new window or publish | -------------------------------------------------------------------------------- /web/assets/css/addon/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: inherit; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: inherit; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /web/assets/css/addon/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /web/assets/css/icon/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/css/icon/iconfont.eot -------------------------------------------------------------------------------- /web/assets/css/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/css/icon/iconfont.ttf -------------------------------------------------------------------------------- /web/assets/css/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/css/icon/iconfont.woff -------------------------------------------------------------------------------- /web/assets/css/icon/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/css/icon/iconfont.woff2 -------------------------------------------------------------------------------- /web/assets/fonts/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/fonts/LICENSE -------------------------------------------------------------------------------- /web/assets/fonts/README: -------------------------------------------------------------------------------- 1 | Use Facetype.js to generate typeface.json fonts. 2 | http://gero3.github.io/facetype.js/ 3 | -------------------------------------------------------------------------------- /web/assets/fonts/droid/README.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2008 The Android Open Source Project 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | ########## 16 | 17 | This directory contains the fonts for the platform. They are licensed 18 | under the Apache 2 license. 19 | -------------------------------------------------------------------------------- /web/assets/fonts/ttf/kenpixel.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/fonts/ttf/kenpixel.ttf -------------------------------------------------------------------------------- /web/assets/image/front-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/front-view.png -------------------------------------------------------------------------------- /web/assets/image/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/icon.png -------------------------------------------------------------------------------- /web/assets/image/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/loading.gif -------------------------------------------------------------------------------- /web/assets/image/perspective-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/perspective-view.png -------------------------------------------------------------------------------- /web/assets/image/side-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/side-view.png -------------------------------------------------------------------------------- /web/assets/image/top-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/image/top-view.png -------------------------------------------------------------------------------- /web/assets/js/libs/ammo.wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/js/libs/ammo.wasm.wasm -------------------------------------------------------------------------------- /web/assets/js/libs/basis/basis_transcoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/js/libs/basis/basis_transcoder.wasm -------------------------------------------------------------------------------- /web/assets/js/libs/draco/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/js/libs/draco/draco_decoder.wasm -------------------------------------------------------------------------------- /web/assets/js/libs/draco/gltf/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/js/libs/draco/gltf/draco_decoder.wasm -------------------------------------------------------------------------------- /web/assets/js/lines/Line2.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | class Line2 extends THREE.LineSegments2 { 4 | 5 | constructor( geometry = new THREE.LineGeometry(), material = new THREE.LineMaterial( { 6 | color: Math.random() * 0xffffff 7 | } ) ) { 8 | 9 | super( geometry, material ); 10 | this.type = 'Line2'; 11 | 12 | } 13 | 14 | } 15 | 16 | Line2.prototype.isLine2 = true; 17 | 18 | THREE.Line2 = Line2; 19 | 20 | } )(); 21 | -------------------------------------------------------------------------------- /web/assets/js/lines/WireframeGeometry2.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | class WireframeGeometry2 extends THREE.LineSegmentsGeometry { 4 | 5 | constructor( geometry ) { 6 | 7 | super(); 8 | this.type = 'WireframeGeometry2'; 9 | this.fromWireframeGeometry( new THREE.WireframeGeometry( geometry ) ); // set colors, maybe 10 | 11 | } 12 | 13 | } 14 | 15 | WireframeGeometry2.prototype.isWireframeGeometry2 = true; 16 | 17 | THREE.WireframeGeometry2 = WireframeGeometry2; 18 | 19 | } )(); 20 | -------------------------------------------------------------------------------- /web/assets/js/loaders/ctm/CTMWorker.js: -------------------------------------------------------------------------------- 1 | importScripts( "../../libs/lzma.js", "../../libs/ctm.js" ); 2 | 3 | self.onmessage = function ( event ) { 4 | 5 | var files = []; 6 | 7 | for ( var i = 0; i < event.data.offsets.length; i ++ ) { 8 | 9 | var stream = new CTM.Stream( event.data.data ); 10 | stream.offset = event.data.offsets[ i ]; 11 | 12 | files[ i ] = new CTM.File( stream, [ event.data.data.buffer ] ); 13 | 14 | } 15 | 16 | self.postMessage( files ); 17 | self.close(); 18 | 19 | }; 20 | -------------------------------------------------------------------------------- /web/assets/js/loaders/ctm/license/OpenCTM.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2010 Marcus Geelnard 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 16 | 2. Altered source versions must be plainly marked as such, and must not 17 | be misrepresented as being the original software. 18 | 19 | 3. This notice may not be removed or altered from any source 20 | distribution. 21 | -------------------------------------------------------------------------------- /web/assets/js/modifiers/ExplodeModifier.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Make all faces use unique vertices 3 | * so that each face can be separated from others 4 | * 5 | * @author alteredq / http://alteredqualia.com/ 6 | */ 7 | 8 | THREE.ExplodeModifier = function () { 9 | 10 | }; 11 | 12 | THREE.ExplodeModifier.prototype.modify = function ( geometry ) { 13 | 14 | var vertices = []; 15 | 16 | for ( var i = 0, il = geometry.faces.length; i < il; i ++ ) { 17 | 18 | var n = vertices.length; 19 | 20 | var face = geometry.faces[ i ]; 21 | 22 | var a = face.a; 23 | var b = face.b; 24 | var c = face.c; 25 | 26 | var va = geometry.vertices[ a ]; 27 | var vb = geometry.vertices[ b ]; 28 | var vc = geometry.vertices[ c ]; 29 | 30 | vertices.push( va.clone() ); 31 | vertices.push( vb.clone() ); 32 | vertices.push( vc.clone() ); 33 | 34 | face.a = n; 35 | face.b = n + 1; 36 | face.c = n + 2; 37 | 38 | } 39 | 40 | geometry.vertices = vertices; 41 | 42 | }; 43 | -------------------------------------------------------------------------------- /web/assets/js/objects/ReflectorRTT.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | class ReflectorRTT extends THREE.Reflector { 4 | 5 | constructor( geometry, options ) { 6 | 7 | super( geometry, options ); 8 | this.geometry.setDrawRange( 0, 0 ); // avoid rendering geometry 9 | 10 | } 11 | 12 | } 13 | 14 | THREE.ReflectorRTT = ReflectorRTT; 15 | 16 | } )(); 17 | -------------------------------------------------------------------------------- /web/assets/js/offscreen/jank.js: -------------------------------------------------------------------------------- 1 | var interval = null; 2 | 3 | var button = document.getElementById( 'button' ); 4 | button.addEventListener( 'click', function () { 5 | 6 | if ( interval === null ) { 7 | 8 | interval = setInterval( jank, 1000 / 60 ); 9 | 10 | button.textContent = 'STOP JANK'; 11 | 12 | } else { 13 | 14 | clearInterval( interval ); 15 | interval = null; 16 | 17 | button.textContent = 'START JANK'; 18 | result.textContent = ''; 19 | 20 | } 21 | 22 | } ); 23 | 24 | var result = document.getElementById( 'result' ); 25 | 26 | function jank() { 27 | 28 | var number = 0; 29 | 30 | for ( var i = 0; i < 10000000; i ++ ) { 31 | 32 | number += Math.random(); 33 | 34 | } 35 | 36 | result.textContent = number; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /web/assets/js/offscreen/offscreen.js: -------------------------------------------------------------------------------- 1 | self.importScripts( '../../../build/three.js' ); 2 | self.importScripts( './scene.js' ); 3 | 4 | self.onmessage = function ( message ) { 5 | 6 | var data = message.data; 7 | init( data.drawingSurface, data.width, data.height, data.pixelRatio, data.path ); 8 | 9 | }; 10 | -------------------------------------------------------------------------------- /web/assets/js/shaders/BasicShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Simple test shader 5 | */ 6 | const BasicShader = { 7 | uniforms: {}, 8 | vertexShader: 9 | /* glsl */ 10 | ` 11 | 12 | void main() { 13 | 14 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 15 | 16 | }`, 17 | fragmentShader: 18 | /* glsl */ 19 | ` 20 | 21 | void main() { 22 | 23 | gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 ); 24 | 25 | }` 26 | }; 27 | 28 | THREE.BasicShader = BasicShader; 29 | 30 | } )(); 31 | -------------------------------------------------------------------------------- /web/assets/js/shaders/ColorifyShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Colorify shader 5 | */ 6 | 7 | const ColorifyShader = { 8 | uniforms: { 9 | 'tDiffuse': { 10 | value: null 11 | }, 12 | 'color': { 13 | value: new THREE.Color( 0xffffff ) 14 | } 15 | }, 16 | vertexShader: 17 | /* glsl */ 18 | ` 19 | 20 | varying vec2 vUv; 21 | 22 | void main() { 23 | 24 | vUv = uv; 25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 26 | 27 | }`, 28 | fragmentShader: 29 | /* glsl */ 30 | ` 31 | 32 | uniform vec3 color; 33 | uniform sampler2D tDiffuse; 34 | 35 | varying vec2 vUv; 36 | 37 | void main() { 38 | 39 | vec4 texel = texture2D( tDiffuse, vUv ); 40 | 41 | vec3 luma = vec3( 0.299, 0.587, 0.114 ); 42 | float v = dot( texel.xyz, luma ); 43 | 44 | gl_FragColor = vec4( v * color, texel.w ); 45 | 46 | }` 47 | }; 48 | 49 | THREE.ColorifyShader = ColorifyShader; 50 | 51 | } )(); 52 | -------------------------------------------------------------------------------- /web/assets/js/shaders/CopyShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Full-screen textured quad shader 5 | */ 6 | var CopyShader = { 7 | uniforms: { 8 | 'tDiffuse': { 9 | value: null 10 | }, 11 | 'opacity': { 12 | value: 1.0 13 | } 14 | }, 15 | vertexShader: 16 | /* glsl */ 17 | ` 18 | 19 | varying vec2 vUv; 20 | 21 | void main() { 22 | 23 | vUv = uv; 24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 25 | 26 | }`, 27 | fragmentShader: 28 | /* glsl */ 29 | ` 30 | 31 | uniform float opacity; 32 | 33 | uniform sampler2D tDiffuse; 34 | 35 | varying vec2 vUv; 36 | 37 | void main() { 38 | 39 | vec4 texel = texture2D( tDiffuse, vUv ); 40 | gl_FragColor = opacity * texel; 41 | 42 | }` 43 | }; 44 | 45 | THREE.CopyShader = CopyShader; 46 | 47 | } )(); 48 | -------------------------------------------------------------------------------- /web/assets/js/shaders/GammaCorrectionShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Gamma Correction Shader 5 | * http://en.wikipedia.org/wiki/gamma_correction 6 | */ 7 | const GammaCorrectionShader = { 8 | uniforms: { 9 | 'tDiffuse': { 10 | value: null 11 | } 12 | }, 13 | vertexShader: 14 | /* glsl */ 15 | ` 16 | 17 | varying vec2 vUv; 18 | 19 | void main() { 20 | 21 | vUv = uv; 22 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 23 | 24 | }`, 25 | fragmentShader: 26 | /* glsl */ 27 | ` 28 | 29 | uniform sampler2D tDiffuse; 30 | 31 | varying vec2 vUv; 32 | 33 | void main() { 34 | 35 | vec4 tex = texture2D( tDiffuse, vUv ); 36 | 37 | gl_FragColor = LinearTosRGB( tex ); // optional: LinearToGamma( tex, float( GAMMA_FACTOR ) ); 38 | 39 | }` 40 | }; 41 | 42 | THREE.GammaCorrectionShader = GammaCorrectionShader; 43 | 44 | } )(); 45 | -------------------------------------------------------------------------------- /web/assets/js/shaders/LuminosityShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Luminosity 5 | * http://en.wikipedia.org/wiki/Luminosity 6 | */ 7 | const LuminosityShader = { 8 | uniforms: { 9 | 'tDiffuse': { 10 | value: null 11 | } 12 | }, 13 | vertexShader: 14 | /* glsl */ 15 | ` 16 | 17 | varying vec2 vUv; 18 | 19 | void main() { 20 | 21 | vUv = uv; 22 | 23 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 24 | 25 | }`, 26 | fragmentShader: 27 | /* glsl */ 28 | ` 29 | 30 | #include 31 | 32 | uniform sampler2D tDiffuse; 33 | 34 | varying vec2 vUv; 35 | 36 | void main() { 37 | 38 | vec4 texel = texture2D( tDiffuse, vUv ); 39 | 40 | float l = linearToRelativeLuminance( texel.rgb ); 41 | 42 | gl_FragColor = vec4( l, l, l, texel.w ); 43 | 44 | }` 45 | }; 46 | 47 | THREE.LuminosityShader = LuminosityShader; 48 | 49 | } )(); 50 | -------------------------------------------------------------------------------- /web/assets/js/shaders/PixelShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Pixelation shader 5 | */ 6 | const PixelShader = { 7 | uniforms: { 8 | 'tDiffuse': { 9 | value: null 10 | }, 11 | 'resolution': { 12 | value: null 13 | }, 14 | 'pixelSize': { 15 | value: 1 16 | } 17 | }, 18 | vertexShader: 19 | /* glsl */ 20 | ` 21 | 22 | varying highp vec2 vUv; 23 | 24 | void main() { 25 | 26 | vUv = uv; 27 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 28 | 29 | }`, 30 | fragmentShader: 31 | /* glsl */ 32 | ` 33 | 34 | uniform sampler2D tDiffuse; 35 | uniform float pixelSize; 36 | uniform vec2 resolution; 37 | 38 | varying highp vec2 vUv; 39 | 40 | void main(){ 41 | 42 | vec2 dxy = pixelSize / resolution; 43 | vec2 coord = dxy * floor( vUv / dxy ); 44 | gl_FragColor = texture2D(tDiffuse, coord); 45 | 46 | }` 47 | }; 48 | 49 | THREE.PixelShader = PixelShader; 50 | 51 | } )(); 52 | -------------------------------------------------------------------------------- /web/assets/js/shaders/UnpackDepthRGBAShader.js: -------------------------------------------------------------------------------- 1 | ( function () { 2 | 3 | /** 4 | * Unpack RGBA depth shader 5 | * - show RGBA encoded depth as monochrome color 6 | */ 7 | const UnpackDepthRGBAShader = { 8 | uniforms: { 9 | 'tDiffuse': { 10 | value: null 11 | }, 12 | 'opacity': { 13 | value: 1.0 14 | } 15 | }, 16 | vertexShader: 17 | /* glsl */ 18 | ` 19 | 20 | varying vec2 vUv; 21 | 22 | void main() { 23 | 24 | vUv = uv; 25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 26 | 27 | }`, 28 | fragmentShader: 29 | /* glsl */ 30 | ` 31 | 32 | uniform float opacity; 33 | 34 | uniform sampler2D tDiffuse; 35 | 36 | varying vec2 vUv; 37 | 38 | #include 39 | 40 | void main() { 41 | 42 | float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) ); 43 | gl_FragColor = vec4( vec3( depth ), opacity ); 44 | 45 | }` 46 | }; 47 | 48 | THREE.UnpackDepthRGBAShader = UnpackDepthRGBAShader; 49 | 50 | } )(); 51 | -------------------------------------------------------------------------------- /web/assets/models/fbx/OculusHand_L.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/models/fbx/OculusHand_L.fbx -------------------------------------------------------------------------------- /web/assets/models/fbx/OculusHand_L_low.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/models/fbx/OculusHand_L_low.fbx -------------------------------------------------------------------------------- /web/assets/models/fbx/OculusHand_R.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/models/fbx/OculusHand_R.fbx -------------------------------------------------------------------------------- /web/assets/models/fbx/OculusHand_R_low.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/models/fbx/OculusHand_R_low.fbx -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_nx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_nx.jpg -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_ny.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_ny.jpg -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_nz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_nz.jpg -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_px.jpg -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_py.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_py.jpg -------------------------------------------------------------------------------- /web/assets/textures/MilkyWay/dark-s_pz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/MilkyWay/dark-s_pz.jpg -------------------------------------------------------------------------------- /web/assets/textures/SPE/smokeparticle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/SPE/smokeparticle.png -------------------------------------------------------------------------------- /web/assets/textures/VolumetricFire/firetex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/VolumetricFire/firetex.png -------------------------------------------------------------------------------- /web/assets/textures/VolumetricFire/nzw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/VolumetricFire/nzw.png -------------------------------------------------------------------------------- /web/assets/textures/VolumetricFire/smoke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/VolumetricFire/smoke.png -------------------------------------------------------------------------------- /web/assets/textures/air.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/air.jpg -------------------------------------------------------------------------------- /web/assets/textures/crate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/crate.gif -------------------------------------------------------------------------------- /web/assets/textures/decal/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | decal-diffuse.png 2 | decal-normal.jpg 3 | 4 | Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication License: 5 | http://creativecommons.org/publicdomain/zero/1.0/ -------------------------------------------------------------------------------- /web/assets/textures/decal/decal-diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/decal/decal-diffuse.png -------------------------------------------------------------------------------- /web/assets/textures/decal/decal-normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/decal/decal-normal.jpg -------------------------------------------------------------------------------- /web/assets/textures/earth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/earth.jpg -------------------------------------------------------------------------------- /web/assets/textures/grass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/grass.jpg -------------------------------------------------------------------------------- /web/assets/textures/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/grid.png -------------------------------------------------------------------------------- /web/assets/textures/lava/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lava/cloud.png -------------------------------------------------------------------------------- /web/assets/textures/lava/lavatile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lava/lavatile.jpg -------------------------------------------------------------------------------- /web/assets/textures/lensflare/LICENSE.txt: -------------------------------------------------------------------------------- 1 | lensflare0.png 2 | lensflare1.png 3 | lensflare2.png 4 | lensflare3.png 5 | 6 | 3D assets and textures for ROME "3 Dreams of Black" at http://ro.me are licensed 7 | under a Creative CommonsAttribution-NonCommercial-ShareAlike 3.0 Unported License 8 | ( http://creativecommons.org/licenses/by-nc-sa/3.0/ ). 9 | 10 | --------------------------------------------------------------------------- 11 | hexangle.png 12 | 13 | CC0 - Public Domain Donation by hackcraft.de 14 | 15 | http://opengameart.org/content/lens-flares-and-particles 16 | http://creativecommons.org/publicdomain/zero/1.0/ -------------------------------------------------------------------------------- /web/assets/textures/lensflare/hexangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/hexangle.png -------------------------------------------------------------------------------- /web/assets/textures/lensflare/lensflare0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/lensflare0.png -------------------------------------------------------------------------------- /web/assets/textures/lensflare/lensflare0_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/lensflare0_alpha.png -------------------------------------------------------------------------------- /web/assets/textures/lensflare/lensflare1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/lensflare1.png -------------------------------------------------------------------------------- /web/assets/textures/lensflare/lensflare2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/lensflare2.png -------------------------------------------------------------------------------- /web/assets/textures/lensflare/lensflare3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/lensflare/lensflare3.png -------------------------------------------------------------------------------- /web/assets/textures/metal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/metal.jpg -------------------------------------------------------------------------------- /web/assets/textures/particles/raindrop-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/raindrop-1.png -------------------------------------------------------------------------------- /web/assets/textures/particles/raindrop-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/raindrop-2.png -------------------------------------------------------------------------------- /web/assets/textures/particles/raindrop-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/raindrop-3.png -------------------------------------------------------------------------------- /web/assets/textures/particles/snowflake1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/snowflake1.png -------------------------------------------------------------------------------- /web/assets/textures/particles/snowflake2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/snowflake2.png -------------------------------------------------------------------------------- /web/assets/textures/particles/snowflake3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/snowflake3.png -------------------------------------------------------------------------------- /web/assets/textures/particles/snowflake4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/snowflake4.png -------------------------------------------------------------------------------- /web/assets/textures/particles/snowflake5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/particles/snowflake5.png -------------------------------------------------------------------------------- /web/assets/textures/patterns/bright_squares256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/patterns/bright_squares256.png -------------------------------------------------------------------------------- /web/assets/textures/patterns/circuit_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/patterns/circuit_pattern.png -------------------------------------------------------------------------------- /web/assets/textures/patterns/readme.txt: -------------------------------------------------------------------------------- 1 | Texture "bright_squares256.png" from http://subtlepatterns.com/ 2 | 3 | Slightly modified to have more GPU friendly sizes. 4 | 5 | Licensed under a Creative Commons Attribution 3.0 Unported License: 6 | http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /web/assets/textures/terrain/backgrounddetailed6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/terrain/backgrounddetailed6.jpg -------------------------------------------------------------------------------- /web/assets/textures/terrain/grasslight-big-nm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/terrain/grasslight-big-nm.jpg -------------------------------------------------------------------------------- /web/assets/textures/terrain/grasslight-big.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/terrain/grasslight-big.jpg -------------------------------------------------------------------------------- /web/assets/textures/terrain/grasslight-thin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/terrain/grasslight-thin.jpg -------------------------------------------------------------------------------- /web/assets/textures/terrain/readme.txt: -------------------------------------------------------------------------------- 1 | Textures from http://opengameart.org/ 2 | 3 | http://opengameart.org/content/dark-grass 4 | http://opengameart.org/content/backgrounds-topdown-games 5 | 6 | Slightly modified to have more GPU friendly sizes. 7 | 8 | Licensed under a Creative Commons Attribution 3.0 Unported License: 9 | http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /web/assets/textures/tri_pattern.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/tri_pattern.jpg -------------------------------------------------------------------------------- /web/assets/textures/wood.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/assets/textures/wood.jpg -------------------------------------------------------------------------------- /web/babel.config.js: -------------------------------------------------------------------------------- 1 | const presets = [ 2 | [ 3 | "@babel/preset-react" 4 | ], 5 | ]; 6 | 7 | module.exports = { presets }; -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/favicon.ico -------------------------------------------------------------------------------- /web/locales/en-US.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ShadowEditor", 3 | "short_name": "SE", 4 | "start_url": ".", 5 | "scope": ".", 6 | "display": "standalone", 7 | "icons": [ 8 | { 9 | "src": "./assets/image/icon.png", 10 | "type": "image/png", 11 | "sizes": "144x144" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /web/src/editor/Loader.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import './css/Loader.css'; 11 | import { LoadMask } from '../ui/index'; 12 | 13 | /** 14 | * 载入页面 15 | * @author tengge / https://github.com/tengge1 16 | */ 17 | class Loader extends React.Component { 18 | constructor(props) { 19 | super(props); 20 | } 21 | 22 | render() { 23 | return ; 24 | } 25 | } 26 | 27 | export default Loader; -------------------------------------------------------------------------------- /web/src/editor/assets/css/AssetsPanel.css: -------------------------------------------------------------------------------- 1 | .AssetsPanel>.AccordionPanel>.body>.subPanel { 2 | position: relative; 3 | width: 100%; 4 | height: 100%; 5 | } -------------------------------------------------------------------------------- /web/src/editor/assets/css/LogPanel.css: -------------------------------------------------------------------------------- 1 | .LogPanel { 2 | overflow: hidden; 3 | } 4 | 5 | .LogPanel>.logs { 6 | height: calc(100% - 28px); 7 | margin-top: 4px; 8 | border: 1px solid #ccc; 9 | box-sizing: border-box; 10 | overflow-y: auto; 11 | } 12 | 13 | .LogPanel>.logs>.warn { 14 | color: #5c3c00; 15 | background: #fffbe5; 16 | } 17 | 18 | .LogPanel>.logs>.error { 19 | color: #ff0000; 20 | background: #fff0f0; 21 | } -------------------------------------------------------------------------------- /web/src/editor/assets/css/MapPanel.css: -------------------------------------------------------------------------------- 1 | .MapPanel>.toolbar { 2 | height: 30px; 3 | display: flex; 4 | flex-direction: row; 5 | align-items: center; 6 | justify-content: flex-start; 7 | box-sizing: border-box; 8 | } 9 | 10 | .MapPanel>.toolbar>.add { 11 | width: 22px; 12 | height: 22px; 13 | } 14 | 15 | .MapPanel>.toolbar>.add>.button>.iconfont { 16 | font-size: 14px; 17 | } 18 | 19 | .MapPanel>.toolbar>.search { 20 | flex: 1; 21 | } -------------------------------------------------------------------------------- /web/src/editor/assets/window/css/AddSkyBoxWindow.css: -------------------------------------------------------------------------------- 1 | .Window.AddSkyBoxWindow>.wrap>.content { 2 | display: flex; 3 | align-items: flex-start; 4 | justify-content: flex-start; 5 | flex-wrap: wrap; 6 | } 7 | 8 | .Window.AddSkyBoxWindow>.wrap>.content>.item { 9 | margin-left: 16px; 10 | } 11 | 12 | .Window.AddSkyBoxWindow>.wrap>.content>.item>.selector { 13 | width: 120px; 14 | height: 120px; 15 | } 16 | 17 | .Window.AddSkyBoxWindow>.wrap>.content>.item>.title { 18 | line-height: 24px; 19 | } -------------------------------------------------------------------------------- /web/src/editor/assets/window/css/CategoryEditWindow.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/assets/window/css/CategoryEditWindow.css -------------------------------------------------------------------------------- /web/src/editor/assets/window/css/CategoryWindow.css: -------------------------------------------------------------------------------- 1 | .Window.CategoryWindow>.wrap>.content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 32px; 6 | } 7 | 8 | .Window.CategoryWindow>.wrap>.content>.box { 9 | position: relative; 10 | width: 100%; 11 | height: 100%; 12 | } 13 | 14 | .Window.CategoryWindow>.wrap>.content>.box>.toolbar { 15 | padding: 2px 0; 16 | box-sizing: border-box; 17 | } 18 | 19 | .Window.CategoryWindow>.wrap>.content>.box>.toolbar>.Button { 20 | height: 20px; 21 | font-size: 12px; 22 | line-height: 20px; 23 | } 24 | 25 | .Window.CategoryWindow>.wrap>.content>.box>.list { 26 | width: 100%; 27 | height: calc(100% - 28px); 28 | padding-bottom: 8px; 29 | overflow-y: auto; 30 | box-sizing: border-box; 31 | } -------------------------------------------------------------------------------- /web/src/editor/assets/window/css/EditWindow.css: -------------------------------------------------------------------------------- 1 | .EditWindow>.wrap>.content>.Form>.FormControl>.Button { 2 | height: 20px; 3 | font-size: 12px; 4 | line-height: 20px; 5 | margin: 0 8px; 6 | } -------------------------------------------------------------------------------- /web/src/editor/component/material/LineBasicMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/LineDashedMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshBasicMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshDepthMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshDistanceMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshFaceMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshLambertMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshMatcapMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshNormalMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshPhongMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshPhysicalMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshStandardMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/MeshToonMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/PointsMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/RawShaderMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/ShaderMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/ShadowMaterial.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/material/SpriteMaterialComponent.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/BvhTriangleMeshShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CapsuleShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CapsuleShapeXHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CapsuleShapeZHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CollisionShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CompoundShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConcaveShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConeShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConeShapeXHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConeShapeZHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConvexHullShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConvexShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/ConvexTriangleMeshShapeHellper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CylinderShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CylinderShapeXHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/CylinderShapeZHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/HeightfieldTerrainShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/StaticPlaneShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/physics/helper/TriangleMeshShapeHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/component/shader/raw_shader_material_fragment.glsl: -------------------------------------------------------------------------------- 1 | precision mediump float; 2 | 3 | void main() { 4 | gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); 5 | } -------------------------------------------------------------------------------- /web/src/editor/component/shader/raw_shader_material_vertex.glsl: -------------------------------------------------------------------------------- 1 | precision mediump float; 2 | 3 | uniform mat4 modelViewMatrix; 4 | uniform mat4 projectionMatrix; 5 | 6 | attribute vec3 position; 7 | 8 | void main() { 9 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 10 | } -------------------------------------------------------------------------------- /web/src/editor/component/shader/shader_material_fragment.glsl: -------------------------------------------------------------------------------- 1 | void main() { 2 | gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); 3 | } -------------------------------------------------------------------------------- /web/src/editor/component/shader/shader_material_vertex.glsl: -------------------------------------------------------------------------------- 1 | void main() { 2 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 3 | } -------------------------------------------------------------------------------- /web/src/editor/component/window/css/TextureSettingWindow.css: -------------------------------------------------------------------------------- 1 | .Window.TextureSettingWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } 8 | 9 | .Window.TextureSettingWindow>.wrap>.content>.Form>.FormControl>.Label { 10 | width: 80px; 11 | } -------------------------------------------------------------------------------- /web/src/editor/css/Editor.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #container { 4 | width: 100%; 5 | height: 100%; 6 | margin: 0; 7 | padding: 0; 8 | overflow: hidden; 9 | } 10 | 11 | .BorderLayout.Editor>.north { 12 | z-index: 1000; 13 | } -------------------------------------------------------------------------------- /web/src/editor/css/Loader.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/css/Loader.css -------------------------------------------------------------------------------- /web/src/editor/menu/css/HelpMenu.css: -------------------------------------------------------------------------------- 1 | .Alert.About { 2 | width: 360px; 3 | height: 200px; 4 | } -------------------------------------------------------------------------------- /web/src/editor/menu/css/LoginMenu.css: -------------------------------------------------------------------------------- 1 | .MenuBar>.MenuItem.LoginMenuItem { 2 | padding: 0 4px; 3 | } 4 | 5 | .MenuBar>.MenuItem.LoginMenuItem>.welcome { 6 | padding: 0 4px; 7 | } 8 | 9 | .MenuItem.LoginMenuItem>.button { 10 | height: 20px; 11 | line-height: 20px; 12 | font-size: 13px; 13 | } -------------------------------------------------------------------------------- /web/src/editor/menu/scene/GISSceneTemplate.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import BaseSceneTemplate from './BaseSceneTemplate'; 11 | 12 | /** 13 | * GIS场景模板 14 | */ 15 | class GISSceneTemplate extends BaseSceneTemplate { 16 | 17 | } 18 | 19 | export default GISSceneTemplate; -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/Add3DTextWindow.css: -------------------------------------------------------------------------------- 1 | .Window.Add3DTextWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 80px; 3 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/CleanUpScenesWindow.css: -------------------------------------------------------------------------------- 1 | .Window.CleanUpScenesWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } 8 | 9 | .Window.CleanUpScenesWindow>.wrap>.content>.Form>.FormControl>.Label { 10 | width: 180px; 11 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/ExtensionWindow.css: -------------------------------------------------------------------------------- 1 | .Window.ExtensionWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } 8 | 9 | .Window.ExtensionWindow>.wrap>.content>.DataGrid { 10 | height: 100%; 11 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/OptionsWindow.css: -------------------------------------------------------------------------------- 1 | .Window.OptionsWindow>.wrap>.content { 2 | left: 4px; 3 | right: 4px; 4 | top: 24px; 5 | bottom: 32px; 6 | } 7 | 8 | .Window.OptionsWindow>.wrap>.content>.tab { 9 | width: 100%; 10 | height: 100%; 11 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/PluginsWindow.css: -------------------------------------------------------------------------------- 1 | .Window.PluginsWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } 8 | 9 | .Window.PluginsWindow>.wrap>.content>.Form>.FormControl>.Label { 10 | width: 180px; 11 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/RendererAttributesWindow.css: -------------------------------------------------------------------------------- 1 | .Window.RendererAttributesWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } 8 | 9 | .Window.RendererAttributesWindow>.wrap>.content>.Form>.FormControl>.Label { 10 | width: 180px; 11 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/SaveSceneWindow.css: -------------------------------------------------------------------------------- 1 | .Window.SaveSceneWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 80px; 3 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/TextureGeneratorWindow.css: -------------------------------------------------------------------------------- 1 | .Window.TextureGeneratorWindow>.wrap>.content { 2 | left: 0; 3 | top: 24px; 4 | right: 0; 5 | bottom: 32px; 6 | overflow-y: auto; 7 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/TypefaceConverterWindow.css: -------------------------------------------------------------------------------- 1 | .Window.TypefaceConverterWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 100px; 3 | } 4 | 5 | .Window.TypefaceConverterWindow>.wrap>.content>.Form>.FormControl>.font { 6 | border: none; 7 | padding: 0; 8 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/css/TypefaceManagementWindow.css: -------------------------------------------------------------------------------- 1 | .Window.TypefaceManagementWindow > .wrap > .content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 32px; 6 | } 7 | 8 | .Window.TypefaceManagementWindow > .wrap > .content > .VBoxLayout > .Toolbar > .Button { 9 | height: 20px; 10 | line-height: 20px; 11 | margin: 2px 4px; 12 | font-size: 12px; 13 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/options/css/DisplayPanel.css: -------------------------------------------------------------------------------- 1 | .Form.DisplayPanel { 2 | padding: 16px; 3 | border: 1px solid #ddd; 4 | border-radius: 2px; 5 | box-sizing: border-box; 6 | } 7 | 8 | .Form.DisplayPanel>.FormControl>.Input.selected-color { 9 | width: 60px; 10 | border: none; 11 | background: transparent; 12 | } 13 | 14 | .Form.DisplayPanel>.FormControl>.Input.selected-thickness { 15 | width: 60px; 16 | } 17 | 18 | .Form.DisplayPanel>.FormControl>.Input.hovered-color { 19 | width: 60px; 20 | border: none; 21 | background: transparent; 22 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/options/css/FilterPanel.css: -------------------------------------------------------------------------------- 1 | .Form.FilterPanel { 2 | padding: 16px; 3 | border: 1px solid #ddd; 4 | border-radius: 2px; 5 | box-sizing: border-box; 6 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/options/css/HelperPanel.css: -------------------------------------------------------------------------------- 1 | .Form.HelperPanel { 2 | padding: 16px; 3 | border: 1px solid #ddd; 4 | border-radius: 2px; 5 | box-sizing: border-box; 6 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/options/css/RendererPanel.css: -------------------------------------------------------------------------------- 1 | .Form.RendererPanel { 2 | padding: 16px; 3 | border: 1px solid #ddd; 4 | border-radius: 2px; 5 | box-sizing: border-box; 6 | } -------------------------------------------------------------------------------- /web/src/editor/menu/window/options/css/WeatherPanel.css: -------------------------------------------------------------------------------- 1 | .Form.WeatherPanel { 2 | padding: 16px; 3 | border: 1px solid #ddd; 4 | border-radius: 2px; 5 | box-sizing: border-box; 6 | } -------------------------------------------------------------------------------- /web/src/editor/script/code/FragmentShaderStarter.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 片源着色器起始代码 12 | * @returns {String} 代码 13 | */ 14 | function FragmentShaderStarter() { 15 | return ` 16 | precision mediump float; 17 | 18 | void main() { 19 | gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); 20 | } 21 | `; 22 | } 23 | 24 | export default FragmentShaderStarter; -------------------------------------------------------------------------------- /web/src/editor/script/code/JsonStarter.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * Json起始代码 12 | * @returns {String} 代码 13 | */ 14 | function JsonStarter() { 15 | return ` 16 | { 17 | "defines": { 18 | 19 | }, 20 | "uniforms": { 21 | 22 | }, 23 | "attributes": { 24 | 25 | } 26 | } 27 | `; 28 | } 29 | 30 | export default JsonStarter; -------------------------------------------------------------------------------- /web/src/editor/script/code/VertexShaderStarter.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 顶点着色器起始代码 12 | * @returns {String} 代码 13 | */ 14 | function VertexShaderStarter() { 15 | return ` 16 | precision mediump float; 17 | 18 | uniform mat4 modelViewMatrix; 19 | uniform mat4 projectionMatrix; 20 | 21 | attribute vec3 position; 22 | 23 | void main() { 24 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 25 | } 26 | `; 27 | } 28 | 29 | export default VertexShaderStarter; -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/AnimationPropertyPanel.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/sidebar/css/AnimationPropertyPanel.css -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/EditorSideBar.css: -------------------------------------------------------------------------------- 1 | .EditorSideBar { 2 | width: 240px; 3 | height: 100%; 4 | box-sizing: border-box; 5 | } 6 | 7 | .EditorSideBar>.top { 8 | height: 320px; 9 | border-bottom: 1px solid #eee; 10 | box-sizing: border-box; 11 | } 12 | 13 | .EditorSideBar>.bottom { 14 | height: calc(100% - 320px); 15 | box-sizing: border-box; 16 | } -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/HierarchyPanel.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/sidebar/css/HierarchyPanel.css -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/HistoryPanel.css: -------------------------------------------------------------------------------- 1 | .HistoryPanel { 2 | display: flex; 3 | flex-direction: column; 4 | box-sizing: border-box; 5 | } 6 | 7 | .HistoryPanel>.toolbar { 8 | padding: 4px; 9 | } 10 | 11 | .HistoryPanel>.content { 12 | margin: 0 8px 8px 8px; 13 | border: 1px solid #ddd; 14 | border-radius: 2px; 15 | flex: 1; 16 | overflow-y: auto; 17 | } 18 | 19 | .HistoryPanel>.content>.undo { 20 | font-size: 12px; 21 | padding: 4px; 22 | } 23 | 24 | .HistoryPanel>.content>.redo { 25 | font-size: 12px; 26 | padding: 4px; 27 | opacity: .3; 28 | } -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/PropertyPanel.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/sidebar/css/PropertyPanel.css -------------------------------------------------------------------------------- /web/src/editor/sidebar/css/ScriptPanel.css: -------------------------------------------------------------------------------- 1 | .ScriptPanel { 2 | position: relative; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | .ScriptPanel>.toolbar { 8 | padding: 2px 4px; 9 | } 10 | 11 | .ScriptPanel>.toolbar>.IconButton { 12 | width: 24px; 13 | height: 24px; 14 | margin: 1px 2px; 15 | } 16 | 17 | .ScriptPanel>.toolbar>.IconButton>.iconfont { 18 | font-size: 14px; 19 | } 20 | 21 | .ScriptPanel>.toolbar>.ToolbarSeparator { 22 | margin: 0 4px; 23 | } 24 | 25 | .ScriptPanel>.content { 26 | position: relative; 27 | width: calc(100% - 8px); 28 | height: calc(100% - 32px); 29 | margin: 0 4px; 30 | padding: 0; 31 | border: 1px solid #ddd; 32 | border-radius: 2px; 33 | box-sizing: border-box; 34 | overflow-y: auto; 35 | } -------------------------------------------------------------------------------- /web/src/editor/sidebar/window/css/ScriptWindow.css: -------------------------------------------------------------------------------- 1 | .Window.ScriptWindow { 2 | width: 350px; 3 | height: 220px; 4 | } -------------------------------------------------------------------------------- /web/src/editor/status/css/EditorStatusBar.css: -------------------------------------------------------------------------------- 1 | .EditorStatusBar>.Label { 2 | margin: 0 8px; 3 | } 4 | 5 | .EditorStatusBar>div.mouse-position { 6 | position: relative; 7 | width: 24px; 8 | height: 20px; 9 | margin: 0 8px; 10 | overflow: visible; 11 | } 12 | 13 | .EditorStatusBar>div.mouse-position > label { 14 | position: absolute; 15 | text-align: center; 16 | } 17 | 18 | .EditorStatusBar>.ToolbarSeparator { 19 | margin: 0 8px; 20 | } 21 | 22 | .EditorStatusBar>.Input.selected-color { 23 | width: 60px; 24 | border: none; 25 | background: transparent; 26 | } 27 | 28 | .EditorStatusBar>.Input.selected-thickness { 29 | width: 60px; 30 | } 31 | 32 | .EditorStatusBar>.Button { 33 | height: 20px; 34 | font: 12px 'Microsoft YaHei'; 35 | line-height: 20px; 36 | padding: 0 6px; 37 | } -------------------------------------------------------------------------------- /web/src/editor/status/window/css/VRSettingWindow.css: -------------------------------------------------------------------------------- 1 | .Window.VRSettingWindow > .wrap > .content > .Form > .FormControl > .Label { 2 | width: 100px; 3 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/ChangePasswordWindow.css: -------------------------------------------------------------------------------- 1 | .Window.ChangePasswordWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 100px; 3 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/LoginWindow.css: -------------------------------------------------------------------------------- 1 | .Window.Login>.wrap>.content>.Form>.FormControl>.fake{ 2 | position: absolute; 3 | left: -10000px; 4 | top: -10000px; 5 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/RegisterWindow.css: -------------------------------------------------------------------------------- 1 | .Window.RegisterWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 120px; 3 | } 4 | 5 | .Window.RegisterWindow>.wrap>.content>.Form>.FormControl>.fake{ 6 | position: absolute; 7 | left: -10000px; 8 | top: -10000px; 9 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/RoleManageWindow.css: -------------------------------------------------------------------------------- 1 | .Window.RoleManageWindow>.wrap>.content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 0; 6 | } 7 | 8 | .Window.RoleManageWindow>.wrap>.content>.Toolbar>.Button { 9 | height: 20px; 10 | line-height: 20px; 11 | font-size: 12px; 12 | } 13 | 14 | .Window.RoleManageWindow>.wrap>.content>.Toolbar>.SearchField { 15 | width: 240px; 16 | } 17 | 18 | .Window.RoleManageWindow>.wrap>.content>.DataGrid { 19 | height: calc(100% - 25px); 20 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/SystemSettingWindow.css: -------------------------------------------------------------------------------- 1 | .Window.SystemSettingWindow>.wrap>.content>.Form>.FormControl>.Label{ 2 | width: 100px; 3 | } -------------------------------------------------------------------------------- /web/src/editor/system/css/UserManageWindow.css: -------------------------------------------------------------------------------- 1 | .Window.UserManageWindow>.wrap>.content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 0; 6 | } 7 | 8 | .Window.UserManageWindow>.wrap>.content>.Toolbar>.Button { 9 | height: 20px; 10 | line-height: 20px; 11 | font-size: 12px; 12 | } 13 | 14 | .Window.UserManageWindow>.wrap>.content>.Toolbar>.ToolbarSeparator>.separator { 15 | margin: 0 4px; 16 | } 17 | 18 | .Window.UserManageWindow>.wrap>.content>.Toolbar>.SearchField { 19 | width: 240px; 20 | } 21 | 22 | .Window.UserManageWindow>.wrap>.content>.DataGrid { 23 | height: calc(100% - 25px); 24 | } -------------------------------------------------------------------------------- /web/src/editor/system/dept/css/EditDeptWindow.css: -------------------------------------------------------------------------------- 1 | .Window.EditDeptWindow>.wrap>.content>.Form>.FormControl>.Label { 2 | width: 80px; 3 | } 4 | 5 | .Window.EditDeptWindow>.wrap>.content>.Form>.FormControl>.Label.text { 6 | width: 120px; 7 | } -------------------------------------------------------------------------------- /web/src/editor/system/dept/css/SelectDeptWindow.css: -------------------------------------------------------------------------------- 1 | .Window.SelectDeptWindow>.wrap>.content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 32px; 6 | } -------------------------------------------------------------------------------- /web/src/editor/system/user/css/EditUserWindow.css: -------------------------------------------------------------------------------- 1 | .Window.EditUserWindow>.wrap>.content>.Form>.FormControl>.fake { 2 | position: absolute; 3 | left: -10000px; 4 | top: -10000px; 5 | } 6 | 7 | .Window.EditUserWindow>.wrap>.content>.Form>.FormControl>.deptName { 8 | width: 100px; 9 | } 10 | 11 | .Window.EditUserWindow>.wrap>.content>.Form>.FormControl>.select { 12 | height: 20px; 13 | line-height: 20px; 14 | } -------------------------------------------------------------------------------- /web/src/editor/system/user/css/ResetPasswordWindow.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/system/user/css/ResetPasswordWindow.css -------------------------------------------------------------------------------- /web/src/editor/system/user/css/SelectUserWindow.css: -------------------------------------------------------------------------------- 1 | .Window.SelectUserWindow>.wrap>.content { 2 | left: 0; 3 | right: 0; 4 | top: 24px; 5 | bottom: 32px; 6 | } 7 | 8 | .Window.SelectUserWindow>.wrap>.content>.Toolbar>.SearchField { 9 | width: 240px; 10 | } -------------------------------------------------------------------------------- /web/src/editor/timeline/css/TimelinePanel.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/editor/timeline/css/TimelinePanel.css -------------------------------------------------------------------------------- /web/src/editor/toolbar/css/EditorToolbar.css: -------------------------------------------------------------------------------- 1 | .Toolbar.EditorToolbar { 2 | height: 32px; 3 | } 4 | 5 | .Toolbar.EditorToolbar>.Select { 6 | height: 24px; 7 | line-height: 24px; 8 | font-size: 12px; 9 | margin-right: 4px; 10 | } 11 | 12 | .Toolbar.EditorToolbar>.IconButton, 13 | .Toolbar.EditorToolbar>.ImageButton { 14 | width: 28px; 15 | height: 24px; 16 | margin: 0px 4px; 17 | } 18 | 19 | .Toolbar.EditorToolbar>.IconButton>.iconfont, 20 | .Toolbar.EditorToolbar>.ImageButton>img { 21 | font-size: 18px; 22 | } 23 | 24 | .Toolbar.EditorToolbar>.ToolbarSeparator { 25 | margin: 0 4px; 26 | } -------------------------------------------------------------------------------- /web/src/editor/tools/AngleTool.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/tools/BaseTool.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import { dispatch } from '../../third_party'; 11 | 12 | var ID = -1; 13 | 14 | /** 15 | * 工具基类 16 | * @author tengge / https://github.com/tengge1 17 | */ 18 | class BaseTool { 19 | constructor() { 20 | this.id = `EditorTool${ID--}`; 21 | this.dispatch = dispatch('end'); 22 | this.call = this.dispatch.call.bind(this.dispatch); 23 | this.on = this.dispatch.on.bind(this.dispatch); 24 | } 25 | 26 | start() { 27 | 28 | } 29 | 30 | stop() { 31 | 32 | } 33 | 34 | clear() { 35 | 36 | } 37 | } 38 | 39 | export default BaseTool; -------------------------------------------------------------------------------- /web/src/editor/tools/LineMarkTool.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/editor/viewport/css/Viewport.css: -------------------------------------------------------------------------------- 1 | .Viewport { 2 | position: relative; 3 | width: 100%; 4 | height: 100%; 5 | display: block; 6 | } 7 | 8 | .Viewport>.editor { 9 | position: absolute; 10 | left: 0; 11 | top: 0; 12 | width: 100%; 13 | height: 100%; 14 | } 15 | 16 | .Viewport>.cesium { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | width: 100%; 21 | height: 100%; 22 | display: none; 23 | } 24 | 25 | .Viewport>.svg { 26 | position: absolute; 27 | left: 0; 28 | top: 0; 29 | width: 100%; 30 | height: 100%; 31 | display: none; 32 | } 33 | 34 | .Viewport>.player { 35 | position: absolute; 36 | left: 0; 37 | top: 0; 38 | width: 100%; 39 | height: 100%; 40 | display: none; 41 | z-index: 10; 42 | } -------------------------------------------------------------------------------- /web/src/event/BaseEvent.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | var ID = -1; 11 | 12 | /** 13 | * 事件基类 14 | * @author tengge / https://github.com/tengge1 15 | */ 16 | class BaseEvent { 17 | constructor() { 18 | this.id = `${this.constructor.name}${ID--}`; 19 | } 20 | 21 | start() { 22 | 23 | } 24 | 25 | stop() { 26 | 27 | } 28 | } 29 | 30 | export default BaseEvent; -------------------------------------------------------------------------------- /web/src/event/shader/depth_fragment.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | varying float depth; 4 | 5 | void main() { 6 | // 参考:https://gamedev.stackexchange.com/questions/93055/getting-the-real-fragment-depth-in-glsl 7 | // 不能直接输出gl_FragCoord.z / gl_FragCoord.w的原因是: 8 | // 由于far=10000,gl_FragCoord.z / gl_FragCoord.w(屏幕坐标系中的深度)非常接近1.0,几乎不变; 9 | // 而gl_FragCoord.z是相机坐标系中的深度,线性变化的。 10 | 11 | float hex = abs(depth) * 16777215.0; // 0xffffff 12 | 13 | float r = floor(hex / 65535.0); 14 | float g = floor((hex - r * 65535.0) / 255.0); 15 | float b = floor(hex - r * 65535.0 - g * 255.0); 16 | float a = sign(depth) >= 0.0 ? 1.0 : 0.0; // depth大于等于0,为1.0;小于0,为0.0。 17 | 18 | gl_FragColor = vec4(r / 255.0, g / 255.0, b / 255.0, a); 19 | } -------------------------------------------------------------------------------- /web/src/event/shader/depth_vertex.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform float far; 4 | 5 | varying float depth; 6 | 7 | void main() { 8 | // 参考:https://stackoverflow.com/questions/6408851/draw-the-depth-value-in-opengl-using-shaders 9 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 10 | depth = gl_Position.z / far; 11 | } -------------------------------------------------------------------------------- /web/src/event/shader/pick_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 pickColor; 2 | 3 | void main() { 4 | gl_FragColor = vec4(pickColor, 1.0); 5 | } -------------------------------------------------------------------------------- /web/src/event/shader/pick_vertex.glsl: -------------------------------------------------------------------------------- 1 | void main() { 2 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 3 | } -------------------------------------------------------------------------------- /web/src/global.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | export default { 11 | app: null 12 | }; -------------------------------------------------------------------------------- /web/src/helper/BaseHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | var ID = -1; 11 | 12 | /** 13 | * 帮助器基类 14 | * @author tengge / https://github.com/tengge1 15 | */ 16 | class BaseHelper { 17 | constructor() { 18 | this.id = `${this.constructor.name}${ID--}`; 19 | } 20 | 21 | /** 22 | * 帮助器开始运行 23 | * @description 因为start是在`appStarted`事件中运行的,所以无法监听到`appStart`和`appStarted`事件 24 | */ 25 | start() { 26 | 27 | } 28 | 29 | /** 30 | * 帮助器结束运行 31 | */ 32 | stop() { 33 | 34 | } 35 | } 36 | 37 | export default BaseHelper; -------------------------------------------------------------------------------- /web/src/helper/animation/SkeletonHelpers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/helper/shader/copy_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform float opacity; 2 | 3 | uniform sampler2D tDiffuse; 4 | 5 | varying vec2 vUv; 6 | 7 | void main() { 8 | vec4 texel = texture2D( tDiffuse, vUv ); 9 | gl_FragColor = opacity * texel; 10 | } -------------------------------------------------------------------------------- /web/src/helper/shader/copy_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | void main() { 4 | vUv = uv; 5 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 6 | } -------------------------------------------------------------------------------- /web/src/helper/shader/edge_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform sampler2D maskTexture; 2 | uniform vec2 texSize; 3 | uniform vec3 color; 4 | uniform float thickness; 5 | 6 | varying vec2 vUv; 7 | 8 | // https://github.com/mrdoob/three.js/blob/dev/examples/js/postprocessing/OutlinePass.js 9 | 10 | void main() { 11 | vec2 invSize = thickness / texSize; 12 | vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize); 13 | 14 | vec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy); 15 | vec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy); 16 | vec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw); 17 | vec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw); 18 | 19 | float diff1 = (c1.r - c2.r)*0.5; 20 | float diff2 = (c3.r - c4.r)*0.5; 21 | 22 | float d = length(vec2(diff1, diff2)); 23 | gl_FragColor = d > 0.0 ? vec4(color, 1.0) : vec4(0.0, 0.0, 0.0, 0.0); 24 | } -------------------------------------------------------------------------------- /web/src/helper/shader/edge_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | // https://github.com/mrdoob/three.js/blob/dev/examples/js/postprocessing/OutlinePass.js 4 | 5 | void main() { 6 | vUv = uv; 7 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 8 | } -------------------------------------------------------------------------------- /web/src/helper/shader/mask_fragment.glsl: -------------------------------------------------------------------------------- 1 | // https://github.com/mrdoob/three.js/blob/dev/examples/js/postprocessing/OutlinePass.js 2 | 3 | void main() { 4 | gl_FragColor = vec4(0.0, 1.0, 1.0, 1.0); 5 | } -------------------------------------------------------------------------------- /web/src/helper/shader/mask_vertex.glsl: -------------------------------------------------------------------------------- 1 | // https://github.com/mrdoob/three.js/blob/dev/examples/js/postprocessing/OutlinePass.js 2 | 3 | void main() { 4 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 5 | } -------------------------------------------------------------------------------- /web/src/helper/shader/outline_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 color; 2 | 3 | void main() { 4 | gl_FragColor = vec4(color, 1.0); 5 | } -------------------------------------------------------------------------------- /web/src/helper/shader/outline_vertex.glsl: -------------------------------------------------------------------------------- 1 | uniform float thickness; 2 | 3 | // Modified from http://forum.unity3d.com/threads/toon-outline-but-with-diffuse-surface.24668/ 4 | 5 | void main() { 6 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 7 | 8 | vec3 norm = normalMatrix * normal; 9 | 10 | norm.x *= projectionMatrix[0][0]; 11 | norm.y *= projectionMatrix[1][1]; 12 | 13 | gl_Position.xy += norm.xy * gl_Position.z * thickness; 14 | } -------------------------------------------------------------------------------- /web/src/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import './polyfills'; 11 | import './render/shader/ShaderChunk'; 12 | 13 | export { default as Options } from './Options'; 14 | export { default as Player } from './player/Player'; 15 | 16 | // ui 17 | export { default as classNames } from 'classnames/bind'; 18 | export { default as PropTypes } from 'prop-types'; 19 | export * from './ui/index'; 20 | 21 | // utils 22 | export { default as LanguageLoader } from './utils/LanguageLoader'; 23 | 24 | // workers 25 | import './worker/Workers'; 26 | 27 | export { default as Application } from './Application'; -------------------------------------------------------------------------------- /web/src/loader/BaseLoader.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import PackageManager from '../package/PackageManager'; 11 | 12 | var ID = -1; 13 | 14 | /** 15 | * BaseLoader 16 | * @author tengge / https://github.com/tengge1 17 | */ 18 | class BaseLoader { 19 | constructor() { 20 | this.id = `BaseLoader${ID--}`; 21 | 22 | this.packageManager = new PackageManager(); 23 | this.require = this.packageManager.require.bind(this.packageManager); 24 | } 25 | 26 | load(url, options) { // eslint-disable-line 27 | return new Promise(resolve => { 28 | resolve(null); 29 | }); 30 | } 31 | } 32 | 33 | export default BaseLoader; -------------------------------------------------------------------------------- /web/src/loader/lol/BaseAnimations.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * @author lolking / http://www.lolking.net/models 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | const BaseAnimations = { 15 | 19: { 16 | 0: { 17 | all: "idle" 18 | } 19 | }, 20 | 32: { 21 | 4: { 22 | all: "idle1_bow", 23 | idle1_bow: "idle1" 24 | } 25 | }, 26 | 55: { 27 | 7: { 28 | idle1_candycane_below: "idle1" 29 | } 30 | } 31 | }; 32 | 33 | export default BaseAnimations; -------------------------------------------------------------------------------- /web/src/object/BaseObject.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 物体基类 12 | * @constructor 13 | * @description 物体不需要继承该类,该类仅仅用来说明物体上的通用方法。 14 | */ 15 | class BaseObject extends THREE.Object3D { 16 | /** 17 | * 创建类前调用,用于下载创建物体所需的类 18 | * @returns {Promise} 下载Promise 19 | */ 20 | load() { 21 | return new Promise(resolve => { 22 | resolve(); 23 | }); 24 | } 25 | } 26 | 27 | export default BaseObject; -------------------------------------------------------------------------------- /web/src/object/component/shader/sky_ball_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform sampler2D diffuse; 2 | 3 | varying vec2 vUv; 4 | 5 | void main() { 6 | gl_FragColor = texture2D(diffuse, vUv); 7 | } -------------------------------------------------------------------------------- /web/src/object/component/shader/sky_ball_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | void main() { 4 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 5 | gl_Position.z = gl_Position.w; 6 | vUv = uv; 7 | } -------------------------------------------------------------------------------- /web/src/object/component/shader/smoke_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture2; 2 | varying float progress; 3 | 4 | void main() { 5 | 6 | vec3 color = vec3( 1. ); 7 | gl_FragColor = texture2D( texture2, gl_PointCoord ) * vec4( color, .3 * ( 1. - progress ) ); 8 | 9 | } -------------------------------------------------------------------------------- /web/src/object/component/shader/smoke_vertex.glsl: -------------------------------------------------------------------------------- 1 | attribute float shift; 2 | uniform float time; 3 | uniform float size; 4 | uniform float lifetime; 5 | uniform float projection; 6 | varying float progress; 7 | 8 | float cubicOut( float t ) { 9 | 10 | float f = t - 1.0; 11 | return f * f * f + 1.0; 12 | 13 | } 14 | 15 | void main () { 16 | 17 | progress = fract( time * 2. / lifetime + shift ); 18 | float eased = cubicOut( progress ); 19 | vec3 pos = vec3( position.x * eased, position.y * eased, position.z ); 20 | gl_Position = projectionMatrix * modelViewMatrix * vec4( pos, 1. ); 21 | gl_PointSize = ( projection * size ) / gl_Position.w; 22 | 23 | } -------------------------------------------------------------------------------- /web/src/object/component/shader/smooth_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform sampler2D texture; 2 | 3 | void main() { 4 | vec2 cellSize = 1.0 / resolution.xy; 5 | vec2 uv = gl_FragCoord.xy * cellSize; 6 | // Computes the mean of texel and 4 neighbours 7 | vec4 textureValue = texture2D( texture, uv ); 8 | textureValue += texture2D( texture, uv + vec2( 0.0, cellSize.y ) ); 9 | textureValue += texture2D( texture, uv + vec2( 0.0, - cellSize.y ) ); 10 | textureValue += texture2D( texture, uv + vec2( cellSize.x, 0.0 ) ); 11 | textureValue += texture2D( texture, uv + vec2( - cellSize.x, 0.0 ) ); 12 | textureValue /= 5.0; 13 | gl_FragColor = textureValue; 14 | } -------------------------------------------------------------------------------- /web/src/object/geometry/Group.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 组 12 | */ 13 | class Group extends THREE.Group { 14 | constructor() { 15 | super(); 16 | this.name = _t('Group'); 17 | } 18 | } 19 | 20 | export default Group; -------------------------------------------------------------------------------- /web/src/object/geometry/Sprite.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 精灵 12 | * @param {THREE.SpriteMaterial} material 材质 13 | */ 14 | class Sprite extends THREE.Sprite { 15 | constructor(material = new THREE.SpriteMaterial()) { 16 | super(material); 17 | this.name = _t('Sprite'); 18 | } 19 | } 20 | 21 | export default Sprite; -------------------------------------------------------------------------------- /web/src/object/light/shader/hemisphere_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 topColor; 2 | uniform vec3 bottomColor; 3 | uniform float offset; 4 | uniform float exponent; 5 | 6 | varying vec3 vWorldPosition; 7 | 8 | void main() { 9 | float h = normalize(vWorldPosition + offset).y; 10 | gl_FragColor = vec4(mix(bottomColor, topColor, max(pow(max(h , 0.0), exponent), 0.0)), 1.0); 11 | } -------------------------------------------------------------------------------- /web/src/object/light/shader/hemisphere_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec3 vWorldPosition; 2 | 3 | void main() { 4 | vec4 worldPosition = modelMatrix * vec4(position, 1.0); 5 | vWorldPosition = worldPosition.xyz; 6 | gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 7 | } -------------------------------------------------------------------------------- /web/src/object/mark/LineStringMarker.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 线标注 12 | */ 13 | class LineStringMarker extends THREE.Object3D { 14 | constructor() { 15 | super(); 16 | 17 | this.userData.type = 'lineStringMarker'; 18 | } 19 | } 20 | 21 | export default LineStringMarker; -------------------------------------------------------------------------------- /web/src/object/mark/shader/point_marker_fragment.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform sampler2D tDiffuse; 4 | uniform float width; 5 | uniform float height; 6 | 7 | varying vec2 vUv; 8 | 9 | void main() { 10 | // 注意vUv一定要从画布整数坐标+0.5处取颜色,否则会导致文字模糊问题。 11 | vec2 _uv = vec2( 12 | (floor(vUv.s * width) + 0.5) / width, 13 | (floor(vUv.t * height) + 0.5) / height 14 | ); 15 | 16 | gl_FragColor = texture2D( tDiffuse, _uv ); 17 | 18 | if (gl_FragColor.a == 0.0) { 19 | discard; 20 | } 21 | 22 | if (_uv.s < 0.0 || _uv.s > 1.0 || _uv.t < 0.0 || _uv.t > 1.0) { 23 | discard; 24 | } 25 | } -------------------------------------------------------------------------------- /web/src/object/mark/shader/point_marker_vertex.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform float width; 4 | uniform float height; 5 | uniform float domWidth; 6 | uniform float domHeight; 7 | 8 | varying vec2 vUv; 9 | 10 | void main() { 11 | vUv = uv; 12 | vec4 proj = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); 13 | gl_Position = vec4( 14 | proj.x / proj.w + position.x * width / domWidth * 2.0, 15 | proj.y / proj.w + position.y * height / domHeight * 2.0, 16 | proj.z / proj.w, 17 | 1.0 18 | ); 19 | } -------------------------------------------------------------------------------- /web/src/object/shape/shader/unscaled_triangle_fragment.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform sampler2D tDiffuse; 4 | 5 | varying vec2 vUv; 6 | 7 | void main() { 8 | vec4 texel = texture2D( tDiffuse, vUv ); 9 | if (texel.a == 0.0) { 10 | discard; 11 | } 12 | gl_FragColor = texel; 13 | } -------------------------------------------------------------------------------- /web/src/object/shape/shader/unscaled_triangle_vertex.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform float width; 4 | uniform float height; 5 | 6 | varying vec2 vUv; 7 | 8 | void main() { 9 | vUv = uv; 10 | vec4 proj = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); 11 | gl_Position = vec4( 12 | proj.x / proj.w + position.x * width * 2.0, 13 | proj.y / proj.w + position.y * height * 2.0, 14 | proj.z / proj.w, 15 | 1.0 16 | ); 17 | } -------------------------------------------------------------------------------- /web/src/object/terrain/shader/height_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | uniform vec2 scale; 3 | uniform vec2 offset; 4 | 5 | void main( void ) { 6 | vUv = uv * scale + offset; 7 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 8 | } -------------------------------------------------------------------------------- /web/src/object/text/ScaledText.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ -------------------------------------------------------------------------------- /web/src/object/text/shader/unscaled_text_fragment.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform sampler2D tDiffuse; 4 | uniform float width; 5 | uniform float height; 6 | 7 | varying vec2 vUv; 8 | 9 | void main() { 10 | // 注意vUv一定要从画布整数坐标取颜色,否则会导致文字模糊问题。 11 | vec2 _uv = vec2( 12 | (floor(vUv.s * width) + 0.5) / width, 13 | (floor(vUv.t * height) + 0.5) / height 14 | ); 15 | 16 | gl_FragColor = texture2D( tDiffuse, _uv ); 17 | 18 | if (gl_FragColor.a == 0.0) { 19 | discard; 20 | } 21 | 22 | if (_uv.s < 0.0 || _uv.s > 1.0 || _uv.t < 0.0 || _uv.t > 1.0) { 23 | discard; 24 | } 25 | } -------------------------------------------------------------------------------- /web/src/object/text/shader/unscaled_text_vertex.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform float width; 4 | uniform float height; 5 | uniform float domWidth; 6 | uniform float domHeight; 7 | 8 | varying vec2 vUv; 9 | 10 | void main() { 11 | vUv = uv; 12 | vec4 proj = projectionMatrix * modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); 13 | gl_Position = vec4( 14 | proj.x / proj.w + position.x * width / domWidth * 2.0, 15 | proj.y / proj.w + position.y * height / domHeight * 2.0, 16 | proj.z / proj.w, 17 | 1.0 18 | ); 19 | } -------------------------------------------------------------------------------- /web/src/player/EventList.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 自定义事件列表 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | const EventList = [ 15 | // 播放器事件 16 | 'init', 17 | 'resize', 18 | 19 | // VR事件 20 | 'vrConnected', // 进入VR 21 | 'vrDisconnected', // 退出VR 22 | 'vrSelectStart', // VR选中开始 23 | 'vrSelectEnd' // VR选中结束 24 | ]; 25 | 26 | export default EventList; -------------------------------------------------------------------------------- /web/src/player/component/GISLoader.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import PlayerComponent from './PlayerComponent'; 11 | 12 | /** 13 | * 播放器下载事件 14 | * @param {*} app 播放器 15 | */ 16 | class GISLoader extends PlayerComponent { 17 | constructor(app) { 18 | super(app); 19 | } 20 | 21 | create(jsons) { // eslint-disable-line 22 | 23 | } 24 | 25 | dispose() { 26 | 27 | } 28 | } 29 | 30 | export default GISLoader; -------------------------------------------------------------------------------- /web/src/render/BaseRenderer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | var ID = -1; 11 | 12 | /** 13 | * 基本渲染器 14 | * @author tengge / https://github.com/tengge1 15 | */ 16 | class BaseRenderer { 17 | constructor() { 18 | this.id = `${this.constructor.name}${ID--}`; 19 | } 20 | 21 | create(scenes, camera, renderer, selected) { 22 | return new Promise(resolve => { 23 | resolve(); 24 | }); 25 | } 26 | 27 | render() { 28 | 29 | } 30 | 31 | dispose() { 32 | 33 | } 34 | } 35 | 36 | export default BaseRenderer; -------------------------------------------------------------------------------- /web/src/render/shader/geo/mercator.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 墨卡托投影 3 | */ 4 | vec2 mercator(vec2 lonlat) 5 | { 6 | return vec2( 7 | lonlat.x, 8 | log(tan((PI / 2.0 + lonlat.y) / 2.0)) 9 | ); 10 | } -------------------------------------------------------------------------------- /web/src/render/shader/geo/mercatorInvert.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 墨卡托投影反算 3 | */ 4 | vec2 mercatorInvert(vec2 mercatorXY) 5 | { 6 | return vec2( 7 | mercatorXY.x, 8 | 2.0 * atan(exp(mercatorXY.y)) - PI / 2.0 9 | ); 10 | } -------------------------------------------------------------------------------- /web/src/render/shader/mat4/makeOrthographic.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 生成正投影矩阵 3 | */ 4 | mat4 makeOrthographic(float left, float right, float top, float bottom, float near, float far) { 5 | float w = 1.0 / ( right - left ); 6 | float h = 1.0 / ( top - bottom ); 7 | float p = 1.0 / ( far - near ); 8 | 9 | float x = ( right + left ) * w; 10 | float y = ( top + bottom ) * h; 11 | float z = ( far + near ) * p; 12 | 13 | return mat4( 14 | 2 * w, 0.0, 0.0, 0.0, 15 | 0.0, 2.0 * h, 0.0, 0.0, 16 | 0.0, 0.0, -2.0 * p, 0.0, 17 | -x, -y, -z, 1.0 18 | ); 19 | } -------------------------------------------------------------------------------- /web/src/render/shader/mat4/makePerspective.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 生成透视投影矩阵 3 | */ 4 | mat4 makePerspective(float left, float right, float top, float bottom, float near, float far) { 5 | float x = 2.0 * near / ( right - left ); 6 | float y = 2.0 * near / ( top - bottom ); 7 | 8 | float a = ( right + left ) / ( right - left ); 9 | float b = ( top + bottom ) / ( top - bottom ); 10 | float c = - ( far + near ) / ( far - near ); 11 | float d = - 2.0 * far * near / ( far - near ); 12 | 13 | return mat4( 14 | x, 0.0, 0.0, 0.0, 15 | 0.0, y, 0.0, 0.0, 16 | a, b, c, -1.0, 17 | 0.0, 0.0, d, 0.0 18 | ); 19 | } -------------------------------------------------------------------------------- /web/src/render/shader/mat4/makePerspective2.glsl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * 根据视场生成投影矩阵 5 | */ 6 | mat4 makePerspective2(float fov, float aspect, float near, float far) { 7 | const float DEG2RAD = 0.017453292519943295; // PI / 180 8 | 9 | float top = near * tan( DEG2RAD * 0.5 * fov ); 10 | float height = 2.0 * top; 11 | float width = aspect * height; 12 | float left = - 0.5 * width; 13 | 14 | return makePerspective(left, left + width, top, top - height, near, far ); 15 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/basic_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 diffuse; 2 | uniform float opacity; 3 | 4 | uniform sampler2D map; 5 | 6 | varying vec2 vUv; 7 | 8 | void main() { 9 | vec4 diffuseColor = vec4( diffuse, opacity ); 10 | 11 | vec4 texelColor = texture2D( map, vUv ); 12 | diffuseColor *= texelColor; 13 | 14 | gl_FragColor = diffuseColor; 15 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/basic_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | void main() { 4 | vUv = uv; 5 | 6 | vec3 transformed = vec3( position ); 7 | vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); 8 | gl_Position = projectionMatrix * mvPosition; 9 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/lambert_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 diffuse; // 物体颜色 2 | uniform float opacity; // 透明度 3 | 4 | uniform sampler2D map; 5 | 6 | uniform vec3 ambientColor; // 漫反射光颜色 7 | 8 | varying vec2 vUv; 9 | varying vec3 vLightFront; 10 | 11 | // 双向反射PI 12 | #define RECIPROCAL_PI 0.31830988618 13 | 14 | void main() { 15 | vec4 diffuseColor = vec4( diffuse, opacity ); 16 | 17 | vec4 texelColor = texture2D( map, vUv ); 18 | diffuseColor *= texelColor; 19 | 20 | // 出射光 = 直接漫反射 + 间接漫反射 21 | vec3 outgoingLight = vLightFront + ambientColor * RECIPROCAL_PI * diffuseColor.rgb; 22 | 23 | gl_FragColor = vec4( outgoingLight, diffuseColor.a ); 24 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/lambert_vertex.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 directColor; // 平行光颜色 2 | uniform vec3 directDirection; // 平行光方向 3 | 4 | #define PI 3.14159265359 5 | 6 | varying vec2 vUv; 7 | varying vec3 vLightFront; 8 | 9 | void main() { 10 | vUv = uv; 11 | 12 | vec3 transformedNormal = normalMatrix * vec3( normal ); 13 | 14 | vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); 15 | gl_Position = projectionMatrix * mvPosition; 16 | 17 | float dotNL = dot( normalize( transformedNormal ), directDirection ); 18 | vLightFront = clamp( dotNL, 0.0, 1.0 ) * PI * directColor; 19 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/phong_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | varying vec3 vNormal; 3 | varying vec3 vViewPosition; 4 | 5 | void main() { 6 | vUv = uv; 7 | vNormal = normalize( normalMatrix * normal ); 8 | 9 | vec3 transformed = vec3( position ); 10 | vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); 11 | vViewPosition = - mvPosition.xyz; 12 | 13 | gl_Position = projectionMatrix * mvPosition; 14 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_instanced/standard_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | varying vec3 vNormal; 3 | varying vec3 vViewPosition; 4 | 5 | void main() { 6 | vUv = uv; 7 | vNormal = normalize( normalMatrix * vec3( normal ) ); 8 | 9 | vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); 10 | vViewPosition = - mvPosition.xyz; 11 | 12 | gl_Position = projectionMatrix * mvPosition; 13 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/basic_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 diffuse; 2 | uniform float opacity; 3 | 4 | uniform sampler2D map; 5 | 6 | varying vec2 vUv; 7 | 8 | void main() { 9 | vec4 diffuseColor = vec4( diffuse, opacity ); 10 | 11 | vec4 texelColor = texture2D( map, vUv ); 12 | diffuseColor *= texelColor; 13 | 14 | gl_FragColor = diffuseColor; 15 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/basic_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | void main() { 4 | vUv = uv; 5 | 6 | vec3 transformed = vec3( position ); 7 | vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); 8 | gl_Position = projectionMatrix * mvPosition; 9 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/lambert_fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 diffuse; // 物体颜色 2 | uniform float opacity; // 透明度 3 | 4 | uniform sampler2D map; 5 | 6 | uniform vec3 ambientColor; // 漫反射光颜色 7 | 8 | varying vec2 vUv; 9 | varying vec3 vLightFront; 10 | 11 | // 双向反射PI 12 | #define RECIPROCAL_PI 0.31830988618 13 | 14 | void main() { 15 | vec4 diffuseColor = vec4( diffuse, opacity ); 16 | 17 | vec4 texelColor = texture2D( map, vUv ); 18 | diffuseColor *= texelColor; 19 | 20 | // 出射光 = 直接漫反射 + 间接漫反射 21 | vec3 outgoingLight = vLightFront + ambientColor * RECIPROCAL_PI * diffuseColor.rgb; 22 | 23 | gl_FragColor = vec4( outgoingLight, diffuseColor.a ); 24 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/lambert_vertex.glsl: -------------------------------------------------------------------------------- 1 | uniform vec3 directColor; // 平行光颜色 2 | uniform vec3 directDirection; // 平行光方向 3 | 4 | #define PI 3.14159265359 5 | 6 | varying vec2 vUv; 7 | varying vec3 vLightFront; 8 | 9 | void main() { 10 | vUv = uv; 11 | 12 | vec3 transformedNormal = normalMatrix * vec3( normal ); 13 | 14 | vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); 15 | gl_Position = projectionMatrix * mvPosition; 16 | 17 | float dotNL = dot( normalize( transformedNormal ), directDirection ); 18 | vLightFront = clamp( dotNL, 0.0, 1.0 ) * PI * directColor; 19 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/phong_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | varying vec3 vNormal; 3 | varying vec3 vViewPosition; 4 | 5 | void main() { 6 | vUv = uv; 7 | vNormal = normalize( normalMatrix * normal ); 8 | 9 | vec3 transformed = vec3( position ); 10 | vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); 11 | vViewPosition = - mvPosition.xyz; 12 | 13 | gl_Position = projectionMatrix * mvPosition; 14 | } -------------------------------------------------------------------------------- /web/src/render/shader/material_simple/standard_vertex.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | varying vec3 vNormal; 3 | varying vec3 vViewPosition; 4 | 5 | void main() { 6 | vUv = uv; 7 | vNormal = normalize( normalMatrix * vec3( normal ) ); 8 | 9 | vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); 10 | vViewPosition = - mvPosition.xyz; 11 | 12 | gl_Position = projectionMatrix * mvPosition; 13 | } -------------------------------------------------------------------------------- /web/src/render/shader/vec3/angleTo.glsl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * 求两个向量之间的夹角 5 | */ 6 | float angleTo(vec3 v1, vec3 v2) { 7 | float theta = dot(v1, v2) / sqrt(lengthSq(v1) * lengthSq(v2) ); 8 | 9 | // clamp, to handle numerical problems 10 | return acos(clamp(theta, -1.0, 1.0)); 11 | } -------------------------------------------------------------------------------- /web/src/render/shader/vec3/applyMatrix4.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 对向量应用矩阵 3 | */ 4 | vec3 applyMatrix4(vec3 v, mat4 m) { 5 | float x = v.x; 6 | float y = v.y; 7 | float z = v.z; 8 | 9 | float w = 1.0 / ( m[0][3] * x + m[1][3] * y + m[2][3] * z + m[3][3] ); 10 | 11 | return vec3( 12 | (m[0][0] * x + m[1][0] * y + m[2][0] * z + m[3][0]) * w, 13 | (m[0][1] * x + m[1][1] * y + m[2][1] * z + m[3][1]) * w, 14 | (m[0][2] * x + m[1][2] * y + m[2][2] * z + m[3][2] ) * w 15 | ); 16 | } -------------------------------------------------------------------------------- /web/src/render/shader/vec3/lengthSq.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * 计算vec3长度的平方 3 | */ 4 | float lengthSq(vec3 v) { 5 | return v.x * v.x + v.y * v.y + v.z * v.z; 6 | } -------------------------------------------------------------------------------- /web/src/serialization/Metadata.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 场景序列化信息 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | const Metadata = { 15 | generator: 'ShadowEditor', 16 | type: 'Object', 17 | version: '0.0.1' 18 | }; 19 | 20 | export default Metadata; -------------------------------------------------------------------------------- /web/src/ui/Config.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --theme-blue: #3399FF; 3 | --theme-green: #64CF40; 4 | --theme-orange: #F6A623; 5 | --theme-black: #FFFFFF; 6 | user-select: none; 7 | } 8 | 9 | :focus { 10 | outline: none; 11 | } 12 | 13 | ::-webkit-scrollbar { 14 | width: 0.2em; 15 | } 16 | 17 | ::-webkit-scrollbar:horizontal { 18 | height: 0.5em; 19 | } 20 | 21 | ::-webkit-scrollbar-track { 22 | box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); 23 | border-radius: 10px; 24 | } 25 | 26 | ::-webkit-scrollbar-thumb { 27 | border-radius: 10px; 28 | background: rgba(0, 0, 0, 0.3); 29 | box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); 30 | } 31 | 32 | ::-webkit-scrollbar-thumb:window-inactive { 33 | background: rgba(169, 169, 169, 0.4); 34 | } -------------------------------------------------------------------------------- /web/src/ui/canvas/css/Canvas.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/ui/canvas/css/Canvas.css -------------------------------------------------------------------------------- /web/src/ui/common/Accordion.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 折叠面板 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Accordion extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Accordion; -------------------------------------------------------------------------------- /web/src/ui/common/Buttons.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 很多按钮 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Buttons extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Buttons; -------------------------------------------------------------------------------- /web/src/ui/common/Column.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 列 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Column extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Column; -------------------------------------------------------------------------------- /web/src/ui/common/Content.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 内容 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Content extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Content; -------------------------------------------------------------------------------- /web/src/ui/common/Item.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 一项 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Item extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Item; -------------------------------------------------------------------------------- /web/src/ui/common/Menu.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 菜单 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Menu extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Menu; -------------------------------------------------------------------------------- /web/src/ui/common/Row.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 行 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Row extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Row; -------------------------------------------------------------------------------- /web/src/ui/common/Rows.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 很多行 12 | * @author tengge / https://github.com/tengge1 13 | */ 14 | class Rows extends React.Component { 15 | render() { 16 | return null; 17 | } 18 | } 19 | 20 | export default Rows; -------------------------------------------------------------------------------- /web/src/ui/form/css/Button.css: -------------------------------------------------------------------------------- 1 | .Button { 2 | height: 24px; 3 | margin: 0 4px; 4 | padding: 0 8px; 5 | line-height: 24px; 6 | color: #fff; 7 | background-color: #e74c3c; 8 | border: none; 9 | display: inline-block; 10 | box-sizing: border-box; 11 | cursor: pointer; 12 | } 13 | 14 | .Button.primary { 15 | color: #fff; 16 | background-color: #3399ff; 17 | } 18 | 19 | .Button.success { 20 | color: #fff; 21 | background-color: #64cf40; 22 | } 23 | 24 | .Button.warn { 25 | color: #fff; 26 | background-color: #f6a623; 27 | } 28 | 29 | .Button.disabled { 30 | color: #fff; 31 | background-color: #ebebeb; 32 | } 33 | 34 | .Button.hidden { 35 | display: none; 36 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/Form.css: -------------------------------------------------------------------------------- 1 | .Form { 2 | box-sizing: border-box; 3 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/FormControl.css: -------------------------------------------------------------------------------- 1 | .FormControl { 2 | min-height: 20px; 3 | margin: 4px; 4 | box-sizing: border-box; 5 | } 6 | 7 | .FormControl.hidden { 8 | display: none; 9 | } 10 | 11 | .FormControl>* { 12 | vertical-align: middle; 13 | } 14 | 15 | .FormControl>.Label { 16 | width: 60px; 17 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/ImageButton.css: -------------------------------------------------------------------------------- 1 | .ImageButton { 2 | width: 32px; 3 | height: 32px; 4 | color: #555; 5 | background: none; 6 | margin: 4px; 7 | padding: 0; 8 | border: 1px solid #ccc; 9 | border-radius: 2px; 10 | display: flex; 11 | align-items: center; 12 | justify-content: center; 13 | box-sizing: border-box; 14 | cursor: pointer; 15 | } 16 | 17 | .ImageButton.selected { 18 | color: #fff; 19 | background: #3399ff; 20 | border: 1px solid #3399ff; 21 | } 22 | 23 | .ImageButton:hover { 24 | color: #3399ff; 25 | background: none; 26 | border: 1px solid #3399ff; 27 | } 28 | 29 | .ImageButton.selected:hover { 30 | color: #fff; 31 | background: #3399ff; 32 | border: 2px solid #3399ff; 33 | } 34 | 35 | .ImageButton>img { 36 | width: 24px; 37 | pointer-events: none; 38 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/Input.css: -------------------------------------------------------------------------------- 1 | .Input { 2 | width: 160px; 3 | font: 12px 'Microsoft YaHei'; 4 | margin: 1px 0; 5 | padding: 0 2px; 6 | border: 1px solid rgb(217, 217, 217); 7 | box-sizing: border-box; 8 | vertical-align: top; 9 | } 10 | 11 | .Input.hidden { 12 | display: none; 13 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/Label.css: -------------------------------------------------------------------------------- 1 | .Label { 2 | font: 12px 'Microsoft YaHei'; 3 | line-height: 20px; 4 | display: inline-block; 5 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/LinkButton.css: -------------------------------------------------------------------------------- 1 | .LinkButton { 2 | height: 24px; 3 | line-height: 24px; 4 | padding: 0 4px; 5 | font-size: 12px; 6 | color: #000; 7 | text-decoration: none; 8 | display: inline-block; 9 | cursor: pointer; 10 | } 11 | 12 | .LinkButton:hover { 13 | text-decoration: underline; 14 | } 15 | 16 | .LinkButton.disabled { 17 | color: #888; 18 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/Select.css: -------------------------------------------------------------------------------- 1 | .Select { 2 | box-sizing: border-box; 3 | } -------------------------------------------------------------------------------- /web/src/ui/form/css/TextArea.css: -------------------------------------------------------------------------------- 1 | .TextArea { 2 | width: 160px; 3 | height: 200px; 4 | font: 12px 'Microsoft YaHei'; 5 | margin: 0px; 6 | padding: 0px 2px; 7 | border: 1px solid rgb(217, 217, 217); 8 | box-sizing: border-box; 9 | vertical-align: top; 10 | } -------------------------------------------------------------------------------- /web/src/ui/icon/css/Icon.css: -------------------------------------------------------------------------------- 1 | .Icon { 2 | font-size: 20px; 3 | margin: 2px; 4 | display: inline-block; 5 | } -------------------------------------------------------------------------------- /web/src/ui/image/css/Image.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/ui/image/css/Image.css -------------------------------------------------------------------------------- /web/src/ui/image/css/ImageSelector.css: -------------------------------------------------------------------------------- 1 | .ImageSelector { 2 | max-width: 160px; 3 | max-height: 120px; 4 | border-radius: 2px; 5 | cursor: pointer; 6 | } 7 | 8 | .ImageSelector.empty { 9 | width: 160px; 10 | height: 120px; 11 | border: 1px solid #ccc; 12 | display: inline-flex; 13 | align-items: center; 14 | justify-content: center; 15 | } -------------------------------------------------------------------------------- /web/src/ui/image/css/ImageUploader.css: -------------------------------------------------------------------------------- 1 | .ImageUploader { 2 | max-width: 160px; 3 | max-height: 120px; 4 | border-radius: 2px; 5 | cursor: pointer; 6 | } 7 | 8 | .ImageUploader.empty { 9 | width: 160px; 10 | height: 120px; 11 | border: 1px solid #ccc; 12 | display: inline-flex; 13 | align-items: center; 14 | justify-content: center; 15 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/AbsoluteLayout.css: -------------------------------------------------------------------------------- 1 | .AbsoluteLayout { 2 | position: absolute; 3 | display: block; 4 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/AccordionLayout.css: -------------------------------------------------------------------------------- 1 | .AccordionLayout { 2 | width: 100%; 3 | height: 100%; 4 | display: block; 5 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/Content.css: -------------------------------------------------------------------------------- 1 | .Content { 2 | display: block-inline; 3 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/HBoxLayout.css: -------------------------------------------------------------------------------- 1 | .HBoxLayout { 2 | display: flex; 3 | flex-direction: row; 4 | overflow-x: auto; 5 | overflow-y: hidden; 6 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/TabLayout.css: -------------------------------------------------------------------------------- 1 | .TabLayout { 2 | position: relative; 3 | } 4 | 5 | .TabLayout>.tabs { 6 | height: 32px; 7 | box-sizing: border-box; 8 | } 9 | 10 | .TabLayout>.tabs>.tab { 11 | height: 32px; 12 | font: 12px 'Microsoft YaHei'; 13 | line-height: 32px; 14 | padding: 0 8px; 15 | color: #737373; 16 | display: inline-block; 17 | box-sizing: border-box; 18 | cursor: pointer; 19 | } 20 | 21 | .TabLayout>.tabs>.tab.selected { 22 | color: #3399ff; 23 | border-bottom: 1px solid #3399ff; 24 | cursor: default; 25 | } 26 | 27 | .TabLayout>.contents { 28 | position: relative; 29 | width: 100%; 30 | height: calc(100% - 32px); 31 | } 32 | 33 | .TabLayout>.contents>.content { 34 | position: relative; 35 | width: 100%; 36 | height: 100%; 37 | display: none; 38 | } 39 | 40 | .TabLayout>.contents>.content.show { 41 | display: block; 42 | } 43 | 44 | .TabLayout>.contents>.content>* { 45 | height: 100%; 46 | } -------------------------------------------------------------------------------- /web/src/ui/layout/css/VBoxLayout.css: -------------------------------------------------------------------------------- 1 | .VBoxLayout { 2 | display: flex; 3 | flex-direction: column; 4 | overflow-x: hidden; 5 | overflow-y: auto; 6 | } -------------------------------------------------------------------------------- /web/src/ui/menu/css/ContextMenu.css: -------------------------------------------------------------------------------- 1 | .ContextMenu { 2 | font: 13px 'Microsoft YaHei'; 3 | color: rgb(0, 0, 0); 4 | background: rgb(240, 240, 240); 5 | margin: 0; 6 | padding: 0; 7 | border: 1px solid rgb(195, 195, 195); 8 | border-radius: 5px; 9 | box-shadow: rgba(128, 128, 128, 0.5) 0px 0px 16px 1px; 10 | box-sizing: border-box; 11 | vertical-align: text-bottom; 12 | display: flex; 13 | flex-direction: column; 14 | list-style: none; 15 | } 16 | 17 | .ContextMenu>.MenuItem { 18 | min-width: auto; 19 | padding: 2px 16px; 20 | } 21 | 22 | .ContextMenu>.MenuItem:hover { 23 | padding: 1px 15px; 24 | } 25 | 26 | .ContextMenu>.MenuItem.disabled:hover{ 27 | padding: 2px 16px; 28 | } -------------------------------------------------------------------------------- /web/src/ui/menu/css/MenuBar.css: -------------------------------------------------------------------------------- 1 | .MenuBar { 2 | font: 13px 'Microsoft YaHei'; 3 | color: rgb(0, 0, 0); 4 | margin: 0; 5 | padding: 0; 6 | background: linear-gradient(to bottom, rgb(250, 252, 253), rgb(232, 241, 251) 40%, rgb(220, 230, 243) 40%, rgb(220, 231, 245)); 7 | border-bottom: 1px solid #bbb; 8 | display: flex; 9 | box-sizing: border-box; 10 | list-style: none; 11 | } 12 | 13 | .MenuBar>.MenuItem { 14 | position: relative; 15 | min-width: auto; 16 | margin: 0; 17 | padding: 0 16px; 18 | display: inline-block; 19 | cursor: default; 20 | } 21 | 22 | .MenuBar>.MenuItem:hover { 23 | background: initial; 24 | color: initial; 25 | margin: 0; 26 | padding: 0 16px; 27 | border: initial; 28 | } 29 | 30 | .MenuBar>.MenuItem>.suffix { 31 | display: none; 32 | } 33 | 34 | .MenuBar>.MenuItem>.sub { 35 | position: absolute; 36 | left: 0; 37 | top: auto; 38 | } -------------------------------------------------------------------------------- /web/src/ui/menu/css/MenuBarFiller.css: -------------------------------------------------------------------------------- 1 | .MenuBarFiller { 2 | flex: 1; 3 | } -------------------------------------------------------------------------------- /web/src/ui/menu/css/MenuItemSeparator.css: -------------------------------------------------------------------------------- 1 | .MenuItemSeparator { 2 | white-space: nowrap; 3 | display: block; 4 | } 5 | 6 | .MenuItemSeparator.hidden { 7 | display: none !important; 8 | } 9 | 10 | .MenuItemSeparator .separator { 11 | background: rgb(229, 229, 229); 12 | } 13 | 14 | .MenuItemSeparator.vertical .separator { 15 | height: 2px; 16 | margin-left: 24px; 17 | background-image: linear-gradient(to bottom, rgb(226, 226, 226), rgb(226, 226, 226) 50%, rgb(252, 252, 252) 50%, rgb(252, 252, 252)); 18 | } 19 | 20 | .MenuItemSeparator.horizontal .separator { 21 | width: 1px; 22 | height: 12px; 23 | margin-top: 6px; 24 | background: #8c8c8c; 25 | } -------------------------------------------------------------------------------- /web/src/ui/menu/css/MenuTab.css: -------------------------------------------------------------------------------- 1 | .MenuTab { 2 | position: relative; 3 | line-height: 24px; 4 | margin: 0; 5 | padding: 0 16px; 6 | background: #fff; 7 | vertical-align: top; 8 | display: inline-block; 9 | white-space: nowrap; 10 | box-sizing: border-box; 11 | cursor: pointer; 12 | user-select: none; 13 | } 14 | 15 | .MenuTab.selected { 16 | color: #fff; 17 | background: #3399ff; 18 | cursor: default; 19 | } 20 | 21 | .MenuTab.hidden { 22 | display: none !important; 23 | } 24 | 25 | /* .MenuTab:hover { 26 | color: #fff; 27 | background: #3399ff; 28 | } */ 29 | 30 | .MenuTab.disabled { 31 | cursor: not-allowed; 32 | } 33 | 34 | .MenuTab.disabled:hover { 35 | background: initial; 36 | color: initial; 37 | padding: 2px 14px 2px 30px; 38 | border: initial; 39 | } -------------------------------------------------------------------------------- /web/src/ui/progress/css/LoadMask.css: -------------------------------------------------------------------------------- 1 | .LoadMask { 2 | position: absolute; 3 | left: 0; 4 | top: 0; 5 | width: 100%; 6 | height: 100%; 7 | background: rgba(255, 255, 255, 0.4); 8 | display: flex; 9 | align-items: center; 10 | justify-content: center; 11 | z-index: 2000; 12 | } 13 | 14 | .LoadMask.hidden { 15 | display: none; 16 | } 17 | 18 | .LoadMask>.box { 19 | position: relative; 20 | background: #c3daf9; 21 | border: 1px solid #6593cf; 22 | padding: 2px; 23 | } 24 | 25 | .LoadMask>.box>.msg { 26 | font: normal 12px 'Microsoft YaHei'; 27 | line-height: 16px; 28 | color: #222; 29 | background: #fbfbfb url(../assets/image/loading.gif) no-repeat 5px 5px; 30 | padding: 5px 10px 5px 25px; 31 | border: 1px solid #a3bad9; 32 | cursor: wait; 33 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/ButtonProperty.css: -------------------------------------------------------------------------------- 1 | .ButtonProperty>.field>.button { 2 | height: auto; 3 | margin-left: 2px; 4 | padding: 2px 8px; 5 | font-size: 12px; 6 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/ButtonsProperty.css: -------------------------------------------------------------------------------- 1 | .ButtonsProperty>.field>.buttons { 2 | height: auto; 3 | margin-left: 4px; 4 | } 5 | 6 | .ButtonsProperty>.field>.buttons>.Button { 7 | height: 20px; 8 | font-size: 12px; 9 | line-height: 20px; 10 | margin: 0 4px; 11 | padding: 0 4px; 12 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/CheckBoxProperty.css: -------------------------------------------------------------------------------- 1 | .CheckBoxProperty>.field>.checkbox { 2 | margin: 0 0 0 2px; 3 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/ColorProperty.css: -------------------------------------------------------------------------------- 1 | .ColorProperty>.field>.input { 2 | width: 100%; 3 | height: 20px; 4 | margin: 0; 5 | padding: 0; 6 | background: #fff; 7 | border: none; 8 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/DisplayProperty.css: -------------------------------------------------------------------------------- 1 | .DisplayProperty>.field>.wrap { 2 | position: absolute; 3 | width: 100%; 4 | height: 100%; 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | justify-content: stretch; 9 | } 10 | 11 | .DisplayProperty>.field>.wrap>.label { 12 | height: 20px; 13 | padding: 0 4px; 14 | flex: 1; 15 | word-break: break-all; 16 | overflow: hidden; 17 | } 18 | 19 | .DisplayProperty>.field>.wrap>.button { 20 | height: 20px; 21 | font-size: 12px; 22 | line-height: 20px; 23 | margin: 0; 24 | padding: 0 4px; 25 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/IntegerProperty.css: -------------------------------------------------------------------------------- 1 | .IntegerProperty>.field>.input { 2 | width: 100%; 3 | border: none; 4 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/NumberProperty.css: -------------------------------------------------------------------------------- 1 | .NumberProperty>.field>.input { 2 | width: 100%; 3 | border: none; 4 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/PropertyGrid.css: -------------------------------------------------------------------------------- 1 | .PropertyGrid { 2 | position: relative; 3 | color: black; 4 | font: 12px 'Microsoft YaHei'; 5 | box-sizing: border-box; 6 | overflow-x: hidden; 7 | overflow-y: auto; 8 | cursor: default; 9 | user-select: none; 10 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/SelectProperty.css: -------------------------------------------------------------------------------- 1 | .SelectProperty>.field>.select { 2 | width: 100%; 3 | height: 20px; 4 | border: none; 5 | } -------------------------------------------------------------------------------- /web/src/ui/property/css/TextProperty.css: -------------------------------------------------------------------------------- 1 | .TextProperty>.field>.input { 2 | width: 100%; 3 | border: none; 4 | } -------------------------------------------------------------------------------- /web/src/ui/svg/css/SVG.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/ui/svg/css/SVG.css -------------------------------------------------------------------------------- /web/src/ui/table/css/Table.css: -------------------------------------------------------------------------------- 1 | .Table { 2 | display: inline-block; 3 | border-collapse: collapse; 4 | user-select: none; 5 | cursor: default; 6 | } -------------------------------------------------------------------------------- /web/src/ui/table/css/TableBody.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tengge1/ShadowEditor/6b13d2887385729e3bf0f08b1391a9dc9b99bb0b/web/src/ui/table/css/TableBody.css -------------------------------------------------------------------------------- /web/src/ui/table/css/TableCell.css: -------------------------------------------------------------------------------- 1 | .TableCell { 2 | padding: 0 16px; 3 | border: 1px solid #ebebeb; 4 | box-sizing: border-box; 5 | } -------------------------------------------------------------------------------- /web/src/ui/table/css/TableHead.css: -------------------------------------------------------------------------------- 1 | .TableHead { 2 | background-color: #f7f7f7; 3 | } -------------------------------------------------------------------------------- /web/src/ui/table/css/TableRow.css: -------------------------------------------------------------------------------- 1 | .TableRow { 2 | height: 24px; 3 | line-height: 24px; 4 | } 5 | 6 | .TableRow:nth-child(even) { 7 | background-color: #f7f7f7; 8 | } 9 | 10 | .TableBody .TableRow:hover { 11 | color: #fff; 12 | background-color: #3399ff; 13 | } -------------------------------------------------------------------------------- /web/src/ui/toolbar/css/Toolbar.css: -------------------------------------------------------------------------------- 1 | .Toolbar { 2 | background: #fafafa; 3 | display: flex !important; 4 | align-items: center; 5 | box-sizing: border-box; 6 | user-select: none; 7 | overflow: hidden; 8 | } 9 | 10 | .Toolbar.horizontal { 11 | width: 100%; 12 | height: 25px; 13 | flex-direction: row; 14 | background: linear-gradient(to bottom, rgb(250, 252, 253), rgb(232, 241, 251) 40%, rgb(220, 230, 243) 40%, rgb(220, 231, 245)); 15 | } 16 | 17 | .Toolbar.vertical { 18 | width: 32px; 19 | height: 100%; 20 | flex-direction: column; 21 | background: #fafafa; 22 | } 23 | 24 | .Toolbar .Icon { 25 | width: 32px; 26 | height: 32px; 27 | line-height: 32px; 28 | text-align: center; 29 | } -------------------------------------------------------------------------------- /web/src/ui/toolbar/css/ToolbarFiller.css: -------------------------------------------------------------------------------- 1 | .ToolbarFiller { 2 | flex: 1; 3 | } -------------------------------------------------------------------------------- /web/src/ui/toolbar/css/ToolbarSeparator.css: -------------------------------------------------------------------------------- 1 | .ToolbarSeparator { 2 | white-space: nowrap; 3 | display: inline-flex; 4 | align-items: center; 5 | justify-content: center; 6 | } 7 | 8 | .ToolbarSeparator>.separator { 9 | width: 1px; 10 | height: 12px; 11 | background: #8c8c8c; 12 | } 13 | 14 | .Toolbar.vertical>.ToolbarSeparator>.separator { 15 | width: 12px; 16 | height: 1px; 17 | background: #8c8c8c; 18 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Alert.css: -------------------------------------------------------------------------------- 1 | .Window.Alert { 2 | width: 320px; 3 | height: 180px; 4 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Confirm.css: -------------------------------------------------------------------------------- 1 | .Window.Confirm { 2 | width: 320px; 3 | height: 180px; 4 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Photo.css: -------------------------------------------------------------------------------- 1 | .PhotoMark { 2 | position: fixed; 3 | left: 0; 4 | top: 0; 5 | width: 100%; 6 | height: 100%; 7 | background: rgba(0, 0, 0, 0.8); 8 | display: flex; 9 | align-items: center; 10 | justify-content: center; 11 | z-index: 1300; 12 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Prompt.css: -------------------------------------------------------------------------------- 1 | .Window.Prompt { 2 | width: 320px; 3 | height: 180px; 4 | } 5 | 6 | .Window.Prompt>.wrap>.content>.Input { 7 | margin-left: 6px; 8 | vertical-align: middle; 9 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Toast.css: -------------------------------------------------------------------------------- 1 | .ToastMark { 2 | position: fixed; 3 | left: 0; 4 | top: 0; 5 | width: 100%; 6 | height: 100%; 7 | display: flex; 8 | align-items: center; 9 | justify-content: center; 10 | z-index: 1300; 11 | pointer-events: none; 12 | } 13 | 14 | .Toast { 15 | color: #fff; 16 | background-color: rgba(0, 0, 0, 0.5); 17 | padding: 16px 24px; 18 | border-radius: 3px; 19 | box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.14); 20 | display: inline-block; 21 | pointer-events: none; 22 | } -------------------------------------------------------------------------------- /web/src/ui/window/css/Video.css: -------------------------------------------------------------------------------- 1 | .VideoMark { 2 | position: fixed; 3 | left: 0; 4 | top: 0; 5 | width: 100%; 6 | height: 100%; 7 | background: rgba(0, 0, 0, 0.8); 8 | display: flex; 9 | align-items: center; 10 | justify-content: center; 11 | z-index: 1300; 12 | } 13 | 14 | .VideoMark>video { 15 | max-width: 80%; 16 | } -------------------------------------------------------------------------------- /web/src/utils/CanvasUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 画布工具类 12 | */ 13 | const CanvasUtils = { 14 | /** 15 | * 扩大到2的整数倍 16 | * @param {Number} num 数字 17 | * @returns {Number} 数字 18 | */ 19 | makePowerOfTwo: function (num) { 20 | let result = 1; 21 | while (result < num) { 22 | result *= 2; 23 | } 24 | return result; 25 | } 26 | }; 27 | 28 | export default CanvasUtils; -------------------------------------------------------------------------------- /web/src/utils/CookieUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | import {Cookies} from '../third_party'; 11 | 12 | const CookieUtils = { 13 | /** 14 | * 清空所有cookie 15 | * @see https://blog.csdn.net/qq_37164847/article/details/82700520 16 | */ 17 | clearAll: function () { 18 | const cookies = Cookies.get(); 19 | Object.keys(cookies).forEach(n => { 20 | Cookies.remove(n); 21 | }); 22 | } 23 | }; 24 | 25 | export default CookieUtils; -------------------------------------------------------------------------------- /web/src/utils/ImageUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 产生一个单像素画布 12 | * @param {String} color 默认颜色 13 | * @returns {HTMLCanvasElement} 画布 14 | */ 15 | function onePixelCanvas(color = '#000000') { 16 | var canvas = document.createElement('canvas'); 17 | canvas.width = 1; 18 | canvas.height = 1; 19 | var ctx = canvas.getContext('2d'); 20 | ctx.fillStyle = color; 21 | ctx.fillRect(0, 0, 1, 1); 22 | return canvas; 23 | } 24 | 25 | /** 26 | * 图片工具类 27 | */ 28 | const ImageUtils = { 29 | onePixelCanvas: onePixelCanvas 30 | }; 31 | 32 | export default ImageUtils; -------------------------------------------------------------------------------- /web/src/utils/MathUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2020 The ShadowEditor Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a MIT-style 5 | * license that can be found in the LICENSE file. 6 | * 7 | * For more information, please visit: https://github.com/tengge1/ShadowEditor 8 | * You can also visit: https://gitee.com/tengge1/ShadowEditor 9 | */ 10 | /** 11 | * 精度 12 | * @author mrdoob / http://mrdoob.com/ 13 | */ 14 | var NUMBER_PRECISION = 6; 15 | 16 | /** 17 | * 打包数字 18 | * @param {String} key 键 19 | * @param {Number} value 数值 20 | * @returns {Number} 数值的六位有效数字 21 | */ 22 | function parseNumber(key, value) { 23 | return typeof value === 'number' ? parseFloat(value.toFixed(NUMBER_PRECISION)) : value; 24 | } 25 | 26 | /** 27 | * 数学工具 28 | */ 29 | const GeoUtils = { 30 | NUMBER_PRECISION: NUMBER_PRECISION, 31 | parseNumber: parseNumber 32 | }; 33 | 34 | export default GeoUtils; -------------------------------------------------------------------------------- /web/src/worker/MyWorker.js: -------------------------------------------------------------------------------- 1 | self.onmessage = e => { 2 | console.log(e); 3 | }; -------------------------------------------------------------------------------- /web/src/worker/Workers.js: -------------------------------------------------------------------------------- 1 | import MyWorker from 'worker!./MyWorker.js'; 2 | 3 | var myWorker = new MyWorker(); 4 | myWorker.postMessage('Hello, world!'); -------------------------------------------------------------------------------- /web/test/README.md: -------------------------------------------------------------------------------- 1 | This is not a part of web. You can test some javascript features or packages here. 2 | 3 | The contents of this folder will be cleared from time to time. --------------------------------------------------------------------------------