Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
TypeError no capturado: no se pueden leer las propiedades de undefined (leyendo 'marco')

Actualmente estoy tratando de animar algunos cuadros de una hoja de sprites usando Phaser3. La página representa con éxito el primer cuadro de la animación en la pantalla, pero falla cuando intento codificar en cualquiera de las animaciones.

Esto es lo que tengo hasta ahora:

 export default class Intro_Animation extends Phaser.Scene { constructor() { super('Intro_Animation'); } intro(){} preload() { this.load.path = './src/assets/intro/'; this.load.spritesheet('intro_frame', 'westwardJourney_02-Sheet.png', {frameWidth: 144, frameHeight: 130}); } create() { //fails somewhere in the animations here var introAnim_config = { key: 'introWalkAnim', frames: this.anims.generateFrameNumbers('intro_walk', { start: 0, end: 23, first: 23 }), frameRate: 20, repeat: -1 }; this.anims.create(introAnim_config); //loads in first frame here this.add.sprite(250, 150, 'intro_frame').play('introWalkAnim'); } }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Solo puedo suponer, sin conocer el mensaje de error exacto , que el frameWidth del marco y/o la altura del frameHeight es quizás demasiado grande (es decir: más grande que el tamaño real de la imagen, incluso para 1px es suficiente ) . Esto podría producir un error como:

Uncaught TypeError: Cannot read properties of undefined (reading 'duration') ...

y también mostrar una imagen.

Excepto esto, no conozco ninguna otra razón, cómo podría ocurrir un error, al mostrar al menos una parte de una imagen, y probé varias posibilidades y combinaciones.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!