chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:24:51 +08:00
commit e74a3762b8
963 changed files with 299400 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# Rust files are text files with Unix-style newlines.
*.rs text eol=lf
# Other text files have Unix-style newlines.
*.shader text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.html text eol=lf
*.js text eol=lf
*.css text eol=lf
*.glsl text eol=lf
LICENSE text eol=lf
# Image files are binary
*.png binary
*.jpg binary
*.ttf binary
*.bin binary
+3
View File
@@ -0,0 +1,3 @@
# These are supported funding model platforms
custom: https://fyrox.rs/sponsor.html
+23
View File
@@ -0,0 +1,23 @@
---
name: Bug report
about: Report a bug you encountered
title: ''
assignees: ''
---
## Description
A clear and concise description of what the bug is.
## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
## Expected behavior
A clear and concise description of what you expected to happen.
## Screenshots
If applicable, add screenshots to help explain your problem.
+13
View File
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
assignees: ''
---
## Problem this feature should fix
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Expected solution
A clear and concise description of what you want to happen.
+23
View File
@@ -0,0 +1,23 @@
## Description
<!-- Provide a clear and concise description of what this PR accomplishes -->
Write here.
## Related Issue(s)
<!-- Link to the issue that this PR addresses (if applicable) -->
Fixes #(issue number)
## Review Guidance
<!-- Provide any additional information that would help reviewing your work -->
Write here.
## Screenshots/GIFs
<!-- If applicable, add screenshots or GIFs demonstrating the changes -->
Write here.
## Checklist
<!-- Mark items with 'x' (no spaces around x) -->
- [ ] My code follows the project's code style guidelines
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] My changes don't generate new warnings or errors
- [ ] No unsafe code introduced (or if introduced, thoroughly justified and documented)
+201
View File
@@ -0,0 +1,201 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
# This allows running it on any branch manually:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
env:
CARGO_TERM_COLOR: always
# Deny warns here as a catch-all and because some commands (e.g. cargo build) don't accept `--deny warnings`
# but also deny them on all individual cargo invocations where available because:
# 1) Some commands might not support rustflags (e.g. clippy didn't at first, cargo doc uses a different var, ...)
# 2) People might copy paste the commands into CI where this flag is missing without noticing.
RUSTFLAGS: --deny warnings
jobs:
tests:
name: Tests CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
# For reference: https://github.com/actions/virtual-environments#available-environments
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- name: Install linux deps
if: ${{ matrix.os == 'ubuntu-latest' }}
# Note that for running your Fyrox game on CI, you might need additinal deps like libxkbcommon-x11 and OpenGL
# and you might need to run it using xvfb-run even in headless mode.
run: |
sudo apt-get update # Run update first or install might start failing eventually.
sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev pkg-config xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libdbus-1-dev
- run: rustc --version && cargo --version
- name: Build and test
env:
RUSTFLAGS: -C prefer-dynamic=yes
run: |
cargo build --verbose --workspace --all-targets --all-features --profile github-ci
cargo test --verbose --workspace --all-features --profile github-ci
wasm:
name: Wasm CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [ stable ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- run: rustc --version && cargo --version
- name: Build
# Build only fyrox package here, because there's fyrox-dylib package which cannot be compiled on wasm.
run: |
cargo build --verbose --target=wasm32-unknown-unknown --package fyrox
format:
name: Rustfmt CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use rust-toolchain because GHA tends to still have an old version for a few days after a new Rust release.
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- run: cargo fmt --version
- run: cargo fmt -- --check
clippy:
name: Clippy CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use rust-toolchain because GHA tends to still have an old version for a few days after a new Rust release.
- uses: dtolnay/rust-toolchain@stable
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- name: Install linux deps
run: |
sudo apt-get update # Run update first or install might start failing eventually.
sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev pkg-config xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libdbus-1-dev
- run: rustup component add clippy
- run: cargo clippy --version
# Using --all-targets to also check tests and examples.
# Note that technically --all-features doesn't check all code when something is *disabled* by a feature.
- run: cargo clippy --workspace --all-targets --all-features -- --deny warnings
docs:
name: Documentation CI
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# Caching must be after toolchain selection
- uses: Swatinem/rust-cache@v2
- run: rustc --version && cargo --version
- name: Build Docs
run: cargo doc --all-features
env:
RUSTDOCFLAGS: --deny warnings
template_pc:
name: Project Template (PC)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cargo build --package editor
template_android:
name: Project Template (Android)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 10406996
- run: sdkmanager tools "platforms;android-30"
- uses: nttld/setup-ndk@v1
with:
ndk-version: r26
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
cargo install cargo-apk
rustup target add armv7-linux-androideabi
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cargo-apk apk build --package executor-android --target armv7-linux-androideabi
template_wasm:
name: Project Template (WASM)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Tools
run: |
cargo install fyrox-template --path=template --force
cargo install wasm-pack
rustup target add wasm32-unknown-unknown
- name: Generate and Build Projects
run: |
cd ../
fyrox-template init --name test_project --style=3d
cd test_project
fyrox-template upgrade --version=latest --local
cd executor-wasm
wasm-pack build --target=web
project_manager:
name: Project Manager
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build Project Manager
run: |
cargo build --package fyrox-project-manager
+114
View File
@@ -0,0 +1,114 @@
/target
**/*.rs.bk
/cloc
*.lock
*.log
/*.png
/examples/data/lightmaps
/save.bin
/examples/data/lightmap_scene.rgs
/fyrox-resource/test.txt
/fyrox-core-derive/test_output
/fyrox-impl/test_output
/fyrox-impl/test_restore_integrity
history.bin
settings.ron
/template-core/*.version
# Nix/NixOS
.direnv/
.envrc
!flake.lock
# from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# from https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore:
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Resource Metadata
*.meta
*.registry
.DS_Store
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/workspace.xml
+6
View File
@@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors.&#10;&#10;Permission is hereby granted, free of charge, to any person obtaining a copy&#10;of this software and associated documentation files (the &quot;Software&quot;), to deal&#10;in the Software without restriction, including without limitation the rights&#10;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&#10;furnished to do so, subject to the following conditions:&#10;&#10;The above copyright notice and this permission notice shall be included in all&#10;copies or substantial portions of the Software.&#10;&#10;THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&#10;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&#10;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&#10;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&#10;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&#10;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE&#10;SOFTWARE." />
<option name="myName" value="MIT" />
</copyright>
</component>
+11
View File
@@ -0,0 +1,11 @@
<component name="CopyrightManager">
<settings>
<module2copyright>
<element module="All" copyright="MIT" />
</module2copyright>
<LanguageOptions name="Rust">
<option name="fileTypeOverride" value="3" />
<option name="block" value="false" />
</LanguageOptions>
</settings>
</component>
+6
View File
@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="RsBorrowChecker" enabled="false" level="ERROR" enabled_by_default="false" />
</profile>
</component>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/rg3d-core.iml" filepath="$PROJECT_DIR$/.idea/rg3d-core.iml" />
</modules>
</component>
</project>
+61
View File
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../rg3d-core/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../rg3d-core/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../rg3d-core/benches" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-core/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-physics/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-sound/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-sound/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-ui/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-property/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/examples/wasm/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-core-derive/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-core-derive/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/rg3d-resource/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/editor/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-core-derive/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-core-derive/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-core/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-resource/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-sound/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-sound/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-ui/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/examples/scripting/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/executor/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/editor-standalone/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/template/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-scripts/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-animation/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-prefab/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-graph/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-math/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/editor-dylib/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-dylib/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-bridge/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-impl/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/project-manager/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/template-core/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-graphics/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-build-tools/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-texture/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-autotile/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-resource/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-material/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-shader/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-graphics-gl/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/editor-automated-tests/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fyrox-build-tools-cli/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/examples/wasm/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+794
View File
@@ -0,0 +1,794 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'it'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=it",
"--package=fyrox-core-derive"
],
"filter": {
"name": "it",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_core'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-core"
],
"filter": {
"name": "fyrox_core",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_math'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-math"
],
"filter": {
"name": "fyrox_math",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_sound'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-sound"
],
"filter": {
"name": "fyrox_sound",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'hrtf'",
"cargo": {
"args": [
"build",
"--example=hrtf",
"--package=fyrox-sound"
],
"filter": {
"name": "hrtf",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'hrtf'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=hrtf",
"--package=fyrox-sound"
],
"filter": {
"name": "hrtf",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'listener'",
"cargo": {
"args": [
"build",
"--example=listener",
"--package=fyrox-sound"
],
"filter": {
"name": "listener",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'listener'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=listener",
"--package=fyrox-sound"
],
"filter": {
"name": "listener",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'play_sound'",
"cargo": {
"args": [
"build",
"--example=play_sound",
"--package=fyrox-sound"
],
"filter": {
"name": "play_sound",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'play_sound'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=play_sound",
"--package=fyrox-sound"
],
"filter": {
"name": "play_sound",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'play_spatial_sound'",
"cargo": {
"args": [
"build",
"--example=play_spatial_sound",
"--package=fyrox-sound"
],
"filter": {
"name": "play_spatial_sound",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'play_spatial_sound'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=play_spatial_sound",
"--package=fyrox-sound"
],
"filter": {
"name": "play_spatial_sound",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'raw_samples'",
"cargo": {
"args": [
"build",
"--example=raw_samples",
"--package=fyrox-sound"
],
"filter": {
"name": "raw_samples",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'raw_samples'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=raw_samples",
"--package=fyrox-sound"
],
"filter": {
"name": "raw_samples",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'raw_streaming'",
"cargo": {
"args": [
"build",
"--example=raw_streaming",
"--package=fyrox-sound"
],
"filter": {
"name": "raw_streaming",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'raw_streaming'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=raw_streaming",
"--package=fyrox-sound"
],
"filter": {
"name": "raw_streaming",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'reverb'",
"cargo": {
"args": [
"build",
"--example=reverb",
"--package=fyrox-sound"
],
"filter": {
"name": "reverb",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'reverb'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=reverb",
"--package=fyrox-sound"
],
"filter": {
"name": "reverb",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'streaming'",
"cargo": {
"args": [
"build",
"--example=streaming",
"--package=fyrox-sound"
],
"filter": {
"name": "streaming",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'streaming'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=streaming",
"--package=fyrox-sound"
],
"filter": {
"name": "streaming",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug example 'write_wav'",
"cargo": {
"args": [
"build",
"--example=write_wav",
"--package=fyrox-sound"
],
"filter": {
"name": "write_wav",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in example 'write_wav'",
"cargo": {
"args": [
"test",
"--no-run",
"--example=write_wav",
"--package=fyrox-sound"
],
"filter": {
"name": "write_wav",
"kind": "example"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_resource'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-resource"
],
"filter": {
"name": "fyrox_resource",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_ui'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-ui"
],
"filter": {
"name": "fyrox_ui",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_animation'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-animation"
],
"filter": {
"name": "fyrox_animation",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_graph'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-graph"
],
"filter": {
"name": "fyrox_graph",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_texture'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-texture"
],
"filter": {
"name": "fyrox_texture",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_scripts'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-scripts"
],
"filter": {
"name": "fyrox_scripts",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox"
],
"filter": {
"name": "fyrox",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_dylib'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-dylib"
],
"filter": {
"name": "fyrox_dylib",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_impl'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-impl"
],
"filter": {
"name": "fyrox_impl",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_autotile'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-autotile"
],
"filter": {
"name": "fyrox_autotile",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_graphics'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-graphics"
],
"filter": {
"name": "fyrox_graphics",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyroxed_base'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyroxed_base"
],
"filter": {
"name": "fyroxed_base",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_build_tools'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-build-tools"
],
"filter": {
"name": "fyrox_build_tools",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'fyroxed'",
"cargo": {
"args": [
"build",
"--bin=fyroxed",
"--package=fyroxed"
],
"filter": {
"name": "fyroxed",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'fyroxed'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=fyroxed",
"--package=fyroxed"
],
"filter": {
"name": "fyroxed",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'fyrox_template_core'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=fyrox-template-core"
],
"filter": {
"name": "fyrox_template_core",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'fyrox-template'",
"cargo": {
"args": [
"build",
"--bin=fyrox-template",
"--package=fyrox-template"
],
"filter": {
"name": "fyrox-template",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'fyrox-template'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=fyrox-template",
"--package=fyrox-template"
],
"filter": {
"name": "fyrox-template",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'fyrox-project-manager'",
"cargo": {
"args": [
"build",
"--bin=fyrox-project-manager",
"--package=fyrox-project-manager"
],
"filter": {
"name": "fyrox-project-manager",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'fyrox-project-manager'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=fyrox-project-manager",
"--package=fyrox-project-manager"
],
"filter": {
"name": "fyrox-project-manager",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
+19
View File
@@ -0,0 +1,19 @@
{
"rust-analyzer.diagnostics.disabled": [
"mismatched-arg-count"
],
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"[markdown]": {
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
},
"[rust]": {
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
}
}
+331
View File
@@ -0,0 +1,331 @@
# Architecture
** WORK IN PROGRESS **
This document describes high-level architecture and basic concepts of Fyrox. It should help you to understand
basics of the engine's architecture and find a right place for your modifications.
## Overview
Fyrox is a monolithic game engine with very few replaceable parts. This means that Fyrox itself has relatively
strong coupling between modules. However, some of its parts can be used as standalone crates - core, UI and
sound are independent of the engine. Internal coupling is one-way in most of the places, this means that, for
instance, a renderer **is** dependent on a scene, but scene does **not** know anything about the renderer.
This fact makes changes in the engine very easy even for beginners.
Fyrox consists of the four crates - fyrox-core, fyrox-sound, fyrox-ui, and Fyrox itself. fyrox-core, fyrox-sound and
fyrox-ui are **standalone** crates and can be used separately, the only place where these three are meet is the
Fyrox. Previously each crate had a separate repository, but then I decided to put everything in single repository
because it was too much of a pain to build any project that uses the engine.
Another important fact is that Fyrox **does not** use ECS, instead it uses generational arenas (pools in Fyrox's
terminology) for efficient memory management (fast allocation/deallocation, CPU cache efficiency). This means
that you are working with good old structures which are placed in contiguous memory block (pool). Once an
object was placed in a pool, you get a handle to the object which can be used to access (borrow) the object
when you need. Such approach allows you to make any relations between the objects - handle is just a pair of
numbers, it won't cause issues with borrow checker. For more info check
[pool.rs](https://github.com/FyroxEngine/Fyrox/blob/master/fyrox-core/src/pool.rs).
### Core
Core contains some of very common algorithms and data structures that are used across other parts of the engine.
It contains linear algebra, accelerating structures, color-space functions, etc. In other words it contains
"building blocks" that are very widely used across other parts of the engine.
### Renderer
Fyrox uses a combination of deferred + forward renderers. The deferred renderer is used to render opaque objects,
when the forward renderer is used to render transparent objects. The renderer provides lots of very common
graphical effects. The renderer is suitable for most of the needs, however it is not flexible enough yet and
there is no way of using custom shaders yet.
### User Interface
Fyrox uses custom user interface library. It is node-based, has very powerful layout system, uses messages
to communicate between widgets, supports styling. The library has 30+ widgets (including docking manager,
windows, file browsers, etc). Please keep in mind that the library does not render anything, instead it
just prepares a set of drawing commands which can be used with any kind of renderer - a software (GDI for
instance) or a hardware (OpenGL, DirectX, Vulkan, Metal, etc.).
### Sound
Fyrox uses software sound engine [fyrox-sound](https://github.com/FyroxEngine/Fyrox/tree/master/fyrox-sound).
The sound engine provides support for binaural sound rendering using HRTF, which gives excellent sound
spatialization.
## Code Map
Code map should help you find a right place for your modifications. This is the most boring part of the
document, here is the table of contents for your comfort:
- [fyrox-core](#fyrox-core)
- [math](#mathmodrs)
- [fyrox-ui](#fyrox-ui)
- [widgets](#borderrs)
- [fyrox-sound](#fyrox-sound)
- [buffer](#buffermodrs)
- [decoder](#decodermodrs)
- [device](#devicemodrs)
- [Fyrox](#fyrox)
### fyrox-core
As it was already said up above, fyrox-core is just a set of useful algorithms. If you want to add a thing
that will be used in dependent crates then you're in the right place. Here is the very brief description
of each module.
#### math/mod.rs
The module contains some intersection check algorithms, vector projection methods (tri-planar mapping for
example), generic rectangle struct, and other stuff that cannot be easily classified.
#### math/aabb.rs
The module contains Axis-Aligned Bounding Box (AABB) structure. It is used as a bounding volume to accelerate
spatial checks (like ray casting, coarse intersection checks, etc).
#### math/frustum.rs
The module contains Frustum structure. Its purpose (in the project) is to perform visibility checks - for
example camera is using frustum culling to determine which objects must be rendered on screen.
#### math/plane.rs
The module contains Plane structure that basically represents just plane equation. Planes are used for
intersection tests.
#### math/ray.rs
The module contains Ray structure which is used for intersection tests. For example the engine uses rays
in lightmapper to do ray tracing to calculate shadows.
#### math/triangulator.rs
The module contains a set of triangulation algorithms for polygon triangulation. There are two algorithms:
simple one is for quadrilaterals, and generic one is the ear-clipping algorithm. The stuff from the module is
used to triangulate polygons in 3d models to make them suitable to render on GPU.
#### color.rs
The module contains structure and methods to work with colors in HSV and RGB color spaces, and to convert
colors HSV <-> RGB.
#### color_gradient.rs
The module contains simple linear color gradient with multiple points. It is widely used in particle systems
to change color of particles over time. For example a spark starts from white color and becomes more red over
time and finally becomes black.
#### lib.rs
The module contains BiDirHashMap and very few other algorithms.
#### numeric_range.rs
The module contains fool-proof numeric range - there is no way to create a range with incorrect bounds - bounds
will be determined at the sampling moment.
#### octree.rs
The module contains Octree acceleration structure which is used to accelerate ray casting, point-probing,
box intersection tests and so on.
#### pool.rs
The module contains the heart of the engine: pool is one of the most commonly used structure in the engine.
Its purpose is to provide a storage for objects of a type in a contiguous block of memory. Any object
can be accessed later by a handle. Handles are some sort of indices, but with additional information that
is used to check if handle is valid.
#### profiles.rs
The module contains a simple intrusive profiler. It uses special macro (scope_profile!()) to time a scope.
#### rectpack.rs
The module contains rectangle packing algorithm (most commonly known as "bin-packing problem"). It is used
to create texture atlases.
#### visitor.rs
The module contains node-based serializer/deserializer (visitor). Everything in the engine serialized by
this serializer. It supports serialization of basic types, many std types (including
Rc/Arc) and user-defined types.
### fyrox-ui
fyrox-ui is a standalone, graphics API-agnostic, node-based, general-purpose user interface library.
#### lib.rs
The module contains UserInterface structure and Control trait.
#### border.rs
The module contains Border widget which is basically just a rectangle with variable width of borders, and
an ability to be a container for child widgets.
#### brush.rs
The module contains Brush structure which describes a way of drawing graphics primitives.
#### button.rs
The module contains Button widget and its builder.
#### canvas.rs
The module contains Canvas widget and its builder. Canvas is a simple container for child widgets,
it allows setting position of children widgets directly.
#### check_box.rs
The module contains CheckBox widget and its builder. CheckBox is a three-state (checked, unchecked,
undefined) switch.
#### color.rs
The module contains widgets to work with colors and their builders. There are separate widgets to change
hue, saturation, brightness and compound color selector widget.
#### decorator.rs
The module contains Decorator widget and its builder. Decorator is a simple container for child widgets,
it has built-in behaviour for most common actions: it changes appearance when mouse enters or leaves bounds,
when user clicks on it, etc.
#### dock.rs
The module contains DockingManager and Tile widgets and their builders. Docking manager is able to combine
multiple Window widgets in its tiles, each tile can be resized, docked or undocked. This is the must-have
widget for any kind of editor.
#### draw.rs
The module is responsible for "drawing". It is in quotes, because it does not actually draw anything, it just
emits drawing commands in a queue for later interpretation.
#### dropdown_list.rs
The module contains DropdownList widget and its builder. DropdownList is a small field that shows selected
item and a "popup" that contains list of items.
#### expander.rs
The module contains Expander widget and its builder. Expander is a collapsable container for child widgets
with a field that describes a content.
#### file_browser.rs
The module contains a set of widgets that displays file system. FileBrowser widget is a simple file system
tree, FileSelector is a window with FileBrowser and few buttons.
#### formatted_text.rs
The module is responsible for text formatting and "rendering". The latter is in quotes, because the library
just uses glyph info from a font to layout each glyph in a line of text with word wrapping and other
useful features (like text size calculation, etc).
#### grid.rs
The module contains Grid widget and its builder. Grid is a powerful layout widget, it allows arranging child
widgets in a series of rows and columns.
#### image.rs
The module contains Image widget and its builder. Image is a simple rectangle with a texture.
#### list_view.rs
The module contains ListView widget and its builder. ListView is a container for items which arranged
as a stack. ListView supports item selection.
#### menu.rs
The module contains menu widgets. Menu here means a classic menu which is a strip with root items and a
set of child sub-menus.
#### message.rs
The module contains all supported messages for every widget in the library.
#### messagebox.rs
#### node.rs
#### numeric.rs
#### popup.rs
#### progress_bar.rs
#### scroll_bar.rs
#### scroll_panel.rs
#### scroll_viewer.rs
#### stack_panel.rs
#### tab_control.rs
#### text.rs
#### tree.rs
#### ttf.rs
#### utils.rs
#### vec.rs
#### vector_image.rs
#### widget.rs
#### window.rs
#### wrap_panel.rs
### fyrox-sound
fyrox-sound is a standalone sound engine with multiple renderers and high-quality sound. The sound engine
provides support for binaural sound rendering using HRTF, which gives excellent sound spatialization.
#### buffer/mod.rs
#### buffer/generic.rs
#### buffer/streaming.rs
#### decoder/mod.rs
#### decoder/vorbis.rs
#### decoder/wav.rs
#### device/mod.rs
#### device/alsa.rs
#### device/coreaudio.rs
#### device/dsound.rs
#### device/dummy.rs
### Fyrox
The engine itself. It has: a renderer, resource manager, animations, scenes, and various utilities like
lightmapper, uv-mapper, navigation mesh, logger, pathfinder.
#### animation/mod.rs
#### animation/machine/mod.rs
#### animation/machine/blend_nodes.rs
#### engine/mod.rs
#### engine/error.rs
#### engine/resource_manager.rs
#### renderer/mod.rs
#### renderer/framework/mod.rs
#### renderer/framework/framebuffer.rs
#### renderer/framework/geometry_buffer.rs
+3068
View File
File diff suppressed because it is too large Load Diff
+74
View File
@@ -0,0 +1,74 @@
# Contributors guidelines
This document explains how to contribute to the engine. Keep in mind that this is not a "must-obey" list; use common
sense when contributing something to the engine.
## How to contribute
- **Code** — writing code is the most obvious way of contribution. You can add missing features, fix bugs, improve
existing tools, etc. See the [code section](#contributing-code) for more info.
- **Documentation** — documentation is the next place where you can contribute, this engine is already quite big and
there's a bunch of undocumented code. If you're familiar with some undocumented API, don't hesitate — write
documentation for it. You will save a lot of time for the next people who will be using this API and they will be
grateful that the docs exists.
See the [documentation section](#contributing-documentation) for more info.
- **Make games** — the best way to understand what's missing or needs to be improved is by making games using the
engine. When you find something missing or can be improved, don't hesitate — create an issue in this repository and
may be somebody will spot this issue and fix it. Filing issues is always good, it clearly shows that there's something
wrong and people can track the progress.
- **Report bugs** — if something does not work as it should, file an issue about it so the problem will be clear. Any
software has edge cases; that could be hidden for a long time, until you need to do something non-trivial.
- **Donation** — if you don't have any time to write the code or docs, and you want to see the project alive, you should
consider donating any amount of money to the developers of the engine.
- **Promote the engine** - write posts, make videos, share news about the engine on social media and so on.
## Contributing code
Common rules for code contributions:
- **Keep code clean** — name your variables and functions meaningfully. Try to not create god-like functions that
handle everything at once. Always compile your code before making a pull request.
- **Write documentation** — document your code. It should explain what the code does at high level. Do not include low
level details in your documentation (unless you need to explain something, that is very important).
- **Format your code** — use `rustfmt` to format the code you're writing.
- **Write unit tests** — if you're adding new functionality to the engine, make sure to write unit tests for it. It is
not always possible to write meaningful unit tests — for example, graphics can hardly be tested this way. In this
case, make sure to thoroughly test your code manually.
- **Describe your code** — it is important to explain why you wrote the code and what it does. Do not create pull
requests with description like: `fixed bug`, `added stuff`, etc. It does not help anyone, instead write a proper
description.
- **License** — include the content of `LICENSE.md` file at the top of any new source code file. Every line must be
start from `// ` (two slashes with a space after them). You can add your own copyright line with dates, but you must
keep the license unchanged (MIT).
- **No AI-generated slop** - Fyrox is a handcrafted game engine, there's no place for AI-generated code. All pull
requests suspected in AI generation won't be accepted. If you want to extend the engine functionality with
AI-generated code, then create your own plugin as a separate crate.
When you're writing something for the editor, you can run its standalone version using `fyroxed` package like so:
```shell
cargo run --package fyroxed --profile=editor-standalone
```
This way the editor will run without any plugins, and you can test your changes quickly without a need to create a
project and test there.
Sometimes there's a need to have a scene for testing, loading the same scene everytime is very tedious and boring.
So the standalone editor has command line arguments that can be used to specify the list of scenes for loading:
```shell
cargo run --package fyroxed --profile editor-standalone -- --scenes data/unnamed.rgs --project-directory .
```
This script loads the scene `unnamed.rgs` right after the start with the last editor's camera location.
## Contributing documentation
Common rules for documentation contributions:
- **Write everything in English** — official API documentation and [the book](https://fyrox-book.github.io/) written in
English. If you want to create a translation for the book, you should create your own repository.
- **Add code examples** — code snippets helps other developers to quickly understand how to use a function/method.
- **Use spell checker** — keep the docs clean and readable.
- **Expertise** — make sure that you understand the thing you're writing the docs for. Shallow docs are usually
misleading, and sometimes they're even worse, than no documentation at all.
+48
View File
@@ -0,0 +1,48 @@
[workspace]
members = [
"fyrox-core-derive",
"fyrox-core",
"fyrox-sound",
"fyrox-ui",
"fyrox-resource",
"fyrox-scripts",
"fyrox-animation",
"editor",
"editor-standalone",
"template-core",
"template",
"fyrox-graph",
"fyrox-math",
"fyrox-dylib",
"fyrox",
"fyrox-impl",
"project-manager",
"fyrox-graphics",
"fyrox-build-tools",
"fyrox-texture",
"fyrox-autotile",
"fyrox-material",
"fyrox-graphics-gl"]
resolver = "2"
[profile.editor-standalone]
inherits = "dev"
opt-level = 1
[profile.release]
opt-level = 3
debug = true
[profile.project-manager]
inherits = "release"
opt-level = "z"
debug = false
strip = true
panic = "abort"
lto = true
[profile.github-ci]
inherits = "dev"
strip = "symbols"
debug = false
opt-level = 3
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+62
View File
@@ -0,0 +1,62 @@
<div align="center">
<a href="https://fyrox.rs/">
<img src="pics/logo.png" width="128" height="128" alt="Fyrox" />
</a>
<h1>Fyrox - a modern Rust game engine</h1>
</div>
[![License (MIT)](https://img.shields.io/crates/l/fyrox)](https://github.com/FyroxEngine/Fyrox/blob/master/LICENSE.md)
[![CI Status](https://github.com/FyroxEngine/Fyrox/actions/workflows/ci.yml/badge.svg)](https://github.com/FyroxEngine/Fyrox/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/fyrox)](https://crates.io/crates/fyrox)
[![docs.rs](https://img.shields.io/badge/docs-website-blue)](https://docs.rs/Fyrox/)
[![Discord](https://img.shields.io/discord/756573453561102427)](https://discord.gg/xENF5Uh)
[![Lines of code](https://tokei.rs/b1/github/FyroxEngine/Fyrox)](https://github.com/FyroxEngine/Fyrox)
A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.
_Formerly known as rg3d_
## [Learning materials](https://fyrox-book.github.io/)
[Read the official Fyrox book here.](https://fyrox-book.github.io/) It contains comprehensive information about many aspects of the engine, starting
by "how to build" and ending by various tutorials.
## Community
You can always ask your question in Discord server - [Join the Discord server](https://discord.gg/xENF5Uh), or directly in
[Discussions](https://github.com/FyroxEngine/Fyrox/discussions).
## Examples
You can run examples directly in your web browser, the full list of demo projects is [available here](https://fyrox.rs/examples.html).
Source code for each demo project [can be found here](https://github.com/FyroxEngine/Fyrox-demo-projects).
## Support
If you want to support the development of the project, click the link below. Preferrable way is to use [Boosty](https://boosty.to/fyrox) - this way the money
will be available for the development immediately. Alternatively you can can use [Patreon](https://www.patreon.com/mrdimas), but in this case the money will
be on-hold for unknown period of time ([details are here](https://github.com/FyroxEngine/Fyrox/issues/363)).
## Contributing
Contributions are very welcome! See the [contributions guidelines](CONTRIBUTING.md) for more info. Check the [good first issue](https://github.com/FyroxEngine/Fyrox/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label to
see where you can help.
## Sponsors
The engine is supported by very generous people, their donations provides sustainable development of the engine:
[Brandon Thomas](https://www.patreon.com/user?u=34951681) | [Taylor C. Richberger](https://www.patreon.com/user/creators?u=60141723) | [Avery Wagar](https://www.patreon.com/user?u=41863848) |
[George Atkinson](https://www.patreon.com/user?u=61771027) | [Erlend Sogge Heggen](https://www.patreon.com/amethystengine/creators) | [Mitch Skinner](https://www.patreon.com/user/creators?u=60141723) | [ozkriff](https://www.patreon.com/ozkriff) | [Taylor Gerpheide](https://www.patreon.com/user/creators?u=32274918) |
[zrkn](https://www.patreon.com/user/creators?u=23413376) | [Aleks Row](https://www.patreon.com/user/creators?u=51907853) | [Edward L](https://www.patreon.com/user/creators?u=53507198) | [L.apz](https://www.patreon.com/user/creators?u=5448832) | [Luke Jones](https://www.patreon.com/flukejones) | [toyboot4e](https://www.patreon.com/user/creators?u=53758973) | [Vish Vadlamani](https://www.patreon.com/user/creators?u=42768509) |
[Alexey Kuznetsov](https://www.patreon.com/user?u=39375025) | [Daniel Simon](https://www.patreon.com/user/creators?u=43754885) | [Jesper Nordenberg](https://www.patreon.com/jesnor) | [Kornel](https://www.patreon.com/user?u=59867) | [Parham Gholami](https://www.patreon.com/user?u=33009238) | [Yuki Ishii](https://www.patreon.com/user/creators?u=9564103) |
[Joseph Catrambone](https://www.patreon.com/user?u=4738580) | [MGlolenstine](https://github.com/MGlolenstine) | [zamar lomax](https://www.patreon.com/user?u=65928523) | [Gheorghe Ugrik](https://www.patreon.com/user?u=54846813) |
[Anton Zelenin](https://www.patreon.com/user?u=62378966) | [Barugon](https://www.patreon.com/user?u=11344465) | [Tom Leys](https://www.patreon.com/user?u=222856) | [Jay Sistar](https://www.patreon.com/user?u=284041) | [tc](https://www.patreon.com/user?u=11268466) | [false](https://www.patreon.com/user?u=713537) | [BlueSkye](https://www.patreon.com/EmotionalSnow) |
[Ben Anderson](https://www.patreon.com/user/creators?u=14436239) | [Thomas](https://www.patreon.com/user?u=317826) | [Iulian Radu](https://www.patreon.com/user?u=8698230) | [Vitaliy (ArcticNoise) Chernyshev](https://www.patreon.com/user?u=2601918)
### JetBrains
JetBrains provided an open-source all-products license for their products which drastically helps in development of the engine.
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" alt="JetBrains logo." width="200" height="200">
_Copyright © 2000-2021 [JetBrains](https://jb.gg/OpenSource) s.r.o. JetBrains and the JetBrains logo are registered trademarks of JetBrains s.r.o._
+7
View File
@@ -0,0 +1,7 @@
# WeHub 来源说明
- 原始项目:`FyroxEngine/Fyrox`
- 原始仓库:https://github.com/FyroxEngine/Fyrox
- 导入方式:上游默认分支的最新快照
- 原作者、版权和许可证信息以原始仓库及本仓库 LICENSE 为准
- 本文件仅用于记录来源,不代表 WeHub 是原项目作者
+18
View File
@@ -0,0 +1,18 @@
[package]
name = "fyroxed"
version = "2.0.0-rc.1"
license = "MIT"
authors = ["Dmitry Stepanov <d1maxa@yandex.ru>"]
edition = "2021"
rust-version = "1.94"
description = "A standalone scene editor for Fyrox game engine"
homepage = "https://github.com/FyroxEngine/Fyrox"
keywords = ["fyrox", "editor", "rust"]
repository = "https://github.com/FyroxEngine/Fyrox"
readme = "README.md"
include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"]
[dependencies]
fyrox = { version = "2.0.0-rc.1", path = "../fyrox" }
fyroxed_base = { version = "2.0.0-rc.1", path = "../editor" }
clap = { version = "4", features = ["derive"] }
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Dmitry Stepanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+41
View File
@@ -0,0 +1,41 @@
# FyroxEd (standalone)
**WARNING:** Standalone version of the editor is not supported, use
[project template generator](https://fyrox-book.github.io/fyrox/beginning/scripting.html) to utilize the full power
of the editor. Standalone version does not support plugins and scripts, it won't be update in next releases!
A standalone version of FyroxEd - native editor of [Fyrox engine](https://github.com/FyroxEngine/Fyrox). The standalone
version allows you only to create and edit scenes, but **not run your game in the editor**. Please see
[the book](https://fyrox-book.github.io/) to learn how to use the editor in different ways.
## How to install and run
To install the latest stable **standalone** version from crates.io use:
```shell
cargo install fyroxed
```
After that, you can run the editor by simply calling:
```shell
fyroxed
```
If you're on Linux, please make sure that the following dependencies are installed:
```shell
sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev libxcb1-dev libxkbcommon-dev libasound2-dev
```
## Controls
- [Click] - Select
- [W][S][A][D] - Move camera
- [Space][Q]/[E] - Raise/Lower Camera
- [1] - Select interaction mode
- [2] - Move interaction mode
- [3] - Scale interaction mode
- [4] - Rotate interaction mode
- [Ctrl]+[Z] - Undo
- [Ctrl]+[Y] - Redo]()
+61
View File
@@ -0,0 +1,61 @@
// Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
use clap::Parser;
use fyrox::core::log::Log;
use fyrox::event_loop::EventLoop;
use fyroxed_base::{Editor, StartupData};
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Project root directory
#[arg(short, long)]
project_directory: Option<String>,
/// List of scenes to load
#[arg(short, long)]
scenes: Option<Vec<String>>,
#[arg(short, long)]
named_objects: bool,
}
fn main() {
Log::set_file_name("fyrox.log");
let args = Args::parse();
let startup_data = if let Some(proj_dir) = args.project_directory {
Some(StartupData {
working_directory: proj_dir.into(),
scenes: args
.scenes
.unwrap_or_default()
.iter()
.map(Into::into)
.collect(),
named_objects: args.named_objects,
})
} else {
None
};
Editor::new(startup_data).run(EventLoop::new().unwrap())
}
+11
View File
@@ -0,0 +1,11 @@
/target
**/*.rs.bk
*.lock
.idea
/*.log
/*.txt
*.rgs
/data
history.bin
/settings.ron
/AutomatedTests
+36
View File
@@ -0,0 +1,36 @@
[package]
name = "fyroxed_base"
license = "MIT"
version = "2.0.0-rc.1"
authors = ["Dmitry Stepanov <d1maxa@yandex.ru>"]
edition = "2021"
rust-version = "1.94"
description = "A scene editor for Fyrox game engine"
homepage = "https://github.com/FyroxEngine/Fyrox"
keywords = ["fyrox", "editor", "rust"]
repository = "https://github.com/FyroxEngine/Fyrox"
readme = "README.md"
include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/resources/**/*"]
[dependencies]
fyrox = { version = "2.0.0-rc.1", path = "../fyrox", default-features = false }
fyrox-build-tools = { version = "2.0.0-rc.1", path = "../fyrox-build-tools" }
ron = "0.11"
serde = { version = "1", features = ["derive"] }
toml = { version = "0.9", default-features = false, features = ["parse"] }
toml_edit = "0.23"
strum = "0.27"
strum_macros = "0.27"
open = "5"
opener = { version = "0.8", default-features = false, features = ["reveal"] }
rust-fuzzy-search = "0.1.1"
cargo_metadata = "0.22"
serde_json = { version = "1", features = ["raw_value", "default", "std", "unbounded_depth"] }
image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] }
imageproc = "0.25.0"
notify = "8"
bitflags = "2.9.1"
[features]
default = ["fyrox/default"]
dylib_engine = ["fyrox/dylib"]
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Dmitry Stepanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+6
View File
@@ -0,0 +1,6 @@
# FyroxEd
Full-featured editor for [Fyrox engine](https://github.com/FyroxEngine/Fyrox). This is the basic library for the editor,
it cannot be run as executable. See `editor-standalone` for this.
The main purpose of making the editor library is to use it with static plugins, see `scripting` example for more info.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More