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); }
public PoseNet(IJSRuntime runtime, ElementReference element, PoseNetOptions options) { Init(runtime, element, options, null); }
public PoseNet(IJSRuntime runtime, PoseNetOptions options) { Init(runtime, null, options, null); }
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); }