This commit is contained in:
ousttrue
2021-09-08 08:52:47 +00:00
parent 01c9848017
commit f3e8d0c8a5
19 changed files with 412 additions and 360 deletions

View File

@@ -1,199 +0,0 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class AmbiguousGltfFileParser
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class AmbiguousGltfFileParser
">
<meta name="generator" content="docfx 2.58.2.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="UniGLTF.AmbiguousGltfFileParser">
<h1 id="UniGLTF_AmbiguousGltfFileParser" data-uid="UniGLTF.AmbiguousGltfFileParser" class="text-break">Class AmbiguousGltfFileParser
</h1>
<div class="markdown level0 summary"><p>Ambiguous file parser.
Determine parsing method from the file extension.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">AmbiguousGltfFileParser</span></div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="UniGLTF.html">UniGLTF</a></h6>
<h6><strong>Assembly</strong>: UniGLTF.dll</h6>
<h5 id="UniGLTF_AmbiguousGltfFileParser_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class AmbiguousGltfFileParser</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/vrm-c/UniVRM/new/master/apiSpec/new?filename=UniGLTF_AmbiguousGltfFileParser__ctor_System_String_.md&amp;value=---%0Auid%3A%20UniGLTF.AmbiguousGltfFileParser.%23ctor(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/vrm-c/UniVRM/blob/master/Assets/UniGLTF/Runtime/UniGLTF/IO/Parser/AmbiguousGltfFileParser.cs/#L13">View Source</a>
</span>
<a id="UniGLTF_AmbiguousGltfFileParser__ctor_" data-uid="UniGLTF.AmbiguousGltfFileParser.#ctor*"></a>
<h4 id="UniGLTF_AmbiguousGltfFileParser__ctor_System_String_" data-uid="UniGLTF.AmbiguousGltfFileParser.#ctor(System.String)">AmbiguousGltfFileParser(String)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AmbiguousGltfFileParser(string path)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">path</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/vrm-c/UniVRM/new/master/apiSpec/new?filename=UniGLTF_AmbiguousGltfFileParser_Parse.md&amp;value=---%0Auid%3A%20UniGLTF.AmbiguousGltfFileParser.Parse%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/vrm-c/UniVRM/blob/master/Assets/UniGLTF/Runtime/UniGLTF/IO/Parser/AmbiguousGltfFileParser.cs/#L18">View Source</a>
</span>
<a id="UniGLTF_AmbiguousGltfFileParser_Parse_" data-uid="UniGLTF.AmbiguousGltfFileParser.Parse*"></a>
<h4 id="UniGLTF_AmbiguousGltfFileParser_Parse" data-uid="UniGLTF.AmbiguousGltfFileParser.Parse">Parse()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public GltfData Parse()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="UniGLTF.GltfData.html">GltfData</a></td>
<td></td>
</tr>
</tbody>
</table>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/vrm-c/UniVRM/new/master/apiSpec/new?filename=UniGLTF_AmbiguousGltfFileParser.md&amp;value=---%0Auid%3A%20UniGLTF.AmbiguousGltfFileParser%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/vrm-c/UniVRM/blob/master/Assets/UniGLTF/Runtime/UniGLTF/IO/Parser/AmbiguousGltfFileParser.cs/#L9" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>

View File

@@ -77,10 +77,6 @@
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="UniGLTF.AmbiguousGltfFileParser.html">AmbiguousGltfFileParser</a></h4>
<section><p>Ambiguous file parser.
Determine parsing method from the file extension.</p>
</section>
<h4><a class="xref" href="UniGLTF.AnimationExporter.html">AnimationExporter</a></h4>
<section></section>
<h4><a class="xref" href="UniGLTF.AnimationExporter.InputOutputValues.html">AnimationExporter.InputOutputValues</a></h4>

View File

@@ -17,9 +17,6 @@
<a href="UniGLTF.html" name="" title="UniGLTF">UniGLTF</a>
<ul class="nav level2">
<li>
<a href="UniGLTF.AmbiguousGltfFileParser.html" name="" title="AmbiguousGltfFileParser">AmbiguousGltfFileParser</a>
</li>
<li>
<a href="UniGLTF.AnimationExporter.html" name="" title="AnimationExporter">AnimationExporter</a>
</li>

View File

@@ -0,0 +1,129 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>v0.36 </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="v0.36 ">
<meta name="generator" content="docfx 2.58.2.0">
<link rel="shortcut icon" href="../../../favicon.ico">
<link rel="stylesheet" href="../../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../../styles/docfx.css">
<link rel="stylesheet" href="../../../styles/main.css">
<meta property="docfx:navrel" content="../../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../index.html">
<img id="logo" class="svg" src="../../../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="v036">v0.36</h1>
<h2 id="changed-storage-position-of-texture-name">Changed Storage Position of Texture Name</h2>
<p>Conforming to the GLTF specification.</p>
<pre><code class="lang-json">json.images[i].extra.name
</code></pre>
<p>After the change</p>
<pre><code class="lang-json">json.images[i].name
</code></pre>
<h2 id="changed-storage-position-blendshape-name">Changed Storage Position BlendShape Name</h2>
<p>Conforming to the GLTF specification.</p>
<ul>
<li><code>extras</code> is not allowed in target</li>
<li><a href="https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356">https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356</a></li>
</ul>
<pre><code class="lang-json">json.meshes[i].primitives[j].targets[k].extra.name
</code></pre>
<p>After the change</p>
<pre><code class="lang-json">json.meshes[i].primitives[j].extras.targetNames[k]
</code></pre>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/vrm-c/UniVRM/blob/master/docfx/articles/en/gltf/0_36_update.md/#L1" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../../styles/docfx.js"></script>
<script type="text/javascript" src="../../../styles/main.js"></script>
</body>
</html>

View File

@@ -112,14 +112,8 @@ If use <code>0.82.0</code>, please upgrade.</p>
<p>See <code>SimpleViewer</code> sample.</p>
<pre><code class="lang-cs">GltfData Load(string path)
{
var ext = Path.GetExtension(path).ToLower();
switch(ext)
{
case &quot;.glb&quot;: return new GlbFileParser(path).Parse();
case &quot;.gltf&quot;: return new GltfFileWithResourceFilesParser(path).Parse();
case &quot;.zip&quot;: return new ZipArchivedGltfFileParser(path).Parse();
default: throw new Exception($&quot;unknown: {ext}&quot;);
}
// Detect type by file extension automatically
return new AutoGltfFileParser(path).Parse();
}
</code></pre>
<h1 id="2-load">2. Load</h1>

View File

@@ -79,19 +79,19 @@
<tbody>
<tr>
<td>v0.82.1</td>
<td>Material replacement when(for URP)</td>
<td><code>materialGenerator(for URP)</code> argument and <code>VrmData</code></td>
</tr>
<tr>
<td>v0.82.0</td>
<td>Material replacement when(for URP)</td>
<td>v0.79</td>
<td><code>GltfData</code></td>
</tr>
<tr>
<td>v0.77</td>
<td>Reorganize ImporterContext</td>
<td><code>RuntimeGltfInstance</code></td>
</tr>
<tr>
<td>v0.68</td>
<td>Reorganize ImporterContext</td>
<td><code>GltfParser</code></td>
</tr>
<tr>
<td>v0.63.2</td>
@@ -103,26 +103,6 @@
</tr>
</tbody>
</table>
<p><a href="https://github.com/vrm-c/UniVRM/wiki/ReleaseNote-v0.56.0%28en%29#reworks-blendshapekeys-interface">Rework BlendShapeKey's Interface</a></p>
<h2 id="v036">v0.36</h2>
<h3 id="changed-storage-position-of-texture-name">Changed Storage Position of Texture Name</h3>
<p>Conforming to the GLTF specification.</p>
<pre><code class="lang-json">json.images[i].extra.name
</code></pre>
<p>After the change</p>
<pre><code class="lang-json">json.images[i].name
</code></pre>
<h3 id="changed-storage-position-blendshape-name">Changed Storage Position BlendShape Name</h3>
<p>Conforming to the GLTF specification.</p>
<ul>
<li><code>extras</code> is not allowed in target</li>
<li><a href="https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356">https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356</a></li>
</ul>
<pre><code class="lang-json">json.meshes[i].primitives[j].targets[k].extra.name
</code></pre>
<p>After the change</p>
<pre><code class="lang-json">json.meshes[i].primitives[j].extras.targetNames[k]
</code></pre>
</article>
</div>

View File

@@ -36,6 +36,9 @@
<li>
<a href="gltf/how_to_impl_extension.html" name="" title="glTF extensions implementation(0.63.2)">glTF extensions implementation(0.63.2)</a>
</li>
<li>
<a href="gltf/0_36_update.html" name="" title="GltfUpdate(0.36)">GltfUpdate(0.36)</a>
</li>
</ul>
</li>
<li>
@@ -87,7 +90,7 @@
<a>🚧Samples/VRM10Viewer</a>
</li>
<li>
<a href="vrm1/vrm1_runtime_load.html" name="" title="&#128679;RuntimeImport">&#128679;RuntimeImport</a>
<a href="vrm1/vrm1_runtime_load.html" name="" title="RuntimeImport">RuntimeImport</a>
</li>
<li>
<a href="vrm1/vrm1_get_humanoid.html" name="" title="&#128679;Humanoid">&#128679;Humanoid</a>

View File

@@ -70,6 +70,7 @@
<h2 id="environment">Environment</h2>
<p>UniVRM v0.58.0</p>
<p><a href="https://github.com/vrm-c/UniVRM/wiki/ReleaseNote-v0.56.0%28en%29#reworks-blendshapekeys-interface">Rework BlendShapeKey's Interface</a></p>
<h2 id="methods">Methods</h2>
<ul>
<li>[Recommended] <code>SetValues</code></li>

View File

@@ -80,6 +80,7 @@
<li>Load a <code>RuntimeGltfInstance</code> from <code>VRMData</code>.</li>
<li>Use the <code>RuntimeGltfInstance</code></li>
</ol>
<p>See <code>Assets\VRM\Samples\SimpleViewer\ViewerUI.cs</code></p>
<h1 id="1-get-gltfdata">1. Get <code>GltfData</code></h1>
<pre><code class="lang-cs">GltfData Load(string path)
{

View File

@@ -5,9 +5,9 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>&#128679;Runtime &#12525;&#12540;&#12489; </title>
<title>RuntimeLoad </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="&#128679;Runtime &#12525;&#12540;&#12489; ">
<meta name="title" content="RuntimeLoad ">
<meta name="generator" content="docfx 2.58.2.0">
<link rel="shortcut icon" href="../../../favicon.ico">
@@ -67,16 +67,47 @@
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="runtimeload">RuntimeLoad</h1>
<p><code>VRM-1.0</code> can load <code>VRM-0.x</code>.
In that case, incompatible migrated meta properties are not allowed.
Therefore, we provide an API that allows you to access the original meta before migration.</p>
<p>See <code>Assets\VRM10\Samples\VRM10Viewer\VRM10ViewerUI.cs</code>.</p>
<pre><code class="lang-cs">async Task&lt;RuntimeGltfInstance&gt; LoadAsync(string path)
{
GltfData data = new GltfZipOrGlbFileParser(path).Parse();
<p>VRM-1.0 を使うアプリケーションは、 <code>VRM-0.x</code> の資産もロードしたいはずです。</p>
<p><code>VRM-1.0</code><code>VRM-0.X</code> の meta の非互換に <a href="https://github.com/vrm-c/vrm-specification/issues/181">Metaの自動的なマイグレーションは禁止する方針</a> となりました。</p>
<h2 id="vrm-0x-を-vrm-10-コンポーネントに対してロードする">VRM-0.X を VRM-1.0 コンポーネントに対してロードする</h2>
<p><code>UniVRM-1.0</code> では、
<code>VRM-0.X</code> のライセンスを保持したまま、<code>VRM-1.0</code> のコンポーネントにロードする機能を提供します(予定)。</p>
<p>アプリケーションは、この方法でロードしたモデルは、<code>VRM-0.X</code> ライセンスとして扱ってください。</p>
<h2 id="runtimeload-例">RuntimeLoad 例</h2>
<p><code>vrm-0.x</code><code>vrm-1.0</code> 両方をロードしてライセンスを取得する例。</p>
// The doMigrate argument allows you to load that older version of the vrm.
if (Vrm10Data.TryParseOrMigrate(data, doMigrate: true, out Vrm10Data vrm))
{
// vrm
using (var loader = new Vrm10Importer(vrm,
materialGenerator: GetVrmMaterialDescriptorGenerator(m_useUrpMaterial.isOn)))
{
// It has been migrated, but it is the same thumbnail
var thumbnail = await loader.LoadVrmThumbnailAsync();
if (vrm.OldMeta != null)
{
// migrated from vrm-0.x. use OldMeta
UpdateMeta(vrm.OldMeta, thumbnail);
}
else
{
// load vrm-1.0. use newMeta
UpdateMeta(vrm.VrmExtension.Meta, thumbnail);
}
// load model
RuntimeGltfInstance instance = await loader.LoadAsync();
return instance;
}
}
else{
throw new Exception(&quot;not vrm&quot;);
}
}
</code></pre>
</article>
</div>

View File

@@ -0,0 +1,134 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>v0.36 </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="v0.36 ">
<meta name="generator" content="docfx 2.58.2.0">
<link rel="shortcut icon" href="../../../favicon.ico">
<link rel="stylesheet" href="../../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../../styles/docfx.css">
<link rel="stylesheet" href="../../../styles/main.css">
<meta property="docfx:navrel" content="../../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../index.html">
<img id="logo" class="svg" src="../../../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="v036">v0.36</h1>
<h2 id="テクスチャ名の格納位置の修正">テクスチャ名の格納位置の修正</h2>
<p>GLTFの仕様に準拠しました。</p>
<ul>
<li>extraはextrasの間違い</li>
<li>imageはnameを持っていた</li>
</ul>
<pre><code class="lang-json">json.images[i].extra.name
</code></pre>
<p>変更後</p>
<pre><code class="lang-json">json.images[i].name
</code></pre>
<h2 id="ブレンドシェイプ名の格納位置の修正">ブレンドシェイプ名の格納位置の修正</h2>
<p>GLTFの仕様に準拠しました。</p>
<ul>
<li>extraはextrasの間違い</li>
<li>targetにextrasは不許可</li>
<li><a href="https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356">https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356</a></li>
</ul>
<pre><code class="lang-json">json.meshes[i].primitives[j].targets[k].extra.name
</code></pre>
<p>変更後</p>
<pre><code class="lang-json">json.meshes[i].primitives[j].extras.targetNames[k]
</code></pre>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/vrm-c/UniVRM/blob/master/docfx/articles/ja/gltf/0_36_update.md/#L1" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../../styles/docfx.js"></script>
<script type="text/javascript" src="../../../styles/main.js"></script>
</body>
</html>

View File

@@ -112,14 +112,8 @@
<p>サンプルの <code>SimpleViewer</code> を参考にしてください。</p>
<pre><code class="lang-cs">GltfData Load(string path)
{
var ext = Path.GetExtension(path).ToLower();
switch(ext)
{
case &quot;.glb&quot;: return new GlbFileParser(path).Parse();
case &quot;.gltf&quot;: return new GltfFileWithResourceFilesParser(path).Parse();
case &quot;.zip&quot;: return new ZipArchivedGltfFileParser(path).Parse();
default: throw new Exception($&quot;unknown: {ext}&quot;);
}
// ファイル拡張子で自動判定します
return new AutoGltfFileParser(path).Parse();
}
</code></pre>
<h1 id="2-ロードする">2. ロードする</h1>

View File

@@ -79,19 +79,19 @@
<tbody>
<tr>
<td>v0.82.1</td>
<td>Import時のMaterial差し替え(URP対応)</td>
<td><code>materialGenerator(URP対応)</code> 引き数と <code>VrmData</code></td>
</tr>
<tr>
<td>v0.82.0</td>
<td>Import時のMaterial差し替え(URP対応)</td>
<td>v0.79</td>
<td><code>GltfData</code></td>
</tr>
<tr>
<td>v0.77</td>
<td>ImporterContext の整理</td>
<td><code>RuntimeGltfInstance</code></td>
</tr>
<tr>
<td>v0.68</td>
<td>ImporterContext の整理</td>
<td><code>GltfParser</code></td>
</tr>
<tr>
<td>v0.63.2</td>
@@ -103,31 +103,6 @@
</tr>
</tbody>
</table>
<p><a href="https://github.com/vrm-c/UniVRM/wiki/ReleaseNote-v0.56.0%28ja%29#blendshapekey%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%95%E3%82%A7%E3%83%BC%E3%82%B9%E3%82%92%E5%8E%B3%E6%A0%BC%E5%8C%96%E6%95%B4%E7%90%86">BlendShapeKeyのインタフェースを厳格化、整理</a></p>
<h2 id="v036">v0.36</h2>
<h3 id="テクスチャ名の格納位置の修正">テクスチャ名の格納位置の修正</h3>
<p>GLTFの仕様に準拠しました。</p>
<ul>
<li>extraはextrasの間違い</li>
<li>imageはnameを持っていた</li>
</ul>
<pre><code class="lang-json">json.images[i].extra.name
</code></pre>
<p>変更後</p>
<pre><code class="lang-json">json.images[i].name
</code></pre>
<h3 id="ブレンドシェイプ名の格納位置の修正">ブレンドシェイプ名の格納位置の修正</h3>
<p>GLTFの仕様に準拠しました。</p>
<ul>
<li>extraはextrasの間違い</li>
<li>targetにextrasは不許可</li>
<li><a href="https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356">https://github.com/KhronosGroup/glTF/issues/1036#issuecomment-314078356</a></li>
</ul>
<pre><code class="lang-json">json.meshes[i].primitives[j].targets[k].extra.name
</code></pre>
<p>変更後</p>
<pre><code class="lang-json">json.meshes[i].primitives[j].extras.targetNames[k]
</code></pre>
</article>
</div>

View File

@@ -36,6 +36,9 @@
<li>
<a href="gltf/how_to_impl_extension.html" name="" title="glTF&#25313;&#24373;&#12398;&#23455;&#35013;(0.63.2)">glTF&#25313;&#24373;&#12398;&#23455;&#35013;(0.63.2)</a>
</li>
<li>
<a href="gltf/0_36_update.html" name="" title="GltfUpdate(0.36)">GltfUpdate(0.36)</a>
</li>
</ul>
</li>
<li>
@@ -87,7 +90,7 @@
<a>🚧Samples/VRM10Viewer</a>
</li>
<li>
<a href="vrm1/vrm1_runtime_load.html" name="" title="&#128679;RuntimeImport">&#128679;RuntimeImport</a>
<a href="vrm1/vrm1_runtime_load.html" name="" title="RuntimeImport">RuntimeImport</a>
</li>
<li>
<a href="vrm1/vrm1_get_humanoid.html" name="" title="&#128679;Humanoid">&#128679;Humanoid</a>

View File

@@ -70,6 +70,7 @@
<h2 id="環境">環境</h2>
<p>UniVRM v0.58.0</p>
<p><a href="https://github.com/vrm-c/UniVRM/wiki/ReleaseNote-v0.56.0%28ja%29#blendshapekey%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%95%E3%82%A7%E3%83%BC%E3%82%B9%E3%82%92%E5%8E%B3%E6%A0%BC%E5%8C%96%E6%95%B4%E7%90%86">BlendShapeKeyのインタフェースを厳格化、整理</a></p>
<h2 id="使用するメソッド">使用するメソッド</h2>
<ul>
<li>[推奨] <code>SetValues</code></li>

View File

@@ -69,7 +69,7 @@
<article class="content wrap" id="_content" data-uid="">
<ul>
<li><code>Version 0.82.0</code> <code>0.82.1</code> 以降を使ってください。</li>
<li><code>Version 0.82.0</code> <code>0.82.1</code> 以降を使ってください。</li>
<li><code>Version 0.82.1~</code></li>
</ul>
<p>以下の手順で import します。</p>
@@ -79,6 +79,7 @@
<li><code>VrmData</code> から <code>RuntimeGltfInstance</code> をロードする。</li>
<li><code>RuntimeGltfInstance</code> を使う。</li>
</ol>
<p>サンプルの <code>Assets\VRM\Samples\SimpleViewer\ViewerUI.cs</code> も参照してください。</p>
<h1 id="1-gltfdata-を得る">1. <code>GltfData</code> を得る</h1>
<pre><code class="lang-cs">GltfData Load(string path)
{

View File

@@ -5,9 +5,9 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>&#128679;Runtime &#12525;&#12540;&#12489; </title>
<title>RuntimeLoad </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="&#128679;Runtime &#12525;&#12540;&#12489; ">
<meta name="title" content="RuntimeLoad ">
<meta name="generator" content="docfx 2.58.2.0">
<link rel="shortcut icon" href="../../../favicon.ico">
@@ -67,16 +67,47 @@
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="runtimeload">RuntimeLoad</h1>
<p><code>VRM-1.0</code> は、 <code>VRM-0.x</code> もロードできます。
その場合、あたらしい meta への変換が発生し互換性の無い部分はすべて <code>不許可</code> の値になります。
このため、変換前のライセンスにアクセスする API を提供します。</p>
<p>サンプルの <code>Assets\VRM10\Samples\VRM10Viewer\VRM10ViewerUI.cs</code> も参照してください。</p>
<pre><code class="lang-cs">async Task&lt;RuntimeGltfInstance&gt; LoadAsync(string path)
{
GltfData data = new GltfZipOrGlbFileParser(path).Parse();
<p>VRM-1.0 を使うアプリケーションは、 <code>VRM-0.x</code> の資産もロードしたいはずです。</p>
<p><code>VRM-1.0</code><code>VRM-0.X</code> の meta の非互換に <a href="https://github.com/vrm-c/vrm-specification/issues/181">Metaの自動的なマイグレーションは禁止する方針</a> となりました。</p>
<h2 id="vrm-0x-を-vrm-10-コンポーネントに対してロードする">VRM-0.X を VRM-1.0 コンポーネントに対してロードする</h2>
<p><code>UniVRM-1.0</code> では、
<code>VRM-0.X</code> のライセンスを保持したまま、<code>VRM-1.0</code> のコンポーネントにロードする機能を提供します(予定)。</p>
<p>アプリケーションは、この方法でロードしたモデルは、<code>VRM-0.X</code> ライセンスとして扱ってください。</p>
<h2 id="runtimeload-例">RuntimeLoad 例</h2>
<p><code>vrm-0.x</code><code>vrm-1.0</code> 両方をロードしてライセンスを取得する例。</p>
// doMigrate: true で旧バージョンの vrm をロードできます。
if (Vrm10Data.TryParseOrMigrate(data, doMigrate: true, out Vrm10Data vrm))
{
// vrm
using (var loader = new Vrm10Importer(vrm,
materialGenerator: GetVrmMaterialDescriptorGenerator(m_useUrpMaterial.isOn)))
{
// migrate しても thumbnail は同じ
var thumbnail = await loader.LoadVrmThumbnailAsync();
if (vrm.OldMeta != null)
{
// migrated from vrm-0.x. use OldMeta
UpdateMeta(vrm.OldMeta, thumbnail);
}
else
{
// load vrm-1.0. use newMeta
UpdateMeta(vrm.VrmExtension.Meta, thumbnail);
}
// モデルをロード
RuntimeGltfInstance instance = await loader.LoadAsync();
return instance;
}
}
else{
throw new Exception(&quot;not vrm&quot;);
}
}
</code></pre>
</article>
</div>

View File

@@ -18,18 +18,6 @@
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/UniGLTF.AmbiguousGltfFileParser.yml",
"output": {
".html": {
"relative_path": "api/UniGLTF.AmbiguousGltfFileParser.html",
"hash": "z1qZ0rW5Zwy1d87n5RlV29r26mxpXZpCbQk5suyWXE4="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/UniGLTF.AnimationExporter.InputOutputValues.yml",
@@ -2760,7 +2748,7 @@
"output": {
".html": {
"relative_path": "api/UniGLTF.html",
"hash": "4BMHbNCtrKgbjEfHx8E51VX9b8oKQruF2OZh6ehhkas="
"hash": "uGlgaxB8ni9tLyVbusx7PqJPiSlLapkhRflE9fuWQ6I="
}
},
"is_incremental": false,
@@ -4464,7 +4452,19 @@
"output": {
".html": {
"relative_path": "api/toc.html",
"hash": "6O9XFCPWapd5iziq00hx1qGBalqJLQLTKV75FgJRVMY="
"hash": "v1BtuWwB/f9nV+eJxUNtL/JakHeVsX81f74Mpoi0ocA="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "articles/en/gltf/0_36_update.md",
"output": {
".html": {
"relative_path": "articles/en/gltf/0_36_update.html",
"hash": "qyUm2ddjOYNouvW2fGuQdpJQPVhxNItrDztXFXxS2js="
}
},
"is_incremental": false,
@@ -4476,7 +4476,7 @@
"output": {
".html": {
"relative_path": "articles/en/gltf/0_82_glb_import.html",
"hash": "sePaFU7bPMVRBXhGAxP6mRHoHA2pAlahd/YdY2RnFgM="
"hash": "heAC1zWdIihS0cXtVL/ESqdJJO8hpbZFIMzuQEG+vJk="
}
},
"is_incremental": false,
@@ -4500,7 +4500,7 @@
"output": {
".html": {
"relative_path": "articles/en/history.html",
"hash": "SvqIt/oocNob3emRpULHT5gAMiyD3eUQPfs9DP3FtZ8="
"hash": "w2e0Sz1MYi+9aMGmBnLunoljCOzXGX9PjVyEgBdiJD4="
}
},
"is_incremental": false,
@@ -4536,7 +4536,7 @@
"output": {
".html": {
"relative_path": "articles/en/toc.html",
"hash": "1cErx3ondkrN56hPAu+BZvnJEd3b8Fa+JlKv7u31BPY="
"hash": "0xAo3eJaAstFH1Iz+d8jAM0gyJczjnYoEjCtsT7Q4Os="
}
},
"is_incremental": false,
@@ -4560,7 +4560,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm0/0_58_blendshape.html",
"hash": "xIasr5p9f1Kg7Tq57/iuqgOT58IA3KB1+WttcpoXmHg="
"hash": "VHQ14lZz1wGlY5atD4YlZ2wp1SuscV1FFE1R1lXqj14="
}
},
"is_incremental": false,
@@ -4608,7 +4608,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm0/0_82_runtime_import.html",
"hash": "ee7MtwC62KPXwOTOnI9Su04fMxwiqZzCflTrcCZpBuM="
"hash": "H1v5NSOv4dzNelyXXS3M0q4L2WH2C9G/ZgReeGU3aH0="
}
},
"is_incremental": false,
@@ -4680,7 +4680,7 @@
"output": {
".html": {
"relative_path": "articles/en/vrm1/vrm1_runtime_load.html",
"hash": "5HJQmEX1yWy1vZIQwKiOWE1uNvJatw51ORpss7UphKw="
"hash": "fjlzlJif09I9fVRQuqrboU634xUfEv119MpqMAxOHg8="
}
},
"is_incremental": false,
@@ -4701,13 +4701,25 @@
"is_incremental": false,
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "articles/ja/gltf/0_36_update.md",
"output": {
".html": {
"relative_path": "articles/ja/gltf/0_36_update.html",
"hash": "1Clgv0oiy1wbunxm5rTaxMClofzZ5AcsEA+rXx4EIJ4="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "Conceptual",
"source_relative_path": "articles/ja/gltf/0_82_glb_import.md",
"output": {
".html": {
"relative_path": "articles/ja/gltf/0_82_glb_import.html",
"hash": "n5U2x3FheIJItVm+4eMQVnPsT8KzVhFeT/fJkmmjYps="
"hash": "CrRq0blmzEkWj0ssm+P1pfAL/IaLhuzvQ//lrX8w76k="
}
},
"is_incremental": false,
@@ -4731,7 +4743,7 @@
"output": {
".html": {
"relative_path": "articles/ja/history.html",
"hash": "0EovI4tLnDmUXYHVovxanrJrubepxT5D5oZS6rUCJws="
"hash": "wUFDP/mJ8eWofsSom+5kod7E6J8fG0qeMbjA8md8KRc="
}
},
"is_incremental": false,
@@ -4767,7 +4779,7 @@
"output": {
".html": {
"relative_path": "articles/ja/toc.html",
"hash": "RCUOWZpFItkHAmN9xlkHAp8nNtpApBiIzyEHqkCQ0D8="
"hash": "lpMPaG+LLg4loS9KCp9yllBcKY/sM/ySq4Iq4Z9VNRw="
}
},
"is_incremental": false,
@@ -4791,7 +4803,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm0/0_58_blendshape.html",
"hash": "Z7K5rQ1drsMhkrCALhac1BEml4NyoSrfkjJIfgZZVxk="
"hash": "jFXpvzG+XKWudsB1P0lcfVQN571lfmEq3ou60Q0d4Qo="
}
},
"is_incremental": false,
@@ -4839,7 +4851,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm0/0_82_runtime_import.html",
"hash": "mkQnVZnFrSBTi1dCMHAOfKtVXIm7EBvkXaGtjvr8TtM="
"hash": "09y+kuhgsFhiaGH46SsV+vct0N9DyuSyUy6i0VFw+cA="
}
},
"is_incremental": false,
@@ -4911,7 +4923,7 @@
"output": {
".html": {
"relative_path": "articles/ja/vrm1/vrm1_runtime_load.html",
"hash": "JQ0gdAHhk0tFT6KP7vdoBVRDji9wYVtlN+kMvLCFzPc="
"hash": "0wPDelUL0uo1W8X5PYenTc/5QWnyShZw4oxRXTPpOWk="
}
},
"is_incremental": false,
@@ -4974,13 +4986,13 @@
"ConceptualDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
"total_file_count": 38,
"total_file_count": 40,
"skipped_file_count": 0
},
"ManagedReferenceDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
"total_file_count": 369,
"total_file_count": 368,
"skipped_file_count": 0
},
"TocDocumentProcessor": {

View File

@@ -7,38 +7,6 @@ references:
commentId: N:UniGLTF
fullName: UniGLTF
nameWithType: UniGLTF
- uid: UniGLTF.AmbiguousGltfFileParser
name: AmbiguousGltfFileParser
href: api/UniGLTF.AmbiguousGltfFileParser.html
commentId: T:UniGLTF.AmbiguousGltfFileParser
fullName: UniGLTF.AmbiguousGltfFileParser
nameWithType: AmbiguousGltfFileParser
- uid: UniGLTF.AmbiguousGltfFileParser.#ctor(System.String)
name: AmbiguousGltfFileParser(String)
href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser__ctor_System_String_
commentId: M:UniGLTF.AmbiguousGltfFileParser.#ctor(System.String)
fullName: UniGLTF.AmbiguousGltfFileParser.AmbiguousGltfFileParser(System.String)
nameWithType: AmbiguousGltfFileParser.AmbiguousGltfFileParser(String)
- uid: UniGLTF.AmbiguousGltfFileParser.#ctor*
name: AmbiguousGltfFileParser
href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser__ctor_
commentId: Overload:UniGLTF.AmbiguousGltfFileParser.#ctor
isSpec: "True"
fullName: UniGLTF.AmbiguousGltfFileParser.AmbiguousGltfFileParser
nameWithType: AmbiguousGltfFileParser.AmbiguousGltfFileParser
- uid: UniGLTF.AmbiguousGltfFileParser.Parse
name: Parse()
href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser_Parse
commentId: M:UniGLTF.AmbiguousGltfFileParser.Parse
fullName: UniGLTF.AmbiguousGltfFileParser.Parse()
nameWithType: AmbiguousGltfFileParser.Parse()
- uid: UniGLTF.AmbiguousGltfFileParser.Parse*
name: Parse
href: api/UniGLTF.AmbiguousGltfFileParser.html#UniGLTF_AmbiguousGltfFileParser_Parse_
commentId: Overload:UniGLTF.AmbiguousGltfFileParser.Parse
isSpec: "True"
fullName: UniGLTF.AmbiguousGltfFileParser.Parse
nameWithType: AmbiguousGltfFileParser.Parse
- uid: UniGLTF.AnimationExporter
name: AnimationExporter
href: api/UniGLTF.AnimationExporter.html