【问题标题】:WebGL pink error in chromechrome中的WebGL粉红色错误
【发布时间】:2016-05-04 15:47:03
【问题描述】:

我正在尝试使用 pixie.js 编写简单的“游戏”from this side

我试图通过谷歌浏览器运行它,但是我收到了奇怪的错误:

我能做些什么来解决它?

编辑

index.js:225 中的错误代表这个:

isWebGLSupported: function ()
{
    var contextOptions = { stencil: true };
    try
    {
        if (!window.WebGLRenderingContext)
        {
            return false;
        }

        var canvas = document.createElement('canvas'),
            gl = canvas.getContext('webgl', contextOptions) || canvas.getContext('experimental-webgl', contextOptions);

        return !!(gl && gl.getContextAttributes().stencil);
    }
    catch (e)
    {
        return false;
    }
},

【问题讨论】:

    标签: google-chrome webgl pixi.js


    【解决方案1】:

    正如另一位用户所说,这不是错误。这是在任何加载了 pixi.js 库的页面上默认显示的欢迎消息。

    如果您想隐藏该消息,可以将其添加到您的页面:

    <script>
    PIXI.utils._saidHello = true;
    </script>
    

    【讨论】:

      猜你喜欢
      • 2016-01-27
      • 2021-01-03
      • 2022-07-29
      • 1970-01-01
      • 2018-05-25
      • 1970-01-01
      • 2018-01-25
      • 2017-05-20
      • 1970-01-01
      相关资源
      最近更新 更多