Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.InfoPhysics
Source: src/com/multiversesocial/hyperview/InfoPhysics.java
Three InfoSteps of the Info demo (V3.23), registered in InfoSteps.all() after the outline step. Each builds its examples in code when the step starts, animates in tick(), and puts back the settings it changed in teardown().
gob-rotation): the same arrow at 0, 30, 60, 90 and 180 degrees with its outline polygon drawn; spinners with ROTATE_NEAREST and ROTATE_BILINEAR (the bilinear one is selected: its yellow polygon turns), and one that is also scaled by z.gob-physics): bouncing walls (CollisionManager.walls) and four lanes — R and B bounce with mass 1 and 3 (momentum and energy of the pair), Y and Z with restitution 0 go on together, P shoots T (45 hit points; damage = impact energy; T explodes and respawns), S is a RESPONSE_STOP ball that stops in the sand block.gob-pick): a ring in front of a box (the hole lets the click through), a turned bar, an L turned by -20 degrees, two overlapping boxes. pickOnClick is on, so a real mouse click selects; when you do not click, a scripted probe (red cross) does it.public class InfoPhysics
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
static final int PEN_CYAN | = 14 | No comment in source. | |
static final int PEN_DKGREY | = 8 | No comment in source. | |
static final int PEN_GREEN | = 5 | No comment in source. | |
static final int PEN_LTGREY | = 9 | No comment in source. | |
static final int PEN_ORANGE | = 6 | No comment in source. | |
static final int PEN_RED | = 2 | No comment in source. | |
static final int PEN_WHITE | = 1 | No comment in source. | |
static final int PEN_YELLOW | = 3 | No comment in source. |
| Signature | Description | Source |
|---|
| Signature | Description | Source |
|---|---|---|
static BufferedImage arrowImg(int w, int h, int rgb) | an arrow pointing right (the nose is the right end) with a round hole in the body | |
static BufferedImage boxImg(int w, int h, int rgb) | No comment in source. | |
static BufferedImage discImg(int dia, int rgb) | a disc with a white bar through its centre, so that a turn can be seen | |
static String f1(double v) | No comment in source. | |
static Gob gobOf(InfoDispatch d, String name, BufferedImage img) | sprites (drawn in code; every Gob's outline is traced from its alpha channel) | |
static BufferedImage lImg(int w, int h, int rgb) | No comment in source. | |
static String pad(String s, int n) | No comment in source. | |
static void polyLines(InfoDispatch d, Polygon q, int pen) | No comment in source. | |
static BufferedImage ringImg(int dia, int hole, int rgb) | No comment in source. | |
static BufferedImage sandImg(int w, int h) | No comment in source. |
// a step is an InfoStep: build() creates, tick() animates (about every 100 ms), teardown() puts settings back l.add(new InfoPhysics.RotationStep()); l.add(new InfoPhysics.PhysicsStep()); l.add(new InfoPhysics.PickStep());