Example #1
0
            public JsInfo CreateContext()
            {
                var resultString = WebAssemblyRuntime.InvokeJSWithInterop($"return {this}.createContext('{Panel.GetHtmlId()}');");
                var result       = resultString?.Split(',');

                if (result?.Length != 5)
                {
                    return(default);
 protected override void SetAnimationFramesInterval()
 {
     if (Handle.IsAlive)
     {
         WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetAnimationFramesInterval();");
     }
     else if (this.Log().IsEnabled(LogLevel.Debug))
     {
         this.Log().Debug("Cannot SetAnimationFramesInterval as Handle is no longer alive.");
     }
 }
 protected override void SetStartFrameDelay(long delayMs)
 {
     if (Handle.IsAlive)
     {
         WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetStartFrameDelay({delayMs});");
     }
     else if (this.Log().IsEnabled(LogLevel.Debug))
     {
         this.Log().Debug("Cannot SetStartFrameDelay as Handle is no longer alive.");
     }
 }
 protected override void DisableFrameReporting()
 {
     if (Handle.IsAlive)
     {
         WebAssemblyRuntime.InvokeJSWithInterop($"{this}.DisableFrameReporting();");
     }
     else if (this.Log().IsEnabled(LogLevel.Debug))
     {
         this.Log().Debug("Cannot DisableFrameReporting as Handle is no longer alive.");
     }
 }
Example #5
0
 public void ResizeCanvas() =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.resizeCanvas();");
Example #6
0
 public void SetEnableRenderLoop(bool enable) =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.setEnableRenderLoop({(enable ? "true" : "false")});");
Example #7
0
 public void RequestAnimationFrame(bool renderLoop) =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.requestAnimationFrame({(renderLoop ? "true" : "false")});");
 protected override void SetAnimationFramesInterval() => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetAnimationFramesInterval();");
 protected override void SetStartFrameDelay(long delayMs) => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetStartFrameDelay({delayMs});");
Example #10
0
 protected override void DisableFrameReporting() => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.DisableFrameReporting();");
Example #11
0
 public void SetCurrent() =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.setCurrent();");