├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ └── ci.yml ├── .gitignore ├── .idea ├── .gitignore ├── copyright │ ├── MIT.xml │ └── profiles_settings.xml ├── inspectionProfiles │ └── Project_Default.xml ├── modules.xml ├── rg3d-core.iml └── vcs.xml ├── .vscode ├── launch.json └── settings.json ├── ARCHITECTURE.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE.md ├── README.md ├── editor-standalone ├── Cargo.toml ├── LICENSE ├── README.md └── src │ └── main.rs ├── editor ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── resources │ ├── Roboto-Regular.ttf │ ├── add_box_emitter.png │ ├── add_cylinder_emitter.png │ ├── add_sphere_emitter.png │ ├── border-icon.png │ ├── brush.png │ ├── button-icon.png │ ├── canvas-icon.png │ ├── checkbox-icon.png │ ├── circle.png │ ├── clear.png │ ├── collapse.png │ ├── collider.png │ ├── copy.png │ ├── cross.png │ ├── cube.png │ ├── curve.png │ ├── die.png │ ├── doc.png │ ├── eraser.png │ ├── expand.png │ ├── fileBrowser-icon.png │ ├── fill.png │ ├── filter.png │ ├── fit.png │ ├── flip_x.png │ ├── flip_y.png │ ├── folder.png │ ├── folder_return.png │ ├── font.png │ ├── grid-icon.png │ ├── grid_snapping.png │ ├── hammer.png │ ├── hrir.png │ ├── icon.png │ ├── image-icon.png │ ├── import.png │ ├── inspector-icon.png │ ├── invisible.png │ ├── joint.png │ ├── light.png │ ├── light_source.png │ ├── line.png │ ├── link.png │ ├── list-icon.png │ ├── locate.png │ ├── material.png │ ├── menu-icon.png │ ├── messageBox-icon.png │ ├── model.png │ ├── move_arrow.png │ ├── navmesh.png │ ├── nine_slice.png │ ├── palette.png │ ├── pick.png │ ├── pipette.png │ ├── play.png │ ├── popup-icon.png │ ├── position_track.png │ ├── property_track.png │ ├── rect_fill.png │ ├── redo.png │ ├── reimport.png │ ├── rename.png │ ├── rigid_body.png │ ├── rotate_arrow.png │ ├── rotation_track.png │ ├── scale_arrow.png │ ├── scaling_track.png │ ├── screen-icon.png │ ├── select.png │ ├── select_in_wv.png │ ├── shader.png │ ├── shaders │ │ ├── gizmo.shader │ │ ├── grid.shader │ │ ├── highlight.shader │ │ ├── overlay.shader │ │ └── sprite_gizmo.shader │ ├── sound.png │ ├── sound_source.png │ ├── speed.png │ ├── stackPanel-icon.png │ ├── stop.png │ ├── terrain.png │ ├── text-icon.png │ ├── tile.png │ ├── tile_set.png │ ├── time.png │ ├── track.png │ ├── triangle.png │ ├── turn_left.png │ ├── turn_right.png │ ├── ui.png │ ├── undo.png │ ├── visible.png │ ├── warning.png │ └── window-icon.png ├── screenshots │ └── latest.png └── src │ ├── asset │ ├── creator.rs │ ├── dependency.rs │ ├── inspector │ │ └── mod.rs │ ├── item.rs │ ├── mod.rs │ └── preview │ │ ├── cache.rs │ │ └── mod.rs │ ├── audio │ ├── bus.rs │ ├── mod.rs │ └── preview.rs │ ├── camera │ ├── mod.rs │ └── panel.rs │ ├── command │ ├── mod.rs │ └── panel.rs │ ├── configurator.rs │ ├── export │ ├── android.rs │ ├── asset.rs │ ├── mod.rs │ ├── pc.rs │ ├── utils.rs │ └── wasm.rs │ ├── highlight.rs │ ├── interaction │ ├── gizmo │ │ ├── mod.rs │ │ ├── move_gizmo.rs │ │ ├── rotate_gizmo.rs │ │ └── scale_gizmo.rs │ ├── mod.rs │ ├── move_mode.rs │ ├── navmesh │ │ ├── mod.rs │ │ └── selection.rs │ ├── plane.rs │ ├── rotate_mode.rs │ ├── scale_mode.rs │ ├── select_mode.rs │ └── terrain.rs │ ├── lib.rs │ ├── light.rs │ ├── menu │ ├── create.rs │ ├── edit.rs │ ├── file.rs │ ├── help.rs │ ├── mod.rs │ ├── ui.rs │ ├── utils.rs │ └── view.rs │ ├── mesh.rs │ ├── message.rs │ ├── overlay.rs │ ├── particle.rs │ ├── plugin.rs │ ├── plugins │ ├── absm │ │ ├── blendspace.rs │ │ ├── canvas.rs │ │ ├── command │ │ │ ├── blend.rs │ │ │ └── mod.rs │ │ ├── connection.rs │ │ ├── mod.rs │ │ ├── node.rs │ │ ├── parameter.rs │ │ ├── segment.rs │ │ ├── selectable.rs │ │ ├── selection.rs │ │ ├── socket.rs │ │ ├── state_graph │ │ │ ├── context.rs │ │ │ └── mod.rs │ │ ├── state_viewer │ │ │ ├── context.rs │ │ │ └── mod.rs │ │ ├── toolbar.rs │ │ └── transition.rs │ ├── animation │ │ ├── command │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── ruler.rs │ │ ├── selection.rs │ │ ├── thumb.rs │ │ ├── toolbar.rs │ │ └── track.rs │ ├── collider │ │ ├── ball.rs │ │ ├── ball2d.rs │ │ ├── capsule.rs │ │ ├── capsule2d.rs │ │ ├── cone.rs │ │ ├── cuboid.rs │ │ ├── cuboid2d.rs │ │ ├── cylinder.rs │ │ ├── dummy.rs │ │ ├── mod.rs │ │ ├── panel.rs │ │ ├── segment.rs │ │ ├── segment2d.rs │ │ ├── triangle.rs │ │ └── triangle2d.rs │ ├── curve_editor.rs │ ├── inspector │ │ ├── editors │ │ │ ├── animation.rs │ │ │ ├── font.rs │ │ │ ├── handle.rs │ │ │ ├── mod.rs │ │ │ ├── resource.rs │ │ │ ├── script.rs │ │ │ ├── spritesheet │ │ │ │ ├── mod.rs │ │ │ │ └── window.rs │ │ │ ├── surface.rs │ │ │ └── texture.rs │ │ ├── handlers │ │ │ ├── mod.rs │ │ │ └── node │ │ │ │ └── mod.rs │ │ └── mod.rs │ ├── material │ │ ├── editor.rs │ │ └── mod.rs │ ├── mod.rs │ ├── ragdoll.rs │ ├── settings.rs │ ├── stats.rs │ └── tilemap │ │ ├── autotile.rs │ │ ├── brush_macro.rs │ │ ├── collider_editor.rs │ │ ├── colliders_tab.rs │ │ ├── commands.rs │ │ ├── handle_editor.rs │ │ ├── handle_field.rs │ │ ├── interaction_mode.rs │ │ ├── macro_inspector.rs │ │ ├── macro_tab.rs │ │ ├── misc.rs │ │ ├── mod.rs │ │ ├── palette.rs │ │ ├── panel.rs │ │ ├── panel_preview.rs │ │ ├── preview.rs │ │ ├── properties_tab.rs │ │ ├── tile_bounds_editor.rs │ │ ├── tile_editor.rs │ │ ├── tile_inspector.rs │ │ ├── tile_prop_editor.rs │ │ ├── tileset.rs │ │ └── wfc.rs │ ├── preview.rs │ ├── scene │ ├── clipboard.rs │ ├── commands │ │ ├── effect.rs │ │ ├── graph.rs │ │ ├── material.rs │ │ ├── mesh.rs │ │ ├── mod.rs │ │ ├── navmesh.rs │ │ ├── sound_context.rs │ │ └── terrain.rs │ ├── container.rs │ ├── controller.rs │ ├── dialog.rs │ ├── mod.rs │ ├── property.rs │ ├── selector.rs │ └── settings │ │ └── mod.rs │ ├── scene_viewer │ ├── gizmo.rs │ └── mod.rs │ ├── settings │ ├── build.rs │ ├── camera.rs │ ├── debugging.rs │ ├── general.rs │ ├── graphics.rs │ ├── keys.rs │ ├── mod.rs │ ├── model.rs │ ├── move_mode.rs │ ├── navmesh.rs │ ├── recent.rs │ ├── rotate_mode.rs │ ├── scene.rs │ ├── selection.rs │ └── windows.rs │ ├── stats.rs │ ├── ui_scene │ ├── clipboard.rs │ ├── commands │ │ ├── graph.rs │ │ ├── mod.rs │ │ └── widget.rs │ ├── interaction │ │ ├── mod.rs │ │ └── move_mode.rs │ ├── menu.rs │ ├── mod.rs │ ├── selection.rs │ └── utils.rs │ ├── utils │ ├── doc.rs │ └── mod.rs │ └── world │ ├── graph.rs │ ├── item.rs │ ├── menu.rs │ ├── mod.rs │ └── selection.rs ├── examples ├── 2d.rs ├── Crate.png ├── data │ ├── navmesh_scene.rgs │ └── navmesh_scene2.rgs └── navmesh.rs ├── flake.lock ├── flake.nix ├── fyrox-animation ├── Cargo.toml ├── LICENSE ├── README.md └── src │ ├── container.rs │ ├── lib.rs │ ├── machine │ ├── event.rs │ ├── layer.rs │ ├── mask.rs │ ├── mod.rs │ ├── node │ │ ├── blend.rs │ │ ├── blendspace.rs │ │ ├── mod.rs │ │ └── play.rs │ ├── parameter.rs │ ├── state.rs │ └── transition.rs │ ├── pose.rs │ ├── signal.rs │ ├── spritesheet │ ├── mod.rs │ └── signal.rs │ ├── track.rs │ └── value.rs ├── fyrox-autotile ├── Cargo.toml ├── LICENSE ├── README.md └── src │ ├── auto.rs │ ├── lib.rs │ └── wave.rs ├── fyrox-build-tools ├── Cargo.toml └── src │ ├── build.rs │ ├── lib.rs │ └── resources │ └── progress.png ├── fyrox-core-derive ├── Cargo.toml ├── README.md ├── src │ ├── component.rs │ ├── lib.rs │ ├── reflect.rs │ ├── reflect │ │ ├── args.rs │ │ ├── prop.rs │ │ └── syntax.rs │ ├── uuid.rs │ ├── visit.rs │ └── visit │ │ ├── args.rs │ │ └── utils.rs └── tests │ └── it │ ├── component.rs │ ├── main.rs │ ├── reflect.rs │ ├── uuid.rs │ ├── visit.rs │ └── visit │ ├── basic.rs │ └── compat.rs ├── fyrox-core ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md └── src │ ├── color.rs │ ├── color_gradient.rs │ ├── early.rs │ ├── io.rs │ ├── lib.rs │ ├── log.rs │ ├── math │ └── mod.rs │ ├── net.rs │ ├── numeric_range.rs │ ├── platform.rs │ ├── pool │ ├── handle.rs │ ├── mod.rs │ ├── multiborrow.rs │ └── payload.rs │ ├── quadtree.rs │ ├── rectpack.rs │ ├── reflect.rs │ ├── reflect │ ├── external_impls.rs │ └── std_impls.rs │ ├── sparse.rs │ ├── sstorage.rs │ ├── task.rs │ ├── type_traits.rs │ ├── variable.rs │ ├── visitor │ ├── blackboard.rs │ ├── error.rs │ ├── field.rs │ ├── impls.rs │ ├── mod.rs │ ├── pod.rs │ ├── reader │ │ ├── ascii.rs │ │ ├── binary.rs │ │ └── mod.rs │ └── writer │ │ ├── ascii.rs │ │ ├── binary.rs │ │ └── mod.rs │ └── watcher.rs ├── fyrox-dylib ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── fyrox-graph ├── Cargo.toml └── src │ ├── constructor.rs │ └── lib.rs ├── fyrox-graphics-gl ├── Cargo.toml └── src │ ├── buffer.rs │ ├── framebuffer.rs │ ├── geometry_buffer.rs │ ├── lib.rs │ ├── program.rs │ ├── query.rs │ ├── read_buffer.rs │ ├── sampler.rs │ ├── server.rs │ ├── shaders │ └── shared.glsl │ └── texture.rs ├── fyrox-graphics ├── Cargo.toml └── src │ ├── buffer.rs │ ├── error.rs │ ├── framebuffer.rs │ ├── geometry_buffer.rs │ ├── gpu_program.rs │ ├── gpu_texture.rs │ ├── lib.rs │ ├── query.rs │ ├── read_buffer.rs │ ├── sampler.rs │ ├── server.rs │ ├── stats.rs │ └── uniform.rs ├── fyrox-impl ├── 0.png ├── Cargo.toml ├── README.md └── src │ ├── engine │ ├── error.rs │ ├── executor.rs │ ├── hotreload.rs │ ├── mod.rs │ └── task.rs │ ├── lib.rs │ ├── material │ └── mod.rs │ ├── plugin │ ├── dylib.rs │ └── mod.rs │ ├── renderer │ ├── bloom │ │ ├── blur.rs │ │ └── mod.rs │ ├── bundle.rs │ ├── cache │ │ ├── geometry.rs │ │ ├── mod.rs │ │ ├── shader.rs │ │ ├── texture.rs │ │ └── uniform.rs │ ├── debug_renderer.rs │ ├── forward_renderer.rs │ ├── framework.rs │ ├── fxaa.rs │ ├── gbuffer.rs │ ├── hdr │ │ ├── adaptation.rs │ │ ├── luminance.rs │ │ ├── luminance │ │ │ ├── histogram_luminance_evaluator.rs │ │ │ ├── luminance_evaluator.rs │ │ │ └── test_luminance_data.in │ │ └── mod.rs │ ├── light.rs │ ├── light_volume.rs │ ├── mod.rs │ ├── observer.rs │ ├── occlusion │ │ ├── grid.rs │ │ ├── mod.rs │ │ └── optimizer.rs │ ├── settings.rs │ ├── shaders │ │ ├── ambient_light.shader │ │ ├── blit.shader │ │ ├── bloom.shader │ │ ├── blur.shader │ │ ├── debug.shader │ │ ├── decal.shader │ │ ├── deferred_directional_light.shader │ │ ├── deferred_point_light.shader │ │ ├── deferred_spot_light.shader │ │ ├── fxaa.shader │ │ ├── gaussian_blur.shader │ │ ├── hdr_adaptation.shader │ │ ├── hdr_downscale.shader │ │ ├── hdr_luminance.shader │ │ ├── hdr_map.shader │ │ ├── pixel_counter.shader │ │ ├── point_volumetric.shader │ │ ├── skybox.shader │ │ ├── spot_volumetric.shader │ │ ├── ssao.shader │ │ ├── visibility.shader │ │ ├── visibility_optimizer.shader │ │ ├── volume_marker_lit.shader │ │ └── volume_marker_vol.shader │ ├── shadow │ │ ├── csm.rs │ │ ├── mod.rs │ │ ├── point.rs │ │ └── spot.rs │ ├── ssao │ │ ├── blur.rs │ │ └── mod.rs │ ├── stats.rs │ ├── storage.rs │ ├── ui_renderer.rs │ └── visibility.rs │ ├── resource │ ├── curve │ │ ├── loader.rs │ │ └── mod.rs │ ├── fbx │ │ ├── document │ │ │ ├── ascii.rs │ │ │ ├── attribute.rs │ │ │ ├── binary.rs │ │ │ └── mod.rs │ │ ├── error.rs │ │ ├── mod.rs │ │ └── scene │ │ │ ├── animation.rs │ │ │ ├── geometry.rs │ │ │ ├── light.rs │ │ │ ├── mod.rs │ │ │ ├── model.rs │ │ │ ├── texture.rs │ │ │ └── video.rs │ ├── gltf │ │ ├── animation.rs │ │ ├── gltf_standard.shader │ │ ├── iter.rs │ │ ├── material.rs │ │ ├── mod.rs │ │ ├── node_names.rs │ │ ├── simplify.rs │ │ ├── surface.rs │ │ └── uri.rs │ ├── mod.rs │ ├── model │ │ ├── loader.rs │ │ └── mod.rs │ └── texture │ │ └── mod.rs │ ├── scene │ ├── accel.rs │ ├── animation │ │ ├── absm.rs │ │ ├── mod.rs │ │ └── spritesheet.rs │ ├── base.rs │ ├── camera.rs │ ├── collider.rs │ ├── debug.rs │ ├── decal.rs │ ├── dim2 │ │ ├── collider.rs │ │ ├── joint.rs │ │ ├── mod.rs │ │ ├── physics.rs │ │ ├── rectangle.rs │ │ └── rigidbody.rs │ ├── graph │ │ ├── event.rs │ │ ├── mod.rs │ │ └── physics.rs │ ├── joint.rs │ ├── light │ │ ├── directional.rs │ │ ├── mod.rs │ │ ├── point.rs │ │ └── spot.rs │ ├── mesh │ │ ├── buffer.rs │ │ ├── mod.rs │ │ ├── surface.rs │ │ └── vertex.rs │ ├── mod.rs │ ├── navmesh.rs │ ├── node │ │ ├── constructor.rs │ │ ├── container.rs │ │ └── mod.rs │ ├── particle_system │ │ ├── draw.rs │ │ ├── emitter │ │ │ ├── base.rs │ │ │ ├── cuboid.rs │ │ │ ├── cylinder.rs │ │ │ ├── mod.rs │ │ │ └── sphere.rs │ │ ├── mod.rs │ │ └── particle.rs │ ├── pivot.rs │ ├── probe.rs │ ├── ragdoll.rs │ ├── rigidbody.rs │ ├── skybox │ │ ├── back.png │ │ ├── bottom.png │ │ ├── front.png │ │ ├── left.png │ │ ├── right.png │ │ └── top.png │ ├── sound │ │ ├── context.rs │ │ ├── listener.rs │ │ └── mod.rs │ ├── sprite.rs │ ├── terrain │ │ ├── brushstroke │ │ │ ├── brushraster.rs │ │ │ ├── mod.rs │ │ │ └── strokechunks.rs │ │ ├── geometry.rs │ │ ├── mod.rs │ │ └── quadtree.rs │ ├── tilemap │ │ ├── autotile.rs │ │ ├── brush.rs │ │ ├── data.rs │ │ ├── effect.rs │ │ ├── mod.rs │ │ ├── property.rs │ │ ├── tile_collider.rs │ │ ├── tile_rect.rs │ │ ├── tile_source.rs │ │ ├── tileset.rs │ │ ├── transform.rs │ │ └── update.rs │ └── transform.rs │ ├── script │ ├── constructor.rs │ └── mod.rs │ └── utils │ ├── astar.rs │ ├── behavior │ ├── composite.rs │ ├── inverter.rs │ ├── leaf.rs │ └── mod.rs │ ├── lightmap.rs │ ├── mod.rs │ ├── navmesh.rs │ ├── raw_mesh.rs │ └── uvgen.rs ├── fyrox-material ├── Cargo.toml └── src │ ├── lib.rs │ ├── loader.rs │ └── shader │ ├── loader.rs │ ├── mod.rs │ └── standard │ ├── standard-two-sides.shader │ ├── standard.shader │ ├── standard2d.shader │ ├── standard_particle_system.shader │ ├── standard_sprite.shader │ ├── terrain.shader │ ├── tile.shader │ └── widget.shader ├── fyrox-math ├── Cargo.toml └── src │ ├── aabb.rs │ ├── curve.rs │ ├── frustum.rs │ ├── lib.rs │ ├── octree.rs │ ├── plane.rs │ ├── ray.rs │ ├── segment.rs │ └── triangulator.rs ├── fyrox-resource ├── .gitignore ├── Cargo.toml ├── LICENSE.md └── src │ ├── builtin.rs │ ├── constructor.rs │ ├── entry.rs │ ├── event.rs │ ├── graph.rs │ ├── io.rs │ ├── lib.rs │ ├── loader.rs │ ├── manager.rs │ ├── metadata.rs │ ├── options.rs │ ├── registry.rs │ ├── state.rs │ └── untyped.rs ├── fyrox-scripts ├── Cargo.toml └── src │ ├── camera.rs │ └── lib.rs ├── fyrox-sound ├── Cargo.toml ├── LICENSE ├── README.md ├── examples │ ├── data │ │ ├── IRC_1002_C.bin │ │ ├── door_open.wav │ │ ├── drop.wav │ │ ├── helicopter.wav │ │ ├── sine_440hz.wav │ │ └── waterfall.ogg │ ├── hrtf.rs │ ├── listener.rs │ ├── play_sound.rs │ ├── play_spatial_sound.rs │ ├── raw_samples.rs │ ├── raw_streaming.rs │ ├── reverb.rs │ ├── streaming.rs │ └── write_wav.rs └── src │ ├── buffer │ ├── generic.rs │ ├── loader.rs │ ├── mod.rs │ └── streaming.rs │ ├── bus.rs │ ├── context.rs │ ├── decoder │ └── mod.rs │ ├── dsp │ ├── filters.rs │ └── mod.rs │ ├── effects │ ├── filter.rs │ ├── mod.rs │ └── reverb.rs │ ├── engine.rs │ ├── error.rs │ ├── lib.rs │ ├── listener.rs │ ├── renderer │ ├── hrtf.rs │ └── mod.rs │ └── source.rs ├── fyrox-texture ├── Cargo.toml └── src │ ├── default.png │ ├── lib.rs │ └── loader.rs ├── fyrox-ui ├── Cargo.toml ├── LICENSE ├── README.md └── src │ ├── absm.rs │ ├── alignment.rs │ ├── animation.rs │ ├── bit.rs │ ├── border.rs │ ├── brush.rs │ ├── build.rs │ ├── button.rs │ ├── canvas.rs │ ├── check_box.rs │ ├── color │ ├── gradient.rs │ └── mod.rs │ ├── control.rs │ ├── curve │ ├── key.rs │ └── mod.rs │ ├── decorator.rs │ ├── dock │ ├── config.rs │ ├── mod.rs │ └── tile.rs │ ├── draw.rs │ ├── dropdown_list.rs │ ├── dropdown_menu.rs │ ├── expander.rs │ ├── file_browser │ ├── menu.rs │ ├── mod.rs │ └── selector.rs │ ├── font │ ├── built_in_font.ttf │ ├── loader.rs │ └── mod.rs │ ├── formatted_text.rs │ ├── formatted_text │ ├── run.rs │ └── textwrapper.rs │ ├── grid.rs │ ├── image.rs │ ├── inspector │ ├── editors │ │ ├── array.rs │ │ ├── bit.rs │ │ ├── bool.rs │ │ ├── collection.rs │ │ ├── color.rs │ │ ├── curve.rs │ │ ├── enumeration.rs │ │ ├── immutable_string.rs │ │ ├── inherit.rs │ │ ├── inspectable.rs │ │ ├── key.rs │ │ ├── matrix2.rs │ │ ├── mod.rs │ │ ├── numeric.rs │ │ ├── path.rs │ │ ├── quat.rs │ │ ├── range.rs │ │ ├── rect.rs │ │ ├── refcell.rs │ │ ├── string.rs │ │ ├── style.rs │ │ ├── texture_slice.rs │ │ ├── utf32.rs │ │ ├── uuid.rs │ │ └── vec.rs │ └── mod.rs │ ├── key.rs │ ├── lib.rs │ ├── list_view.rs │ ├── loader.rs │ ├── log.rs │ ├── matrix.rs │ ├── menu.rs │ ├── message.rs │ ├── messagebox.rs │ ├── navigation.rs │ ├── nine_patch.rs │ ├── node │ ├── constructor.rs │ ├── container.rs │ └── mod.rs │ ├── numeric.rs │ ├── path.rs │ ├── popup.rs │ ├── progress_bar.rs │ ├── range.rs │ ├── rect.rs │ ├── resources │ ├── bits.png │ └── chain.png │ ├── screen.rs │ ├── scroll_bar.rs │ ├── scroll_panel.rs │ ├── scroll_viewer.rs │ ├── searchbar.rs │ ├── selector.rs │ ├── stack_panel.rs │ ├── style │ ├── mod.rs │ └── resource.rs │ ├── tab_control.rs │ ├── text.rs │ ├── text_box.rs │ ├── thickness.rs │ ├── thumb.rs │ ├── toggle.rs │ ├── tree.rs │ ├── utils.rs │ ├── uuid.rs │ ├── vec.rs │ ├── vector_image.rs │ ├── widget.rs │ ├── window.rs │ └── wrap_panel.rs ├── fyrox ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── pics ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── editor.png ├── logo.png ├── social.png └── video.png ├── project-manager ├── Cargo.toml ├── resources │ ├── Roboto-Regular.ttf │ ├── add.png │ ├── caution.png │ ├── clean.png │ ├── cross.png │ ├── delete.png │ ├── flame.png │ ├── folder.png │ ├── gear.png │ ├── icon.png │ ├── ide.png │ ├── location.png │ ├── open-folder.png │ ├── pencil.png │ ├── play.png │ ├── plus.png │ ├── question.png │ └── up.png └── src │ ├── main.rs │ ├── manager.rs │ ├── project.rs │ ├── settings.rs │ ├── upgrade.rs │ └── utils.rs ├── template-core ├── Cargo.toml ├── LICENSE ├── README.md ├── build.rs └── src │ ├── 2d.rgs │ ├── 3d.rgs │ ├── android │ ├── README.md │ └── release.keystore │ ├── lib.rs │ ├── regex │ └── wasm │ ├── README.md │ ├── index.html │ ├── main.js │ └── styles.css ├── template ├── Cargo.toml ├── LICENSE ├── README.md └── src │ └── main.rs └── test_output ├── behavior_save_load.bin ├── behavior_save_load.txt ├── derived.rgs ├── derived2.rgs ├── root.rgs └── root2.rgs /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: https://fyrox.rs/sponsor.html 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug you encountered 4 | title: '' 5 | assignees: '' 6 | 7 | --- 8 | 9 | ## Description 10 | A clear and concise description of what the bug is. 11 | 12 | ## To Reproduce 13 | Steps to reproduce the behavior: 14 | 1. Go to '...' 15 | 2. Click on '....' 16 | 3. Scroll down to '....' 17 | 4. See error 18 | 19 | ## Expected behavior 20 | A clear and concise description of what you expected to happen. 21 | 22 | ## Screenshots 23 | If applicable, add screenshots to help explain your problem. 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | assignees: '' 6 | 7 | --- 8 | 9 | ## Problem this feature should fix 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | ## Expected solution 13 | A clear and concise description of what you want to happen. 14 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Write here. 4 | 5 | ## Related Issue(s) 6 | 7 | Fixes #(issue number) 8 | 9 | ## Review Guidance 10 | 11 | Write here. 12 | 13 | ## Screenshots/GIFs 14 | 15 | Write here. 16 | 17 | ## Checklist 18 | 19 | - [ ] My code follows the project's code style guidelines 20 | - [ ] I have commented my code, particularly in hard-to-understand areas 21 | - [ ] I have updated the documentation accordingly 22 | - [ ] My changes don't generate new warnings or errors 23 | - [ ] No unsafe code introduced (or if introduced, thoroughly justified and documented) 24 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Default ignored files 3 | /workspace.xml -------------------------------------------------------------------------------- /.idea/copyright/MIT.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.diagnostics.disabled": [ 3 | "mismatched-arg-count" 4 | ], 5 | "editor.codeActionsOnSave": { 6 | "source.fixAll": "explicit", 7 | "source.organizeImports": "explicit" 8 | }, 9 | "files.trimTrailingWhitespace": true, 10 | "files.trimFinalNewlines": true, 11 | "[markdown]": { 12 | "editor.formatOnSave": true, 13 | "files.insertFinalNewline": true, 14 | }, 15 | "[rust]": { 16 | "editor.formatOnSave": true, 17 | "files.insertFinalNewline": true, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "fyrox-core-derive", 4 | "fyrox-core", 5 | "fyrox-sound", 6 | "fyrox-ui", 7 | "fyrox-resource", 8 | "fyrox-scripts", 9 | "fyrox-animation", 10 | "editor", 11 | "editor-standalone", 12 | "template-core", 13 | "template", 14 | "fyrox-graph", 15 | "fyrox-math", 16 | "fyrox-dylib", 17 | "fyrox", 18 | "fyrox-impl", 19 | "project-manager", 20 | "fyrox-graphics", 21 | "fyrox-build-tools", 22 | "fyrox-texture", 23 | "fyrox-autotile", 24 | "fyrox-material" 25 | , "fyrox-graphics-gl"] 26 | resolver = "2" 27 | 28 | [profile.dev] 29 | opt-level = 1 30 | 31 | [profile.release] 32 | opt-level = 3 33 | debug = true 34 | 35 | [profile.project-manager] 36 | inherits = "release" 37 | opt-level = "z" 38 | debug = false 39 | strip = true 40 | panic = "abort" 41 | lto = true 42 | 43 | [profile.github-ci] 44 | inherits = "dev" 45 | strip = "symbols" 46 | debug = false 47 | opt-level = 3 48 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /editor-standalone/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyroxed" 3 | version = "1.0.0-rc.1" 4 | license = "MIT" 5 | authors = ["Dmitry Stepanov "] 6 | edition = "2021" 7 | rust-version = "1.86" 8 | description = "A standalone scene editor for Fyrox game engine" 9 | homepage = "https://github.com/FyroxEngine/Fyrox" 10 | keywords = ["fyrox", "editor", "rust"] 11 | repository = "https://github.com/FyroxEngine/Fyrox" 12 | readme = "README.md" 13 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 14 | 15 | [dependencies] 16 | fyrox = { version = "1.0.0-rc.1", path = "../fyrox" } 17 | fyroxed_base = { version = "1.0.0-rc.1", path = "../editor" } 18 | clap = { version = "4", features = ["derive"] } 19 | -------------------------------------------------------------------------------- /editor-standalone/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /editor-standalone/README.md: -------------------------------------------------------------------------------- 1 | # FyroxEd (standalone) 2 | 3 | **WARNING:** Standalone version of the editor is not supported, use 4 | [project template generator](https://fyrox-book.github.io/fyrox/beginning/scripting.html) to utilize the full power 5 | of the editor. Standalone version does not support plugins and scripts, it won't be update in next releases! 6 | 7 | A standalone version of FyroxEd - native editor of [Fyrox engine](https://github.com/FyroxEngine/Fyrox). The standalone 8 | version allows you only to create and edit scenes, but **not run your game in the editor**. Please see 9 | [the book](https://fyrox-book.github.io/) to learn how to use the editor in different ways. 10 | 11 | ## How to install and run 12 | 13 | To install the latest stable **standalone** version from crates.io use: 14 | 15 | ```shell 16 | cargo install fyroxed 17 | ``` 18 | 19 | After that, you can run the editor by simply calling: 20 | 21 | ```shell 22 | fyroxed 23 | ``` 24 | 25 | If you're on Linux, please make sure that the following dependencies are installed: 26 | 27 | ```shell 28 | sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev libxcb1-dev libxkbcommon-dev libasound2-dev 29 | ``` 30 | 31 | ## Controls 32 | 33 | - [Click] - Select 34 | - [W][S][A][D] - Move camera 35 | - [Space][Q]/[E] - Raise/Lower Camera 36 | - [1] - Select interaction mode 37 | - [2] - Move interaction mode 38 | - [3] - Scale interaction mode 39 | - [4] - Rotate interaction mode 40 | - [Ctrl]+[Z] - Undo 41 | - [Ctrl]+[Y] - Redo]() -------------------------------------------------------------------------------- /editor-standalone/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use clap::Parser; 22 | use fyrox::core::log::Log; 23 | use fyrox::event_loop::EventLoop; 24 | use fyroxed_base::{Editor, StartupData}; 25 | 26 | #[derive(Parser, Debug)] 27 | #[command(version, about, long_about = None)] 28 | struct Args { 29 | /// Project root directory 30 | #[arg(short, long)] 31 | project_directory: Option, 32 | 33 | /// List of scenes to load 34 | #[arg(short, long)] 35 | scenes: Option>, 36 | } 37 | 38 | fn main() { 39 | Log::set_file_name("fyrox.log"); 40 | 41 | let args = Args::parse(); 42 | let startup_data = if let Some(proj_dir) = args.project_directory { 43 | Some(StartupData { 44 | working_directory: proj_dir.into(), 45 | scenes: args 46 | .scenes 47 | .unwrap_or_default() 48 | .iter() 49 | .map(Into::into) 50 | .collect(), 51 | }) 52 | } else { 53 | None 54 | }; 55 | 56 | Editor::new(startup_data).run(EventLoop::new().unwrap()) 57 | } 58 | -------------------------------------------------------------------------------- /editor/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | *.lock 4 | .idea 5 | /*.log 6 | /*.txt 7 | *.rgs 8 | /data 9 | history.bin 10 | /settings.ron 11 | -------------------------------------------------------------------------------- /editor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyroxed_base" 3 | license = "MIT" 4 | version = "1.0.0-rc.1" 5 | authors = ["Dmitry Stepanov "] 6 | edition = "2021" 7 | rust-version = "1.86" 8 | description = "A scene editor for Fyrox game engine" 9 | homepage = "https://github.com/FyroxEngine/Fyrox" 10 | keywords = ["fyrox", "editor", "rust"] 11 | repository = "https://github.com/FyroxEngine/Fyrox" 12 | readme = "README.md" 13 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/resources/**/*"] 14 | 15 | [dependencies] 16 | fyrox = { version = "1.0.0-rc.1", path = "../fyrox", default-features = false } 17 | fyrox-build-tools = { version = "1.0.0-rc.1", path = "../fyrox-build-tools" } 18 | lazy_static = "1.4.0" 19 | ron = "0.8.0" 20 | serde = "^1.0.0" 21 | toml = { version = "0.8.10", default-features = false, features = ["parse"] } 22 | toml_edit = "0.22.6" 23 | strum = "0.26.1" 24 | strum_macros = "0.26.1" 25 | open = "5" 26 | opener = { version = "0.7.2", default-features = false, features = ["reveal"] } 27 | rust-fuzzy-search = "0.1.1" 28 | cargo_metadata = "0.19" 29 | serde_json = "1.0.113" 30 | image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } 31 | imageproc = "0.25.0" 32 | notify = "8" 33 | 34 | [features] 35 | default = ["fyrox/default"] 36 | dylib_engine = ["fyrox/dylib"] 37 | -------------------------------------------------------------------------------- /editor/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /editor/README.md: -------------------------------------------------------------------------------- 1 | # FyroxEd 2 | 3 | Full-featured editor for [Fyrox engine](https://github.com/FyroxEngine/Fyrox). This is the basic library for the editor, 4 | it cannot be run as executable. See `editor-standalone` for this. 5 | 6 | The main purpose of making the editor library is to use it with static plugins, see `scripting` example for more info. -------------------------------------------------------------------------------- /editor/resources/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/Roboto-Regular.ttf -------------------------------------------------------------------------------- /editor/resources/add_box_emitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/add_box_emitter.png -------------------------------------------------------------------------------- /editor/resources/add_cylinder_emitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/add_cylinder_emitter.png -------------------------------------------------------------------------------- /editor/resources/add_sphere_emitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/add_sphere_emitter.png -------------------------------------------------------------------------------- /editor/resources/border-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/border-icon.png -------------------------------------------------------------------------------- /editor/resources/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/brush.png -------------------------------------------------------------------------------- /editor/resources/button-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/button-icon.png -------------------------------------------------------------------------------- /editor/resources/canvas-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/canvas-icon.png -------------------------------------------------------------------------------- /editor/resources/checkbox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/checkbox-icon.png -------------------------------------------------------------------------------- /editor/resources/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/circle.png -------------------------------------------------------------------------------- /editor/resources/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/clear.png -------------------------------------------------------------------------------- /editor/resources/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/collapse.png -------------------------------------------------------------------------------- /editor/resources/collider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/collider.png -------------------------------------------------------------------------------- /editor/resources/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/copy.png -------------------------------------------------------------------------------- /editor/resources/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/cross.png -------------------------------------------------------------------------------- /editor/resources/cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/cube.png -------------------------------------------------------------------------------- /editor/resources/curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/curve.png -------------------------------------------------------------------------------- /editor/resources/die.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/die.png -------------------------------------------------------------------------------- /editor/resources/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/doc.png -------------------------------------------------------------------------------- /editor/resources/eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/eraser.png -------------------------------------------------------------------------------- /editor/resources/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/expand.png -------------------------------------------------------------------------------- /editor/resources/fileBrowser-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/fileBrowser-icon.png -------------------------------------------------------------------------------- /editor/resources/fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/fill.png -------------------------------------------------------------------------------- /editor/resources/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/filter.png -------------------------------------------------------------------------------- /editor/resources/fit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/fit.png -------------------------------------------------------------------------------- /editor/resources/flip_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/flip_x.png -------------------------------------------------------------------------------- /editor/resources/flip_y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/flip_y.png -------------------------------------------------------------------------------- /editor/resources/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/folder.png -------------------------------------------------------------------------------- /editor/resources/folder_return.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/folder_return.png -------------------------------------------------------------------------------- /editor/resources/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/font.png -------------------------------------------------------------------------------- /editor/resources/grid-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/grid-icon.png -------------------------------------------------------------------------------- /editor/resources/grid_snapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/grid_snapping.png -------------------------------------------------------------------------------- /editor/resources/hammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/hammer.png -------------------------------------------------------------------------------- /editor/resources/hrir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/hrir.png -------------------------------------------------------------------------------- /editor/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/icon.png -------------------------------------------------------------------------------- /editor/resources/image-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/image-icon.png -------------------------------------------------------------------------------- /editor/resources/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/import.png -------------------------------------------------------------------------------- /editor/resources/inspector-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/inspector-icon.png -------------------------------------------------------------------------------- /editor/resources/invisible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/invisible.png -------------------------------------------------------------------------------- /editor/resources/joint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/joint.png -------------------------------------------------------------------------------- /editor/resources/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/light.png -------------------------------------------------------------------------------- /editor/resources/light_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/light_source.png -------------------------------------------------------------------------------- /editor/resources/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/line.png -------------------------------------------------------------------------------- /editor/resources/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/link.png -------------------------------------------------------------------------------- /editor/resources/list-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/list-icon.png -------------------------------------------------------------------------------- /editor/resources/locate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/locate.png -------------------------------------------------------------------------------- /editor/resources/material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/material.png -------------------------------------------------------------------------------- /editor/resources/menu-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/menu-icon.png -------------------------------------------------------------------------------- /editor/resources/messageBox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/messageBox-icon.png -------------------------------------------------------------------------------- /editor/resources/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/model.png -------------------------------------------------------------------------------- /editor/resources/move_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/move_arrow.png -------------------------------------------------------------------------------- /editor/resources/navmesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/navmesh.png -------------------------------------------------------------------------------- /editor/resources/nine_slice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/nine_slice.png -------------------------------------------------------------------------------- /editor/resources/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/palette.png -------------------------------------------------------------------------------- /editor/resources/pick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/pick.png -------------------------------------------------------------------------------- /editor/resources/pipette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/pipette.png -------------------------------------------------------------------------------- /editor/resources/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/play.png -------------------------------------------------------------------------------- /editor/resources/popup-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/popup-icon.png -------------------------------------------------------------------------------- /editor/resources/position_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/position_track.png -------------------------------------------------------------------------------- /editor/resources/property_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/property_track.png -------------------------------------------------------------------------------- /editor/resources/rect_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/rect_fill.png -------------------------------------------------------------------------------- /editor/resources/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/redo.png -------------------------------------------------------------------------------- /editor/resources/reimport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/reimport.png -------------------------------------------------------------------------------- /editor/resources/rename.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/rename.png -------------------------------------------------------------------------------- /editor/resources/rigid_body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/rigid_body.png -------------------------------------------------------------------------------- /editor/resources/rotate_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/rotate_arrow.png -------------------------------------------------------------------------------- /editor/resources/rotation_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/rotation_track.png -------------------------------------------------------------------------------- /editor/resources/scale_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/scale_arrow.png -------------------------------------------------------------------------------- /editor/resources/scaling_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/scaling_track.png -------------------------------------------------------------------------------- /editor/resources/screen-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/screen-icon.png -------------------------------------------------------------------------------- /editor/resources/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/select.png -------------------------------------------------------------------------------- /editor/resources/select_in_wv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/select_in_wv.png -------------------------------------------------------------------------------- /editor/resources/shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/shader.png -------------------------------------------------------------------------------- /editor/resources/sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/sound.png -------------------------------------------------------------------------------- /editor/resources/sound_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/sound_source.png -------------------------------------------------------------------------------- /editor/resources/speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/speed.png -------------------------------------------------------------------------------- /editor/resources/stackPanel-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/stackPanel-icon.png -------------------------------------------------------------------------------- /editor/resources/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/stop.png -------------------------------------------------------------------------------- /editor/resources/terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/terrain.png -------------------------------------------------------------------------------- /editor/resources/text-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/text-icon.png -------------------------------------------------------------------------------- /editor/resources/tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/tile.png -------------------------------------------------------------------------------- /editor/resources/tile_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/tile_set.png -------------------------------------------------------------------------------- /editor/resources/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/time.png -------------------------------------------------------------------------------- /editor/resources/track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/track.png -------------------------------------------------------------------------------- /editor/resources/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/triangle.png -------------------------------------------------------------------------------- /editor/resources/turn_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/turn_left.png -------------------------------------------------------------------------------- /editor/resources/turn_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/turn_right.png -------------------------------------------------------------------------------- /editor/resources/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/ui.png -------------------------------------------------------------------------------- /editor/resources/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/undo.png -------------------------------------------------------------------------------- /editor/resources/visible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/visible.png -------------------------------------------------------------------------------- /editor/resources/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/warning.png -------------------------------------------------------------------------------- /editor/resources/window-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/resources/window-icon.png -------------------------------------------------------------------------------- /editor/screenshots/latest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/editor/screenshots/latest.png -------------------------------------------------------------------------------- /editor/src/interaction/gizmo/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod move_gizmo; 22 | pub mod rotate_gizmo; 23 | pub mod scale_gizmo; 24 | -------------------------------------------------------------------------------- /editor/src/plugins/collider/dummy.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::{ 22 | fyrox::{ 23 | core::{algebra::Vector3, pool::Handle}, 24 | scene::{node::Node, Scene}, 25 | }, 26 | plugins::collider::{ShapeGizmoTrait, ShapeHandleValue}, 27 | }; 28 | 29 | pub struct DummyShapeGizmo; 30 | 31 | impl ShapeGizmoTrait for DummyShapeGizmo { 32 | fn for_each_handle(&self, _func: &mut dyn FnMut(Handle)) {} 33 | 34 | fn handle_local_position( 35 | &self, 36 | _handle: Handle, 37 | _collider: Handle, 38 | _scene: &Scene, 39 | ) -> Option> { 40 | None 41 | } 42 | 43 | fn value_by_handle( 44 | &self, 45 | _handle: Handle, 46 | _collider: Handle, 47 | _scene: &Scene, 48 | ) -> Option { 49 | None 50 | } 51 | 52 | fn set_value_by_handle( 53 | &self, 54 | _handle: Handle, 55 | _value: ShapeHandleValue, 56 | _collider: Handle, 57 | _scene: &mut Scene, 58 | _initial_collider_local_position: Vector3, 59 | ) { 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /editor/src/plugins/inspector/handlers/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod node; 22 | -------------------------------------------------------------------------------- /editor/src/plugins/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod absm; 22 | pub mod animation; 23 | pub mod collider; 24 | pub mod curve_editor; 25 | pub mod inspector; 26 | pub mod material; 27 | pub mod ragdoll; 28 | pub mod settings; 29 | pub mod stats; 30 | pub mod tilemap; 31 | -------------------------------------------------------------------------------- /editor/src/settings/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use fyrox_build_tools::BuildProfile; 23 | use serde::{Deserialize, Serialize}; 24 | 25 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 26 | pub struct BuildSettings { 27 | #[reflect(hidden)] 28 | pub selected_profile: usize, 29 | pub profiles: Vec, 30 | } 31 | 32 | impl Default for BuildSettings { 33 | fn default() -> Self { 34 | let debug = BuildProfile::debug(); 35 | let release = BuildProfile::release(); 36 | let debug_hot_reloading = BuildProfile::debug_hot_reloading(); 37 | let release_hot_reloading = BuildProfile::release_hot_reloading(); 38 | Self { 39 | selected_profile: 0, 40 | profiles: vec![debug, debug_hot_reloading, release, release_hot_reloading], 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /editor/src/settings/camera.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use serde::{Deserialize, Serialize}; 23 | use std::ops::Range; 24 | 25 | fn default_sensitivity() -> f32 { 26 | 1.0f32 27 | } 28 | 29 | fn default_zoom_speed() -> f32 { 30 | 0.5 31 | } 32 | 33 | fn default_zoom_range() -> Range { 34 | 0.0f32..100.0f32 35 | } 36 | 37 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 38 | pub struct CameraSettings { 39 | #[serde(default)] 40 | pub speed: f32, 41 | #[serde(default = "default_sensitivity")] 42 | pub sensitivity: f32, 43 | #[serde(default = "default_zoom_speed")] 44 | pub zoom_speed: f32, 45 | #[reflect(min_value = 0.0, max_value = 1000.0)] 46 | #[serde(default = "default_zoom_range")] 47 | pub zoom_range: Range, 48 | } 49 | 50 | impl Default for CameraSettings { 51 | fn default() -> Self { 52 | Self { 53 | speed: 10.0, 54 | sensitivity: default_sensitivity(), 55 | zoom_speed: default_zoom_speed(), 56 | zoom_range: default_zoom_range(), 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /editor/src/settings/debugging.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 25 | pub struct DebuggingSettings { 26 | pub show_physics: bool, 27 | pub show_bounds: bool, 28 | pub show_tbn: bool, 29 | #[serde(default)] 30 | pub show_terrains: bool, 31 | #[serde(default)] 32 | pub show_light_bounds: bool, 33 | #[serde(default)] 34 | pub show_camera_bounds: bool, 35 | #[reflect(description = "Size of pictograms in meters. It is used for objects like lights.")] 36 | #[serde(default)] 37 | pub pictogram_size: f32, 38 | #[reflect( 39 | description = "Forces the editor to save the scene in text form as well as standard binary." 40 | )] 41 | #[serde(default)] 42 | pub save_scene_in_text_form: bool, 43 | } 44 | 45 | impl Default for DebuggingSettings { 46 | fn default() -> Self { 47 | Self { 48 | show_physics: true, 49 | show_bounds: true, 50 | show_tbn: false, 51 | show_terrains: false, 52 | show_light_bounds: true, 53 | show_camera_bounds: true, 54 | pictogram_size: 0.33, 55 | save_scene_in_text_form: false, 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /editor/src/settings/graphics.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::{core::reflect::prelude::*, renderer::QualitySettings}; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Debug, Clone, Reflect)] 25 | pub struct GraphicsSettings { 26 | pub quality: QualitySettings, 27 | pub z_near: f32, 28 | pub z_far: f32, 29 | #[serde(default = "default_draw_grid")] 30 | pub draw_grid: bool, 31 | pub gizmo_scale: f32, 32 | } 33 | 34 | fn default_draw_grid() -> bool { 35 | true 36 | } 37 | 38 | impl Default for GraphicsSettings { 39 | fn default() -> Self { 40 | Self { 41 | quality: Default::default(), 42 | z_near: 0.025, 43 | z_far: 128.0, 44 | draw_grid: default_draw_grid(), 45 | gizmo_scale: 1.0, 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /editor/src/settings/model.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::{algebra::Vector3, reflect::prelude::*}; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 25 | pub struct ModelSettings { 26 | #[reflect( 27 | description = "Initial scale the root of the instance will have after instantiation.\ 28 | Useful when you have lots of huge models and don't want to rescale them manually." 29 | )] 30 | pub instantiation_scale: Vector3, 31 | } 32 | 33 | impl Default for ModelSettings { 34 | fn default() -> Self { 35 | Self { 36 | instantiation_scale: Vector3::new(1.0, 1.0, 1.0), 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /editor/src/settings/move_mode.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::{algebra::Vector3, math, reflect::prelude::*}; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Debug, Clone, Reflect)] 25 | pub struct MoveInteractionModeSettings { 26 | pub grid_snapping: bool, 27 | pub x_snap_step: f32, 28 | pub y_snap_step: f32, 29 | pub z_snap_step: f32, 30 | } 31 | 32 | impl Default for MoveInteractionModeSettings { 33 | fn default() -> Self { 34 | Self { 35 | grid_snapping: false, 36 | x_snap_step: 0.05, 37 | y_snap_step: 0.05, 38 | z_snap_step: 0.05, 39 | } 40 | } 41 | } 42 | 43 | impl MoveInteractionModeSettings { 44 | pub fn try_snap_vector_to_grid(&self, v: Vector3) -> Vector3 { 45 | if self.grid_snapping { 46 | Vector3::new( 47 | math::round_to_step(v.x, self.x_snap_step), 48 | math::round_to_step(v.y, self.y_snap_step), 49 | math::round_to_step(v.z, self.z_snap_step), 50 | ) 51 | } else { 52 | v 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /editor/src/settings/navmesh.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 25 | pub struct NavmeshSettings { 26 | #[reflect( 27 | description = "Show all navigational meshes in scene. With this function turned off, only currently edited navmesh will be shown." 28 | )] 29 | pub draw_all: bool, 30 | 31 | #[reflect(description = "Radius of a nav mesh vertex.")] 32 | pub vertex_radius: f32, 33 | } 34 | 35 | impl Default for NavmeshSettings { 36 | fn default() -> Self { 37 | Self { 38 | draw_all: true, 39 | vertex_radius: 0.2, 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /editor/src/settings/recent.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::make_relative_path; 22 | use serde::{Deserialize, Serialize}; 23 | use std::{collections::BTreeSet, path::PathBuf}; 24 | 25 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Default, Eq)] 26 | pub struct RecentFiles { 27 | pub scenes: Vec, 28 | } 29 | 30 | impl RecentFiles { 31 | /// Does few main things: 32 | /// - Removes path to non-existent files. 33 | /// - Removes all duplicated paths. 34 | /// - Forces all paths to be in canonical form and replaces slashes to be OS-independent. 35 | /// - Sorts all paths in alphabetic order, which makes it easier to find specific path when there are many. 36 | pub fn deduplicate_and_refresh(&mut self) { 37 | self.scenes = self 38 | .scenes 39 | .iter() 40 | .filter_map(|p| make_relative_path(p).ok()) 41 | .collect::>() 42 | .into_iter() 43 | .collect::>(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /editor/src/settings/rotate_mode.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Debug, Clone, Reflect)] 25 | pub struct RotateInteractionModeSettings { 26 | pub angle_snapping: bool, 27 | pub x_snap_step: f32, 28 | pub y_snap_step: f32, 29 | pub z_snap_step: f32, 30 | } 31 | 32 | impl Default for RotateInteractionModeSettings { 33 | fn default() -> Self { 34 | Self { 35 | angle_snapping: false, 36 | x_snap_step: 2.5, 37 | y_snap_step: 2.5, 38 | z_snap_step: 2.5, 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /editor/src/settings/scene.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::{core::algebra::Vector3, core::pool::ErasedHandle, scene::camera::Projection}; 22 | use serde::{Deserialize, Serialize}; 23 | use std::collections::HashMap; 24 | 25 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug)] 26 | pub struct SceneCameraSettings { 27 | pub position: Vector3, 28 | pub yaw: f32, 29 | pub pitch: f32, 30 | #[serde(default)] 31 | pub projection: Projection, 32 | } 33 | 34 | impl Default for SceneCameraSettings { 35 | fn default() -> Self { 36 | Self { 37 | position: Vector3::new(0.0, 1.0, 0.0), 38 | yaw: 0.0, 39 | pitch: 0.0, 40 | projection: Default::default(), 41 | } 42 | } 43 | } 44 | 45 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug)] 46 | pub struct NodeInfo { 47 | pub is_expanded: bool, 48 | } 49 | 50 | impl Default for NodeInfo { 51 | fn default() -> Self { 52 | Self { is_expanded: true } 53 | } 54 | } 55 | 56 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Default)] 57 | pub struct SceneSettings { 58 | pub camera_settings: SceneCameraSettings, 59 | pub node_infos: HashMap, 60 | } 61 | -------------------------------------------------------------------------------- /editor/src/settings/selection.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::core::reflect::prelude::*; 22 | use serde::{Deserialize, Serialize}; 23 | 24 | #[derive(Deserialize, Serialize, PartialEq, Clone, Debug, Reflect)] 25 | pub struct SelectionSettings { 26 | pub ignore_back_faces: bool, 27 | 28 | #[serde(default = "default_hull_less_object_selection_radius")] 29 | pub hull_less_object_selection_radius: f32, 30 | 31 | // Hidden because there's a separate switch in world viewer for this. 32 | #[reflect(hidden)] 33 | pub track_selection: bool, 34 | } 35 | 36 | fn default_hull_less_object_selection_radius() -> f32 { 37 | 0.33 38 | } 39 | 40 | impl Default for SelectionSettings { 41 | fn default() -> Self { 42 | Self { 43 | ignore_back_faces: false, 44 | hull_less_object_selection_radius: default_hull_less_object_selection_radius(), 45 | track_selection: true, 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /editor/src/settings/windows.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::fyrox::{ 22 | core::{algebra::Vector2, reflect::prelude::*}, 23 | gui::dock::config::DockingManagerLayoutDescriptor, 24 | }; 25 | use serde::{Deserialize, Serialize}; 26 | 27 | #[derive(Deserialize, Serialize, PartialEq, Debug, Clone, Reflect)] 28 | pub struct WindowsSettings { 29 | #[serde(default)] 30 | pub window_position: Vector2, 31 | #[serde(default)] 32 | pub window_size: Vector2, 33 | #[serde(default)] 34 | pub window_maximized: bool, 35 | #[serde(default)] 36 | #[reflect(hidden)] 37 | pub layout: Option, 38 | } 39 | 40 | impl Default for WindowsSettings { 41 | fn default() -> Self { 42 | Self { 43 | window_position: Vector2::new(0.0, 0.0), 44 | window_size: Vector2::new(1024.0, 768.0), 45 | window_maximized: true, 46 | layout: None, 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /examples/Crate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/examples/Crate.png -------------------------------------------------------------------------------- /examples/data/navmesh_scene.rgs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/examples/data/navmesh_scene.rgs -------------------------------------------------------------------------------- /examples/data/navmesh_scene2.rgs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/examples/data/navmesh_scene2.rgs -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1739866667, 6 | "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs", 22 | "rust-overlay": "rust-overlay" 23 | } 24 | }, 25 | "rust-overlay": { 26 | "inputs": { 27 | "nixpkgs": [ 28 | "nixpkgs" 29 | ] 30 | }, 31 | "locked": { 32 | "lastModified": 1740074384, 33 | "narHash": "sha256-T2eO9ognlph94/TyAu1uILo38fZG1G4S5FQxG+YBDv0=", 34 | "owner": "oxalica", 35 | "repo": "rust-overlay", 36 | "rev": "d291a120b6524911249b198baf3ec3e07ff57e04", 37 | "type": "github" 38 | }, 39 | "original": { 40 | "owner": "oxalica", 41 | "repo": "rust-overlay", 42 | "type": "github" 43 | } 44 | } 45 | }, 46 | "root": "root", 47 | "version": 7 48 | } 49 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs = { 3 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 4 | rust-overlay = { 5 | url = "github:oxalica/rust-overlay"; 6 | inputs.nixpkgs.follows = "nixpkgs"; 7 | }; 8 | }; 9 | 10 | outputs = { 11 | nixpkgs, 12 | rust-overlay, 13 | ... 14 | }: 15 | let 16 | overlays = [ 17 | (import rust-overlay) 18 | ]; 19 | 20 | systems = [ 21 | "x86_64-linux" 22 | "aarch64-linux" 23 | ]; 24 | 25 | forAllSystems = f: 26 | nixpkgs.lib.genAttrs systems 27 | (system: f { pkgs = import nixpkgs { inherit system overlays; }; }); 28 | in 29 | { 30 | devShells = forAllSystems ({ pkgs }: with pkgs; { 31 | default = mkShell rec { 32 | buildInputs = [ 33 | rust-bin.stable.latest.default 34 | 35 | pkg-config 36 | xorg.libxcb 37 | alsa-lib 38 | wayland 39 | libxkbcommon 40 | libGL 41 | ]; 42 | LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; 43 | }; 44 | }); 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /fyrox-animation/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-animation" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Flexible Animation System" 8 | keywords = ["animation", "game"] 9 | categories = ["game-development", "graphics"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-animation" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [dependencies] 18 | fyrox-core = { version = "1.0.0-rc.1", path = "../fyrox-core" } 19 | fyrox-resource = { version = "1.0.0-rc.1", path = "../fyrox-resource" } 20 | strum = "0.26.1" 21 | strum_macros = "0.26.1" 22 | fxhash = "0.2.1" 23 | spade = "2.1.0" -------------------------------------------------------------------------------- /fyrox-animation/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2024 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /fyrox-animation/README.md: -------------------------------------------------------------------------------- 1 | # fyrox-animation 2 | 3 | Flexible, general-purpose, reflection-based animation system for game development. 4 | 5 | **NOTE:** even though this crate has `fyrox` prefix in its name, it can be used separately without any issues. 6 | 7 | ## Features 8 | 9 | - Reflection-based animation. 10 | - Animation blending state machine. 11 | - Sprite sheet animation. 12 | - Various blending modes - blend by weight, blend by index, blend space. 13 | - Smooth state transition. 14 | - Ability to animate any numeric property, including vectors, bools, natural and real numbers. 15 | - Layer masks. 16 | - Root motion. 17 | - Fixed set of binding modes for most common cases. 18 | - Signals and events. -------------------------------------------------------------------------------- /fyrox-animation/src/spritesheet/signal.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Animation signal is used as a point at which to notify external observers that animation just 22 | //! started to play a specific frame. 23 | 24 | use crate::core::{reflect::prelude::*, visitor::prelude::*}; 25 | use fyrox_core::uuid_provider; 26 | 27 | /// Animation signal is used as a point at which to notify external observers that animation just 28 | /// started to play a specific frame. 29 | #[derive(PartialEq, Visit, Reflect, Debug, Clone)] 30 | pub struct Signal { 31 | /// Signal id. It should be used to distinguish different signals. For example, `JUMP` signal 32 | /// can have `id = 0`, while `CROUCH` signal - `id = 1`, etc. 33 | pub id: u64, 34 | 35 | /// Index of a frame at which to notify external observers. 36 | pub frame: u32, 37 | 38 | /// Is the signal enabled or not. Disabled signals won't produce any events. 39 | pub enabled: bool, 40 | } 41 | 42 | uuid_provider!(Signal = "30fd963f-4ce7-4dcc-bdff-691897267420"); 43 | 44 | impl Default for Signal { 45 | fn default() -> Self { 46 | Self { 47 | id: 0, 48 | frame: 0, 49 | enabled: true, 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /fyrox-autotile/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-autotile" 3 | license = "MIT" 4 | version = "1.0.0-rc.1" 5 | authors = ["Dmitry Stepanov ", "Brendan Guild "] 6 | edition = "2021" 7 | rust-version = "1.86" 8 | description = "An autotiler for Fyrox game engine" 9 | homepage = "https://github.com/FyroxEngine/Fyrox" 10 | keywords = ["tilemap", "autotile", "wave function collapse"] 11 | categories = ["game-development"] 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | readme = "README.md" 14 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 15 | 16 | [dependencies] 17 | nalgebra = { version = "0.33", features = ["bytemuck"] } 18 | fxhash = "0.2.1" 19 | rand = "0.8.5" 20 | -------------------------------------------------------------------------------- /fyrox-autotile/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /fyrox-autotile/README.md: -------------------------------------------------------------------------------- 1 | # fyrox-autotile 2 | 3 | An implementation of autotiling algorithms for use with regular tile grids. This includes: 4 | 5 | - Interactive terrain-based autotiling for tile map editing. The user picks a broad category of tile for each cell. These categories are called *terrains* and each terrain may have many tiles. The algorithm picks specific tiles for each cell from its terrain so that the tiles fit naturally together, thus sparing the user from having to manually select matching tiles. 6 | 7 | The algorithm is based upon a Godot library for the same purpose: https://github.com/dandeliondino/terrain-autotiler 8 | 9 | - Randomized tile generation using Wave Function Collapse. Unlike terrain-based autotiling where the purpose is to automate tedious work for an artist, the purpose of Wave Function Collapse is to replace the artist entirely by generating creative tile layouts through randomization. 10 | 11 | The algorithm is based upon fast-wfc, a C++ library for the same purpose: https://github.com/math-fehr/fast-wfc 12 | 13 | These algorithms are designed to be generic in a way that will work with *any* regular grid. They should work just as well with square cells and hexagon cells and 3D grids. The user specifies the coordinate system that is used to identify cells and which cells are neighbors to which other cells. 14 | -------------------------------------------------------------------------------- /fyrox-build-tools/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-build-tools" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | license = "MIT" 6 | description = "Build tools for Fyrox Engine" 7 | keywords = ["build"] 8 | categories = ["game-development"] 9 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 10 | homepage = "https://fyrox.rs" 11 | documentation = "https://docs.rs/fyrox-build-tools" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | rust-version = "1.86" 14 | 15 | [dependencies] 16 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1" } 17 | fyrox-ui = { path = "../fyrox-ui", version = "1.0.0-rc.1" } 18 | fyrox-resource = { path = "../fyrox-resource", version = "1.0.0-rc.1" } 19 | serde = { version = "1.0.215", features = ["derive"] } -------------------------------------------------------------------------------- /fyrox-build-tools/src/resources/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-build-tools/src/resources/progress.png -------------------------------------------------------------------------------- /fyrox-core-derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-core-derive" 3 | version = "1.0.0-rc.1" 4 | authors = ["toyboot4e , Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Proc-macro for the Visit trait" 8 | repository = "https://github.com/FyroxEngine/Fyrox" 9 | include = ["/src/**/*", "/Cargo.toml", "/README.md"] 10 | readme = "README.md" 11 | rust-version = "1.86" 12 | 13 | [lib] 14 | proc-macro = true 15 | 16 | [dependencies] 17 | convert_case = "0.6.0" 18 | proc-macro2 = "1.0.33" 19 | quote = "1.0.10" 20 | syn = "1.0.82" 21 | darling = "0.14.0" 22 | fxhash = "0.2.1" 23 | 24 | [dev-dependencies] 25 | fyrox-core = { path = "../fyrox-core" } 26 | futures = "0.3.16" 27 | -------------------------------------------------------------------------------- /fyrox-core-derive/README.md: -------------------------------------------------------------------------------- 1 | # fyrox-core-derive 2 | 3 | This crate provides with some derive macros: 4 | 5 | - `#[derive(Visit)]` 6 | - `#[derive(Inspect)]` 7 | - `#[derive(Reflect)]` 8 | -------------------------------------------------------------------------------- /fyrox-core-derive/src/uuid.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use darling::*; 22 | use proc_macro2::TokenStream as TokenStream2; 23 | use quote::*; 24 | use syn::*; 25 | 26 | #[derive(FromDeriveInput)] 27 | #[darling(attributes(type_uuid), supports(struct_any, enum_any))] 28 | pub struct TypeArgs { 29 | pub ident: Ident, 30 | pub generics: Generics, 31 | pub id: String, 32 | } 33 | 34 | pub fn impl_type_uuid_provider(ast: DeriveInput) -> TokenStream2 { 35 | let ty_args = TypeArgs::from_derive_input(&ast).unwrap(); 36 | let ty_ident = &ty_args.ident; 37 | let id = &ty_args.id; 38 | 39 | let (impl_generics, ty_generics, where_clause) = ty_args.generics.split_for_impl(); 40 | 41 | quote! { 42 | impl #impl_generics TypeUuidProvider for #ty_ident #ty_generics #where_clause { 43 | fn type_uuid() -> Uuid { 44 | uuid!(#id) 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /fyrox-core-derive/src/visit/args.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use darling::*; 22 | use syn::*; 23 | 24 | #[derive(FromDeriveInput)] 25 | #[darling(attributes(visit), supports(struct_any, enum_any))] 26 | pub struct TypeArgs { 27 | pub ident: Ident, 28 | pub generics: Generics, 29 | pub data: ast::Data, 30 | #[darling(default)] 31 | pub optional: bool, 32 | } 33 | 34 | /// Parsed from struct's or enum variant's field 35 | #[derive(FromField, Clone)] 36 | #[darling(attributes(visit))] 37 | pub struct FieldArgs { 38 | pub ident: Option, 39 | // pub vis: Visibility, 40 | pub ty: Type, 41 | // pub attrs: Vec, 42 | // --- 43 | /// `#[visit(skip)]` 44 | /// 45 | /// Skip on read and write 46 | #[darling(default)] 47 | pub skip: bool, 48 | 49 | /// `#[visit(rename = "..")]` 50 | /// 51 | /// Force this name 52 | #[darling(default)] 53 | pub rename: Option, 54 | 55 | /// `#[visit(optional)]` 56 | /// 57 | /// Ignore missing field 58 | #[darling(default)] 59 | pub optional: bool, 60 | } 61 | 62 | #[derive(FromVariant)] 63 | #[darling(attributes(inspect))] 64 | pub struct VariantArgs { 65 | pub ident: Ident, 66 | pub fields: ast::Fields, 67 | } 68 | -------------------------------------------------------------------------------- /fyrox-core-derive/tests/it/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! The only integration test (the only test "crate") 22 | //! 23 | //! c.f. https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html 24 | 25 | // #![feature(trace_macros)] 26 | // trace_macros!(true); 27 | 28 | pub mod component; 29 | pub mod reflect; 30 | pub mod uuid; 31 | pub mod visit; 32 | -------------------------------------------------------------------------------- /fyrox-core-derive/tests/it/uuid.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use fyrox_core::type_traits::prelude::*; 22 | use std::marker::PhantomData; 23 | 24 | #[derive(TypeUuidProvider)] 25 | #[type_uuid(id = "5fb10a22-4ea9-4a13-a58c-82f2734aefd8")] 26 | struct _Foo {} 27 | 28 | #[derive(TypeUuidProvider)] 29 | #[type_uuid(id = "5fb10a22-4ea9-4a13-a58c-82f2734aefd9")] 30 | struct _Bar { 31 | phantom: PhantomData, 32 | } 33 | -------------------------------------------------------------------------------- /fyrox-core-derive/tests/it/visit/compat.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Fight the compatibility hell with attributes! .. someday :) 22 | 23 | use fyrox_core::visitor::prelude::*; 24 | 25 | // Comment it out and make sure it panics 26 | // #[derive(Debug, Clone, PartialEq, Visit)] 27 | // pub struct CantCompile { 28 | // pub a: f32, 29 | // #[visit(rename = "A")] 30 | // pub duplicate_name: f32, 31 | // } 32 | 33 | #[derive(Debug, Clone, PartialEq, Visit)] 34 | pub struct Rename { 35 | #[visit(rename = "Renamed")] 36 | pub x: f32, 37 | } 38 | 39 | #[test] 40 | fn rename() { 41 | let mut data = Rename { x: 100.0 }; 42 | let mut data_default = Rename { x: 0.0 }; 43 | 44 | super::save_load("rename", &mut data, &mut data_default); 45 | 46 | assert_eq!(data, data_default); 47 | } 48 | -------------------------------------------------------------------------------- /fyrox-core/.gitignore: -------------------------------------------------------------------------------- 1 | test.txt 2 | test.bin 3 | test_ascii.txt -------------------------------------------------------------------------------- /fyrox-core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-core" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Shared core for the Fyrox engine and its external crates." 8 | keywords = ["game", "engine", "3d"] 9 | categories = ["game-development", "graphics", "gui", "rendering", "wasm"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-core" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [dependencies] 18 | fyrox-core-derive = { path = "../fyrox-core-derive", version = "1.0.0-rc.1" } 19 | fyrox-math = { path = "../fyrox-math", version = "1.0.0-rc.1" } 20 | base64 = "0.22.1" 21 | byteorder = "1.4.3" 22 | rand = "0.8.4" 23 | memoffset = "0.9.0" 24 | lazy_static = "1.4.0" 25 | nalgebra = { version = "0.33", features = ["bytemuck"] } 26 | arrayvec = "0.7.2" 27 | futures = { version = "0.3.17", features = ["thread-pool"] } 28 | uuid = { version = "1", features = ["v4", "js"] } 29 | instant = { version = "0.1.12", features = ["wasm-bindgen"] } 30 | num-traits = "0.2.14" 31 | parking_lot = "0.12.0" 32 | fxhash = "0.2.1" 33 | bitflags = "2.2.1" 34 | once_cell = "1.17.1" 35 | notify = "8" 36 | serde = { version = "1", features = ["derive"] } 37 | bincode = "1.3.3" 38 | bytemuck = "1.16.1" 39 | strum = "0.26.1" 40 | strum_macros = "0.26.1" 41 | 42 | [target.'cfg(target_arch = "wasm32")'.dependencies] 43 | web-sys = { version = "0.3.53", features = ["Request", "Window", "Response", "AudioContext", "AudioBuffer", "AudioContextOptions", "AudioNode", "AudioBufferSourceNode", "AudioDestinationNode"] } 44 | wasm-bindgen = "0.2.76" 45 | wasm-bindgen-futures = "0.4.26" 46 | js-sys = "0.3.53" 47 | 48 | [target.'cfg(target_os = "android")'.dependencies] 49 | android-activity = "0.5.0" 50 | 51 | [features] 52 | serde = ["nalgebra/serde-serialize", "uuid/serde"] 53 | enable_profiler = [] 54 | -------------------------------------------------------------------------------- /fyrox-core/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /fyrox-core/README.md: -------------------------------------------------------------------------------- 1 | # fyrox-core 2 | 3 | Shared library for Fyrox-engine containing linear algebra and some useful algorithms. 4 | 5 | **NOTE:** even though this crate has `fyrox` prefix in its name, it can be used separately without any issues. 6 | -------------------------------------------------------------------------------- /fyrox-core/src/platform.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use std::fmt::{Display, Formatter}; 22 | use strum_macros::VariantNames; 23 | 24 | #[derive(Copy, Clone, VariantNames, Default, Debug, Eq, PartialEq)] 25 | pub enum TargetPlatform { 26 | #[default] 27 | PC, 28 | WebAssembly, 29 | Android, 30 | } 31 | 32 | impl Display for TargetPlatform { 33 | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { 34 | write!( 35 | f, 36 | "{}", 37 | match self { 38 | TargetPlatform::PC => "PC", 39 | TargetPlatform::WebAssembly => "WASM", 40 | TargetPlatform::Android => "Android", 41 | } 42 | ) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /fyrox-core/src/quadtree.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub use crate::math::quadtree::*; 22 | -------------------------------------------------------------------------------- /fyrox-core/src/rectpack.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub use crate::math::pack::RectPacker; 22 | -------------------------------------------------------------------------------- /fyrox-core/src/reflect/external_impls.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! `Reflect` implementations for external types othern than `std` types 22 | 23 | use fyrox_core_derive::impl_reflect; 24 | use nalgebra::*; 25 | use std::fmt::Debug; 26 | 27 | use crate::reflect::prelude::*; 28 | 29 | impl_reflect! { 30 | pub struct Matrix { 31 | pub data: S, 32 | // _phantoms: PhantomData<(T, R, C)>, 33 | } 34 | } 35 | 36 | impl_reflect! { 37 | pub struct ArrayStorage(pub [[T; R]; C]); 38 | } 39 | 40 | impl_reflect! { 41 | pub struct Unit { 42 | // pub(crate) value: T, 43 | } 44 | } 45 | 46 | impl_reflect! { 47 | pub struct Quaternion { 48 | pub coords: Vector4, 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /fyrox-core/src/visitor/reader/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod ascii; 22 | pub mod binary; 23 | 24 | use crate::{ 25 | pool::Handle, 26 | visitor::{error::VisitError, field::Field, Visitor, VisitorNode}, 27 | }; 28 | 29 | pub trait Reader { 30 | fn read_field(&mut self) -> Result; 31 | fn read_node(&mut self, visitor: &mut Visitor) -> Result, VisitError>; 32 | fn read(&mut self) -> Result; 33 | } 34 | -------------------------------------------------------------------------------- /fyrox-core/src/visitor/writer/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod ascii; 22 | pub mod binary; 23 | 24 | use crate::visitor::{field::Field, VisitResult, Visitor, VisitorNode}; 25 | use std::io::Write; 26 | 27 | pub trait Writer { 28 | fn write_field(&self, field: &Field, dest: &mut dyn Write) -> VisitResult; 29 | fn write_node( 30 | &self, 31 | visitor: &Visitor, 32 | node: &VisitorNode, 33 | hierarchy_level: usize, 34 | dest: &mut dyn Write, 35 | ) -> VisitResult; 36 | fn write(&self, visitor: &Visitor, dest: &mut dyn Write) -> VisitResult; 37 | } 38 | -------------------------------------------------------------------------------- /fyrox-dylib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-dylib" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | authors = ["Dmitry Stepanov ", "Fyrox Engine Contributors"] 6 | license = "MIT" 7 | description = "Dynamic library for Fyrox Game Engine" 8 | keywords = ["sound", "game", "engine", "3d", "gui"] 9 | categories = ["game-engines", "graphics", "gui", "rendering", "wasm"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-dylib" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [lib] 18 | crate-type = ["dylib"] 19 | 20 | [features] 21 | mesh_analysis = ["fyrox-impl/mesh_analysis"] 22 | 23 | [dependencies] 24 | fyrox-impl = { path = "../fyrox-impl", version = "1.0.0-rc.1" } -------------------------------------------------------------------------------- /fyrox-dylib/README.md: -------------------------------------------------------------------------------- 1 | # fyrox-dylib 2 | 3 | Dynamic library for Fyrox Game Engine. -------------------------------------------------------------------------------- /fyrox-dylib/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! A crate that allows using Fyrox as a dynamically linked library. It could be useful for fast 22 | //! prototyping, that can save some time on avoiding potentially time-consuming static linking 23 | //! stage. 24 | //! 25 | //! The crate just re-exports everything from the engine, and you can use it as Fyrox. To use the 26 | //! crate all you need to do is re-define `fyrox` dependency in your project like so: 27 | //! 28 | //! ```toml 29 | //! [dependencies.fyrox] 30 | //! version = "0.1.0" 31 | //! registry = "fyrox-dylib" 32 | //! package = "fyrox-dylib" 33 | //! ``` 34 | //! 35 | //! You can also use the latest version from git: 36 | //! 37 | //! ```toml 38 | //! [dependencies.fyrox] 39 | //! git = "https://github.com/FyroxEngine/Fyrox" 40 | //! package = "fyrox-dylib" 41 | //! ``` 42 | 43 | // Just re-export everything. 44 | pub use fyrox_impl::*; 45 | -------------------------------------------------------------------------------- /fyrox-graph/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-graph" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Graph management crate for the Fyrox engine" 8 | keywords = ["graph", "prefab"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-graph" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | rust-version = "1.86" 15 | 16 | [dependencies] 17 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1" } 18 | fyrox-resource = { path = "../fyrox-resource", version = "1.0.0-rc.1" } 19 | fxhash = "0.2.1" -------------------------------------------------------------------------------- /fyrox-graphics-gl/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-graphics-gl" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | license = "MIT" 6 | description = "OpenGL-based graphics server for Fyrox Game Engine" 7 | keywords = ["graphics", "gapi"] 8 | categories = ["graphics", "rendering::graphics-api"] 9 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 10 | homepage = "https://fyrox.rs" 11 | documentation = "https://docs.rs/fyrox-graphics-gl" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | rust-version = "1.86" 14 | 15 | [dependencies] 16 | winit = { version = "0.29.2", features = ["serde"] } 17 | fyrox-graphics = { version = "1.0.0-rc.1", path = "../fyrox-graphics" } 18 | fyrox-core = { version = "1.0.0-rc.1", path = "../fyrox-core" } 19 | fxhash = "0.2.1" 20 | regex = "1" 21 | glow = "0.16" 22 | serde = { version = "1.0.215", features = ["derive"] } 23 | 24 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 25 | glutin = "0.31" 26 | glutin-winit = "0.4.2" 27 | raw-window-handle = "0.5.0" 28 | 29 | [target.'cfg(target_arch = "wasm32")'.dependencies] 30 | serde-wasm-bindgen = "0.6.3" -------------------------------------------------------------------------------- /fyrox-graphics-gl/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod buffer; 22 | pub mod framebuffer; 23 | pub mod geometry_buffer; 24 | pub mod program; 25 | pub mod query; 26 | pub mod read_buffer; 27 | pub mod sampler; 28 | pub mod server; 29 | pub mod texture; 30 | 31 | pub trait ToGlConstant { 32 | fn into_gl(self) -> u32; 33 | } 34 | -------------------------------------------------------------------------------- /fyrox-graphics/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-graphics" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | license = "MIT" 6 | description = "Graphics API abstraction for Fyrox Game Engine" 7 | keywords = ["graphics", "gapi"] 8 | categories = ["graphics", "rendering::graphics-api"] 9 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 10 | homepage = "https://fyrox.rs" 11 | documentation = "https://docs.rs/fyrox-graphics" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | rust-version = "1.86" 14 | 15 | [dependencies] 16 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1", features = ["serde"] } 17 | serde = { version = "1", features = ["derive"] } 18 | strum = "0.26.1" 19 | strum_macros = "0.26.1" 20 | bytemuck = { version = "1.16.1", features = ["derive"] } -------------------------------------------------------------------------------- /fyrox-graphics/src/read_buffer.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::{ 22 | core::math::Rect, define_shared_wrapper, error::FrameworkError, 23 | framebuffer::GpuFrameBufferTrait, 24 | }; 25 | use bytemuck::Pod; 26 | use fyrox_core::define_as_any_trait; 27 | 28 | define_as_any_trait!(GpuAsyncReadBufferAsAny => GpuAsyncReadBufferTrait); 29 | 30 | pub trait GpuAsyncReadBufferTrait: GpuAsyncReadBufferAsAny { 31 | fn schedule_pixels_transfer( 32 | &self, 33 | framebuffer: &dyn GpuFrameBufferTrait, 34 | color_buffer_index: u32, 35 | rect: Option>, 36 | ) -> Result<(), FrameworkError>; 37 | fn is_request_running(&self) -> bool; 38 | fn try_read(&self) -> Option>; 39 | } 40 | 41 | impl dyn GpuAsyncReadBufferTrait { 42 | pub fn try_read_of_type(&self) -> Option> 43 | where 44 | T: Pod, 45 | { 46 | let mut bytes = self.try_read()?; 47 | let typed = unsafe { 48 | Some(Vec::from_raw_parts( 49 | bytes.as_mut_ptr() as *mut T, 50 | bytes.len() / size_of::(), 51 | bytes.capacity() / size_of::(), 52 | )) 53 | }; 54 | std::mem::forget(bytes); 55 | typed 56 | } 57 | } 58 | 59 | define_shared_wrapper!(GpuAsyncReadBuffer); 60 | -------------------------------------------------------------------------------- /fyrox-impl/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/0.png -------------------------------------------------------------------------------- /fyrox-impl/src/material/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Material is a set of parameters for a shader. This module contains everything related to materials. 22 | //! 23 | //! See [Material struct docs](self::Material) for more info. 24 | 25 | pub use fyrox_material::*; 26 | -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/hdr/luminance.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub mod histogram_luminance_evaluator; 22 | pub mod luminance_evaluator; 23 | -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/hdr/luminance/luminance_evaluator.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | pub trait LuminanceEvaluator { 22 | fn average_luminance(self, data: &[f32]) -> f32; 23 | } 24 | -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/blit.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "Blit", 3 | resources: [ 4 | ( 5 | name: "diffuseTexture", 6 | kind: Texture(kind: Sampler2D, fallback: White), 7 | binding: 0 8 | ), 9 | ( 10 | name: "properties", 11 | kind: PropertyGroup([ 12 | (name: "worldViewProjection", kind: Matrix4()), 13 | ]), 14 | binding: 0 15 | ), 16 | ], 17 | passes: [ 18 | ( 19 | name: "Primary", 20 | 21 | draw_parameters: DrawParameters( 22 | cull_face: None, 23 | color_write: ColorMask( 24 | red: true, 25 | green: true, 26 | blue: true, 27 | alpha: true, 28 | ), 29 | depth_write: true, 30 | stencil_test: None, 31 | depth_test: None, 32 | blend: None, 33 | stencil_op: StencilOp( 34 | fail: Keep, 35 | zfail: Keep, 36 | zpass: Keep, 37 | write_mask: 0xFFFF_FFFF, 38 | ), 39 | scissor_box: None 40 | ), 41 | 42 | vertex_shader: 43 | r#" 44 | layout (location = 0) in vec3 vertexPosition; 45 | layout (location = 1) in vec2 vertexTexCoord; 46 | 47 | out vec2 texCoord; 48 | 49 | void main() 50 | { 51 | texCoord = vertexTexCoord; 52 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 53 | } 54 | "#, 55 | 56 | fragment_shader: 57 | r#" 58 | out vec4 FragColor; 59 | 60 | in vec2 texCoord; 61 | 62 | void main() 63 | { 64 | FragColor = texture(diffuseTexture, texCoord); 65 | } 66 | "#, 67 | ) 68 | ] 69 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/bloom.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "Bloom", 3 | resources: [ 4 | ( 5 | name: "hdrSampler", 6 | kind: Texture(kind: Sampler2D, fallback: White), 7 | binding: 0 8 | ), 9 | ( 10 | name: "properties", 11 | kind: PropertyGroup([ 12 | (name: "worldViewProjection", kind: Matrix4()), 13 | ]), 14 | binding: 0 15 | ), 16 | ], 17 | passes: [ 18 | ( 19 | name: "Primary", 20 | 21 | draw_parameters: DrawParameters( 22 | cull_face: None, 23 | color_write: ColorMask( 24 | red: true, 25 | green: true, 26 | blue: true, 27 | alpha: true, 28 | ), 29 | depth_write: false, 30 | stencil_test: None, 31 | depth_test: None, 32 | blend: None, 33 | stencil_op: StencilOp( 34 | fail: Keep, 35 | zfail: Keep, 36 | zpass: Keep, 37 | write_mask: 0xFFFF_FFFF, 38 | ), 39 | scissor_box: None 40 | ), 41 | 42 | vertex_shader: 43 | r#" 44 | layout (location = 0) in vec3 vertexPosition; 45 | layout (location = 1) in vec2 vertexTexCoord; 46 | 47 | out vec2 texCoord; 48 | 49 | void main() 50 | { 51 | texCoord = vertexTexCoord; 52 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 53 | } 54 | "#, 55 | 56 | fragment_shader: 57 | r#" 58 | in vec2 texCoord; 59 | 60 | out vec4 outBrightColor; 61 | 62 | void main() { 63 | vec3 hdrPixel = texture(hdrSampler, texCoord).rgb; 64 | 65 | if (S_Luminance(hdrPixel) > 1.0) { 66 | outBrightColor = vec4(hdrPixel, 0.0); 67 | } else { 68 | outBrightColor = vec4(0.0); 69 | } 70 | } 71 | "#, 72 | ) 73 | ] 74 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/debug.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "Debug", 3 | resources: [ 4 | ( 5 | name: "properties", 6 | kind: PropertyGroup([ 7 | (name: "worldViewProjection", kind: Matrix4()), 8 | ]), 9 | binding: 0 10 | ), 11 | ], 12 | passes: [ 13 | ( 14 | name: "Primary", 15 | 16 | draw_parameters: DrawParameters( 17 | cull_face: None, 18 | color_write: ColorMask( 19 | red: true, 20 | green: true, 21 | blue: true, 22 | alpha: true, 23 | ), 24 | depth_write: false, 25 | stencil_test: None, 26 | depth_test: Some(Less), 27 | blend: None, 28 | stencil_op: StencilOp( 29 | fail: Keep, 30 | zfail: Keep, 31 | zpass: Keep, 32 | write_mask: 0xFFFF_FFFF, 33 | ), 34 | scissor_box: None 35 | ), 36 | 37 | vertex_shader: 38 | r#" 39 | layout (location = 0) in vec3 vertexPosition; 40 | layout (location = 1) in vec4 vertexColor; 41 | 42 | out vec4 color; 43 | 44 | void main() 45 | { 46 | color = vertexColor; 47 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 48 | } 49 | "#, 50 | 51 | fragment_shader: 52 | r#" 53 | out vec4 FragColor; 54 | 55 | in vec4 color; 56 | 57 | void main() 58 | { 59 | FragColor = color; 60 | } 61 | "#, 62 | ) 63 | ] 64 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/hdr_adaptation.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "HdrAdaptation", 3 | resources: [ 4 | ( 5 | name: "oldLumSampler", 6 | kind: Texture(kind: Sampler2D, fallback: White), 7 | binding: 0 8 | ), 9 | ( 10 | name: "newLumSampler", 11 | kind: Texture(kind: Sampler2D, fallback: White), 12 | binding: 1 13 | ), 14 | ( 15 | name: "properties", 16 | kind: PropertyGroup([ 17 | (name: "worldViewProjection", kind: Matrix4()), 18 | (name: "speed", kind: Float()), 19 | ]), 20 | binding: 0 21 | ), 22 | ], 23 | passes: [ 24 | ( 25 | name: "Primary", 26 | 27 | draw_parameters: DrawParameters( 28 | cull_face: None, 29 | color_write: ColorMask( 30 | red: true, 31 | green: true, 32 | blue: true, 33 | alpha: true, 34 | ), 35 | depth_write: false, 36 | stencil_test: None, 37 | depth_test: None, 38 | blend: None, 39 | stencil_op: StencilOp( 40 | fail: Keep, 41 | zfail: Keep, 42 | zpass: Zero, 43 | write_mask: 0xFFFF_FFFF, 44 | ), 45 | scissor_box: None 46 | ), 47 | 48 | vertex_shader: 49 | r#" 50 | layout (location = 0) in vec3 vertexPosition; 51 | layout (location = 1) in vec2 vertexTexCoord; 52 | 53 | out vec2 texCoord; 54 | 55 | void main() 56 | { 57 | texCoord = vertexTexCoord; 58 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 59 | } 60 | "#, 61 | 62 | fragment_shader: 63 | r#" 64 | out float outLum; 65 | 66 | void main() { 67 | float oldLum = texture(oldLumSampler, vec2(0.5, 0.5)).r; 68 | float newLum = texture(newLumSampler, vec2(0.5, 0.5)).r; 69 | outLum = clamp(oldLum + (newLum - oldLum) * properties.speed, 0.0, newLum); 70 | } 71 | "#, 72 | ) 73 | ] 74 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/pixel_counter.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "PixelCounter", 3 | resources: [ 4 | ( 5 | name: "properties", 6 | kind: PropertyGroup([ 7 | (name: "worldViewProjection", kind: Matrix4()), 8 | ]), 9 | binding: 0 10 | ), 11 | ], 12 | passes: [ 13 | ( 14 | name: "Primary", 15 | 16 | draw_parameters: DrawParameters( 17 | cull_face: None, 18 | color_write: ColorMask( 19 | red: false, 20 | green: false, 21 | blue: false, 22 | alpha: false, 23 | ), 24 | depth_write: false, 25 | stencil_test: Some(StencilFunc ( 26 | func: NotEqual, 27 | ref_value: 0, 28 | mask: 0xFFFF_FFFF, 29 | )), 30 | depth_test: None, 31 | blend: None, 32 | stencil_op: StencilOp( 33 | fail: Keep, 34 | zfail: Keep, 35 | zpass: Keep, 36 | write_mask: 0xFFFF_FFFF, 37 | ), 38 | scissor_box: None 39 | ), 40 | 41 | vertex_shader: 42 | r#" 43 | layout (location = 0) in vec3 vertexPosition; 44 | 45 | void main() 46 | { 47 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 48 | } 49 | "#, 50 | 51 | fragment_shader: 52 | r#" 53 | out vec4 FragColor; 54 | 55 | void main() 56 | { 57 | FragColor = vec4(1.0); 58 | } 59 | "#, 60 | ) 61 | ] 62 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/skybox.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "SkyBox", 3 | resources: [ 4 | ( 5 | name: "cubemapTexture", 6 | kind: Texture(kind: SamplerCube, fallback: White), 7 | binding: 0 8 | ), 9 | ( 10 | name: "properties", 11 | kind: PropertyGroup([ 12 | (name: "worldViewProjection", kind: Matrix4()), 13 | ]), 14 | binding: 0 15 | ), 16 | ], 17 | passes: [ 18 | ( 19 | name: "Primary", 20 | 21 | draw_parameters: DrawParameters( 22 | cull_face: None, 23 | color_write: ColorMask( 24 | red: true, 25 | green: true, 26 | blue: true, 27 | alpha: true, 28 | ), 29 | depth_write: false, 30 | stencil_test: None, 31 | depth_test: None, 32 | blend: None, 33 | stencil_op: StencilOp( 34 | fail: Keep, 35 | zfail: Keep, 36 | zpass: Keep, 37 | write_mask: 0xFFFF_FFFF, 38 | ), 39 | scissor_box: None 40 | ), 41 | 42 | vertex_shader: 43 | r#" 44 | layout (location = 0) in vec3 vertexPosition; 45 | 46 | out vec3 texCoord; 47 | 48 | void main() 49 | { 50 | texCoord = vertexPosition; 51 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 52 | } 53 | "#, 54 | 55 | fragment_shader: 56 | r#" 57 | out vec4 FragColor; 58 | 59 | in vec3 texCoord; 60 | 61 | void main() 62 | { 63 | FragColor = S_SRGBToLinear(texture(cubemapTexture, texCoord)); 64 | } 65 | "#, 66 | ) 67 | ] 68 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/volume_marker_lit.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "VolumeMarkerLighting", 3 | resources: [ 4 | ( 5 | name: "properties", 6 | kind: PropertyGroup([ 7 | (name: "worldViewProjection", kind: Matrix4()), 8 | ]), 9 | binding: 0 10 | ), 11 | ], 12 | passes: [ 13 | ( 14 | name: "Primary", 15 | 16 | // Drawing params are dynamic. 17 | 18 | vertex_shader: 19 | r#" 20 | layout (location = 0) in vec3 vertexPosition; 21 | 22 | void main() 23 | { 24 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 25 | } 26 | "#, 27 | 28 | fragment_shader: 29 | r#" 30 | out vec4 FragColor; 31 | 32 | void main() 33 | { 34 | FragColor = vec4(1.0); 35 | } 36 | "#, 37 | ) 38 | ] 39 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shaders/volume_marker_vol.shader: -------------------------------------------------------------------------------- 1 | ( 2 | name: "VolumeMarkerVolume", 3 | resources: [ 4 | ( 5 | name: "properties", 6 | kind: PropertyGroup([ 7 | (name: "worldViewProjection", kind: Matrix4()), 8 | ]), 9 | binding: 0 10 | ), 11 | ], 12 | passes: [ 13 | ( 14 | name: "Primary", 15 | 16 | draw_parameters: DrawParameters( 17 | cull_face: None, 18 | color_write: ColorMask( 19 | red: false, 20 | green: false, 21 | blue: false, 22 | alpha: false, 23 | ), 24 | depth_write: false, 25 | stencil_test: Some(StencilFunc ( 26 | func: Equal, 27 | ref_value: 0xFF, 28 | mask: 0xFFFF_FFFF 29 | )), 30 | depth_test: Some(Less), 31 | blend: None, 32 | stencil_op: StencilOp( 33 | fail: Replace, 34 | zfail: Keep, 35 | zpass: Replace, 36 | write_mask: 0xFFFF_FFFF, 37 | ), 38 | scissor_box: None 39 | ), 40 | 41 | vertex_shader: 42 | r#" 43 | layout (location = 0) in vec3 vertexPosition; 44 | 45 | void main() 46 | { 47 | gl_Position = properties.worldViewProjection * vec4(vertexPosition, 1.0); 48 | } 49 | "#, 50 | 51 | fragment_shader: 52 | r#" 53 | out vec4 FragColor; 54 | 55 | void main() 56 | { 57 | FragColor = vec4(1.0); 58 | } 59 | "#, 60 | ) 61 | ] 62 | ) -------------------------------------------------------------------------------- /fyrox-impl/src/renderer/shadow/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | #![warn(clippy::too_many_arguments)] 22 | 23 | pub mod csm; 24 | pub mod point; 25 | pub mod spot; 26 | 27 | pub fn cascade_size(base_size: usize, cascade: usize) -> usize { 28 | match cascade { 29 | 0 => base_size, 30 | 1 => (base_size / 2).max(1), 31 | 2 => (base_size / 4).max(1), 32 | _ => unreachable!(), 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /fyrox-impl/src/resource/curve/loader.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Curve loader. 22 | 23 | use crate::{ 24 | asset::{ 25 | io::ResourceIo, 26 | loader::{BoxedLoaderFuture, LoaderPayload, ResourceLoader}, 27 | }, 28 | core::{uuid::Uuid, TypeUuidProvider}, 29 | resource::curve::CurveResourceState, 30 | }; 31 | use fyrox_resource::state::LoadError; 32 | use std::{path::PathBuf, sync::Arc}; 33 | 34 | /// Default implementation for curve loading. 35 | pub struct CurveLoader; 36 | 37 | impl ResourceLoader for CurveLoader { 38 | fn extensions(&self) -> &[&str] { 39 | &["curve", "crv"] 40 | } 41 | 42 | fn data_type_uuid(&self) -> Uuid { 43 | CurveResourceState::type_uuid() 44 | } 45 | 46 | fn load(&self, path: PathBuf, io: Arc) -> BoxedLoaderFuture { 47 | Box::pin(async move { 48 | let curve_state = CurveResourceState::from_file(&path, io.as_ref()) 49 | .await 50 | .map_err(LoadError::new)?; 51 | Ok(LoaderPayload::new(curve_state)) 52 | }) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /fyrox-impl/src/resource/fbx/scene/video.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | use crate::{ 22 | core::pool::Handle, 23 | resource::fbx::document::{attribute::FbxAttribute, FbxNode, FbxNodeContainer}, 24 | }; 25 | use base64::Engine; 26 | 27 | pub struct FbxVideo { 28 | pub content: Vec, 29 | } 30 | 31 | impl FbxVideo { 32 | pub(in crate::resource::fbx) fn read( 33 | video_node_handle: Handle, 34 | nodes: &FbxNodeContainer, 35 | ) -> Result { 36 | if let Ok(content_node) = nodes.get_by_name(video_node_handle, "Content") { 37 | let attrib = content_node.get_attrib(0)?; 38 | 39 | let content = match attrib { 40 | FbxAttribute::String(base64) => base64::engine::general_purpose::STANDARD 41 | .decode(base64) 42 | .expect("FBX cannot contain invalid base64-encoded data."), 43 | FbxAttribute::RawData(raw) => raw.clone(), 44 | _ => Default::default(), 45 | }; 46 | 47 | Ok(Self { content }) 48 | } else { 49 | Ok(Self { 50 | content: Default::default(), 51 | }) 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /fyrox-impl/src/resource/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Everything related to resources. 22 | 23 | #![warn(missing_docs)] 24 | 25 | pub mod curve; 26 | pub mod fbx; 27 | pub mod gltf; 28 | pub mod model; 29 | pub mod texture; 30 | -------------------------------------------------------------------------------- /fyrox-impl/src/resource/texture/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Everything related to textures. See [`fyrox_texture`] crate docs for more info. 22 | 23 | pub use fyrox_texture::*; 24 | -------------------------------------------------------------------------------- /fyrox-impl/src/scene/animation/spritesheet.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Scene-specific sprite sheet animation. 22 | 23 | use crate::resource::texture::TextureResource; 24 | 25 | /// Scene-specific sprite sheet animation. 26 | pub type SpriteSheetAnimation = 27 | crate::generic_animation::spritesheet::SpriteSheetAnimation; 28 | /// Scene-specific sprite sheet animation frames container. 29 | pub type SpriteSheetFramesContainer = 30 | crate::generic_animation::spritesheet::SpriteSheetFramesContainer; 31 | 32 | /// Standard prelude for sprite sheet animations, that contains all most commonly used types and traits. 33 | pub mod prelude { 34 | pub use super::{SpriteSheetAnimation, SpriteSheetFramesContainer}; 35 | pub use crate::generic_animation::spritesheet::{ 36 | signal::Signal, Event, ImageParameters, Status, 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /fyrox-impl/src/scene/dim2/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! The module contains 2D scene nodes and physics. Despite the naming, scene nodes are still 3D 22 | //! but physics simulation is in true 2D. 23 | 24 | pub mod collider; 25 | pub mod joint; 26 | pub mod physics; 27 | pub mod rectangle; 28 | pub mod rigidbody; 29 | -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/back.png -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/bottom.png -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/front.png -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/left.png -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/right.png -------------------------------------------------------------------------------- /fyrox-impl/src/scene/skybox/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-impl/src/scene/skybox/top.png -------------------------------------------------------------------------------- /fyrox-impl/src/utils/behavior/inverter.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! A node, that inverts its child state ([`super::Status::Failure`] becomes [`super::Status::Success`] and vice versa, [`super::Status::Running`] remains 22 | //! unchanged) 23 | 24 | use crate::{ 25 | core::{pool::Handle, visitor::prelude::*}, 26 | utils::behavior::{BehaviorNode, BehaviorTree}, 27 | }; 28 | 29 | /// See module docs. 30 | #[derive(Debug, PartialEq, Visit, Eq, Clone)] 31 | pub struct Inverter 32 | where 33 | B: Clone, 34 | { 35 | /// A handle of child node, the state of which will be inverted. 36 | pub child: Handle>, 37 | } 38 | 39 | impl Default for Inverter 40 | where 41 | B: Clone, 42 | { 43 | fn default() -> Self { 44 | Self { 45 | child: Default::default(), 46 | } 47 | } 48 | } 49 | 50 | impl Inverter 51 | where 52 | B: Clone + 'static, 53 | { 54 | /// Creates new inverter node with given action. 55 | pub fn new(child: Handle>) -> Self { 56 | Self { child } 57 | } 58 | 59 | /// Adds self to given behavior tree and returns handle to self. 60 | pub fn add_to(self, tree: &mut BehaviorTree) -> Handle> { 61 | tree.add_node(BehaviorNode::Inverter(self)) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /fyrox-impl/src/utils/behavior/leaf.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Leaf is a "final" node of a behavior tree. It contains user-defined action which 22 | //! is able to mutate given context. 23 | 24 | use crate::{ 25 | core::{pool::Handle, visitor::prelude::*}, 26 | utils::behavior::{BehaviorNode, BehaviorTree}, 27 | }; 28 | use std::cell::RefCell; 29 | 30 | /// See module docs. 31 | #[derive(Debug, PartialEq, Visit, Eq, Clone)] 32 | pub struct LeafNode 33 | where 34 | B: Clone, 35 | { 36 | /// User-defined behavior. 37 | pub behavior: Option>, 38 | } 39 | 40 | impl Default for LeafNode 41 | where 42 | B: Clone, 43 | { 44 | fn default() -> Self { 45 | Self { behavior: None } 46 | } 47 | } 48 | 49 | impl LeafNode 50 | where 51 | B: Clone + 'static, 52 | { 53 | /// Creates new leaf node with given action. 54 | pub fn new(behavior: B) -> Self { 55 | Self { 56 | behavior: Some(RefCell::new(behavior)), 57 | } 58 | } 59 | 60 | /// Adds self to given behavior tree and returns handle to self. 61 | pub fn add_to(self, tree: &mut BehaviorTree) -> Handle> { 62 | tree.add_node(BehaviorNode::Leaf(self)) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /fyrox-impl/src/utils/uvgen.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! UV generation utils. 22 | 23 | pub use uvgen::{generate_uvs, SurfaceDataPatch}; 24 | -------------------------------------------------------------------------------- /fyrox-material/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-material" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | description = "Material and shader utilities for Fyrox Engine" 6 | keywords = ["graphics"] 7 | categories = ["game-development"] 8 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 9 | homepage = "https://fyrox.rs" 10 | documentation = "https://docs.rs/fyrox-material" 11 | repository = "https://github.com/FyroxEngine/Fyrox" 12 | rust-version = "1.86" 13 | 14 | [dependencies] 15 | fyrox-core = { version = "1.0.0-rc.1", path = "../fyrox-core" } 16 | fyrox-resource = { version = "1.0.0-rc.1", path = "../fyrox-resource" } 17 | fyrox-texture = { version = "1.0.0-rc.1", path = "../fyrox-texture" } 18 | fyrox-graphics = { version = "1.0.0-rc.1", path = "../fyrox-graphics" } 19 | strum = "0.26.1" 20 | strum_macros = "0.26.1" 21 | fxhash = "0.2.1" 22 | lazy_static = "1.4.0" 23 | uuid = "1" 24 | serde = { version = "1", features = ["derive"] } 25 | ron = "0.8.0" 26 | regex = "1" 27 | 28 | [dev-dependencies] 29 | fyrox-texture = { version = "1.0.0-rc.1", path = "../fyrox-texture" } -------------------------------------------------------------------------------- /fyrox-material/src/loader.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Material loader. 22 | 23 | use crate::Material; 24 | use fyrox_core::{uuid::Uuid, TypeUuidProvider}; 25 | use fyrox_resource::state::LoadError; 26 | use fyrox_resource::{ 27 | io::ResourceIo, 28 | loader::{BoxedLoaderFuture, LoaderPayload, ResourceLoader}, 29 | manager::ResourceManager, 30 | }; 31 | use std::{path::PathBuf, sync::Arc}; 32 | 33 | /// Default implementation for material loading. 34 | pub struct MaterialLoader { 35 | /// Resource manager that will be used to load internal shader resources of materials. 36 | pub resource_manager: ResourceManager, 37 | } 38 | 39 | impl ResourceLoader for MaterialLoader { 40 | fn extensions(&self) -> &[&str] { 41 | &["material"] 42 | } 43 | 44 | fn data_type_uuid(&self) -> Uuid { 45 | Material::type_uuid() 46 | } 47 | 48 | fn load(&self, path: PathBuf, io: Arc) -> BoxedLoaderFuture { 49 | let resource_manager = self.resource_manager.clone(); 50 | Box::pin(async move { 51 | let material = Material::from_file(&path, io.as_ref(), resource_manager) 52 | .await 53 | .map_err(LoadError::new)?; 54 | Ok(LoaderPayload::new(material)) 55 | }) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /fyrox-material/src/shader/loader.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! Shader loader. 22 | 23 | use crate::shader::Shader; 24 | use fyrox_core::{uuid::Uuid, TypeUuidProvider}; 25 | use fyrox_resource::{ 26 | io::ResourceIo, 27 | loader::{BoxedLoaderFuture, LoaderPayload, ResourceLoader}, 28 | state::LoadError, 29 | }; 30 | use std::{path::PathBuf, sync::Arc}; 31 | 32 | /// Default implementation for shader loading. 33 | pub struct ShaderLoader; 34 | 35 | impl ResourceLoader for ShaderLoader { 36 | fn extensions(&self) -> &[&str] { 37 | &["shader"] 38 | } 39 | 40 | fn data_type_uuid(&self) -> Uuid { 41 | Shader::type_uuid() 42 | } 43 | 44 | fn load(&self, path: PathBuf, io: Arc) -> BoxedLoaderFuture { 45 | Box::pin(async move { 46 | let shader_state = Shader::from_file(&path, io.as_ref()) 47 | .await 48 | .map_err(LoadError::new)?; 49 | Ok(LoaderPayload::new(shader_state)) 50 | }) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /fyrox-math/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-math" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Math utils for the Fyrox engine" 8 | keywords = ["octree", "plane", "ray", "aabb", "frustum"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-math" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | rust-version = "1.86" 15 | 16 | [dependencies] 17 | rectutils = "0.4.0" 18 | nalgebra = { version = "0.33", features = ["bytemuck"] } 19 | arrayvec = "0.7.4" 20 | num-traits = "0.2.18" 21 | uuid = { version = "1", features = ["v4"] } 22 | bytemuck = { version = "1.16.1", features = ["derive"] } 23 | -------------------------------------------------------------------------------- /fyrox-resource/.gitignore: -------------------------------------------------------------------------------- 1 | /test_output1 2 | /test_output2 3 | /test_output3 -------------------------------------------------------------------------------- /fyrox-resource/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-resource" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Asset management crate for the Fyrox engine" 8 | keywords = ["asset", "resource"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-resource" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | rust-version = "1.86" 15 | 16 | [dependencies] 17 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1", features = ["serde"] } 18 | fxhash = "0.2.1" 19 | ron = "0.8.0" 20 | serde = { version = "1", features = ["derive"] } 21 | walkdir = "2.3.2" 22 | rayon = "1.7.0" -------------------------------------------------------------------------------- /fyrox-resource/LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2019 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /fyrox-scripts/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-scripts" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Standard scripts for the Fyrox engine" 8 | keywords = ["asset", "resource"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-scripts" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | rust-version = "1.86" 15 | 16 | [dependencies] 17 | fyrox = { version = "1.0.0-rc.1", path = "../fyrox" } -------------------------------------------------------------------------------- /fyrox-scripts/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! A set of useful scripts that can be used to in your game. 22 | 23 | use crate::camera::FlyingCameraController; 24 | use fyrox::script::constructor::ScriptConstructorContainer; 25 | 26 | pub mod camera; 27 | 28 | /// Registers every script from the crate in the given constructor container. Use it, if you want to register all 29 | /// available scripts at once. Typical usage could be like this: 30 | /// 31 | /// ```rust,no_run 32 | /// # use fyrox::{ 33 | /// # core::pool::Handle, core::visitor::prelude::*, core::reflect::prelude::*, 34 | /// # plugin::{Plugin, PluginContext, PluginRegistrationContext}, 35 | /// # scene::Scene, 36 | /// # }; 37 | /// # 38 | /// # #[derive(Visit, Reflect, Debug)] 39 | /// # #[reflect(non_cloneable)] 40 | /// # struct Game; 41 | /// # 42 | /// # impl Plugin for Game { 43 | /// // This is PluginConstructor::register method of your GameConstructor. 44 | /// fn register(&self, context: PluginRegistrationContext) { 45 | /// fyrox_scripts::register(&context.serialization_context.script_constructors) 46 | /// } 47 | /// # } 48 | /// ``` 49 | pub fn register(container: &ScriptConstructorContainer) { 50 | container.add::("Fyrox Flying Camera Controller"); 51 | } 52 | -------------------------------------------------------------------------------- /fyrox-sound/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-sound" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Sound library for games." 8 | keywords = ["sound", "game", "hrtf", "binaural", "reverb"] 9 | categories = ["game-development", "multimedia::audio"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/examples/*"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-sound" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [dependencies] 18 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1" } 19 | fyrox-resource = { path = "../fyrox-resource", version = "1.0.0-rc.1" } 20 | hrtf = "0.8.0" 21 | hound = "3.4.0" 22 | strum = "0.26.1" 23 | strum_macros = "0.26.1" 24 | tinyaudio = "1" 25 | serde = { version = "1", features = ["derive"] } 26 | symphonia = { version = "0.5.4", features = ["all-codecs"] } 27 | -------------------------------------------------------------------------------- /fyrox-sound/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /fyrox-sound/examples/data/IRC_1002_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/IRC_1002_C.bin -------------------------------------------------------------------------------- /fyrox-sound/examples/data/door_open.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/door_open.wav -------------------------------------------------------------------------------- /fyrox-sound/examples/data/drop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/drop.wav -------------------------------------------------------------------------------- /fyrox-sound/examples/data/helicopter.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/helicopter.wav -------------------------------------------------------------------------------- /fyrox-sound/examples/data/sine_440hz.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/sine_440hz.wav -------------------------------------------------------------------------------- /fyrox-sound/examples/data/waterfall.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-sound/examples/data/waterfall.ogg -------------------------------------------------------------------------------- /fyrox-texture/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-texture" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | license = "MIT" 6 | description = "Texture utilities for Fyrox Engine" 7 | keywords = ["graphics"] 8 | categories = ["game-development"] 9 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 10 | homepage = "https://fyrox.rs" 11 | documentation = "https://docs.rs/fyrox-texture" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | rust-version = "1.86" 14 | 15 | [dependencies] 16 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1" } 17 | fyrox-resource = { path = "../fyrox-resource", version = "1.0.0-rc.1" } 18 | ddsfile = "0.5.0" 19 | fast_image_resize = "5.0.0" 20 | serde = { version = "1", features = ["derive"] } 21 | lazy_static = "1.4.0" 22 | fxhash = "0.2.1" 23 | strum = "0.26.1" 24 | strum_macros = "0.26.1" 25 | tbc = "0.3.0" 26 | image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } -------------------------------------------------------------------------------- /fyrox-texture/src/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-texture/src/default.png -------------------------------------------------------------------------------- /fyrox-ui/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-ui" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov "] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Extendable UI library" 8 | keywords = ["ui", "game", "gui"] 9 | categories = ["game-development", "gui"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox-ui" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [dependencies] 18 | fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1", features = ["serde"] } 19 | fyrox-resource = { path = "../fyrox-resource", version = "1.0.0-rc.1" } 20 | fyrox-texture = { path = "../fyrox-texture", version = "1.0.0-rc.1" } 21 | fyrox-graph = { path = "../fyrox-graph", version = "1.0.0-rc.1" } 22 | fyrox-animation = { path = "../fyrox-animation", version = "1.0.0-rc.1" } 23 | fyrox-material = { path = "../fyrox-material", version = "1.0.0-rc.1" } 24 | lazy_static = "1.4.0" 25 | copypasta = "0.10.1" 26 | fontdue = "0.9.2" 27 | notify = "8" 28 | fxhash = "0.2.1" 29 | strum = "0.26.1" 30 | strum_macros = "0.26.1" 31 | serde = { version = "1", features = ["derive"] } 32 | bytemuck = { version = "1.16.1", features = ["derive"] } 33 | uuid = { version = "1.7.0", features = ["v4"] } 34 | 35 | [features] 36 | enable_profiler = ["fyrox-core/enable_profiler"] 37 | 38 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 39 | sysinfo = "0.29.0" 40 | directories = "5.0.1" 41 | -------------------------------------------------------------------------------- /fyrox-ui/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /fyrox-ui/src/font/built_in_font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-ui/src/font/built_in_font.ttf -------------------------------------------------------------------------------- /fyrox-ui/src/resources/bits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-ui/src/resources/bits.png -------------------------------------------------------------------------------- /fyrox-ui/src/resources/chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/fyrox-ui/src/resources/chain.png -------------------------------------------------------------------------------- /fyrox/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox" 3 | version = "1.0.0-rc.1" 4 | authors = ["Dmitry Stepanov ", "Fyrox Engine Contributors"] 5 | edition = "2021" 6 | license = "MIT" 7 | description = "Feature-rich, easy-to-use, 2D/3D game engine with a scene editor. Like Godot, but in Rust." 8 | keywords = ["sound", "game", "engine", "3d", "gui"] 9 | categories = ["game-engines", "graphics", "gui", "rendering", "wasm"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] 11 | homepage = "https://fyrox.rs" 12 | documentation = "https://docs.rs/fyrox" 13 | repository = "https://github.com/FyroxEngine/Fyrox" 14 | readme = "README.md" 15 | rust-version = "1.86" 16 | 17 | [features] 18 | default = ["fyrox-impl"] 19 | dylib = ["fyrox-dylib"] 20 | mesh_analysis = ["fyrox-impl/mesh_analysis", "fyrox-dylib/mesh_analysis"] 21 | 22 | [dependencies] 23 | fyrox-impl = { version = "1.0.0-rc.1", path = "../fyrox-impl", optional = true } 24 | fyrox-dylib = { version = "1.0.0-rc.1", path = "../fyrox-dylib", optional = true } -------------------------------------------------------------------------------- /fyrox/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | // SOFTWARE. 20 | 21 | //! 3D/2D Game Engine. 22 | //! 23 | //! Tutorials can be found [here](https://fyrox-book.github.io/tutorials/tutorials.html) 24 | 25 | #![doc( 26 | html_logo_url = "https://fyrox.rs/assets/logos/logo.png", 27 | html_favicon_url = "https://fyrox.rs/assets/logos/logo.png" 28 | )] 29 | 30 | #[cfg(not(feature = "dylib"))] 31 | #[doc(inline)] 32 | pub use fyrox_impl::*; 33 | 34 | #[cfg(feature = "dylib")] 35 | #[doc(inline)] 36 | pub use fyrox_dylib::*; 37 | -------------------------------------------------------------------------------- /pics/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/1.jpg -------------------------------------------------------------------------------- /pics/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/2.jpg -------------------------------------------------------------------------------- /pics/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/3.jpg -------------------------------------------------------------------------------- /pics/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/4.jpg -------------------------------------------------------------------------------- /pics/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/5.jpg -------------------------------------------------------------------------------- /pics/editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/editor.png -------------------------------------------------------------------------------- /pics/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/logo.png -------------------------------------------------------------------------------- /pics/social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/social.png -------------------------------------------------------------------------------- /pics/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/pics/video.png -------------------------------------------------------------------------------- /project-manager/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-project-manager" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | authors = ["Dmitry Stepanov "] 6 | license = "MIT" 7 | description = "Project manager for Fyrox engine" 8 | keywords = ["fyrox", "project", "manager"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/resources/**/*"] 11 | homepage = "https://fyrox.rs" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | rust-version = "1.86" 14 | 15 | [dependencies] 16 | fyrox = { version = "1.0.0-rc.1", path = "../fyrox" } 17 | fyrox-template-core = { version = "1.0.0-rc.1", path = "../template-core" } 18 | fyrox-build-tools = { version = "1.0.0-rc.1", path = "../fyrox-build-tools" } 19 | serde = { version = "1", features = ["derive"] } 20 | ron = "0.8.1" 21 | open = "5.0.1" 22 | cargo_metadata = "0.19.0" 23 | serde_json = "1.0.133" 24 | directories = "5.0.1" -------------------------------------------------------------------------------- /project-manager/resources/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/Roboto-Regular.ttf -------------------------------------------------------------------------------- /project-manager/resources/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/add.png -------------------------------------------------------------------------------- /project-manager/resources/caution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/caution.png -------------------------------------------------------------------------------- /project-manager/resources/clean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/clean.png -------------------------------------------------------------------------------- /project-manager/resources/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/cross.png -------------------------------------------------------------------------------- /project-manager/resources/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/delete.png -------------------------------------------------------------------------------- /project-manager/resources/flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/flame.png -------------------------------------------------------------------------------- /project-manager/resources/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/folder.png -------------------------------------------------------------------------------- /project-manager/resources/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/gear.png -------------------------------------------------------------------------------- /project-manager/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/icon.png -------------------------------------------------------------------------------- /project-manager/resources/ide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/ide.png -------------------------------------------------------------------------------- /project-manager/resources/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/location.png -------------------------------------------------------------------------------- /project-manager/resources/open-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/open-folder.png -------------------------------------------------------------------------------- /project-manager/resources/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/pencil.png -------------------------------------------------------------------------------- /project-manager/resources/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/play.png -------------------------------------------------------------------------------- /project-manager/resources/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/plus.png -------------------------------------------------------------------------------- /project-manager/resources/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/question.png -------------------------------------------------------------------------------- /project-manager/resources/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FyroxEngine/Fyrox/89a75167e828caaf3648ed9322f20707cec6e886/project-manager/resources/up.png -------------------------------------------------------------------------------- /template-core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fyrox-template-core" 3 | version = "1.0.0-rc.1" 4 | edition = "2021" 5 | authors = ["Dmitry Stepanov "] 6 | license = "MIT" 7 | description = "Project template generator for Fyrox engine" 8 | keywords = ["fyrox", "game", "project"] 9 | categories = ["game-development"] 10 | include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "engine.version", "editor.version", "scripts.version"] 11 | homepage = "https://fyrox.rs" 12 | repository = "https://github.com/FyroxEngine/Fyrox" 13 | readme = "README.md" 14 | rust-version = "1.86" 15 | 16 | [dependencies] 17 | uuid = { version = "1", features = ["v4"] } 18 | convert_case = "0.6.0" 19 | toml = "0.8.10" 20 | toml_edit = "0.22.6" 21 | regex = "1.7.3" 22 | unicode-xid = "0.2.6" 23 | 24 | [build-dependencies] 25 | toml_edit = "0.22.6" -------------------------------------------------------------------------------- /template-core/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Dmitry Stepanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /template-core/README.md: -------------------------------------------------------------------------------- 1 | # Fyrox Engine Template Generator 2 | 3 | This tiny utility handles project and script generation for Fyrox Game Engine. 4 | 5 | ## Installation 6 | 7 | Install it via `cargo install`: 8 | 9 | ```shell 10 | cargo install fyrox-template 11 | ``` 12 | 13 | ## Generating New Project 14 | 15 | `fyrox-template init [--name --style