interface BMFontChar wrong texture type defined

Abierto
#589 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
1.4k
Forks
485
Merge medio
1 d 2 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de phaserjs/phaser-ce

Todos los issues de phaserjs/phaser-ce

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.