Compare commits

...
4 Commits
Author SHA1 Message Date
nils c888ffeec4 Show axis units on blur plot
Build & Deploy / build (push) Successful in 2m40s
Build & Deploy / deploy (push) Failing after 3s
2025-09-29 00:04:32 +02:00
nils d744028971 Fix deploy workflow with AWS CLI action 2025-09-29 00:02:06 +02:00
nils 822d93cb70 Add Viltrox 27mm f/1.2 XF lens 2025-09-28 23:50:37 +02:00
nils 3e72036ca1 Add Viltrox 75mm f/1.2 XF lens 2025-09-28 23:49:36 +02:00
3 changed files with 31 additions and 13 deletions
+22 -8
View File
@@ -37,11 +37,25 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }} aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy to S3 and invalidate CloudFront - name: Sync hashed assets to S3
env: uses: aws-actions/aws-cli-action@v2
BUCKET_NAME: ${{ secrets.BUCKET_NAME }} with:
CLOUDFRONT_ID: ${{ secrets.CLOUDFRONT_ID }} command: >-
run: | s3 sync dist/ "s3://${{ secrets.BUCKET_NAME }}"
aws s3 sync dist/ "s3://${BUCKET_NAME}" --delete --exclude "index.html" --cache-control "public, max-age=31536000, immutable" --delete
aws s3 cp dist/index.html "s3://${BUCKET_NAME}/index.html" --cache-control "no-cache, no-store, must-revalidate" --content-type "text/html" --exclude "index.html"
aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_ID}" --paths "/" "/index.html" --cache-control "public, max-age=31536000, immutable"
- name: Upload index.html
uses: aws-actions/aws-cli-action@v2
with:
command: >-
s3 cp dist/index.html "s3://${{ secrets.BUCKET_NAME }}/index.html"
--cache-control "no-cache, no-store, must-revalidate"
--content-type "text/html"
- name: Invalidate CloudFront
uses: aws-actions/aws-cli-action@v2
with:
command: >-
cloudfront create-invalidation
--distribution-id "${{ secrets.CLOUDFRONT_ID }}"
--paths "/" "/index.html"
+7 -5
View File
@@ -52,17 +52,17 @@ const formatAperture = (value) => {
const getAxisConfig = (plotType) => { const getAxisConfig = (plotType) => {
switch (plotType) { switch (plotType) {
case PlotTypes.DISTANCE: case PlotTypes.DISTANCE:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance }; return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
case PlotTypes.ZOOMED: case PlotTypes.ZOOMED:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance }; return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
case PlotTypes.NORMALIZED: case PlotTypes.NORMALIZED:
return { label: 'Scene distance ÷ subject distance', accessor: (point) => point.normalizedDistance }; return { label: 'Scene distance ÷ subject distance', accessor: (point) => point.normalizedDistance };
case PlotTypes.SEPARATION: case PlotTypes.SEPARATION:
return { label: 'Focus-relative distance (m)', accessor: (point) => point.focusOffset }; return { label: 'Focus-relative distance (m)', accessor: (point) => point.focusOffset, ticksuffix: ' m' };
case PlotTypes.DIOPTER: case PlotTypes.DIOPTER:
return { label: 'Diopter difference (1/m)', accessor: (point) => point.diopterDifference }; return { label: 'Diopter difference (1/m)', accessor: (point) => point.diopterDifference, ticksuffix: ' 1/m' };
default: default:
return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance }; return { label: 'Scene distance (m)', accessor: (point) => point.sceneDistance, ticksuffix: ' m' };
} }
}; };
@@ -144,6 +144,7 @@ const PlotSection = ({ lensCurves, plotType, setPlotType }) => {
title: axisConfig.label, title: axisConfig.label,
gridcolor: 'rgba(148, 163, 184, 0.2)', gridcolor: 'rgba(148, 163, 184, 0.2)',
zerolinecolor: 'rgba(148, 163, 184, 0.4)', zerolinecolor: 'rgba(148, 163, 184, 0.4)',
...(axisConfig.ticksuffix ? { ticksuffix: axisConfig.ticksuffix } : {}),
}, },
yaxis: { yaxis: {
title: 'Blur radius (% of sensor diagonal)', title: 'Blur radius (% of sensor diagonal)',
@@ -151,6 +152,7 @@ const PlotSection = ({ lensCurves, plotType, setPlotType }) => {
gridcolor: 'rgba(148, 163, 184, 0.2)', gridcolor: 'rgba(148, 163, 184, 0.2)',
zerolinecolor: 'rgba(148, 163, 184, 0.4)', zerolinecolor: 'rgba(148, 163, 184, 0.4)',
range: [0, maxY * 1.1], range: [0, maxY * 1.1],
ticksuffix: ' %',
}, },
}} }}
useResizeHandler useResizeHandler
+2
View File
@@ -24,8 +24,10 @@ export const defaultLenses = [
{ id: 'fujifilm_23_14', brand: 'Fujifilm', name: 'XF 23mm f/1.4 R LM WR', focalLength: 23, maxAperture: 1.4, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_23_14', brand: 'Fujifilm', name: 'XF 23mm f/1.4 R LM WR', focalLength: 23, maxAperture: 1.4, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_33_14', brand: 'Fujifilm', name: 'XF 33mm f/1.4 R LM WR', focalLength: 33, maxAperture: 1.4, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_33_14', brand: 'Fujifilm', name: 'XF 33mm f/1.4 R LM WR', focalLength: 33, maxAperture: 1.4, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_35_2', brand: 'Fujifilm', name: 'XF 35mm f/2 R WR', focalLength: 35, maxAperture: 2, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_35_2', brand: 'Fujifilm', name: 'XF 35mm f/2 R WR', focalLength: 35, maxAperture: 2, sensorId: 'aps_c_fuji' },
{ id: 'viltrox_27_12', brand: 'Viltrox', name: 'Viltrox 27mm f/1.2 XF', focalLength: 27, maxAperture: 1.2, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_56_12', brand: 'Fujifilm', name: 'XF 56mm f/1.2 R WR', focalLength: 56, maxAperture: 1.2, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_56_12', brand: 'Fujifilm', name: 'XF 56mm f/1.2 R WR', focalLength: 56, maxAperture: 1.2, sensorId: 'aps_c_fuji' },
{ id: 'sigma_56_14', brand: 'Sigma', name: 'Sigma 56mm f/1.4', focalLength: 56, maxAperture: 1.4, sensorId: 'aps_c_fuji' }, { id: 'sigma_56_14', brand: 'Sigma', name: 'Sigma 56mm f/1.4', focalLength: 56, maxAperture: 1.4, sensorId: 'aps_c_fuji' },
{ id: 'viltrox_75_12', brand: 'Viltrox', name: 'Viltrox 75mm f/1.2 XF', focalLength: 75, maxAperture: 1.2, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_80_28_macro', brand: 'Fujifilm', name: 'XF 80mm f/2.8 R LM OIS WR Macro', focalLength: 80, maxAperture: 2.8, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_80_28_macro', brand: 'Fujifilm', name: 'XF 80mm f/2.8 R LM OIS WR Macro', focalLength: 80, maxAperture: 2.8, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_90_2', brand: 'Fujifilm', name: 'XF 90mm f/2 R LM WR', focalLength: 90, maxAperture: 2, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_90_2', brand: 'Fujifilm', name: 'XF 90mm f/2 R LM WR', focalLength: 90, maxAperture: 2, sensorId: 'aps_c_fuji' },
{ id: 'fujifilm_200_2', brand: 'Fujifilm', name: 'XF 200mm f/2', focalLength: 200, maxAperture: 2, sensorId: 'aps_c_fuji' }, { id: 'fujifilm_200_2', brand: 'Fujifilm', name: 'XF 200mm f/2', focalLength: 200, maxAperture: 2, sensorId: 'aps_c_fuji' },