Skip to content

Instantly share code, notes, and snippets.

@petrukhnov
Created January 4, 2017 05:55
Show Gist options
  • Select an option

  • Save petrukhnov/25dad4e2db9334a5efd513c5c1222065 to your computer and use it in GitHub Desktop.

Select an option

Save petrukhnov/25dad4e2db9334a5efd513c5c1222065 to your computer and use it in GitHub Desktop.
@Override
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry("Box", b);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
rootNode.attachChild(geom);
Cylinder cyl = new Cylinder(100, 200, 20, 100);
Geometry geom2 = new Geometry("Cyl", cyl);
Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat2.setColor("Color", ColorRGBA.Green);
geom2.setMaterial(mat2);
rootNode.attachChild(geom2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment