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=6e76b1d54ad0d6b3ed80720ffb7fb9ef63132962;hp=557d5ff539c280851e0bee36ca352811569e981e;hb=04220ddc40ea23ff3fa0d397d2c53db66f76952c;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..6e76b1d 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java @@ -1,24 +1,21 @@ /* - * Sixth 3D engine demos. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine demos. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 3 of the GNU Lesser General Public License - * or later as published by the Free Software Foundation. - */ +*/ 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 +25,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 +50,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();