X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fexamples%2FRainingNumbersDemo.java;h=c42f6f861371b24ad6de5edba1aafb41b9f10442;hp=557d5ff539c280851e0bee36ca352811569e981e;hb=63b799f7add2ebb5cd30b50c2581bc246f6e7b82;hpb=335758c2678788d95da705b28dbebe4ba206c103 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java index 557d5ff..c42f6f8 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java @@ -9,16 +9,15 @@ package eu.svjatoslav.sixth.e3d.examples; import eu.svjatoslav.sixth.e3d.geometry.Point3D; -import eu.svjatoslav.sixth.e3d.math.Transform; -import eu.svjatoslav.sixth.e3d.gui.ViewContext; import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.gui.ViewPanel; import eu.svjatoslav.sixth.e3d.gui.ViewRenderListener; +import eu.svjatoslav.sixth.e3d.math.Transform; import eu.svjatoslav.sixth.e3d.renderer.raster.Color; import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.textcanvas.TextCanvas; -import java.io.IOException; import java.util.Collection; import java.util.Random; @@ -28,15 +27,15 @@ public class RainingNumbersDemo implements ViewRenderListener { private final static int AREA = 600; private final static int AREA_HALF = AREA / 2; - public static void main(final String[] args) throws IOException { + public static void main(final String[] args) { new RainingNumbersDemo().run(); } @Override - public boolean beforeRender(final ViewContext viewContext, + public boolean beforeRender(final ViewPanel viewPanel, final int millisecondsSinceLastFrame) { - final Collection shapes = viewContext + final Collection shapes = viewPanel .getRootShapeCollection().getShapes(); final double translateAmount = millisecondsSinceLastFrame / 50d; @@ -53,11 +52,11 @@ public class RainingNumbersDemo implements ViewRenderListener { return true; } - private void run() throws IOException { + private void run() { final ViewFrame viewFrame = new ViewFrame(); final ShapeCollection geometryCollection = viewFrame.getViewPanel() - .getContext().getRootShapeCollection(); + .getRootShapeCollection(); Random random = new Random();