Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1006974 // Follow the mouse cursor with a heart

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (3527L/23K/80K).

!7

sS imageID = #1006973;
static int width = 200;

p {
  BufferedImage img = loadBufferedImage(imageID);
  BufferedImage resized = resizeImage(img, width);
  final Window w = showAnimation(resized);
  final Shape shape = scaleShape(alphaToShape(img), width/(double) img.getWidth());
  swing { w.setShape(shape); }
  
  repeat with ms sleep 20 {
    w.setLocation(mouseX()+2, mouseY()+2);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jmyaexzvplwz, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv

No comments. add comment

Snippet ID: #1006974
Snippet name: Follow the mouse cursor with a heart
Eternal ID of this version: #1006974/13
Text MD5: 0b158232d18206d408ef416c058b2f7c
Transpilation MD5: 76dbf0fa98d2d0257931a8eb1470f1aa
Author: stefan
Category: javax / gui effects
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-21 20:40:56
Source code size: 409 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 582 / 711
Version history: 12 change(s)
Referenced in: [show references]