Pixi.js: autoPreventDefault๊ฐ€ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์—ฌ์ „ํžˆ ์Šคํฌ๋กค์„ ๋งŒ์งˆ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2018๋…„ 04์›” 02์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: pixijs/pixi.js

์•ˆ๋…•ํ•˜์„ธ์š”, ๋จผ์ € ๋ฉ‹์ง„ ๋„์„œ๊ด€์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
Pixi๋Š” ํ›Œ๋ฅญํ•ฉ๋‹ˆ๋‹ค. v5๊ฐ€ ๋‚˜์˜ฌ ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆด ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค!
์ด์ œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.
๋ชจ๋ฐ”์ผ ์Šคํฌ๋กค์„ ์‚ฌ์šฉํ•˜์—ฌ ์บ”๋ฒ„์Šค๋ฅผ ์Šคํฌ๋กคํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
^4.7.1 ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ ๋‚ด ์ฝ”๋“œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค

    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';

๋ชจ๋“  4 ๋Œ“๊ธ€

    this.App.renderer.plugins.interaction.autoPreventDefault = false;
    this.App.renderer.view.style.touchAction = 'auto';

@rockmandash renderer.view.style.touchAction = 'auto'; ์ด(๊ฐ€) ๋‚˜๋ฅผ ์œ„ํ•ด ์†์ž„์ˆ˜๋ฅผ ์ผ์Šต๋‹ˆ๋‹ค!

์ด๊ฒƒ์€ ์–ด๋”˜๊ฐ€์— ๋ฌธ์„œํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๊นŒ?! pixi๊ฐ€ ์บ”๋ฒ„์Šค ์š”์†Œ ์ž์ฒด์—์„œ ์ด CSS ๊ทœ์น™( touch-action )์„ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ž…๋‹ˆ๊นŒ?

์ด ์Šค๋ ˆ๋“œ๋Š” ๋‹ซํžŒ ํ›„ ์ตœ๊ทผ ํ™œ๋™์ด ์—†์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ž๋™์œผ๋กœ ์ž ๊ฒผ์Šต๋‹ˆ๋‹ค. ๊ด€๋ จ ๋ฒ„๊ทธ์— ๋Œ€ํ•œ ์ƒˆ ๋ฌธ์ œ๋ฅผ ์—ฌ์‹ญ์‹œ์˜ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰