|
@@ -34,7 +34,7 @@ const CellRef = {
|
|
|
model: 'Model'
|
|
|
};
|
|
|
|
|
|
-const CellAttachement = {
|
|
|
+const CellAttachment = {
|
|
|
corner: 'Corner',
|
|
|
center: 'Center'
|
|
|
};
|
|
@@ -44,12 +44,12 @@ const CellParams = {
|
|
|
cellColor: PD.Color(ColorNames.orange),
|
|
|
cellScale: PD.Numeric(2, { min: 0.1, max: 5, step: 0.1 }),
|
|
|
ref: PD.Select('model', PD.objectToOptions(CellRef), { isEssential: true }),
|
|
|
- attachement: PD.Select('corner', PD.objectToOptions(CellAttachement), { isEssential: true }),
|
|
|
+ attachment: PD.Select('corner', PD.objectToOptions(CellAttachment), { isEssential: true }),
|
|
|
};
|
|
|
-type MeshParams = typeof CellParams
|
|
|
+type CellParams = typeof CellParams
|
|
|
|
|
|
const UnitcellVisuals = {
|
|
|
- 'mesh': (ctx: RepresentationContext, getParams: RepresentationParamsGetter<UnitcellData, MeshParams>) => ShapeRepresentation(getUnitcellShape, Mesh.Utils),
|
|
|
+ 'mesh': (ctx: RepresentationContext, getParams: RepresentationParamsGetter<UnitcellData, CellParams>) => ShapeRepresentation(getUnitcellShape, Mesh.Utils),
|
|
|
};
|
|
|
|
|
|
export const UnitcellParams = {
|
|
@@ -64,7 +64,7 @@ function getUnitcellMesh(data: UnitcellData, props: UnitcellProps, mesh?: Mesh)
|
|
|
const { fromFractional } = data.symmetry.spacegroup.cell;
|
|
|
|
|
|
Vec3.copy(tmpRef, data.ref);
|
|
|
- if (props.attachement === 'center') {
|
|
|
+ if (props.attachment === 'center') {
|
|
|
Vec3.trunc(tmpRef, tmpRef);
|
|
|
Vec3.subScalar(tmpRef, tmpRef, 0.5);
|
|
|
} else {
|