at line 265 1) add each mesh you want to use in the "meshes" section. For each mesh you need a line like this: "meshXXX" : { url: "models/modelfilenameXXX.nxs" }, 2) in te section "modelInstances" create an instance for each layer you want to add to the page. Each instance should have a unique NAME, which will be used as an identifier in the whole page. Pick the NAME carefully, as you will have to use it all over the HTML code. This NAME will not appear on the page when it appears in the browser, it is just an internal ID, so it should not be a "nice and human-readable" For each layer you will add an object like this: "ID FOR INSTANCE XXX" : { mesh : "meshXXX" }, ==================================================================== presenter.setScene({ meshes: { "sphere" : { url: "models/sphere.ply" }, "cube" : { url: "models/cube.ply" }, "meshA" : { url: "models/ARDARA_2013_1000_C.nxs" }, "meshB" : { url: "models/ARDARA_2013_2000_C.nxs" }, "meshC" : { url: "models/ARDARA_2013_3000_C.nxs" }, }, modelInstances : { "ARDARA_1000" : { mesh : "meshA" }, "ARDARA_2000" : { mesh : "meshB" }, "ARDARA_3000" : { mesh : "meshC" }, ==================================================================== at line 117 3) for each layer, you have to add an input checkbox in the LAYER interface. Each checkbox will have the ID of the corresponding layer THIS IS THE TEXT THAT WILL APPEAR IN THE LAYER INTERFACE
==================================================================== LAYERS
Area 1000
Area 2000
Area 3000
==================================================================== at line 362 4) if you want to start with a single visible layer, in this line, you have to specify WHICH is the single layer you want to start as visible. Change this line accordingly: changeVisibility('ID OF THE INSTANCE YOU WANT', true); If you remove this line, ALL layer will be visible at the start of the page visualization. ==================================================================== //TO START WITH ONLY A SINGLE LAYER VISIBLE changeVisibility('ARDARA_1000', true); ==================================================================== at line 140 5) when creating PREDEFINED VIEWS, it is possible to specify that a view is related to only a single layer, by including the instruction "changeVisibility" witht he ID of the layer you want to focus on in that predefined view. in this example, the predefined view will change the view position AND the layer visiblity:
in this example, the predefined view will change the view position but KEEP the current layer visiblity:
====================================================================
VIEWS



==================================================================== at line 295 6) when creating hotspots, it is possible to associate a hotspot to a single LAYER, or to a group of layers. The "tags" parameter of each hotspot must be set: - tags: ["ALL"], means that the hotspot will be always shown, no matter which layers are visible - tags: ["ID OF LAYER A"], means that the hotspot will be shown ONLY when layer A is visible - tags: ["ID OF LAYER A","ID OF LAYER B"], means that the hotspot will be shown when layer A or B are visible. It is possible to specify as many ID as you want. ==================================================================== spots: { "uno": { mesh: "sphere", transform: { translation : [ 11.21 , 50.05 , 304.93 ], scale : [1.0, 1.0, 1.0], }, color: [0.0, 0.25, 1.0], tags: ["ARDARA_1000"], }, "due": { mesh: "sphere", transform: { translation : [ 21.8 , 58.87 , 304.37 ], scale : [1.0, 1.0, 1.0], }, color: [1.0, 0.0, 1.0], tags: ["ALL"], }, "tre": { mesh: "sphere", transform: { translation : [ 10.0 , 60.92 , 304.45 ], scale : [1.0, 1.0, 1.0], }, color: [2.0, 2.0, 2.0], tags: ["ARDARA_2000","ARDARA_1000"], }, }, ====================================================================