Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Docfx implementation added #4

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/bepu-docs-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build Bepu Docs for GitHub Pages

env:
COMMON_SETTINGS_PATH: Documentation/docfx.json

on:
workflow_dispatch:

jobs:
publish-docs:
runs-on: windows-latest

steps:
- name: .NET SDK Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x

- name: Checkout Bepu
uses: actions/checkout@v4

- name: Install DocFX
# This installs the latest version of DocFX and may introduce breaking changes
# run: dotnet tool update -g docfx
# This installs a specific, tested version of DocFX.
run: dotnet tool update -g docfx --version 2.78.2

- name: Build Bepu API Docs
run: docfx metadata ${{ env.COMMON_SETTINGS_PATH }}

- name: Build Bepu Docs
run: docfx build ${{ env.COMMON_SETTINGS_PATH }}

- name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.COMMON_SETTINGS_PATH }}/_site
publish_branch: gh-pages
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,7 @@ ModelManifest.xml

# JetBrains Rider
.idea/

# DocFX API Generated Pages
Documentation/api/*
Documentation/_site/*
57 changes: 57 additions & 0 deletions Documentation/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
"metadata": [
{
"src": [
{
"src": "..",
"files": [
"BepuPhysics/BepuPhysics.csproj",
"BepuPhysics/BepuUtilities.csproj"
]
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"favicon.ico",
"favicon.png",
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern",
"template"
],
"fileMetadata": {
"_appTitle": {
"api/**/*.md": "Bepu API",
"api/**/*.yml": "Bepu API"
}
},
"globalMetadata": {
"_appName": "",
"_appTitle": "Bepu Docs",
"_appLogoPath": "images/bepuphysicslogo256.png",
"_enableSearch": true,
"pdf": false
}
}
}
4 changes: 4 additions & 0 deletions Documentation/docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Getting Started
href: ../GettingStarted.md
- name: Building
href: ../Building.md
Binary file added Documentation/favicon.ico
Binary file not shown.
25 changes: 25 additions & 0 deletions Documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
_disableToc: false
---

# Quick Start

The BepuPhysics and BepuUtilities libraries target .NET 8 and should work on any supported platform.

The physics engine heavily uses `System.Numerics.Vectors` types, so to get good performance, you'll need a compiler which can consume those types (like RyuJIT).

## Features

- Spheres, capsules, boxes, triangles, cylinders, and convex hulls
- Compounds of the above
- Meshes
- A [whole bunch of constraint types](BepuPhysics/Constraints/)
- [Newts](Demos/Demos/NewtDemo.cs)
- Linear and angular continuous collision detection
- Extremely low cost sleep states for resting bodies
- Efficient scene-wide ray and sweep queries
- [Character controller example](Demos/Demos/Characters/CharacterDemo.cs)
- At least somewhat extensible collision pipeline, with [example custom voxel collidable](Demos/Demos/CustomVoxelCollidableDemo.cs)
- Highly nonidiomatic APIs
- Super speediness
- And a bunch of other miscellaneous stuff!
5 changes: 5 additions & 0 deletions Documentation/template/public/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */

.navbar-brand #logo {
height: 56px;
}
17 changes: 17 additions & 0 deletions Documentation/template/public/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const app = {
languageDropdownCreated: false,
iconLinks: [
{
icon: 'github',
href: 'https://github.com/bepu/bepuphysics2',
title: 'GitHub'
},
{
icon: 'discord',
href: 'https://discord.gg/ssa2XpY',
title: 'Discord'
}
]
};

export default app;
4 changes: 4 additions & 0 deletions Documentation/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Docs
href: docs/
- name: API
href: api/
Loading