This commit is contained in:
PoChang007
2021-10-25 05:55:07 +00:00
parent ad2a0874ef
commit 101b43edaa
38 changed files with 62 additions and 503 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,158 +0,0 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sphinx 作業 &mdash; UniVRM Programming Document documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../ja/README.html">日本語</a> [English]
<a href="index.html" class="icon icon-home"> UniVRM Programming Document
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="build.html">Build Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="implementation/index.html">Implementation note</a></li>
<li class="toctree-l1"><a class="reference internal" href="gltf/index.html">glTF</a></li>
<li class="toctree-l1"><a class="reference internal" href="vrm0/index.html">VRM</a></li>
<li class="toctree-l1"><a class="reference internal" href="vrm1/index.html">VRM-1.0(β)</a></li>
<li class="toctree-l1"><a class="reference internal" href="release/index.html">Release</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">UniVRM Programming Document</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Sphinx 作業</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/vrm-c/UniVRM/blob/master/docs/README.md" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section class="tex2jax_ignore mathjax_ignore" id="sphinx">
<h1>Sphinx 作業<a class="headerlink" href="#sphinx" title="Permalink to this headline"></a></h1>
<section id="id1">
<h2>初期化<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install sphinx
$ mkdir docs
$ cd docs
docs$ sphinx-quickstart
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">docs/_build/ja</span></code> に日本語ドキュメントを出力する</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build . _build/ja
</pre></div>
</div>
</section>
<section id="myst">
<h2>MySt 導入<a class="headerlink" href="#myst" title="Permalink to this headline"></a></h2>
<p>markdown で記事を記述する</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install --upgrade myst-parser
</pre></div>
</div>
<p>conf.py</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">extensions</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;myst_parser&#39;</span><span class="p">]</span>
</pre></div>
</div>
</section>
<section id="gettext">
<h2>gettext 導入<a class="headerlink" href="#gettext" title="Permalink to this headline"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install sphinx-intl
</pre></div>
</div>
<p>conf.py</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">locale_dirs</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;locale/&#39;</span><span class="p">]</span>
<span class="n">gettext_compact</span> <span class="o">=</span> <span class="bp">False</span>
</pre></div>
</div>
</section>
<section id="id2">
<h2>gettext 更新<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<p>potファイル作成</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build -M gettext . _pot
# =&gt; _pot/gettext
</pre></div>
</div>
<p>poファイルを作成</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-intl update -p _pot/gettext -l en
# =&gt; locale/en
</pre></div>
</div>
<p>ロケールを使ってサイトビルド</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build . _build/en -D language=en
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, VRM Consortium.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -1,62 +0,0 @@
```{orphan}
```
# Sphinx 作業
## 初期化
```
$ pip install sphinx
$ mkdir docs
$ cd docs
docs$ sphinx-quickstart
```
`docs/_build/ja` に日本語ドキュメントを出力する
```
doc$ sphinx-build . _build/ja
```
## MySt 導入
markdown で記事を記述する
```
$ pip install --upgrade myst-parser
```
conf.py
```py
extensions = ['myst_parser']
```
## gettext 導入
```
$ pip install sphinx-intl
```
conf.py
```py
locale_dirs = ['locale/']
gettext_compact = False
```
## gettext 更新
potファイル作成
```
doc$ sphinx-build -M gettext . _pot
# => _pot/gettext
```
poファイルを作成
```
doc$ sphinx-intl update -p _pot/gettext -l en
# => locale/en
```
ロケールを使ってサイトビルド
```
doc$ sphinx-build . _build/en -D language=en
```

View File

@@ -22,7 +22,7 @@ VRM0.x向けのFastSpringBone実装は `VRM/Runtime/FastSpringBone` ディレク
これを明示的に呼ばなければ、従来のSpringBoneのまま動作します。
```cs
```csharp
using (var loader = new UniGLTF.ImporterContext(data))
{
var instance = await loader.LoadAsync();

View File

@@ -18,7 +18,7 @@
`ScriptedImporter` を継承したクラスの `public member` や `[SerializeField]` に情報を保存できます。
```cs
```csharp
// 例
[ScriptedImporter(1, "cube")]
public class CubeImporter : ScriptedImporter

View File

@@ -33,7 +33,7 @@ v*
## UPM(v0.81~)
```json
```js
// manifest.json 抜粋
{
"dependencies": {

View File

@@ -2,7 +2,7 @@
## awaitCaller 引き数
```cs
```csharp
public virtual async Task<RuntimeGltfInstance> LoadAsync(IAwaitCaller awaitCaller = null, ...)
```

View File

@@ -6,5 +6,5 @@ Runtime ローダーのサンプルです。
:language: csharp
:linenos:
:caption:
:emphasize-lines" 434-485
:lines: 434-485
```

View File

@@ -112,15 +112,15 @@
<h2>VRM 0.x での FastSpringBone の導入方法<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<p>差し替えを行いたいタイミングで <code class="docutils literal notranslate"><span class="pre">FastSpringBoneReplacer.ReplaceAsync</span></code> を呼び出してください</p>
<p>これを明示的に呼ばなければ、従来のSpringBoneのまま動作します。</p>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>using (var loader = new UniGLTF.ImporterContext(data))
{
var instance = await loader.LoadAsync();
SetModel(instance);
}
FastSpringBoneReplacer.ReplaceAsync(instance.Root)
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="k">using</span> <span class="p">(</span><span class="kt">var</span> <span class="n">loader</span> <span class="p">=</span> <span class="k">new</span> <span class="n">UniGLTF</span><span class="p">.</span><span class="n">ImporterContext</span><span class="p">(</span><span class="n">data</span><span class="p">))</span>
<span class="p">{</span>
<span class="kt">var</span> <span class="n">instance</span> <span class="p">=</span> <span class="k">await</span> <span class="n">loader</span><span class="p">.</span><span class="n">LoadAsync</span><span class="p">();</span>
<span class="n">SetModel</span><span class="p">(</span><span class="n">instance</span><span class="p">);</span>
<span class="p">}</span>
<span class="n">FastSpringBoneReplacer</span><span class="p">.</span><span class="n">ReplaceAsync</span><span class="p">(</span><span class="n">instance</span><span class="p">.</span><span class="n">Root</span><span class="p">)</span>
instance.EnableUpdateWhenOffscreen();
instance.ShowMeshes();
<span class="n">instance</span><span class="p">.</span><span class="n">EnableUpdateWhenOffscreen</span><span class="p">();</span>
<span class="n">instance</span><span class="p">.</span><span class="n">ShowMeshes</span><span class="p">();</span>
</pre></div>
</div>
</section>

View File

@@ -111,14 +111,14 @@
<section id="import">
<h3>Import 設定を作れる<a class="headerlink" href="#import" title="Permalink to this headline"></a></h3>
<p><code class="docutils literal notranslate"><span class="pre">ScriptedImporter</span></code> を継承したクラスの <code class="docutils literal notranslate"><span class="pre">public</span> <span class="pre">member</span></code><code class="docutils literal notranslate"><span class="pre">[SerializeField]</span></code> に情報を保存できます。</p>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>// 例
[ScriptedImporter(1, &quot;cube&quot;)]
public class CubeImporter : ScriptedImporter
{
public float m_Scale = 1; // これを Asset の Inspector で変更して Apply すると、新しい設定で再importできる
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="c1">// 例</span>
<span class="na">[ScriptedImporter(1, &quot;cube&quot;)]</span>
<span class="k">public</span> <span class="k">class</span> <span class="nc">CubeImporter</span> <span class="p">:</span> <span class="n">ScriptedImporter</span>
<span class="p">{</span>
<span class="k">public</span> <span class="kt">float</span> <span class="n">m_Scale</span> <span class="p">=</span> <span class="m">1</span><span class="p">;</span> <span class="c1">// これを Asset の Inspector で変更して Apply すると、新しい設定で再importできる</span>
// 省略
}
<span class="c1">// 省略</span>
<span class="p">}</span>
</pre></div>
</div>
</section>

Binary file not shown.

View File

@@ -156,15 +156,15 @@
</section>
<section id="upm-v0-81">
<h2>UPM(v0.81~)<a class="headerlink" href="#upm-v0-81" title="Permalink to this headline"></a></h2>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span>// manifest.json 抜粋
{
&quot;dependencies&quot;: {
&quot;com.vrmc.vrmshaders&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.82.1&quot;,
&quot;com.vrmc.gltf&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.82.1&quot;, // rename unigltf to gltf
&quot;com.vrmc.univrm&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM#v0.82.1&quot;,
&quot;com.vrmc.vrm&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.82.1&quot;, // rename univrm1 to vrm
}
}
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="c1">// manifest.json 抜粋</span>
<span class="p">{</span>
<span class="s2">&quot;dependencies&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;com.vrmc.vrmshaders&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.82.1&quot;</span><span class="p">,</span>
<span class="s2">&quot;com.vrmc.gltf&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.82.1&quot;</span><span class="p">,</span> <span class="c1">// rename unigltf to gltf</span>
<span class="s2">&quot;com.vrmc.univrm&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM#v0.82.1&quot;</span><span class="p">,</span>
<span class="s2">&quot;com.vrmc.vrm&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.82.1&quot;</span><span class="p">,</span> <span class="c1">// rename univrm1 to vrm</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</section>

File diff suppressed because one or more lines are too long

View File

@@ -95,7 +95,7 @@
<h1>RuntimeImport(0.87) 非同期ロード<a class="headerlink" href="#runtimeimport-0-87" title="Permalink to this headline"></a></h1>
<section id="awaitcaller">
<h2>awaitCaller 引き数<a class="headerlink" href="#awaitcaller" title="Permalink to this headline"></a></h2>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>public virtual async Task&lt;RuntimeGltfInstance&gt; LoadAsync(IAwaitCaller awaitCaller = null, ...)
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="k">public</span> <span class="k">virtual</span> <span class="k">async</span> <span class="n">Task</span><span class="p">&lt;</span><span class="n">RuntimeGltfInstance</span><span class="p">&gt;</span> <span class="n">LoadAsync</span><span class="p">(</span><span class="n">IAwaitCaller</span> <span class="n">awaitCaller</span> <span class="p">=</span> <span class="k">null</span><span class="p">,</span> <span class="p">...)</span>
</pre></div>
</div>
<p>awaitCaller によりロード時の挙動をカスタマイズできます。</p>

Binary file not shown.

Binary file not shown.

View File

@@ -1,159 +0,0 @@
<!DOCTYPE html>
<html class="writer-html5" lang="ja" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sphinx 作業 &mdash; UniVRM Programming Document ドキュメント</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/translations.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="索引" href="genindex.html" />
<link rel="search" title="検索" href="search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
[日本語] <a href="../en/README.html">English</a>
<a href="index.html" class="icon icon-home"> UniVRM Programming Document
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="build.html">アプリケーションのビルド</a></li>
<li class="toctree-l1"><a class="reference internal" href="implementation/index.html">実装メモ</a></li>
<li class="toctree-l1"><a class="reference internal" href="gltf/index.html">glTF</a></li>
<li class="toctree-l1"><a class="reference internal" href="vrm0/index.html">VRM</a></li>
<li class="toctree-l1"><a class="reference internal" href="vrm1/index.html">VRM-1.0(β)</a></li>
<li class="toctree-l1"><a class="reference internal" href="release/index.html">Release</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">UniVRM Programming Document</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Sphinx 作業</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/vrm-c/UniVRM/blob/master/docs/README.md" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section class="tex2jax_ignore mathjax_ignore" id="sphinx">
<h1>Sphinx 作業<a class="headerlink" href="#sphinx" title="このヘッドラインへのパーマリンク"></a></h1>
<section id="id1">
<h2>初期化<a class="headerlink" href="#id1" title="このヘッドラインへのパーマリンク"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install sphinx
$ mkdir docs
$ cd docs
docs$ sphinx-quickstart
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">docs/_build/ja</span></code> に日本語ドキュメントを出力する</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build . _build/ja
</pre></div>
</div>
</section>
<section id="myst">
<h2>MySt 導入<a class="headerlink" href="#myst" title="このヘッドラインへのパーマリンク"></a></h2>
<p>markdown で記事を記述する</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install --upgrade myst-parser
</pre></div>
</div>
<p>conf.py</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">extensions</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;myst_parser&#39;</span><span class="p">]</span>
</pre></div>
</div>
</section>
<section id="gettext">
<h2>gettext 導入<a class="headerlink" href="#gettext" title="このヘッドラインへのパーマリンク"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ pip install sphinx-intl
</pre></div>
</div>
<p>conf.py</p>
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">locale_dirs</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;locale/&#39;</span><span class="p">]</span>
<span class="n">gettext_compact</span> <span class="o">=</span> <span class="bp">False</span>
</pre></div>
</div>
</section>
<section id="id2">
<h2>gettext 更新<a class="headerlink" href="#id2" title="このヘッドラインへのパーマリンク"></a></h2>
<p>potファイル作成</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build -M gettext . _pot
# =&gt; _pot/gettext
</pre></div>
</div>
<p>poファイルを作成</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-intl update -p _pot/gettext -l en
# =&gt; locale/en
</pre></div>
</div>
<p>ロケールを使ってサイトビルド</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>doc$ sphinx-build . _build/en -D language=en
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, VRM Consortium.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@@ -1,62 +0,0 @@
```{orphan}
```
# Sphinx 作業
## 初期化
```
$ pip install sphinx
$ mkdir docs
$ cd docs
docs$ sphinx-quickstart
```
`docs/_build/ja` に日本語ドキュメントを出力する
```
doc$ sphinx-build . _build/ja
```
## MySt 導入
markdown で記事を記述する
```
$ pip install --upgrade myst-parser
```
conf.py
```py
extensions = ['myst_parser']
```
## gettext 導入
```
$ pip install sphinx-intl
```
conf.py
```py
locale_dirs = ['locale/']
gettext_compact = False
```
## gettext 更新
potファイル作成
```
doc$ sphinx-build -M gettext . _pot
# => _pot/gettext
```
poファイルを作成
```
doc$ sphinx-intl update -p _pot/gettext -l en
# => locale/en
```
ロケールを使ってサイトビルド
```
doc$ sphinx-build . _build/en -D language=en
```

View File

@@ -22,7 +22,7 @@ VRM0.x向けのFastSpringBone実装は `VRM/Runtime/FastSpringBone` ディレク
これを明示的に呼ばなければ、従来のSpringBoneのまま動作します。
```cs
```csharp
using (var loader = new UniGLTF.ImporterContext(data))
{
var instance = await loader.LoadAsync();

View File

@@ -18,7 +18,7 @@
`ScriptedImporter` を継承したクラスの `public member` や `[SerializeField]` に情報を保存できます。
```cs
```csharp
// 例
[ScriptedImporter(1, "cube")]
public class CubeImporter : ScriptedImporter

View File

@@ -33,7 +33,7 @@ v*
## UPM(v0.81~)
```json
```js
// manifest.json 抜粋
{
"dependencies": {

View File

@@ -2,7 +2,7 @@
## awaitCaller 引き数
```cs
```csharp
public virtual async Task<RuntimeGltfInstance> LoadAsync(IAwaitCaller awaitCaller = null, ...)
```

View File

@@ -6,5 +6,5 @@ Runtime ローダーのサンプルです。
:language: csharp
:linenos:
:caption:
:emphasize-lines" 434-485
:lines: 434-485
```

View File

@@ -113,15 +113,15 @@
<h2>VRM 0.x での FastSpringBone の導入方法<a class="headerlink" href="#id2" title="このヘッドラインへのパーマリンク"></a></h2>
<p>差し替えを行いたいタイミングで <code class="docutils literal notranslate"><span class="pre">FastSpringBoneReplacer.ReplaceAsync</span></code> を呼び出してください</p>
<p>これを明示的に呼ばなければ、従来のSpringBoneのまま動作します。</p>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>using (var loader = new UniGLTF.ImporterContext(data))
{
var instance = await loader.LoadAsync();
SetModel(instance);
}
FastSpringBoneReplacer.ReplaceAsync(instance.Root)
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="k">using</span> <span class="p">(</span><span class="kt">var</span> <span class="n">loader</span> <span class="p">=</span> <span class="k">new</span> <span class="n">UniGLTF</span><span class="p">.</span><span class="n">ImporterContext</span><span class="p">(</span><span class="n">data</span><span class="p">))</span>
<span class="p">{</span>
<span class="kt">var</span> <span class="n">instance</span> <span class="p">=</span> <span class="k">await</span> <span class="n">loader</span><span class="p">.</span><span class="n">LoadAsync</span><span class="p">();</span>
<span class="n">SetModel</span><span class="p">(</span><span class="n">instance</span><span class="p">);</span>
<span class="p">}</span>
<span class="n">FastSpringBoneReplacer</span><span class="p">.</span><span class="n">ReplaceAsync</span><span class="p">(</span><span class="n">instance</span><span class="p">.</span><span class="n">Root</span><span class="p">)</span>
instance.EnableUpdateWhenOffscreen();
instance.ShowMeshes();
<span class="n">instance</span><span class="p">.</span><span class="n">EnableUpdateWhenOffscreen</span><span class="p">();</span>
<span class="n">instance</span><span class="p">.</span><span class="n">ShowMeshes</span><span class="p">();</span>
</pre></div>
</div>
</section>

View File

@@ -112,14 +112,14 @@
<section id="import">
<h3>Import 設定を作れる<a class="headerlink" href="#import" title="このヘッドラインへのパーマリンク"></a></h3>
<p><code class="docutils literal notranslate"><span class="pre">ScriptedImporter</span></code> を継承したクラスの <code class="docutils literal notranslate"><span class="pre">public</span> <span class="pre">member</span></code><code class="docutils literal notranslate"><span class="pre">[SerializeField]</span></code> に情報を保存できます。</p>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>// 例
[ScriptedImporter(1, &quot;cube&quot;)]
public class CubeImporter : ScriptedImporter
{
public float m_Scale = 1; // これを Asset の Inspector で変更して Apply すると、新しい設定で再importできる
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="c1">// 例</span>
<span class="na">[ScriptedImporter(1, &quot;cube&quot;)]</span>
<span class="k">public</span> <span class="k">class</span> <span class="nc">CubeImporter</span> <span class="p">:</span> <span class="n">ScriptedImporter</span>
<span class="p">{</span>
<span class="k">public</span> <span class="kt">float</span> <span class="n">m_Scale</span> <span class="p">=</span> <span class="m">1</span><span class="p">;</span> <span class="c1">// これを Asset の Inspector で変更して Apply すると、新しい設定で再importできる</span>
// 省略
}
<span class="c1">// 省略</span>
<span class="p">}</span>
</pre></div>
</div>
</section>

Binary file not shown.

View File

@@ -157,15 +157,15 @@
</section>
<section id="upm-v0-81">
<h2>UPM(v0.81~)<a class="headerlink" href="#upm-v0-81" title="このヘッドラインへのパーマリンク"></a></h2>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span>// manifest.json 抜粋
{
&quot;dependencies&quot;: {
&quot;com.vrmc.vrmshaders&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.82.1&quot;,
&quot;com.vrmc.gltf&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.82.1&quot;, // rename unigltf to gltf
&quot;com.vrmc.univrm&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM#v0.82.1&quot;,
&quot;com.vrmc.vrm&quot;: &quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.82.1&quot;, // rename univrm1 to vrm
}
}
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="c1">// manifest.json 抜粋</span>
<span class="p">{</span>
<span class="s2">&quot;dependencies&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;com.vrmc.vrmshaders&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.82.1&quot;</span><span class="p">,</span>
<span class="s2">&quot;com.vrmc.gltf&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.82.1&quot;</span><span class="p">,</span> <span class="c1">// rename unigltf to gltf</span>
<span class="s2">&quot;com.vrmc.univrm&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM#v0.82.1&quot;</span><span class="p">,</span>
<span class="s2">&quot;com.vrmc.vrm&quot;</span><span class="o">:</span> <span class="s2">&quot;https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.82.1&quot;</span><span class="p">,</span> <span class="c1">// rename univrm1 to vrm</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</section>

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@
<h1>RuntimeImport(0.87) 非同期ロード<a class="headerlink" href="#runtimeimport-0-87" title="このヘッドラインへのパーマリンク"></a></h1>
<section id="awaitcaller">
<h2>awaitCaller 引き数<a class="headerlink" href="#awaitcaller" title="このヘッドラインへのパーマリンク"></a></h2>
<div class="highlight-cs notranslate"><div class="highlight"><pre><span></span>public virtual async Task&lt;RuntimeGltfInstance&gt; LoadAsync(IAwaitCaller awaitCaller = null, ...)
<div class="highlight-csharp notranslate"><div class="highlight"><pre><span></span><span class="k">public</span> <span class="k">virtual</span> <span class="k">async</span> <span class="n">Task</span><span class="p">&lt;</span><span class="n">RuntimeGltfInstance</span><span class="p">&gt;</span> <span class="n">LoadAsync</span><span class="p">(</span><span class="n">IAwaitCaller</span> <span class="n">awaitCaller</span> <span class="p">=</span> <span class="k">null</span><span class="p">,</span> <span class="p">...)</span>
</pre></div>
</div>
<p>awaitCaller によりロード時の挙動をカスタマイズできます。</p>