コード例 #1
0
 private async void Init(IJSRuntime runtime, ElementReference?element, PoseNetOptions options, DetectionType?type)
 {
     Runtime         = runtime;
     DotNetObjectRef = DotNetObjectReference.Create(this);
     Hash            = PoseNetHash++;
     await runtime.InvokeVoidAsync("poseNetML5", Hash.ToString(), DotNetObjectRef, element, options, type);
 }
コード例 #2
0
 public PoseNet(IJSRuntime runtime, ElementReference element, PoseNetOptions options)
 {
     Init(runtime, element, options, null);
 }
コード例 #3
0
 public PoseNet(IJSRuntime runtime, PoseNetOptions options)
 {
     Init(runtime, null, options, null);
 }
コード例 #4
0
        private async void Init(IJSInProcessRuntime runtime, ElementReference?element, PoseNetOptions options, DetectionType?type)
        {
            Runtime         = runtime;
            DotNetObjectRef = DotNetObjectReference.Create(this);
            JSReference     = await Runtime.InvokeAsync <IJSInProcessObjectReference>("import", "./_content/BlazorML5/ml5PoseNet.js");

            Hash = PoseNetHash++;
            JSReference.InvokeVoid("poseNetML5", Hash.ToString(), DotNetObjectRef, element, options, type);
        }