User Tools

Site Tools


example.1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
example.1 [2022/05/10 10:13] – [Creating a chair] ig_jscexample.1 [2022/06/10 16:04] (current) – ig_nm
Line 182: Line 182:
 Make sure on the //Settings// page the workspace settings are set up as following: Make sure on the //Settings// page the workspace settings are set up as following:
 {{ ::configuration_settings.png?600 |}} {{ ::configuration_settings.png?600 |}}
 +
 +Also if switching the mode to SimpleCom make sure to click "connect". Changing the dropdown value is not enough.
 +If you are not using a contect script make also sure the "Advanced"->"Commercial context" ist set to "NoContext".
  
 As first the **Chair** should get a property to switch the material. There for go to the //Assets/Commercial// page. For more information on this page, check its [[ig.creator:assets:commercial|Wiki]]. As first the **Chair** should get a property to switch the material. There for go to the //Assets/Commercial// page. For more information on this page, check its [[ig.creator:assets:commercial|Wiki]].
Line 296: Line 299:
  
 For checking, put //SeatBack_B// a little bit higher as //SeatBack_A// and go back to the //Configurator//. For checking, put //SeatBack_B// a little bit higher as //SeatBack_A// and go back to the //Configurator//.
-{{ ::configuration_23.png?400 |}}+{{ ::configuration_23.png?200 |}} 
 + 
 +The next step is to hide either //SeatBack_A// or //SeatBack_B//. For this, a new property needs to be linked to the geometries. This is done like it has been done with the material befor. Go to //Products/Commercial// and create a new commercial property. 
 +{{ ::configuration_24.png?800 |}} 
 +In case testing the new property inside the //Configurator// the result is: Nothing has changed. This is because the geometries itself are not connected to the created property yet. 
 + 
 +Go to //Products/Graphical/Structure// to link the property and the geometries. Have a close look at the table. There should be a column called //Visible//. 
 + 
 +Take the line with //SeatBack_A// and for the visibility write: **{ComSeatBack==='SeatBack_A'}** 
 + 
 +This expression is a JavaScript code snippet. 
 +Each JavaScript code snippet is written between **{}**. **ComSeatBack** is the property created under //Products/Commercial//. But when using it inside the node structure is gets the prefix **Com**. **SeatBack_A** is the name of the geometry. Notice strings are written in **''** not **""** ! 
 +{{ ::configuration_25.png?800 |}} 
 + 
 +Because //Visible// column is asking for a boolean, this line is evaluatoed as //If-statement//. Make //SeatBack_B// configuratable as well and reset the position, so it has the same position like //SeatBack_A//. Test it in the //Configurator//. 
 +{{ ::configuration_26.png?400 |}} 
 + 
 +With this, it is possible to configure the seatback with in two differen variations. 
 + 
 +As an exercice, add more properties that changes a part of the chair, e.g. the seat or the legs. 
 + 
example.1.1652170396.txt.gz · Last modified: (external edit)