From 21df1b1b9950a6adb293e37deaed77e1951905f4 Mon Sep 17 00:00:00 2001 From: sovanna Date: Sun, 4 Aug 2019 19:21:00 +0200 Subject: [PATCH] fix(Solvespace): Adds customs sizes to model --- content/software/solvespace.md | 2 +- sass/css/_layout.scss | 7 +++++++ templates/page-solvespace.html | 25 ++++++++++++++++--------- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/content/software/solvespace.md b/content/software/solvespace.md index 9c27953..d9d32a9 100644 --- a/content/software/solvespace.md +++ b/content/software/solvespace.md @@ -41,7 +41,7 @@ Of course, most vacuum chambers would have some standard flanges. These can be e {% layout_treejs(two=true, css="row d-flex align-items-center mt-5 mb-1") %} - +
{% end %} diff --git a/sass/css/_layout.scss b/sass/css/_layout.scss index ae78b70..d3eff47 100644 --- a/sass/css/_layout.scss +++ b/sass/css/_layout.scss @@ -101,6 +101,10 @@ p ~ h5 { margin-top: 3rem; } +img.kf25 { + width: 320px; +} + // Small devices (landscape phones, 576px and up) @media (min-width: 576px) { @@ -116,6 +120,9 @@ p ~ h5 { // Medium devices (tablets, 768px and up) @media (min-width: 768px) { + img.kf25 { + width: 400px; + } } // Large devices (desktops, 992px and up) diff --git a/templates/page-solvespace.html b/templates/page-solvespace.html index 1a2c371..3a5466a 100644 --- a/templates/page-solvespace.html +++ b/templates/page-solvespace.html @@ -38,21 +38,28 @@ } var bootstrap_env = findBootstrapEnvironment(); - var params_chamber = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 400, height: 200, scale: 1} : {width: 800, height: 600, scale: 3}; - var params_k526s_fixture = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 400, height: 200, scale: 6} : {width: 800, height: 400, scale: 12}; + var params_chamber = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 200, scale: 1} : {width: 800, height: 600, scale: 3}; + var params_kf25 = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 10, offset: new THREE.Vector3(-8, 0, 0)} : {width: 400, height: 300, scale: 10, offset: new THREE.Vector3(-8, 0, 0)}; + var params_viewport = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 3} : {width: 400, height: 300, scale: 3}; + var params_multiport = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 3} : {width: 400, height: 300, scale: 3}; + var params_k526s_body = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 6, offset: new THREE.Vector3(-10, -15, 0)} : {width: 400, height: 300, scale: 6, offset: new THREE.Vector3(-10, -15, 0)}; + var params_k526s_head = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 8, offset: new THREE.Vector3(25, 0, 0)} : {width: 400, height: 300, scale: 8, offset: new THREE.Vector3(25, 0, 0)}; + var params_k526s_fixture = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 200, scale: 6} : {width: 800, height: 400, scale: 12}; + var params_k526s_adapter = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 8, offset: new THREE.Vector3(-8, 0, 0)} : {width: 400, height: 300, scale: 8, offset: new THREE.Vector3(-8, 0, 0)}; + var params_k526s_assy = (bootstrap_env === 'xs' || bootstrap_env == 'sm') ? {width: 320, height: 300, scale: 8} : {width: 400, height: 300, scale: 8}; var nodes = [{ id: 'kf25', model: solvespace_model_kf25, - params: {width: 400, height: 300, scale: 10, offset: new THREE.Vector3(-8, 0, 0)}, + params: params_kf25, }, { id: 'viewport', model: solvespace_model_viewport, - params: {width: 400, height: 300, scale: 3}, + params: params_viewport, }, { id: 'multiport', model: solvespace_model_multiport, - params: {width: 400, height: 300, scale: 3}, + params: params_multiport, }, { id: 'chamber', model: solvespace_model_chamber, @@ -60,11 +67,11 @@ }, { id: 'k526s-body', model: solvespace_model_k526s_body, - params: {width: 400, height: 300, scale: 6, offset: new THREE.Vector3(-10, -15, 0)}, + params: params_k526s_body, }, { id: 'k526s-head', model: solvespace_model_k526s_head, - params: {width: 400, height: 300, scale: 8, offset: new THREE.Vector3(25, 0, 0)}, + params: params_k526s_head, }, { id: 'k526s-fixture', model: solvespace_model_k526s_fixture, @@ -72,11 +79,11 @@ }, { id: 'k526s-adapter', model: solvespace_model_k526s_adapter, - params: {width: 400, height: 300, scale: 8, offset: new THREE.Vector3(-8, 0, 0)}, + params: params_k526s_adapter, }, { id: 'k526s-adapter-assy', model: solvespace_model_k526s_adapter_assy, - params: {width: 400, height: 300, scale: 8}, + params: params_k526s_assy, }]; var node;