abbas jafari Posted February 24, 2020 Share Posted February 24, 2020 hi. i use element html in pixi.js by this plugin https://github.com/EneaEntertainment/pixi-html-element-wrapper i create an input and add it on stage. but this z-index not working. for example: I first added input . then added this picture but input zIndex not working . and allways get on other object. please heelppp me Quote Link to comment Share on other sites More sharing options...
bubamara Posted February 24, 2020 Share Posted February 24, 2020 Hi, pixi-html-element-wrapper allows you to position HTML elements above or below Pixi canvas. Input is HTML element and image is sprite added to Pixi stage, is that correct? In that case it works like intended. Input's z-index will affect it's Z position only against canvas in which Pixi is living in. Sprite added to Pixi stage is 'part' of that canvas. Quote Link to comment Share on other sites More sharing options...
abbas jafari Posted February 24, 2020 Author Share Posted February 24, 2020 (edited) @bubamara thanks for reply. yes. input is element and picture is sprite that added on stage. so , you want say not any way to handle this problem?? if I want put a html input under one sprite not any way? Edited February 24, 2020 by abbas jafari Quote Link to comment Share on other sites More sharing options...
bubamara Posted February 24, 2020 Share Posted February 24, 2020 yes, not possible with HTML elements. You can position HTML element only above or below Pixi canvas. abbas jafari 1 Quote Link to comment Share on other sites More sharing options...
abbas jafari Posted February 24, 2020 Author Share Posted February 24, 2020 @bubamara thanks a lot Quote Link to comment Share on other sites More sharing options...
bubamara Posted February 24, 2020 Share Posted February 24, 2020 You're welcome. If you need to combine those two inside of pixi stage, you'll have to write your own pure pixi input unfortunatelly abbas jafari 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 24, 2020 Share Posted February 24, 2020 There's https://github.com/Mwni/PIXI.TextInput abbas jafari 1 Quote Link to comment Share on other sites More sharing options...
abbas jafari Posted February 24, 2020 Author Share Posted February 24, 2020 @ivan.popelyshev yess its greate. when unFoucuse . this plugin convert string in input to SpriteText. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.