diff --git a/src/App/App.stories.tsx b/src/App/App.stories.tsx index 40429a31..b351be0a 100644 --- a/src/App/App.stories.tsx +++ b/src/App/App.stories.tsx @@ -14,7 +14,7 @@ export const Default: StoryObj = { args: { script: `import { analyzing } from 'https://unpkg.com/awatif'; -export const nodes = [[50, 50, 0], [80, 50, 0], [50, 50, 30]]; +export const nodes = [[8, 12.5, 0], [15, 12.5, 0], [8, 12.5, 8]];; export const elements = [[0, 1], [1, 2]] export const assignments = [ @@ -50,7 +50,7 @@ export const UndeformedAndGridSize: StoryObj = { args: { script: `import { analyzing } from 'https://unpkg.com/awatif'; -export const nodes = [[50, 50, 0], [80, 50, 0], [50, 50, 30]];; +export const nodes = [[8, 12.5, 0], [15, 12.5, 0], [8, 12.5, 8]];;; export const elements = [[0, 1], [1, 2]] export const assignments = [ @@ -82,7 +82,7 @@ export const analysisResults = analyzing(nodes, elements, assignments); export const settings = { deformedShape: false, - gridSize: 80 + gridSize: 40 }`, }, }; @@ -93,24 +93,24 @@ export const ParametersAndResults: StoryObj = { export const parameters = { xPosition: { - value: 80, + value: 15, min: 1, - max: 100, + max: 20, step: 1 }, zPosition: { value: 0, min: 0, - max: 100, + max: 10, step: 1 } } export const onParameterChange = (parameters) => { const nodes = [ - [50, 50, 0], - [parameters.xPosition.value, 50, parameters.zPosition.value], - [50, 50, 30]]; + [8, 12.5, 0], + [parameters.xPosition.value, 12.5, parameters.zPosition.value], + [8, 12.5, 8]]; const elements = [[0, 1], [1, 2]] const assignments = [ @@ -153,7 +153,7 @@ export const settings = { export const IndicesAndDisplayScale: StoryObj = { args: { - script: `export const nodes = [[50, 50, 0], [80, 50, 0], [50, 50, 30]]; + script: `export const nodes = [[8, 12.5, 0], [15, 12.5, 0], [8, 12.5, 8]];; export const elements = [[0, 1], [1, 2]]; export const settings = { diff --git a/src/App/App.tsx b/src/App/App.tsx index 5c06bbfa..2e9b55dd 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -38,7 +38,7 @@ export function App(props: AppProps) { }); const defaultScript = `import { analyzing } from 'https://unpkg.com/awatif'; -export const nodes = [[50, 50, 0], [80, 50, 0], [50, 50, 30]]; +export const nodes = [[8, 12.5, 0], [15, 12.5, 0], [8, 12.5, 8]];; export const elements = [[0, 1], [1, 2]] export const assignments = [ diff --git a/src/Viewer/objects/ElementResult.tsx b/src/Viewer/objects/ElementResult.tsx index 939df01f..1bf9224a 100644 --- a/src/Viewer/objects/ElementResult.tsx +++ b/src/Viewer/objects/ElementResult.tsx @@ -28,7 +28,7 @@ export function ElementResult(props: ElementResultProps) { const start = new THREE.Vector3(...convertAxesToAwatif(props.start)); const end = new THREE.Vector3(...convertAxesToAwatif(props.end)); - const size = 4; + const size = 0.5; const geometry = new THREE.PlaneGeometry(start.distanceTo(end), size); const material = new THREE.MeshBasicMaterial({ color: props.result > 0 ? 0x005ce6 : 0xe62e00, // second 0xe62e00 @@ -66,7 +66,7 @@ export function ElementResult(props: ElementResultProps) { plane.position.set(...start.toArray()); const lineLength = start.clone().sub(end).length(); plane.translateX(-lineLength / 2); - plane.translateY(size / 2 + 0.05 * size); + plane.translateY(size / 2); // text const textPosition = start.clone().add(end).multiplyScalar(0.5).toArray();