0.0.9 • Published 1 year ago

pixidom.js v0.0.9

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

Pixi Dom

Starting a library with pixi interface elements

examples folder is best place to look

Bitmap Font Textfields

PIXI.loader.add('./fonts/small.fnt');
PIXI.loader.load(() => {
   const textInput = new PIXI_DOM.TextField('small');
   
   // define which keys can fire off the "onSubmit" event, by default its just 13 (enter key)
   textInput.submitKeyCodes = ([13]);
   
    // can define keys to ignore, this would ignore all tab presses as input
    textInput.ignoreKeys = ([9]) 

   // manually focus
   textInput.focus();
   // manually blur
   textInput.blur();
   // manually clear text
   textInput.clear();
   // manually trigger submit
   textInput.submit();
   // manually change
   textInput.change("Text to change to");
   
   // fired off when focused
   textInput.onFocus(() => {});
   // fired off when blurred
   textInput.onBlur(() => {});
   // fired off when text changes
   textInput.onChange((text) => {});
   // fired off when hit submit button
   textInput.onSubmit(() => {});
})
0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

6 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago