-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
Reorganize project files Separate out editor scripts into a different directory
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
release: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Semantic Release | ||
id: semantic | ||
uses: cycjimmy/[email protected] | ||
with: | ||
extra_plugins: | | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create UPM branch | ||
run: | | ||
git branch -d upm &> /dev/null || echo upm branch not found | ||
git subtree split -P "$PKG_ROOT" -b upm | ||
git checkout upm | ||
if [[ -d "Samples" ]]; then | ||
git mv Samples Samples~ | ||
rm -f Samples.meta | ||
git config --global user.name 'github-bot' | ||
git config --global user.email '[email protected]' | ||
git commit -am "fix: Samples => Samples~" | ||
fi | ||
git push -f -u origin upm | ||
env: | ||
PKG_ROOT: "Assets/Adrenak.Tork" | ||
|
||
- name: Create UPM git tag | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
git tag $TAG upm | ||
git push origin --tags | ||
env: | ||
TAG: upm/v${{ steps.semantic.outputs.new_release_version }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"tagFormat": "v${version}", | ||
"plugins": [ | ||
["@semantic-release/commit-analyzer", { "preset": "angular" }], | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/changelog", { | ||
"preset": "angular", | ||
"changelogFile":"Assets/Adrenak.Tork/CHANGELOG.MD" | ||
}], | ||
["@semantic-release/npm", { | ||
"npmPublish": false, | ||
"pkgRoot":"Assets/Adrenak.Tork" | ||
}], | ||
["@semantic-release/git", { | ||
"assets": ["Assets/Adrenak.Tork/package.json", "Assets/Adrenak.Tork/CHANGELOG.md"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}], | ||
"@semantic-release/github" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using UnityEngine; | ||
|
||
namespace Adrenak.Tork { | ||
public class AckermannDebug : MonoBehaviour { | ||
[SerializeField] Ackermann target; | ||
|
||
void OnDrawGizmos() { | ||
if (target.drawLevel == DrawLevel.Always) | ||
Draw(); | ||
} | ||
|
||
void OnDrawGizmosSelected() { | ||
if (target.drawLevel == DrawLevel.OnSelected) | ||
Draw(); | ||
} | ||
|
||
void Draw() { | ||
UnityEditor.Handles.color = Color.cyan; | ||
|
||
if (target.FrontLeftWheel != null) { | ||
var angle = target.FrontLeftWheel.transform.localEulerAngles.y; | ||
var origin = target.FrontLeftWheel.transform.position; | ||
UnityEditor.Handles.DrawLine(origin, origin + Quaternion.AngleAxis(angle, Vector3.up) * transform.forward); | ||
} | ||
|
||
if (target.FrontRightWheel != null) { | ||
var angle = target.FrontRightWheel.transform.localEulerAngles.y; | ||
var origin = target.FrontRightWheel.transform.position; | ||
UnityEditor.Handles.DrawLine(origin, origin + Quaternion.AngleAxis(angle, Vector3.up) * transform.forward); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Adrenak.Tork.Editor", | ||
"references": [ | ||
"Adrenak.Tork.Runtime" | ||
], | ||
"optionalUnityReferences": [], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using UnityEngine; | ||
|
||
namespace Adrenak.Tork{ | ||
public class CenterOfMassAssignerDebug : MonoBehaviour { | ||
[SerializeField] CenterOfMassAssigner target; | ||
|
||
private void OnDrawGizmos() { | ||
Gizmos.color = Color.red; | ||
|
||
if (target.m_Point != null) | ||
Gizmos.DrawSphere(target.m_Point.position, .1f); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
|
||
namespace Adrenak.Tork { | ||
public class WheelDebug : MonoBehaviour { | ||
[SerializeField] Wheel target; | ||
|
||
void OnDrawGizmos() { | ||
Handles.color = Color.yellow; | ||
Handles.DrawWireDisc(transform.position, transform.right, target.radius); | ||
|
||
Handles.color = Color.red; | ||
var p1 = transform.position + transform.up * Wheel.k_RayStartHeight; | ||
var p2 = transform.position - transform.up * (target.GetRayLen() - Wheel.k_RayStartHeight); | ||
Handles.DrawLine(p1, p2); | ||
|
||
var pos = transform.position + (-transform.up * (target.GetRayLen() - Wheel.k_RayStartHeight - target.CompressionDistance - target.radius)); | ||
Handles.DrawWireDisc(pos, transform.right, target.radius); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Vatsal Ambastha | ||
|
||
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. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## Tork | ||
A vehicle system for Unity | ||
|
||
It is being developed for [Project Torque](https://forum.unity.com/threads/project-torque-offroad-racer-update-custom-wheel-colliders-and-physics.652135/#post-4379842). You can join its Discord server [here](https://discord.gg/bKp6VhX). | ||
|
||
## Modules | ||
- `Physics` | ||
[Demo video](https://www.youtube.com/watch?v=gso45Zg_Z_Q) | ||
Semi realistic/arcade vehicle physics. Features: | ||
1. Ackermann steering | ||
2. Motor and brake torque differential | ||
3. Anti-roll bar | ||
4. Mid-air steering | ||
5. Mid-air stabilization | ||
|
||
- `AI` | ||
Currently has a simple `AIPlayer` script that approaches a destination | ||
- `Effects` | ||
Coming soon | ||
- `Audio` | ||
Coming soon | ||
|
||
## Docs | ||
Coming soon | ||
|
||
## Forks | ||
For a DOTS implementation check out [@PragneshRathod901's fork](https://github.com/PragneshRathod901/Tork) | ||
|
||
## Contact | ||
[@github](https://www.github.com/adrenak) | ||
[@www](http://www.vatsalambastha.com) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.