コード例 #1
0
 public virtual void Run(JSObject canvas, float canvasWidth, float canvasHeight, Color clearColor)
 {
     gl = WebGL.GetContext(canvas);
     this.canvasWidth  = canvasWidth;
     this.canvasHeight = canvasHeight;
     this.clearColor   = clearColor;
 }
コード例 #2
0
ファイル: Profile.cs プロジェクト: nintran1995/MMOApp
        private void WindowsPCProfile(Models.Device device)
        {
            Id              = device.ID;
            Name            = device.Name;
            Email           = device.Email.EmailAccount;
            Description     = "";
            OperatingSystem = "";

            #region Device
            CPU = new CPU {
                DeviceMemory = 16, HardwareConcurrency = 8
            };
            Battery = new Battery {
                Charging = true, ChargingTime = 1486, DischargingTime = 1328, Level = 0.52
            };
            EnableAudioApi     = false;
            EnablePlugins      = false;
            EnableMediaPlugins = false;
            #endregion Device

            Fonts = Fonts.Windows10;

            #region Content
            RandomTimersEnabled = true;
            UserAgent           = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36";
            Screen = new CommandModel.Screen {
                Width = 1680, Height = 1050, Color = 24
            };
            HistoryLength = 2;
            #endregion Content

            #region Fingerprint
            WebGL = new WebGL {
                Plus1 = 1007, Plus2 = 25502, Plus3 = 31603, Plus4 = 42975, Plus5 = 12677, BrowserplugsR = 88
            };
            FakeClientRects = true;
            Canvas          = new Canvas {
                R = 5, G = 4, B = 1
            };
            #endregion Fingerprint

            #region Geo
            EnableNetwork = true;
            Language      = "en";
            GeoIpEnabled  = true;
            #endregion Geo

            #region Proxy
            ProxyEnabled     = true;
            Proxies          = new List <Proxy>();
            ByPassProxySites = new List <string>();
            #endregion
        }
コード例 #3
0
ファイル: Profile.cs プロジェクト: nintran1995/MMOApp
 public Profile()
 {
     BackupItems      = new List <BackupItem>();
     ActionLogs       = new List <ActionLog>();
     Proxies          = new List <Proxy>();
     ByPassProxySites = new List <string>();
     CPU             = new CPU();
     WebGL           = new WebGL();
     Battery         = new Battery();
     Canvas          = new Canvas();
     Screen          = new Screen();
     OperatingSystem = "WindowsPC";
 }
コード例 #4
0
    public void ExitGame()
    {
        #if UNITY_WEBGL
        WebGL TempWebGLScpript = FindObjectOfType <WebGL>();
        if (!TempWebGLScpript)
        {
            Debug.LogError("Das Script WEBGL wurde in der aktuellen Scene nicht gefunden! Es konnte keine URL zu einer anderen Webseite geöffnet werden.");
        }

        TempWebGLScpript.OpenURL();
        #else
        Application.Quit();
        #endif
    }
コード例 #5
0
        public static void CheckWebGLError()
        {
            var    error    = WebGL.GetError();
            string errorStr = "GL_NO_ERROR";

            switch (error)
            {
            case WebGL.GL_NO_ERROR:
                errorStr = "GL_NO_ERROR";
                break;

            case WebGL.GL_INVALID_ENUM:
                errorStr = "GL_INVALID_ENUM";
                break;

            case WebGL.GL_INVALID_VALUE:
                errorStr = "GL_INVALID_VALUE";
                break;

            case WebGL.GL_INVALID_OPERATION:
                errorStr = "GL_INVALID_OPERATION";
                break;

            case WebGL.GL_STACK_OVERFLOW:
                errorStr = "GL_STACK_OVERFLOW";
                break;

            case WebGL.GL_STACK_UNDERFLOW:
                errorStr = "GL_STACK_UNDERFLOW";
                break;

            case WebGL.GL_OUT_OF_MEMORY:
                errorStr = "GL_OUT_OF_MEMORY";
                break;

            case WebGL.GL_INVALID_FRAMEBUFFER_OPERATION:
                errorStr = "GL_INVALID_FRAMEBUFFER_OPERATION";
                break;

            case WebGL.GL_CONTEXT_LOST:
                errorStr = "GL_CONTEXT_LOST";
                break;
            }

            if (error != GL.GL_NO_ERROR)
            {
                throw new Exception(String.Format("glError: 0x{0:X} ({1})", error, errorStr));
            }
        }
コード例 #6
0
ファイル: QuitButton.cs プロジェクト: mirenbhakta/UDC-Jam-7
 public void Quit()
 {
     WebGL.Quit();
 }
コード例 #7
0
 public static void OpenPdfByReleativePath(string path)
 {
     WebGL.OpenPdfByUrl(Application.streamingAssetsPath + "/PDFFiles/" + path);
 }