Jump to content

PIXI & DOM Inpus


Recommended Posts


There's no clear article on that, but Accessability package of pixijs has all necessary code inside. Also you can copy something from https://github.com/Mwni/PIXI.TextInput .

Basically, need to take calculated transform matrix from pixi element and put it to css transform of DOM element.

Edited by ivan.popelyshev
Link to comment
Share on other sites

  • 2 weeks later...

sample use:
html page section

<input id = "number1_input" type = "number" min = "0" max = "100000" value = "10" onchange = "html_inputChange_Sayi1 ()" onkeyup = "html_inputChange_Sayi1 ()" style = "visibility: hidden">


window.addEventListener('resize', resize);
window.addEventListener('orientationchange', resize);

var w,h;
function resize() {

    var canvasRatio = 800 / 1440; ////canvas genişlik ve canvas yükseklik
    var windowRatio = window.innerHeight / window.innerWidth;


    if (windowRatio < canvasRatio) {
        h = window.innerHeight;  
        w = h / canvasRatio;
    } else {
        w = window.innerWidth;
        h = w * canvasRatio;
    app.view.style.width = w + 'px';
    app.view.style.height = h + 'px';

function resizeHtmlElement(){

    var sayı1_size_degis=document.getElementById('number1_input');




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...