batman Posted February 28, 2018 Share Posted February 28, 2018 Hi everyone, I checked many articles about this topic. All what I tried didn`t work for me. But unfortunately there is no clear vision what are the steps to make your custom designed (from your png or cur file) cursor view. Just simply change from default one (white arrow) to my own. The questions are the follows: What kind of variables I should declare? Where in the code I should declare them (like global, or in setup function, or update function)? Examples: Complete code to use cursor defined in CSS file? ( example of css, and js file). Nothing else, just using cursor style defined in CSS. Complete code of defining your own cursor in js file (pixi application). Nothing else, just using my own cursor style (png, cur) in PIXI application. Any other solution. I think replies on these questions will shed the light on this mysterious topic. What I checked: And finally this one: https://github.com/pixijs/pixi.js/issues/4238 + some minors Thank you in advance, Quote Link to comment Share on other sites More sharing options...
Exca Posted February 28, 2018 Share Posted February 28, 2018 One way to achieve that is to have a container inside your container that is being rendered and use following: container.cursor = "url('path to image'),auto"; Another way is to just set it with css directly to parent of canvas. There's also settings in interactionmanager for default styles. Quote Link to comment Share on other sites More sharing options...
batman Posted March 2, 2018 Author Share Posted March 2, 2018 Exca, thanks for reply. But is there any chance to show full example? Quote Link to comment Share on other sites More sharing options...
Exca Posted March 5, 2018 Share Posted March 5, 2018 Sure, I'll try to get one made during this week. batman 1 Quote Link to comment Share on other sites More sharing options...
Exca Posted March 7, 2018 Share Posted March 7, 2018 Here's an example: http://pixijs.io/examples/#/demos/custom-mouse-icon.js batman, OSUblake and ivan.popelyshev 3 Quote Link to comment Share on other sites More sharing options...
batman Posted March 12, 2018 Author Share Posted March 12, 2018 Exca, thanks, exactly what was needed Quote Link to comment Share on other sites More sharing options...
jasonsturges Posted September 11, 2019 Share Posted September 11, 2019 Since this is the #1 Google Search result for changing Pixi cursor, just noting the URL appears to have updated: https://pixijs.io/examples/#/interaction/custom-mouse-icon.js themoonrat and Tiggs 2 Quote Link to comment Share on other sites More sharing options...
haseeb Posted December 1, 2020 Share Posted December 1, 2020 Hi everyone, anyone can help me on this ?https://konvajs.org/docs/select_and_transform/Transform_Events.html i want to implement this on pixi. 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.