1"use strict";(self.webpackChunkvrm_dev=self.webpackChunkvrm_dev||[]).push([[613],{73874:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>t,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"api/runtime-import/VRM_BlendShapeProxy","title":"VRM.BlendShapeProxy","description":"v0.58","source":"@site/docs/api/runtime-import/VRM_BlendShapeProxy.md","sourceDirName":"api/runtime-import","slug":"/api/runtime-import/VRM_BlendShapeProxy","permalink":"/api/runtime-import/VRM_BlendShapeProxy","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"apiSidebar","previous":{"title":"UniVRM10.Vrm10Runtime","permalink":"/api/runtime-import/UniVRM10_Vrm10Runtime"},"next":{"title":"v0.122 KHR_texture_basisu \u62e1\u5f35\u5bfe\u5fdc","permalink":"/api/runtime-import/import_basisu"}}');var d=l(74848),s=l(28453);const t={},i="VRM.BlendShapeProxy",a={},h=[{value:"BlendShapeKey\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u53b3\u683c\u5316\u3001\u6574\u7406",id:"blendshapekey\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u53b3\u683c\u5316\u6574\u7406",level:2},{value:"\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9",id:"\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9",level:2},{value:"\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089 BlendShape weight \u3092\u9069\u7528\u3059\u308b",id:"\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089-blendshape-weight-\u3092\u9069\u7528\u3059\u308b",level:2},{value:"\u8907\u6570\u306e BlendShape weight \u3092\u9069\u7528\u3059\u308b\u969b\u306e\u7af6\u5408\u306e\u554f\u984c\u306b\u3064\u3044\u3066",id:"\u8907\u6570\u306e-blendshape-weight-\u3092\u9069\u7528\u3059\u308b\u969b\u306e\u7af6\u5408\u306e\u554f\u984c\u306b\u3064\u3044\u3066",level:2},{value:"\u4f55\u6545\u3001\u8907\u6570\u306eSetter\u304c\u3042\u308b\u306e\u304b",id:"\u4f55\u6545\u8907\u6570\u306esetter\u304c\u3042\u308b\u306e\u304b",level:2},{value:"ImmediatelySetValue",id:"immediatelysetvalue",level:2},{value:"AccumulateValue + Apply",id:"accumulatevalue--apply",level:2},{value:"SetValues",id:"setvalues",level:2}];function c(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"vrmblendshapeproxy",children:"VRM.BlendShapeProxy"})}),"\n",(0,d.jsx)(n.p,{children:(0,d.jsx)(n.code,{children:"v0.58"})}),"\n",(0,d.jsx)(n.h2,{id:"blendshapekey\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u53b3\u683c\u5316\u6574\u7406",children:"BlendShapeKey\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u53b3\u683c\u5316\u3001\u6574\u7406"}),"\n",(0,d.jsx)(n.p,{children:"BlendShapeKey\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u304c\u4e0d\u660e\u77ad\u3060\u3063\u305f\u305f\u3081\u3001\n\u3088\u308a\u660e\u793a\u7684\u306a API \u306b\u7f6e\u304d\u63db\u3048\u307e\u3057\u305f\u3002"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"BlendShapeClip.Key \u8ffd\u52a0"}),"\n"]}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"arguments"}),(0,d.jsx)(n.th,{children:"before"}),(0,d.jsx)(n.th,{children:"after"}),(0,d.jsx)(n.th,{children:"\u5099\u8003"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"string name, BlendShapePreset preset"}),(0,d.jsx)(n.td,{children:"public constructor"}),(0,d.jsx)(n.td,{children:"private constructor"}),(0,d.jsx)(n.td,{children:"BlendShapePreset.Unknown\u306e\u3068\u304d\u306e\u6319\u52d5\u304c\u4e0d\u660e\u77ad\u3060\u3063\u305f\u3002\u4ee3\u308f\u308a\u306b\u3001CreateFromPreset \u307e\u305f\u306f CreateUnknown \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"BlendShapeClip"}),(0,d.jsx)(n.td,{children:"BlendShapeKey.CreateFrom"}),(0,d.jsx)(n.td,{children:"BlendShapeKey.CreateFromClip"}),(0,d.jsx)(n.td,{children:"\u4ed6\u306e\u95a2\u6570\u306b\u5408\u308f\u305b\u3066\u3001\u540d\u524d\u3092\u5909\u66f4"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"BlendShapePreset"}),(0,d.jsx)(n.td,{children:"public constructor"}),(0,d.jsx)(n.td,{children:"BlendShapeKey.CreateFromPreset"}),(0,d.jsx)(n.td,{children:"\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3092\u3084\u3081\u3066\u660e\u793a\u7684\u306a\u95a2\u6570\u306b\u5909\u66f4"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"public constructor"}),(0,d.jsx)(n.td,{children:"BlendShapeKey.CreateUnknown"}),(0,d.jsx)(n.td,{children:"\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3092\u3084\u3081\u3066\u660e\u793a\u7684\u306a\u95a2\u6570\u306b\u5909\u66f4\u3002"})]})]})]}),"\n",(0,d.jsx)(n.h2,{id:"\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9",children:"\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["[\u63a8\u5968] ",(0,d.jsx)(n.code,{children:"SetValues"})]}),"\n",(0,d.jsxs)(n.li,{children:["[\u975e\u63a8\u5968] ",(0,d.jsx)(n.code,{children:"ImmediatelySetValue"})]}),"\n",(0,d.jsxs)(n.li,{children:["[\u4e0a\u7d1a\u8005\u5411\u3051] ",(0,d.jsx)(n.code,{children:"AccumulateValue"})]}),"\n",(0,d.jsxs)(n.li,{children:["[\u4e0a\u7d1a\u8005\u5411\u3051] ",(0,d.jsx)(n.code,{children:"Apply"})]}),"\n"]}),"\n",(0,d.jsx)(n.h2,{id:"\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089-blendshape-weight-\u3092\u9069\u7528\u3059\u308b",children:"\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089 BlendShape weight \u3092\u9069\u7528\u3059\u308b"}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.code,{children:"SetValues"})," \u95a2\u6570\u306e\u307f\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\n\u305d\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u5fc5\u8981\u306a\u8868\u60c5\u306e weight \u5024\u3092\u3059\u3079\u3066\u96c6\u3081\u3066\u304b\u3089 ",(0,d.jsx)(n.code,{children:"SetValues"})," \u3092 1 \u56de\u3060\u3051\u547c\u3093\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:'var proxy = GetComponent<VRMBlendShapeProxy>();\n\nproxy.SetValues(new Dictionary<BlendShapeKey, float>\n{\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.A), 1f}, // [0, 1] \u306e\u7bc4\u56f2\u3067 Weight \u3092\u6307\u5b9a\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.Joy), 1f}, // \u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u306e\u8868\u60c5\u306f enum \u3067\u6307\u5b9a\n {BlendShapeKey.CreateUnknown("USER_DEFINED_FACIAL"), 1f}
1, // \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306e\u8868\u60c5\u306f string \u3067\u6307\u5b9a\n});\n'})}),"\n",(0,d.jsx)(n.h2,{id:"\u8907\u6570\u306e-blendshape-weight-\u3092\u9069\u7528\u3059\u308b\u969b\u306e\u7af6\u5408\u306e\u554f\u984c\u306b\u3064\u3044\u3066",children:"\u8907\u6570\u306e BlendShape weight \u3092\u9069\u7528\u3059\u308b\u969b\u306e\u7af6\u5408\u306e\u554f\u984c\u306b\u3064\u3044\u3066"}),"\n",(0,d.jsxs)(n.p,{children:["\u3053\u306e\u7bc0\u3067\u306f\u3001\u306a\u305c ",(0,d.jsx)(n.code,{children:"SetValues"})," \u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304b\u3068\u3044\u3046\u7591\u554f\u306b\u56de\u7b54\u3057\u307e\u3059\u3002"]}),"\n",(0,d.jsxs)(n.p,{children:["\u305f\u3068\u3048\u3070 2 \u3064\u306e VRMBlendShape ",(0,d.jsx)(n.code,{children:"Blink_L"})," \u3068 ",(0,d.jsx)(n.code,{children:"Blink_R"})," \u304c"]}),"\n",(0,d.jsxs)(n.p,{children:["VRMBlendShape ",(0,d.jsx)(n.code,{children:"Blink_L"})]}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["Mesh ",(0,d.jsx)(n.code,{children:"A"})," \u306e Blendshape ",(0,d.jsx)(n.code,{children:"eye_close_L"})," \u306e weight \u5024 ",(0,d.jsx)(n.code,{children:"100"})]}),"\n",(0,d.jsxs)(n.li,{children:["Mesh ",(0,d.jsx)(n.code,{children:"A"})," \u306e Blendshape ",(0,d.jsx)(n.code,{children:"eye_close_R"})," \u306e weight \u5024 ",(0,d.jsx)(n.code,{children:"1"})]}),"\n"]}),"\n",(0,d.jsxs)(n.p,{children:["VRMBlendShape ",(0,d.jsx)(n.code,{children:"Blink_R"})]}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:["Mesh ",(0,d.jsx)(n.code,{children:"A"})," \u306e Blendshape ",(0,d.jsx)(n.code,{children:"eye_close_L"})," \u306e weight \u5024 ",(0,d.jsx)(n.code,{children:"1"})]}),"\n",(0,d.jsxs)(n.li,{children:["Mesh ",(0,d.jsx)(n.code,{children:"A"})," \u306e Blendshape ",(0,d.jsx)(n.code,{children:"eye_close_R"})," \u306e weight \u5024 ",(0,d.jsx)(n.code,{children:"100"})]}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\n\u3053\u306e\u3068\u304d\u4e21\u76ee\u3092\u9589\u3058\u305f\u3044\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u3001\u4e21\u65b9\u3092\u6709\u52b9\u306b\u3059\u308b\u610f\u56f3\u3067\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"proxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_L), 1.0f);\nproxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_R), 1.0f);\n"})}),"\n",(0,d.jsxs)(n.p,{children:["\u3059\u308b\u3068\u3001\u5de6\u76ee\u3060\u3051\u304c\u958b\u3044\u3066\u3057\u307e\u3044\u307e\u3059\u3002\n\u3053\u308c\u306f\u5f8c\u304b\u3089 ",(0,d.jsx)(n.code,{children:"ImmediateSetValue"})," \u3057\u305f ",(0,d.jsx)(n.code,{children:"Blink_R"})," \u304c ",(0,d.jsx)(n.code,{children:"Blink_L"})," \u3068\u7af6\u5408\u3057\u3066 weight \u3092\u4e0a\u66f8\u304d\u3057\u3066\u3057\u307e\u3046\u304b\u3089\u3067\u3059\u3002\n\u3057\u305f\u304c\u3063\u3066 VRM \u306e\u8868\u60c5\u5236\u5fa1\u306b\u304a\u3044\u3066\u306f\u4e0b\u8a18\u306e 2 \u901a\u308a\u306e\u3069\u3061\u3089\u304b\u306e\u65b9\u6cd5\u3067\u66f8\u304f\u3053\u3068\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\n\u3053\u308c\u3089\u306e\u65b9\u6cd5\u306f\u3053\u306e\u7af6\u5408\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u8868\u60c5\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"proxy.SetValues(new Dictionary<BlendShapeKey, float>\n{\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_L), 1.0f},\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_R), 1.0f},\n});\n"})}),"\n",(0,d.jsx)(n.p,{children:"\u307e\u305f\u306f"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"proxy.AccumulateValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_L), 1.0f); // \u3059\u3050\u306b\u9069\u7528\u305b\u305a\u306b\u305f\u304f\u308f\u3048\u308b\nproxy.AccumulateValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_R), 1.0f);\nproxy.Apply(); // \u84c4\u7a4d\u3057\u305f\u5024\u3092\u307e\u3068\u3081\u3066\u9069\u7528\u3059\u308b\n"})}),"\n",(0,d.jsx)(n.p,{children:"WIP"}),"\n",(0,d.jsx)(n.h2,{id:"\u4f55\u6545\u8907\u6570\u306esetter\u304c\u3042\u308b\u306e\u304b",children:"\u4f55\u6545\u3001\u8907\u6570\u306eSetter\u304c\u3042\u308b\u306e\u304b"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsx)(n.li,{children:"LipSync"}),"\n",(0,d.jsx)(n.li,{children:"\u77ac\u304d"}),"\n",(0,d.jsx)(n.li,{children:"\u8996\u7dda\u5236\u5fa1(BlendShape\u3067\u8996\u7dda\u3092\u52d5\u304b\u3059\u30bf\u30a4\u30d7\u306e\u30e2\u30c7\u30eb)"}),"\n",(0,d.jsx)(n.li,{children:"\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308b\u559c\u6012\u54c0\u697d"}),"\n"]}),"\n",(0,d.jsx)(n.p,{children:"\u4e0a\u8a18\u306e\u3088\u3046\u306a\u8907\u6570\u306eBlendShape\u304c\u5225\u3005\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304b\u3089\u8a2d\u5b9a\u3055\u308c\u305f\u5834\u5408\u306b\u3001\nBlendShape\u540c\u58eb\u304c\u7af6\u5408\u3059\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002\n\u5f8c\u3067\u8a2d\u5b9a\u3057\u305f\u5024\u3067\u4e0a\u66f8\u304d\u3055\u308c\u3066\u5e0c\u671b\u306eBlendShape\u304c\u9069\u7528\u3055\u308c\u306a\u3044\u3068\u3044\u3046\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002\n\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u4e00\u304b\u6240\u3067\u4e2d\u592e\u96c6\u6a29\u7684\u306b\u5236\u5fa1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002"}),"\n",(0,d.jsxs)(n.p,{children:["\u5408\u6210\u3057\u305f\u308a\u6392\u4ed6\u5236\u5fa1\u3057\u305f\u3001BlendShapeClip\u306e\u96c6\u5408\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u307e\u3068\u3081\u3066\u9069\u7528\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066 ",(0,d.jsx)(n.code,{children:"SetValues"})]}),"\n",(0,d.jsx)(n.h2,{id:"immediatelysetvalue",children:"ImmediatelySetValue"}),"\n",(0,d.jsx)(n.p,{children:"\u7c21\u5358\u306a\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306e\u5229\u7528\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002"}),"\n",(0,d.jsx)(n.p,{children:"\u4f8b\uff1a"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"var proxy = GetComponent<VRMBlendShapeProxy>();\n\nproxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.A), 1.0f);\n"})}),"\n",(0,d.jsx)(n.h2,{id:"accumulatevalue--apply",children:"AccumulateValue + Apply"}),"\n",(0,d.jsx)(n.p,{children:"\u4f8b\uff1a"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"var proxy = GetComponent<VRMBlendShapeProxy>();\n\nproxy.AccumulateValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_L), 1.0f); // \u3059\u3050\u306b\u9069\u7528\u305b\u305a\u306b\u305f\u304f\u308f\u3048\u308b\nproxy.AccumulateValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_R), 1.0f);\nproxy.Apply(); // \u84c4\u7a4d\u3057\u305f\u5024\u3092\u307e\u3068\u3081\u3066\u9069\u7528\u3059\u308b\n"})}),"\n",(0,d.jsx)(n.p,{children:"\u4e0b\u8a18\u306eSetValues\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002"}),"\n",(0,d.jsx)(n.h2,{id:"setvalues",children:"SetValues"}),"\n",(0,d.jsx)(n.p,{children:"BlendShape\u5408\u6210\u5668\u304c\u5fc5\u8981\u306b\u5fdc\u3058\u547c\u3073\u51fa\u3059\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002"}),"\n",(0,d.jsx)(n.p,{children:"\u4f8b\uff1a"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-csharp",children:"var proxy = GetComponent<VRMBlendShapeProxy>();\n\nproxy.SetValues(new Dictionary<BlendShapeKey, float>\n{\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_L), 1.0f},\n {BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink_R), 1.0f},\n});\n"})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(c,{...e})}):c(e)}},28453:(e,n,l)=>{l.d(n,{R:()=>t,x:()=>i});var r=l(96540);const d={},s=r.createContext(d);function t(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.