Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
package com.sun.j3d.utils.geometry;
import javax.media.j3d.QuadArray;
import javax.media.j3d.Shape3D;
public class ColorCube extends Shape3D
{
private static final float[] verts = { 1.0F, -1.0F, 1.0F, 1.0F, 1.0F, 1.0F, -1.0F, 1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, -1.0F, -1.0F, -1.0F, 1.0F, -1.0F, 1.0F, 1.0F, -1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, -1.0F, 1.0F, 1.0F, -1.0F, 1.0F, 1.0F, 1.0F, 1.0F, -1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, 1.0F, 1.0F, -1.0F, 1.0F, -1.0F, -1.0F, -1.0F, -1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, -1.0F, 1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, -1.0F, -1.0F, 1.0F, -1.0F, -1.0F, 1.0F, -1.0F, 1.0F };
private static final float[] colors = { 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F };
double scale;
public ColorCube()
{
QuadArray localQuadArray = new QuadArray(24, 5);
localQuadArray.setCoordinates(0, verts);
localQuadArray.setColors(0, colors);
setGeometry(localQuadArray);
this.scale = 1.0D;
}
public ColorCube(double paramDouble)
{
QuadArray localQuadArray = new QuadArray(24, 5);
float[] arrayOfFloat = new float[verts.length];
for (int i = 0; i < verts.length; ++i)
arrayOfFloat[i] = (verts[i] * (float)paramDouble);
localQuadArray.setCoordinates(0, arrayOfFloat);
localQuadArray.setColors(0, colors);
setGeometry(localQuadArray);
this.scale = paramDouble;
}
/**
* @deprecated
*/
public Shape3D getShape()
{
return this;
}
public double getScale()
{
return this.scale;
}
}