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

                if (result?.Length != 5)
                {
                    return(default);
예제 #2
0
 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.");
     }
 }
예제 #3
0
 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.");
     }
 }
예제 #4
0
 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.");
     }
 }
예제 #5
0
 public void ResizeCanvas() =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.resizeCanvas();");
예제 #6
0
 public void SetEnableRenderLoop(bool enable) =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.setEnableRenderLoop({(enable ? "true" : "false")});");
예제 #7
0
 public void RequestAnimationFrame(bool renderLoop) =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.requestAnimationFrame({(renderLoop ? "true" : "false")});");
예제 #8
0
 protected override void SetAnimationFramesInterval() => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetAnimationFramesInterval();");
예제 #9
0
 protected override void SetStartFrameDelay(long delayMs) => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.SetStartFrameDelay({delayMs});");
예제 #10
0
 protected override void DisableFrameReporting() => WebAssemblyRuntime.InvokeJSWithInterop($"{this}.DisableFrameReporting();");
예제 #11
0
 public void SetCurrent() =>
 WebAssemblyRuntime.InvokeJSWithInterop($"{this}.setCurrent();");