0.0.0 • Published 4 years ago

threed v0.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

webGL-demo-react

window._initialState

window._initialState contains all the data about parameters, scene description etc.

    {
        defaultConfig: {
            properties: "{}",
             components: "{}",
             guid: ""
        }
        logo: ""
        materialGroups: [
            {
                name: "",
                materials: [],
                values: []
            },
        ]
        otherProperties: [
                {
                    title: "",
                    property: "",
                    value: "",
                    parameter: 0,
                }
            ]
        otherSlots: [
                       {
                           name: "",
                           offset: {
                               offset: {z: 0, x: 0, y: 0}
                           },
                           childProperties: {
                                 (property) : (webGLProperty)
                           },
                           url: "",
                       }
                ]
        sliders: [
            {
                max: 0,
                min: 0,
                parameter: 0,
                property: "",
                title: "",
                type: "",
            }
        ]
        webGlProduct: ""
        webGlProperties: {
            (property) : (webGLProperty)
        }
        webGlUrl: ""
    }

bimClass

bimClass.data should have a 'webglScene' field with model url and guids to slot products and 'webgl' field with how certain parameters are called in webgl interface:

  data: {
    .....
    webglScene: {  
        webglUrl: String e.g. "UNIVERSAL/doors/door",
        webglProduct: String e.g. "doors/door",
        otherSlots: Array of guids,  if there are additional slots within this bimClass
         }
    webgl : {
           (unique_param_id) : String with it's webgl counterpart ,
           ....
    }
         }
         

productDefinition

product definition is expected to have Array of properties

slots may also be stored within componentConfigurations as Array of guids

 {
    properties : [ {parameter: Number, value: ... }, ...],
    componentConfigurations : Array of guids
 }