Skip to main content
Version: Released

Project Info

The project information is a JSON object containing details about the project structure and content.

Event nameInput / OutputPayloadReason
getProjectInfoInput eventNone.Request the Project Info for the current state.
projectInfoOutput eventSee the description below.Receive the requested project info.

Example​

// Receive the project info.
configurator.addEventListener("projectInfo", (event) => {
console.log(event.detail);
});

// Send a request to get the project info.
configurator.dispatchEvent(new CustomEvent("getProjectInfo"))

Payload description​

The Project Info is a complex JSON object. At the top level, it contains the following attributes:

Attribute nameTypeContent
productsArray of Product data. πŸ”—This will contain the products currently loaded in the project.
levelLevel data. πŸ”—This will contain the level information of the project.
wallsArray of Wall data. πŸ”—This will contain the walls information of the project.
baysArray of Bay data. πŸ”—This will contain the bays information of the project.

Product​

This is the description of a product or sub product.

Attribute nameTypeContent
dbIDstringThe identifier of this product in the database. If you load the same product multiple times, the dbid will be the same.
parametersArray of Parameters. πŸ”—The parameters of this product.
subProductsArray of Products. πŸ”—The sub products of this product.
transfomatrix4The transformation matrix of the product, corresponding to its position in the 3D scene.
uuidstringA unique random identifier for this instance of the product.

Parameter​

This is the description of the parameter of a product.

Attribute nameTypeContent
idstringThe identifier of this product in the database. If you load the same product multiple times, the dbid will be the same.
typenumberA number indicating the type of the value:
1: number (Real)
2: integer
3: boolean
4: string
5: string (color)
6: string (material dbid)
7: string (product dbid)
valueSee the "type" attribute.The current value of this parameter. The type depends on the "type" attribute.

Level​

This is the description of the level of a project.

Attribute nameTypeContent
wallHeightnumberThe wall height.

Wall​

This is the description of a wall of a sloped wall.

Attribute nameTypeContent
heightnumberThe wall height.
depthnumberThe wall depth.
startPointPoint2The wall's start point.
endPointPoint2The wall's end point.
straightHeightnumberThe sloped wall height of the straigth part.
slopeDepthnumberThe sloped wall depth of the sloped part.
direction-1 or 1 enumThe sloped wall direction (1 for inward, -1 for outward).

Bay​

This is the description of a bay. A bay is a product so it contains the same information as Product data. πŸ”—