Nutrient Web SDK
    Preparing search index...

    Type Alias CustomRenderers

    This object can include functions to be called when specific entities, like annotations, are being rendered in the viewport, and return additional or replacement DOM content for the entity instance.

    Currently only annotation's rendering can be customized using the Annotation key.

    If the callback returns null, the instance will be rendered normally.

    NutrientViewer.load({
    customRenderers: {
    Annotation: ({ annotation }) => ({
    node: document.createElement("div").appendChild(document.createTextNode("Custom rendered!")),
    append: true,
    })
    }
    });
    type CustomRenderers = {
        Annotation?: (
            options: { annotation: AnnotationsUnion },
        ) => RendererConfiguration | null | undefined;
        CommentAvatar?: (
            options: { comment: NutrientViewer.Comment },
        ) => RendererConfiguration | null | undefined;
    }
    Index

    Properties

    Annotation?: (
        options: { annotation: AnnotationsUnion },
    ) => RendererConfiguration | null | undefined

    This user defined function receives the AnnotationsUnion to be rendered as argument.

    It must return a RendererConfiguration object or null.

    CommentAvatar?: (
        options: { comment: NutrientViewer.Comment },
    ) => RendererConfiguration | null | undefined