This class is used to create and display 2D HTML sprites called annotations. Annotation may contain an optional dialog text (or HTML layout) which appears when the user clicks on the annotation label.
var annotation = new v3d.Annotation(container, 'A', 'Hello! ...');
app.scene.add(annotation);
Verge3D offers two CSS classes to define annotation look:
.v3d-annotation {
background: red;
}
.v3d-annotation-dialog {
background: red;
}
container - the id of an HTML-element or the HTML-element itself which will contain the annotation.
character - a symbol displayed inside the annotation label e.g "1", "2", "3" or "A", "B", "C". In fact, the label character can be a string of any length.
text - a text displayed in the annotation popup dialog. This dialog appears when the user clicks on the annotation. It may contain HTML formatted text as well. Specify an empty line to disable the popup dialog feature.
See the base [page:AnnotationControl] class for common properties.
Annotation character.
Annotation dialog text.
Annotation label element (usually div).
Annotation dialog element (usually div).
Annotation dialog visibility flag. Calculated by the [page:AnnotationControl.update update] method.
Fade (make semi-transparent) the annotation if obscured by other objects. Default is true.
Used to check whether this or derived classes are annotations.
You should not change this, as it is used internally for optimization.
See the base [page:Object3D] class for common methods.
Returns a clone of this Annotation object and any descendants.
Removes the HTML layout and the corresponding event listeners.
Not implemented yet.
Use [page:Puzzles.add_annotation add annotation] or [page:Puzzles.remove_annotation remove annotation] to manage annotations in the Puzzles editor.
[sourceHint]