Details and Options
ResourceFunction["Locator3D"] is a 3D version of
Locator.
ResourceFunction["Locator3D"][…,Automatic] uses the default sphere appearance for the locator object when no rotation is allowed, and a cube if rotation is allowed.
ResourceFunction["Locator3D"][Dynamic[{x,y,z}]] will reset the values of
x,
y and
z when the locator object is moved;
ResourceFunction["Locator3D"][{x,y,z}] will not.
The following options can be given:
ImageSize | Scaled[0.05] | the size of the displayed locator object |
"GuideDirections" | Automatic | the directions along which the guides point |
"ShowGuides" | True | whether to show guide lines and planes |
"AllowedActions" | Automatic | which manipulation actions to allow |
"ModifierKeys" | {None,"ShiftKey",”OptionKey"} | the modifier keys for the different allowed actions |
"RotateGuides" | False | whether the guide directions should be affected by the rotation matrix |
ResourceFunction["Locator3D"][] is equivalent to ResourceFunction["Locator3D"][{0,0,0}].
The option
ImageSize accepts the following settings:
Scaled[s] | scaled size s |
s | size s in graphics coordinates |
The setting for
ImageSize specifies the radius of the main locator sphere, with the other parts sized accordingly.
When using scaled sizes, the hit detection does not always work properly in versions 12.3 and lower. Use absolute sizing specifications instead if you are having issues selecting the arrows.
The default setting
"GuideDirections"→Automatic effectively corresponds to guides along the three cardinal directions.
The option "GuideDirections" accepts an arbitrary number of guide directions.
Using "GuideDirections"⧴{dir1,dir2,…}, the guide directions are dynamically updated while moving the locator.
The option "AllowedActions" accepts the following settings:
Automatic | automatically choose the allowed actions |
All | allow all actions |
"MoveAlong" | move locator along guide directions |
"MovePerpendicular" | move locator perpendicular to guide direction |
"Rotate" | rotate locator around guide directions |
{act1,act2,…} | list of several allowed actions |
The default setting
"AllowedActions"→Automatic effectively always allows
"MoveAlong". With
"GuideDirections"→Automatic,
"MovePerpendicular" is also allowed. Finally,
"Rotate" is enabled when an explicit rotation matrix is specified.
The option "ModifierKeys" controls how the different actions can be accessed. A list of modifier keys is expected, with the first key corresponding to the first action, etc.
In "ModifierKeys"→{mod1,mod2,…}, the individual modi can be any of the following:
None | no modifier key necessary |
"string" | any of the strings supported by CurrentValue |
"string1"&&"string2"||… | logical predications of different string specifications |
The default setting
"ModifierKeys"→{None,"ShiftKey","OptionKey"} specifies that the first allowed action should require no modifier key, the second one the
-key, and the third one the
-key (Windows/Linux)/the
-key (macOS).
ResourceFunction["Locator3D"] supports
Dynamic[…,{fstart,…}] type dynamic arguments to control the set/reset behavior of the position and rotation variables.
When using positions of the form
Dynamic[…,{fstart,…}], the functions are supplied with the index of the currently active direction as the third argument.