예제 #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);
        }