3D Advanced Renderer (Aura)

Background Information

The Advanced Renderer was created for more complex development and interaction scenarios than the SimpleRenderer component. SimpleRenderer was created for displaying 3D drawings and allowing interaction without events or selection of components within the drawing itself.

Advanced Renderer was created to allow for the manipulation of a 3D scene within the context of a Salesforce interaction. This can be displayed using our Slot UI framework which is detailed below.

The Advanced Renderer is used throughout the RenderDraw suite, namely inside of the 3D Scene Director.

Usage Notes

Advanced Renderer should be used in any custom development scenario. This component was created to allow for the contextual interaction with other data within Salesforce. If you need a custom interaction beyond 3D visualization, this component is likely what you will be using. AdvancedRenderer can be utilized in simple rendering scenarios as well, with the option of utilizing slots.

Slots

AdvancedRenderer was designed for extensibility, with that in mind, solving for every use case isn't really possible without knowing how each implementation and custom project needs to display 3D within Salesforce. Salesforce Lightning components are composable, and the AdvancedRenderer has prebuilt slots for you to pass custom components into.

A common interaction flow is searching for a detail record from record set, and displaying a 3D drawing or 2D image based on that selection. in the diagram below, we walk through displaying a list of order items, fetching the details of an item, displaying the appropriate drawing and if selected the related actions to its subcomponents. These can lead to the user attempting to either re-order an item or create a service order based on a warranty claim.

The interaction follows a pattern events that can be triggered by the user, or by the 3D drawing / rendering itself. Displaying these details alongside the 3D drawing in a repeatable way are why we created the Slot UI Layout. Slots can be used to express any interaction within Salesforce, and the AdvancedRenderer provides the capability to display these as you see fit.

Lets break down each Slot and its intended purpose.

These slots were meant to be used as needed, and data surrounding what we are rendering is supposed to flow from left to right, starting with ContextContent (1) and concluding on the Sidebar Content (4) with some interaction in between.

Context Content (1)

The ContextContent slot is meant to provide high-level information to the user regarding what the 3D model is supposed to represent. Some examples of what has been used in the ContextContent Slot in past projects include

  • Lists of Salesforce Objects that, once selected, update what rendering is displayed

  • Configuration options for a product to modify the 3D object/scene

Because of the recurring theme of searching for details that reside in a list of information, we have created the ContextContentDetails slot as well, which is displayed in the same area (1) that the ContextContent component is displayed, the only difference is an additional back button (that raises EVT_Renderer_Context_Details_Closed), and displayed header text to provide your user some context (attribute contextDetailHeaderText).

Action Information Pane (3)

The horizontal slot available above the 3D model, which is typically used for Actions related to what is being rendered (e.g. Create a Case). Using attribute displayActionInformationPaneOnSelection will automatically display the ActionInformationPane when a user selects a component using ComponentTouch.

We suggest limiting the height of components passed into this slot to approximately ⅓ of the parents components overall height, as the ActionInformationPane shares vertical space with the rendered content, and the 3D element is typically the star of the show in a user's eyes.

The Sidebar content slot provides space for additional information that is to be displayed based on an interaction in the 3D content pane.

Passing components into a slot

Passing components into slots are as simple as using the aura:set tag with the name of the slot you would like to use.

<RDraw:AdvancedRenderer aura:id="renderer" displayContext="true"  loadingImage="{!v.loadingImage}"
 displaySidebar="{!v.showSidebar}" displayActionInformationPane="{!v.displayActions}"
 spitShine="True" allowSelection="true" recordId="{!v.recordId}">
    <aura:set attribute="contextContent">
           //your component goes here for the context menu (1) 
    </aura:set>
    <aura:set attribute="actionInformationPane">
          //your component goes here for the ActionInformationPane (3)
    </aura:set> v
    <aura:set attribute="sidebarContent">
         //your component goes here for the Sidebar content (4)
    </aura:set>
 </RDraw:AdvancedRenderer>

Interfaces

flexipage:availableForAllPageTypes, force:hasRecordId, lightning:availableForFlowScreens

Attributes

NAMETYPEDEFAULTDESCRIPTION

actionInformationPane

component[]

The horizontal slot available above the 3D model. This is typically used for Actions related to what is being rendered (e.g. Create a Case)

allowSelection

boolean

Allow the selection of subcomponents either by ComponentTouch(Click) or programmatically using the selectComponent method

availableActions

string[]

Inherited from lightning:availableForFlowScreensThe navigation actions available for this screen. Valid actions are NEXT, PREVIOUS, FINISH, and PAUSE.

body

component[]

Inherited from aura:componentThe body of the component. In markup, this is everything in the body of the tag.

brandImageURL

string

The branded logo image displayed in the bottom right corner of the rendering components. Pass an empty string if no branding is desired.

childComponentPrefixToFilter

string[]

[]

A list of strings to ignore if they follow the name value, e.g. a value of ['_ASM'] passed along with the 'name' parameter of IceCream would successfully return a 3D node named 'IceCream_ASM'

childComponentSuffixToFilter

string[]

[]

A list of strings to ignore if they precede the name value, e.g. a value of ['ASD_'] passed along with the 'name' parameter of IceCream would successfully return a 3D node named 'ASD_IceCream'

contentVersionId

string

The content version to render (if rendering from Salesforce servers/files). Using contentversionid will bypass the standard recordId and the overrideURL

contextContent

component[]

The Salesforce Lightning components to be displayed on the context pane (left side slot, representing context to what is being rendererd.)

contextDetailContent

component[]

The Salesforce Lightning components to be displayed on the context detail pane (left side slot, representing details to the context of what is being rendererd.) This is typically displayed based on some action that happened within the contextContent componets, e.g. list order items, then dive into the details of a particular line.

contextDetailHeaderText

string

Details

The header text that is displayed next to the back button on the contextDetail facet. This describes the content that is passed via contextDetailsContent, typically the name of a line item or detail item within a list presented in the contextContent

contextSize

integer

4

The size in units, up to 12, for how wide the Context and Context Details slots are

displayActionInformationPane

boolean

false

Whether or not to display the Action information pane slot (top slot) and components passed into actionInformationPane parameter

displayActionInformationPaneOnSelection

boolean

false

Whether or not to display the Action information pane slot (top slot) when a selection is made via ComponentTouch or programmatically

displayContext

boolean

false

Whether or not to display the context slot (left side slot) and components passed into contextContent parameter

displayContextDetails

boolean

false

Whether or not to display the context slot details and components passed into contextDetailContent parameter. Use this for displaying detail components related to contextContent, e.g. Line item details for for an order item listed in contextContent. This cannot be used at the same time as displayContext

displaySidebar

boolean

false

Whether or not to display the sidebar slot (right side slot) and components passed into sidebarContent parameter

environmentColor

string

#E6F1F4

The background color of the 3D environment. Use Hex code format, such as #ffffff

loadingImage

string

The image URL to display while the 3D model is loading

nodeIgnoreList

string[]

[]

A list of strings that contain names of nodes to ignore when traversing the 3D structure during ComponentTouch or Finding a component by name

overrideURL

string

The absolute URL to render.

playground

boolean

false

Setup a renderer without loading a model for custom interactions

recordId

string

Inherited from force:hasRecordIdThe record Id

relatedRecordBusy

boolean

false

Whether or not the system is busy searching for the related record.

selectedComponentName

string

The node name of the selected component in the 3D model

showUserMessages

boolean

false

Show rendering related messages to the user. This is typically used in debug scenarios

sidebarContent

component[]

The vertical slot avalable to the right of the 3D model. This is typically used for Detailed information related to the result of a ComponentTouch on a model (e.g. selection of a subcomponent within a model for checking on warranty information).

sidebarSize

integer

4

The size in units, up to 12, for how wide the Context and Context Details slots are

size

string

Size of the component, either Stretch, Small, Medium, Large, Jumbo

spitShine

boolean

false

Add a shine to your model, even if the materials loaded have no reflection

useCommunities

boolean

Fixes the fetching of files and metadata when utilizing a Community

userInteracted

boolean

false

Whether or not a user has interacted with the drawing

Methods

NAMEARGUMENTSDESCRIPTION

add2DImage

Add a floating image in 3D space

add2DText

Add floating 2D text that can be attached to a 3D component/node in the scene

add3DTextToScene

Add 3D text to a given Scene

addComponentTransformHandles

Used to add position, rotation and size handles to a set of components by name.

addComponentTransformHandlesToMultipleComponents

Used to add position, rotation and size handles to a set of components by name.

addLight

Add a new light to the scene

addModelToScene

Add an additional model to the scene.

addPhotoDome

Add 360° photo as a sphere where models can be rendered

addVideoPlayer

Add a floating video Player in 3D space

addWidget

Still in our 'labs' status. Adds a widget to our scene.

aimAndPositionCamera

Position the camera in 3D space and aim at a subject.

aimCamera

Aim the camera in 3D space either at a component or some coordinates.

autoLabelComponents

Automatically add labels to components

clearAllHighlights

Clear all highlights from the Scene.

clearSelections

Clear all selections from the Scene.

displayMedia

Display related media instead of the 3D drawing

findNode

Returns an object containing the Node information from the 3D scene. If no node is found, ths returns nothing

getCameraPositionandTarget

Fetch the camera's current position and where it is aiming.

getFixedComponentName

Retrieves fixed component name based on prefix and suffixes

getHierarchy

Fetch the 3D model's hierarchy. Must subscribe to RDraw:EVT_Renderer_Get_Hierarchy for response

getListOfComponentNames

Fetch a flat list of all of the names of each 3D Node in the scene

getRenderContextForId

Retrieves RenderContext from server for a given recordId

hideAllLabels

Hide all labels added to the 3D Scene

hideAllNodes

Hide all nodes in a 3D Scene

hideLabelManager

Hide label manager to apply styles to labels added to the 3D Scene

hideMedia

Hide displayed related media that is presented in the content area of this component

hideNode

Hide a node in a 3D Scene

highlightComponent

Find a component by name or Id and highlight it with the color provided

highlightMultipleComponents

Highlight several components in the scene

is3DSceneDisplayed

Check if a 3D scene is displayed in the Main Content of this component

isMediaDisplayed

Check if media is displayed instead of a 3D scene in the Main Content of this component

isolateComponent

Isolate the individual component by hiding all other components in the scene

isolateMultipleComponents

Isolate the several components by hiding other components in the scene

loadAndApplyTextureMaterialToModel

Load a diffuse texture and add it to a model.

positionCamera

Position the camera in 3D space.

raiseInteractionEvent

Used to call actions that were setup within the 'interactions' section of the Scene setup

reintegrateComponent

Re-integrate a component that has been isolated.

reloadToInitialScene

Reload to the initial scene (post initial model load)

removeComponent

Removes the given component from a scene

removeComponentHandles

Used to remove position, rotation and size handles to a set of components by name.

resetCamera

Reset the camera to it's initial position in the scene

resetExplosion

Reset a custom explosion to its initial position

selectComponent

Programmatically select a component node within the 3D model. Raises RDraw:EVT_Renderer_Mesh_Selected on successful selection

setLabelStyling

Hide label manager to apply styles to labels added to the 3D Scene

setupGround

Add a ground for your 3D scene, with or without a heightmap

showAllLabels

Show all labels added to the 3D Scene

showAllNodes

Show all nodes that have been hidden in a 3D Scene

showLabelManager

Show label manager to apply styles to labels added to the 3D Scene

showNode

Show a node that has been hidden in a 3D Scene

showToastNotification

Displays a toast notification to the user

takeSnapshot

Take a snapshot of the scene

toggleEnableComponent

Enable or disable a given 3D node by passing a uniqueId, name or id

triggerRegisteredExplosion

Register a custom explosion

updateBackgroundImage

Update background to a image

updateComponentColor

Update a given 3D component node to the passed hex color code.

updateEnvironmentLightTexture

Change the lighting texture to use (for refraction)

updateExistingLabel

Update an existing Label

updateLight

Add a new light to the scene

verifyComponent

Verify a component exists in the scene, is enabled and visible.

Last updated