11// Global variables
22
3- const points_defaultVisibility = true ;
4- const edges_defaultVisibility = true ;
5- const polygons_defaultVisibility = true ;
6- const polyhedra_defaultVisibility = true ;
7- const points_defaultSize = 10 ;
8- const points_defaultColor = { r : 20 , g : 20 , b : 20 } ;
9- const edges_defaultSize = 5 ;
10- const edges_defaultColor = { r : 20 , g : 20 , b : 20 } ;
11- const polygons_defaultColor = { r : 255 , g : 255 , b : 255 } ;
12- const polyhedra_defaultColor = { r : 255 , g : 255 , b : 255 } ;
13-
14- const corners_defaultVisibility = true ;
15- const lines_defaultVisibility = true ;
16- const surfaces_defaultVisibility = true ;
17- const blocks_defaultVisibility = true ;
18- const lines_defaultColor = { r : 20 , g : 20 , b : 20 } ;
3+ const points_defaultVisibility = true
4+ const edges_defaultVisibility = true
5+ const polygons_defaultVisibility = true
6+ const polyhedra_defaultVisibility = true
7+ const points_defaultSize = 10
8+ const points_defaultColor = { r : 20 , g : 20 , b : 20 }
9+ const edges_defaultSize = 5
10+ const edges_defaultColor = { r : 20 , g : 20 , b : 20 }
11+ const polygons_defaultColor = { r : 255 , g : 255 , b : 255 }
12+ const polyhedra_defaultColor = { r : 255 , g : 255 , b : 255 }
13+
14+ const corners_defaultVisibility = true
15+ const lines_defaultVisibility = true
16+ const surfaces_defaultVisibility = true
17+ const blocks_defaultVisibility = true
18+ const lines_defaultColor = { r : 20 , g : 20 , b : 20 }
1919
2020// Mesh functions
2121const meshPointsDefaultStyle = (
2222 visibility = points_defaultVisibility ,
2323 size = points_defaultSize ,
24- color = points_defaultColor
24+ color = points_defaultColor ,
2525) => {
2626 return {
2727 visibility,
@@ -31,13 +31,13 @@ const meshPointsDefaultStyle = (
3131 vertex : null ,
3232 } ,
3333 size,
34- } ;
35- } ;
34+ }
35+ }
3636
3737const meshEdgesDefaultStyle = (
3838 visibility = edges_defaultVisibility ,
3939 size = edges_defaultSize ,
40- color = edges_defaultColor
40+ color = edges_defaultColor ,
4141) => {
4242 return {
4343 visibility,
@@ -46,12 +46,12 @@ const meshEdgesDefaultStyle = (
4646 color,
4747 } ,
4848 size,
49- } ;
50- } ;
49+ }
50+ }
5151
5252const meshPolygonsDefaultStyle = (
5353 visibility = polygons_defaultVisibility ,
54- color = polygons_defaultColor
54+ color = polygons_defaultColor ,
5555) => {
5656 return {
5757 visibility,
@@ -62,12 +62,12 @@ const meshPolygonsDefaultStyle = (
6262 polygon : null ,
6363 vertex : null ,
6464 } ,
65- } ;
66- } ;
65+ }
66+ }
6767
6868const meshPolyhedraDefaultStyle = (
6969 visibility = polyhedra_defaultVisibility ,
70- color = polyhedra_defaultColor
70+ color = polyhedra_defaultColor ,
7171) => {
7272 return {
7373 visibility,
@@ -77,32 +77,32 @@ const meshPolyhedraDefaultStyle = (
7777 polyhedron : null ,
7878 vertex : null ,
7979 } ,
80- } ;
81- } ;
80+ }
81+ }
8282
8383const pointSet_defaultStyle = ( ) => {
8484 return {
8585 visibility : true ,
8686 points : meshPointsDefaultStyle ( ) ,
87- } ;
88- } ;
87+ }
88+ }
8989
9090const edgedCurve_defaultStyle = ( ) => {
9191 return {
9292 visibility : true ,
9393 points : meshPointsDefaultStyle ( false ) ,
9494 edges : meshEdgesDefaultStyle ( ) ,
95- } ;
96- } ;
95+ }
96+ }
9797
9898const surface_defaultStyle = ( visibility = true ) => {
9999 return {
100100 visibility,
101101 points : meshPointsDefaultStyle ( false ) ,
102102 edges : meshEdgesDefaultStyle ( false ) ,
103103 polygons : meshPolygonsDefaultStyle ( ) ,
104- } ;
105- } ;
104+ }
105+ }
106106
107107const solid_defaultStyle = ( ) => {
108108 return {
@@ -111,34 +111,34 @@ const solid_defaultStyle = () => {
111111 edges : meshEdgesDefaultStyle ( false ) ,
112112 polygons : meshPolygonsDefaultStyle ( ) ,
113113 polyhedra : meshPolyhedraDefaultStyle ( ) ,
114- } ;
115- } ;
114+ }
115+ }
116116
117117// Model functions
118118const modelCornersDefaultStyle = ( visibility = corners_defaultVisibility ) => {
119- return { visibility } ;
120- } ;
119+ return { visibility }
120+ }
121121const modelLinesDefaultStyle = (
122122 visibility = lines_defaultVisibility ,
123- color = lines_defaultColor
123+ color = lines_defaultColor ,
124124) => {
125- return { visibility, color } ;
126- } ;
125+ return { visibility, color }
126+ }
127127const modelSurfacesDefaultStyle = ( visibility = surfaces_defaultVisibility ) => {
128- return { visibility } ;
129- } ;
128+ return { visibility }
129+ }
130130const modelBlocksDefaultStyle = ( visibility = blocks_defaultVisibility ) => {
131- return { visibility } ;
132- } ;
131+ return { visibility }
132+ }
133133const modelPointsDefaultStyle = (
134134 visibility = points_defaultVisibility ,
135- size
135+ size ,
136136) => {
137- return { visibility, size } ;
138- } ;
137+ return { visibility, size }
138+ }
139139const modelEdgesDefaultStyle = ( visibility = edges_defaultVisibility ) => {
140- return { visibility } ;
141- } ;
140+ return { visibility }
141+ }
142142
143143const brep_defaultStyle = ( ) => {
144144 return {
@@ -149,8 +149,8 @@ const brep_defaultStyle = () => {
149149 blocks : modelBlocksDefaultStyle ( ) ,
150150 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
151151 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
152- } ;
153- } ;
152+ }
153+ }
154154
155155const crossSection_defaultStyle = ( ) => {
156156 return {
@@ -160,8 +160,8 @@ const crossSection_defaultStyle = () => {
160160 surfaces : modelSurfacesDefaultStyle ( ) ,
161161 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
162162 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
163- } ;
164- } ;
163+ }
164+ }
165165
166166const structuralModel_defaultStyle = ( ) => {
167167 return {
@@ -172,8 +172,8 @@ const structuralModel_defaultStyle = () => {
172172 blocks : modelBlocksDefaultStyle ( ) ,
173173 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
174174 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
175- } ;
176- } ;
175+ }
176+ }
177177
178178const section_defaultStyle = ( ) => {
179179 return {
@@ -183,8 +183,8 @@ const section_defaultStyle = () => {
183183 surfaces : modelSurfacesDefaultStyle ( ) ,
184184 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
185185 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
186- } ;
187- } ;
186+ }
187+ }
188188
189189const implicitCrossSection_defaultStyle = ( ) => {
190190 return {
@@ -194,8 +194,8 @@ const implicitCrossSection_defaultStyle = () => {
194194 surfaces : modelSurfacesDefaultStyle ( ) ,
195195 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
196196 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
197- } ;
198- } ;
197+ }
198+ }
199199
200200const implicitStructuralModel_defaultStyle = ( ) => {
201201 return {
@@ -206,8 +206,8 @@ const implicitStructuralModel_defaultStyle = () => {
206206 blocks : modelBlocksDefaultStyle ( ) ,
207207 points : modelPointsDefaultStyle ( false , points_defaultSize ) ,
208208 edges : modelEdgesDefaultStyle ( false , edges_defaultSize ) ,
209- } ;
210- } ;
209+ }
210+ }
211211
212212const default_styles = ( ) => {
213213 return {
@@ -236,11 +236,11 @@ const default_styles = () => {
236236 TriangulatedSurface2D : surface_defaultStyle ( ) ,
237237 TriangulatedSurface3D : surface_defaultStyle ( ) ,
238238 VertexSet : { } ,
239- } ;
240- } ;
239+ }
240+ }
241241
242242function getDefaultStyle ( type ) {
243- return default_styles ( ) [ type ] ;
243+ return default_styles ( ) [ type ]
244244}
245245
246- export { getDefaultStyle } ;
246+ export { getDefaultStyle }
0 commit comments