Class: Anchor

X3D: 3.3
Component: Networking
Status:
fully implemented

x3dom.nodeTypes. Anchor

Anchor is a Grouping node that can contain most nodes. Clicking Anchored geometry loads content specified by the url field. Loaded content completely replaces current content, if parameter is same window. Hint: insert a Shape node before adding geometry or Appearance.

HTML Encoding and Default Values

<Anchor bboxCenter='0,0,0' bboxSize='-1,-1,-1' children='X3DChildNode' description='[]' metadata='X3DMetadataObject' parameter='[]' render='true' url='[]' ></Anchor>

Inheritance


Constructor

Anchor(ctx)

Constructor for Anchor

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
bboxCenter SFVec3f 0,0,0 [-inf, inf] X3DGroupingNode Center of the bounding box
bboxSize SFVec3f -1,-1,-1 [0, inf] or -1 X3DGroupingNode Size of the bounding box
children MFNode X3DChildNode X3DGroupingNode Grouping nodes have a field that contains a list of children nodes. Each grouping node defines a coordinate space for its children. This coordinate space is relative to the coordinate space of the node of which the group node is a child. Such a node is called a parent node. This means that transformations accumulate down the scene graph hierarchy.
description SFString [] The description field in the Anchor node specifies a textual description of the Anchor node. This may be used by browser-specific user interfaces that wish to present users with more detailed information about the Anchor.
metadata SFNode X3DMetadataObject X3DGroupingNode Field to add metadata information
parameter MFString [] Passed parameter that signals web browser how to redirect url loading. Each string shall consist of "keyword=value" pairs. Hint: set parameter to target=_blank or target=_extern to load target url with a system-specific application. target=_self or target=_intern will open url in current x3d-browser window. Hint: set parameter to target=frame_name to load target url into another frame. Hint: Strings can have multiple values, so separate each string by quote marks. [ 'http://www.url1.org' 'http://www.url2.org' 'etc.' ]. Interchange profile hint: this field may be ignored.
render SFBool true X3DGroupingNode Flag to enable/disable rendering
url MFString [] Address of replacement world, activated by clicking Anchor geometry. Hint: jump to a world's internal viewpoint by appending viewpoint name (e.g. #ViewpointName, someOtherCoolWorld.wrl#GrandTour). Hint: jump to a local viewpoint by only using viewpoint name (e.g. #GrandTour). Hint: Strings can have multiple values, so separate each string by quote marks [ 'http://www.url1.org' 'http://www.url2.org' 'etc.' ]. Hint: XML encoding for ' is ampersandquot; (a character entity). Warning: strictly match directory and filename capitalization for http links! Hint: can replace embedded blank(s) in url queries with %20 for each blank character.