[x3d-public] x3d-public Digest, Vol 92, Issue 8

Andreas Plesch andreasplesch at gmail.com
Sat Nov 5 06:30:09 PDT 2016


x3dom allows use of css color names directly as SFColor values. This would
be a great addition to x3d v4.0, perhaps just for the xml encoding.

-Andreas

On Fri, Nov 4, 2016 at 3:05 PM, <x3d-public-request at web3d.org> wrote:

> Send x3d-public mailing list submissions to
>         x3d-public at web3d.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> or, via email, send a message with subject or body 'help' to
>         x3d-public-request at web3d.org
>
> You can reach the person managing the list at
>         x3d-public-owner at web3d.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of x3d-public digest..."
>
>
> Today's Topics:
>
>    1. Re: announce: X3D Java Scene Authoring Interface (SAI) open
>       source, beta supports colors and field names for ROUTEs (Don
> Brutzman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 4 Nov 2016 12:04:58 -0700
> From: Don Brutzman <brutzman at nps.edu>
> To: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: [x3d-public] announce: X3D Java Scene Authoring Interface
>         (SAI) open source, beta supports colors and field names for ROUTEs
> Message-ID: <ef017f6d-1a6c-50e3-28dd-ddc3d62cafa3 at nps.edu>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Two nice programming features have emerged during beta-test development.
>
>         X3D Java Scene Access Interface (SAI) Library
>         http://www.web3d.org/specifications/java/X3dJavaSceneAuthori
> ngInterface.html
>
> 1.  /Complete/. Added support for numerous hexadecimal 0xRRGGBB integer
> colors (through defined constants and utility methods) to SFColorObject and
> related classes.
>
> Reference:
> CSS Color Module Level 3, 4.3. Extended color keywords
> https://www.w3.org/TR/css3-color/#svg-color
>
> 147 Web colors provided as Java SFColor RGB values:
> http://www.web3d.org/specifications/java/javadoc/org/web3d/
> x3d/java/fields/SFColorObject.html
> http://www.web3d.org/specifications/java/javadoc/org/web3d/
> x3d/java/fields/SFColorObject.html#ALICEBLUE
>
> Example source showing use:
>
> boxMaterial.setDiffuseColor(MaterialObject.DIFFUSECOLOR_DEFAULT_VALUE);
> boxMaterial.setDiffuseColor(new float[] {0, 1, 1});
>           // equivalent
> boxMaterial.setDiffuseColor((new SFColorObject(0.0f, 1.0f,
> 1.0f)).toFloatArray()); // equivalent
> boxMaterial.setDiffuseColor((new SFColorObject(0x00FFFF)).toFloatArray());
>        // equivalent
> boxMaterial.setDiffuseColor(SFColorObject.CYAN);
>          // equivalent
>
>
> 2. /Complete/. Add string constants naming each field eligible for ROUTE
> connections,
> e.g. OrientationInterpolatorObject.toField_SET_FRACTION and
>        OrientationInterpolatorObject.fromField_VALUE_CHANGED.
>
> Example source showing use:
>
> ROUTEObject  spinROUTE = new ROUTEObject();
> spinROUTE.setFromNode(clockDEF).setFromField("fraction_changed")
>                  .setToNode(orientationInterpolatorDEF).setToField("set_fraction");
>    // equivalent, typos possible
>
> spinROUTE.setFromNode(clockDEF)
>                  .setFromField(TimeSensorObjec
> t.fromField_FRACTION_CHANGED)
>                  .setToNode(orientationInterpolatorDEF)
>                  .setToField(OrientationInterpolatorObject.toField_SET_FRACTION);
>      // equivalent, correctly named
>
> http://www.web3d.org/specifications/java/javadoc/org/web3d/
> x3d/java/Interpolation/OrientationInterpolatorObject.html#
> toField_SET_FRACTION
> http://www.web3d.org/specifications/java/javadoc/org/web3d/
> x3d/java/Interpolation/OrientationInterpolatorObject.html#
> fromField_VALUE_CHANGED
>
> As with other Java constructs, these field names get automatically
> generated into the Java SAI Library by using information found the X3D
> Object Model.  So these string constants are always correct and always
> available to the programmer.  It is always valuable to try pushing error
> detection from end-user run time (ouch) to programmer compile time (aha, a
> bug to fix).  These good programming practices add up, and all help X3D
> Quality Assurance (QA).
>
>
> 3. Test program and library are getting daily improvements.  Source and
> resultant demo scene online at
>
> http://www.web3d.org/specifications/java/examples/
> http://www.web3d.org/specifications/java/examples/HelloWorldProgram.java
> http://www.web3d.org/specifications/java/examples/HelloWorld
> ProgramOutput.x3d
>
> inversion control
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x
> 3d/stylesheets/java/examples
>
> Have fun with X3D Java!
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzma
> n
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: HelloWorldProgram.java.png
> Type: image/png
> Size: 39287 bytes
> Desc: not available
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments
> /20161104/81aa7236/attachment.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 92, Issue 8
> *****************************************
>



-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161105/2ce0b853/attachment-0001.html>


More information about the x3d-public mailing list