interface BMFontChar wrong texture type defined

オープン
#589 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
frontend

調査の方向性

Start by finding the BMFontChar interface and checking its texture property type; the issue identifies the mismatch between PIXI.BaseTexture and PIXI.Texture. Update the type to match the texture passed in the example, then confirm the interface accepts that assignment. The issue is nearly eight years old with no recent activity, so check whether this work is still relevant before starting.

索引モデルが issue の本文から書いたものです。

説明

bug needs code example

This Issue is about (pick one, ✏️ delete others)

  • A bug in the API:
    • Phaser version(s): 2.11.0
    • Live example: creating custom Phaser.BMFontChar

fontData.chars[5000] = {
x: f.x,
y: f.y,
width: f.width,
height: f.height,
xOffset: 1,
yOffset: charA.yOffset + Math.floor((charA.height - f.height) / 2),
xAdvance: f.width + 2,
kerning: [],
texture: new PIXI.Texture(font.base, new PIXI.Rectangle(f.x, f.y, f.width, f.height))
};

  • What should happen: it should accept PIXI.Texture type for texture property
  • What happens instead: it throws error, because its defined PIXI.BaseTexture type

Changing texture type property in BMFontChar interface from PIXI.BaseTexture to PIXI.Texture solves the issue.

主要言語
JavaScript
スター
1.4k
フォーク
485
平均マージ
1日 2時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

phaserjs/phaser-ce のほかの issue

phaserjs/phaser-ce の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。