Browse Source

tweaked geometry param info categories

Alexander Rose 5 years ago
parent
commit
ef2c1b51e9

+ 2 - 1
src/mol-geo/geometry/base.ts

@@ -40,7 +40,8 @@ export namespace BaseGeometry {
     }
     export type Params = typeof Params
 
-    export const CustomQualityParamInfo: PD.Info = { 
+    export const ShadingCategory: PD.Info = { category: 'Shading' };
+    export const CustomQualityParamInfo: PD.Info = {
         category: 'Custom Quality',
         hideIf: (params: PD.Values<Params>) => typeof params.quality !== 'undefined' && params.quality !== 'custom'
     };

+ 4 - 7
src/mol-geo/geometry/mesh/mesh.ts

@@ -319,15 +319,12 @@ export namespace Mesh {
 
     //
 
-
-    const ShadingCategory: PD.Info = { category: 'Shading' };
-
     export const Params = {
         ...BaseGeometry.Params,
-        doubleSided: PD.Boolean(false, ShadingCategory),
-        flipSided: PD.Boolean(false, ShadingCategory),
-        flatShaded: PD.Boolean(false, ShadingCategory),
-        ignoreLight: PD.Boolean(false, ShadingCategory),
+        doubleSided: PD.Boolean(false, BaseGeometry.CustomQualityParamInfo),
+        flipSided: PD.Boolean(false, BaseGeometry.ShadingCategory),
+        flatShaded: PD.Boolean(false, BaseGeometry.ShadingCategory),
+        ignoreLight: PD.Boolean(false, BaseGeometry.ShadingCategory),
     }
     export type Params = typeof Params
 

+ 2 - 2
src/mol-geo/geometry/spheres/spheres.ts

@@ -114,8 +114,8 @@ export namespace Spheres {
     export const Params = {
         ...BaseGeometry.Params,
         sizeFactor: PD.Numeric(1, { min: 0, max: 10, step: 0.1 }),
-        doubleSided: PD.Boolean(false),
-        ignoreLight: PD.Boolean(false),
+        doubleSided: PD.Boolean(false, BaseGeometry.CustomQualityParamInfo),
+        ignoreLight: PD.Boolean(false, BaseGeometry.ShadingCategory),
     }
     export type Params = typeof Params
 

+ 3 - 3
src/mol-geo/geometry/texture-mesh/texture-mesh.ts

@@ -70,9 +70,9 @@ export namespace TextureMesh {
 
     export const Params = {
         ...BaseGeometry.Params,
-        doubleSided: PD.Boolean(false),
-        flipSided: PD.Boolean(false),
-        flatShaded: PD.Boolean(false),
+        doubleSided: PD.Boolean(false, BaseGeometry.CustomQualityParamInfo),
+        flipSided: PD.Boolean(false, BaseGeometry.ShadingCategory),
+        flatShaded: PD.Boolean(false, BaseGeometry.ShadingCategory),
     }
     export type Params = typeof Params