ソースを参照

Merge branch 'master' into cylinders

Alexander Rose 4 年 前
コミット
db0aa12e75

+ 6 - 0
src/mol-geo/geometry/texture-mesh/texture-mesh.ts

@@ -75,6 +75,8 @@ export namespace TextureMesh {
         doubleSided: PD.Boolean(false, BaseGeometry.CustomQualityParamInfo),
         flipSided: PD.Boolean(false, BaseGeometry.ShadingCategory),
         flatShaded: PD.Boolean(false, BaseGeometry.ShadingCategory),
+        ignoreLight: PD.Boolean(false, BaseGeometry.ShadingCategory),
+        xrayShaded: PD.Boolean(false, BaseGeometry.ShadingCategory),
     };
     export type Params = typeof Params
 
@@ -126,6 +128,8 @@ export namespace TextureMesh {
             dDoubleSided: ValueCell.create(props.doubleSided),
             dFlatShaded: ValueCell.create(props.flatShaded),
             dFlipSided: ValueCell.create(props.flipSided),
+            dIgnoreLight: ValueCell.create(props.ignoreLight),
+            dXrayShaded: ValueCell.create(props.xrayShaded),
             dGeoTexture: ValueCell.create(true),
         };
     }
@@ -142,6 +146,8 @@ export namespace TextureMesh {
         ValueCell.updateIfChanged(values.dDoubleSided, props.doubleSided);
         ValueCell.updateIfChanged(values.dFlatShaded, props.flatShaded);
         ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
+        ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
+        ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
 
         if (values.drawCount.ref.value > values.aGroup.ref.value.length) {
             // console.log('updating vertex ids in aGroup to handle larger drawCount')

+ 2 - 0
src/mol-gl/renderable/texture-mesh.ts

@@ -22,6 +22,8 @@ export const TextureMeshSchema = {
     dFlatShaded: DefineSpec('boolean'),
     dDoubleSided: DefineSpec('boolean'),
     dFlipSided: DefineSpec('boolean'),
+    dIgnoreLight: DefineSpec('boolean'),
+    dXrayShaded: DefineSpec('boolean'),
     dGeoTexture: DefineSpec('boolean'),
 };
 export type TextureMeshSchema = typeof TextureMeshSchema

+ 6 - 0
src/mol-repr/structure/complex-visual.ts

@@ -317,6 +317,12 @@ export function ComplexTextVisual<P extends ComplexTextParams>(builder: ComplexT
             if (newProps.tetherLength !== currentProps.tetherLength) state.createGeometry = true;
             if (newProps.tetherBaseWidth !== currentProps.tetherBaseWidth) state.createGeometry = true;
             if (newProps.attachment !== currentProps.attachment) state.createGeometry = true;
+
+            if (newProps.fontFamily !== currentProps.fontFamily) state.createGeometry = true;
+            if (newProps.fontQuality !== currentProps.fontQuality) state.createGeometry = true;
+            if (newProps.fontStyle !== currentProps.fontStyle) state.createGeometry = true;
+            if (newProps.fontVariant !== currentProps.fontVariant) state.createGeometry = true;
+            if (newProps.fontWeight !== currentProps.fontWeight) state.createGeometry = true;
         },
         geometryUtils: Text.Utils
     }, materialId);

+ 6 - 0
src/mol-repr/structure/units-visual.ts

@@ -400,6 +400,12 @@ export function UnitsTextVisual<P extends UnitsTextParams>(builder: UnitsTextVis
             if (newProps.tetherLength !== currentProps.tetherLength) state.createGeometry = true;
             if (newProps.tetherBaseWidth !== currentProps.tetherBaseWidth) state.createGeometry = true;
             if (newProps.attachment !== currentProps.attachment) state.createGeometry = true;
+
+            if (newProps.fontFamily !== currentProps.fontFamily) state.createGeometry = true;
+            if (newProps.fontQuality !== currentProps.fontQuality) state.createGeometry = true;
+            if (newProps.fontStyle !== currentProps.fontStyle) state.createGeometry = true;
+            if (newProps.fontVariant !== currentProps.fontVariant) state.createGeometry = true;
+            if (newProps.fontWeight !== currentProps.fontWeight) state.createGeometry = true;
         },
         geometryUtils: Text.Utils
     }, materialId);