Hola, en primer lugar, gracias por la maravillosa biblioteca.
Pixi es increíble, ¡no puedo esperar a que salga v5!
Ahora, me he encontrado con un problema.
No puedo desplazar mi lienzo usando el desplazamiento móvil.
Estoy usando la versión ^4.7.1
Aquí está mi código
this.App = new Application(
Math.min(window.innerWidth, window.screen.width),
Math.min(window.innerHeight, window.screen.height),
{
backgroundColor: `0x${backgroundColor}`,
resolution: window.devicePixelRatio
}
);
this.App.renderer.plugins.interaction.autoPreventDefault = false; // notice that after adding this line still can't have scroll work.
this.App.renderer.autoResize = true;
this.App.renderer.plugins.interaction.autoPreventDefault = false;
this.App.renderer.view.style.touchAction = 'auto';
¡@rockmandash renderer.view.style.touchAction = 'auto';
hizo el truco para mí!
¿Esto está documentado en algún lugar? parece que pixi establece esta regla css ( touch-action
), en el propio elemento del lienzo?
Este hilo se ha bloqueado automáticamente ya que no ha habido ninguna actividad reciente después de que se cerró. Abra un nuevo problema para los errores relacionados.
Comentario más útil