Open Source JavaFX Now!

JFXtras Core Logo

Sphere

Provides a 3D effect Sphere shape as below:

Try it out

If you would like to try a sample of how this control operates, run the ShapesDemoFX.fx application in org.jfxtras.scene.shape.

Sample Code


Sphere { effect: Glow {} centerX: 70 centerY: 70 radius: 50 shadowHeight: 10 base: Color.hsb(hue, 1.0, 1.0) specular: Color.hsb(hue - 40, 0.9, 0.7) }

General Options

(see JavaFXDoc for details)

Parameter   Default   Description
centerX0x coordinate of the Sphere center
centerY0y coordinate of the Sphere center
radius20Radius of the Sphere
baseBLUESphere background color
edgeEdge color
ambientAmbient color
specularSpecular color
shineShine color
shadowSize0.7Shadow size as percent of Sphere
shadowHeight0Pixel displacement of shadow from Sphere



Other options may be available, including public variables and methods and will be detailed in the JavaFXDoc

<< Back to JFXtras FrontPage < Back to Shapes

1 Attachments 1 Attachments
537 Views