Class ShaderPart

java.lang.Object
All Implemented Interfaces:
X3DNode, X3DUrlObject, ShaderPart

public class ShaderPart extends X3DConcreteNode implements ShaderPart
ShaderPart can contain a CDATA section of plain-text source code.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. ShaderPart node tooltip: (X3D version 3.1 or later) [X3DNode,X3DUrlObject] ShaderPart defines the source for a portion of source code used by a ComposedShader node. The source is not required to be a complete shader for all of the vertex/fragment processing.
  • Hint: ShaderPart can contain a CDATA block of plain-text source code.
  • Hint: embedded ecmascript: source can also be contained in the sourceCode pseudo-field without escape characters, equivalent to last entry in the url list, when using other API codebases and file encodings.
  • Warning: ShaderPart contains no field declarations.
  • Hint: insert an XML Character Data (CDATA) block within the Script node to contain source code embedded within an X3D scene, avoiding the need for escape characters.
  • Hint: a contained XML Character Data (CDATA) block for source code protects whitespace, line breaks, and literal characters (such as & for ampersand character, < for less-than-sign character, and > for greater-than-sign character) from unintended escape-character modifications by XML parsers.
  • Warning: strict order is required for contained constructs: first field declarations (if any), then IS/connect statements (if any), and finally CDATA source-code block.
  • Hint: ShaderPart subprograms are written in the same language, which is specified in the parent ComposedShader node.
  • Hint: when parent node is LoadSensor, apply containerField='children' (X3Dv4) or containerField='watchList' (X3Dv3). https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges

Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also: