...
Expand |
---|
|
NPMWe will set you up with credentials that give you read access to necessary repositories. **Credentials for Nexus Server will be sent separately. Build RequirementsSCSS is provided and must be converted to CSS Default icon assets are provided in assets folder and if using webpack, must be bundled in appropriately using file-loader By default, other assets, such as assets for i18n, shaders, and sqlite readers are stored in our CDN and read from there. Must be built in an environment that handles process.env (webpack, gulp, react, etc), otherwise use CDN (Reference the CDN instruction above. Please reach out with any questions you may have!).
Error loading urls from SCSS filesIf using webpack to build your solution including our SDK, you may run into the issues documented here: https://webpack.js.org/loaders/sass-loader/#problems-with-url . Make sure you add the missing url rewriting using the resolve-url-loader. Place it before sass-loader in the loader chain. Build the .npmrc Add the following code to a new .npmrc file at the root of your project. Code Block |
---|
always-auth=true
registry=https://nexus.3dcloud.io/repository/npm-group/
_auth=<insert token here> |
Open a terminal window and use the provided nexus credentials to generate your token with the following command. Substitute the token placeholder (including the “<“ & “>”) in the .npmrc with the output of that command. Code Block |
---|
echo -n 'myuser:mypassword' | openssl base64 |
Finally, add the spins dependency to your package.json. Code Block |
---|
| {
...
"dependencies": {
"@mxt/mxt-sectionalconfig": "7.10.0",
...
},
...
} |
|
...
Basic Usage
Configurator init with options. ?
denotes an optional setting. A div
with the id of sectional-config-container
must be provided to inject the webgl canvas.
...
Root Product - The top level product the contains an assembly. For example, a Chair, or a Fireplace, etc
Assembly Step - a configurable unit of the product; for example, the legs on a chair, or the type of stone used inside the fireplace
...
Data Customizations
Expand |
---|
title | Customizing Content with 3D Cloud |
---|
|
** These customizations will require access to the implementation in 3D Cloud. Create a top level Menu with the following values in the input fields: Label – (Whatever you use to name the menu. I use Configurable UI . Action – LOAD_MENU Type – SECTIONAL
Add new items in the “Configurable UI” group. Items have to be set to type: BUTTON , TOOLBAR , or TOOLBAR_ACTIONS . If the item is a BUTTON , it will appear as a single button. If the item is a TOOLBAR , it will appear as a group and any items in that group will be buttons. If the item is a TOOLBAR_ACTION , it has to have a component in the codebase that will init. Items at this level will need to have a position to be set in the UI. Adding the menuPosition metadata key, you will assign the position of the button/group. Please see below for the usable values to input.
Add a Tabbed Menu to the left side of the configurator. Create a new menu in 3D Cloud, “Tabbed View”, with type SCENE_CONFIGURATOR_TOOLBAR_TABS . Then create a submenu item for each of the following. “Product View”: [Type: PRODUCT_BROWSE , ParentMenu: Tabbed View ] Add metadata, “text”, used to set the title of the tab. Set the order that this tab should appear in the tab bar.
“Style View”: [Type: STYLEALL_CONFIGURATOR , ParentMenu: Tabbed View ] Add metadata, “text”, used to set the title of the tab. Set the order that this tab should appear in the tab bar.
TOOLBAR
TOOLBAR_ACTIONS
BUTTON
activeIcon
inverseImage
menuPosition
toggle
-- Adding Custom Landing Page Content for “No Products CTA”The landing page graphic can be overridden by adding a graphic to the Client Branding assets in 3D Cloud. Create a new asset and use the following values. Purpose – ctaNoProducts Label – Landing Page CTA No Products
Upload the image you want to override the default image.
|
...
Code Block |
---|
|
import { CustomStylingPlugin } from "...";
const sectionalConfig = new MxtSectionalConfigurator({
...
plugins?:{
styling?: CustomStylingPlugin
}
}); |
...
Using the SDK & Event Communicator
Registering Events
You may register callbacks for a variety of UI, product, and other notification events, allowing you to act on them.
...