docs: add changelog to docs site

Closes: #1479
This commit is contained in:
bd_ 2025-03-13 19:33:54 -07:00
parent 45352296e9
commit c0f2f0731f
9 changed files with 136 additions and 1 deletions

22
.github/gen-docs-changelog.pl vendored Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/perl
use strict;
use warnings;
# We want to skip two sections - the main header, then up to the first version header.
# In a prerelease, we only want to skip the first section (not including the unreleased header)
if ($ENV{PRERELEASE} eq 'false') {
while (<>) {
if (/^\## /) { last; }
}
}
while (<>) {
if (/^## /) { print; last; }
}
while (<>) {
print;
}

View File

@ -23,6 +23,11 @@ on:
description: 'build the latest release'
type: boolean
required: false
prerelease:
description: 'use prerelease changelog'
type: boolean
required: false
default: true
jobs:
build-docs:
@ -67,6 +72,18 @@ jobs:
BASEURL="/${{ inputs.path }}/" perl -i -p -e "s{baseUrl: '/'}{baseUrl: '\$ENV{BASEURL}'}" docs~/docusaurus.config.js
cat docs~/docusaurus.config.js
- name: Format changelogs
run: |
SUFFIX=""
export PRERELEASE=${{ inputs.prerelease && 'true' || 'false' }}
if [ ${{ inputs.prerelease }} == true ]; then
SUFFIX="-PRERELEASE"
fi
perl -n .github/gen-docs-changelog.pl < CHANGELOG$SUFFIX.md >> docs~/docs/changelog.md
perl -n .github/gen-docs-changelog.pl < CHANGELOG$SUFFIX''-jp.md >> docs~/i18n/ja/docusaurus-plugin-content-docs/current/changelog.md
- name: Build docs
run: |
cd docs~

View File

@ -40,11 +40,13 @@ jobs:
build-docs:
name: Build documentation (latest release)
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@main
# TODO - update to build-docs.yml
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@docs-snapshot
needs:
- snapshot-docs
with:
ref: docs-snapshot
#prerelease: false TODO - uncomment once we release
build-docs-dev:
name: Build documentation (main branch)
@ -53,6 +55,7 @@ jobs:
ref: main
path: dev
artifact: docs-dev
prerelease: true
deploy-docs:
name: Deploy documentation

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- [#1497] CHANGELOGをドキュメンテーションサイトに追加
- [#1482] `Merge Animator` に既存のアニメーターコントローラーを置き換える機能を追加
- [#1481] [World Scale Object](https://m-a.nadena.dev/dev/ja/docs/reference/world-scale-object)を追加

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- [#1497] Added changelog to docs site
- [#1482] Added support for replacing pre-existing animator controllers to `Merge Animator`
- [#1481] Added [World Scale Object](https://m-a.nadena.dev/dev/docs/reference/world-scale-object)

8
design-docs~/mmd.md Normal file
View File

@ -0,0 +1,8 @@
Early pass: Identify top-three FX layers (update in Merge Animation if in replace mode)
- Merge Animation replace mode needs to be careful not to break RC! (TODO)
Late running pass:
Inject layer 0: Animate _MMD_NotActive to 1
If layers 1/2 are not part of the original FX: Insert dummy layers (empty motion)
Add layer (can this be a dummy layer?):
- If _MMD_NotActive is 0, drive the original 3 layers off (and back on when 1)
Opt-in: New state _machine_ behavior to control MMD behavior (opt in or opt out)

View File

@ -0,0 +1,71 @@
# Goals
* Single frame evaluation
* Parameter drivers
* Condition overrides
* Extensibility
* We need to support NDMF extensions adding new conditions, new reactions, and changing how existing reactions are
animated
* XDress as a sample case
## General concept: Object conditions
By default, the condition of an object is a boolean value determined by ANDing the object's active state, any condition
components on the object, and the condition of its parent.
The Condition Override component can be used to override this. If this component is present, the condition of the object
is replaced by the condition specified by the Condition Override component. This condition can specify an OR of (not)
ANDs, each of which can contain:
* A condition component
* A game object's active state
* A game object's _condition_ (including its parents)
## Evaluation
We need to convert these conditions into blend trees in the end. Generally, 1D or 2D freeform blend trees are used as
boolean primitives. Complex conditions may require multiple frames to evaluate, as a direct conversion would result
in a O(2^n) blend tree nodes; as such, we instead consider that an OR should be evaluated by adding up each of its
branches in an internal parameter, and in a subsequent frame operating based on whether that parameter is >= 1.
## Wavefronts
To avoid objects triggering at different times, we synchronize the state change of all related objects. A group of such
objects is called a _wave_, and a single evaluation is a _wavefront_. To construct a wave, we build an undirected graph
consisting of connections between gameobject _active state_ inputs, virtual nodes corresponding to condition components
and object conditions, and gameobjects animated by reactions. Then, each subgraph of this graph is a wave.
Within a wave, we arrange for all objects to respond with the same latency in frames. This is accomplished by adding
buffering stages to the decision blendtrees where needed. For gameobject _active state_ inputs, we convert them into
parameter driving curves, and then apply those curves to the object's active state after an appropriate delay.
Note: For AAO compatibility, we need a prepass to merge multiple objects with identical animations into a single parameter
and driving animation.
# Extension APIs
## What do we want to do?
### XDress
XDress needs to operate on an entire wave at a time. It will in particular need to:
* Add additional delay to reactions outside of its scope (?)
* Virtualize some reactions into parameters so it can apply its own animations afterward
### Custom conditions
We need to generate a new condition in the form of a blendtree (or multiple blendtrees). The framework will provide a
"true" or "false" motion that the blendtree will branch to.
### Custom reactions
Apart from the XDress usecase where we virtualize as parameters, we also want to be able to directly drive serialized
properties.
### Parameter drivers
Parameter drivers require a separate layer, due to the need to use state behaviors
TODO: substatemachine tricks
TODO: loop handling

6
docs~/docs/changelog.md Normal file
View File

@ -0,0 +1,6 @@
---
sidebar_position: 9
---
# Release History

View File

@ -0,0 +1,6 @@
---
sidebar_position: 9
---
# リリースノーツ