text.cacheAsBitmap = true throws error.
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- backend
調査の方向性
The report points to _CreateFramebuffer and PIXI.FilterTexture in the WebGL code but gives no file path or test. Start by locating those functions and tracing how framebuffer creation is called when Text.cacheAsBitmap is enabled. Confirm the reported renderBuffer error and verify the fix by exercising bitmap caching in the affected Phaser version.
索引モデルが issue の本文から書いたものです。
説明
This Issue is about (pick one, ✏️ delete others)
- A bug in the API: Text.cacheAsBitmap
- Phaser version(s): 2.10.6
- What should happen: The text should be cached as bitmap
- What happens instead: Uncaught TypeError: Cannot read property 'renderBuffer' of undefined
Error is in this piece of code -
The below function is not associated with a class so "this.renderBuffer" is not accessible. Possible fix is calling this function using call method and passing "this" as context.
function _CreateFramebuffer (gl, width, height, scaleMode, textureUnit)
{
var framebuffer = gl.createFramebuffer();
var depthStencilBuffer = gl.createRenderbuffer();
var colorBuffer = null;
var fbStatus = 0;
gl.activeTexture(gl.TEXTURE0 + textureUnit);
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, this.renderBuffer);
colorBuffer = _CreateEmptyTexture(gl, width, height, scaleMode);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorBuffer, 0);
fbStatus = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
if(fbStatus !== gl.FRAMEBUFFER_COMPLETE)
{
console.error('Incomplete GL framebuffer. ', _fbErrors[fbStatus]);
}
framebuffer.width = width;
framebuffer.height = height;
framebuffer.targetTexture = colorBuffer;
framebuffer.renderBuffer = depthStencilBuffer;
return framebuffer;
}
PIXI.FilterTexture = function (gl, width, height, scaleMode, textureUnit)
{
textureUnit = typeof textureUnit === 'number' ? textureUnit : 0;
/**
* @property gl
* @type WebGLContext
*/
this.gl = gl;
// next time to create a frame buffer and texture
/**
* @property frameBuffer
* @type Any
*/
// this.frameBuffer = _CreateFramebuffer(gl, width, height, scaleMode || PIXI.scaleModes.DEFAULT, textureUnit);
// The below line fixes the error.
this.frameBuffer = _CreateFramebuffer.call (this, gl, width, height, scaleMode || PIXI.scaleModes.DEFAULT, textureUnit);
/**
* @property texture
* @type Any
*/
this.texture = this.frameBuffer.targetTexture;
this.width = width;
this.height = height;
this.renderBuffer = this.frameBuffer.renderBuffer;
};
- 主要言語
- JavaScript
- スター
- 1.4k
- フォーク
- 485
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
phaserjs/phaser-ce のほかの issue
-
Web audio stops playing in iOS 17 and 18 after refocusing再び着手できるかも @samme が 633 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
phaserjs/phaser-ce#748 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
phaserjs/phaser-ce#740 · コメント 9 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
phaserjs/phaser-ce#724 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
phaserjs/phaser-ce#711 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
phaserjs/phaser-ce の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
needs:triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
fix(readme): skills.sh badge says 'resource not found' and the skills.sh link is a 404; skills.sh still lists the old name tdk-skills対応中かも @bfs2021 が今日担当しました。 オープンarea: ci area: docs badge bug chore cleanup consistency developer-experience difficulty: easy docs documentation good first issue hygiene journey: first-visit links priority: P3 skills user-journey
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
flisk-sh/flisk-skills#39 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Ionaru/easy-markdown-editor#656 ·