Style Physics options presets pick list

This commit is contained in:
David Rowe 2017-08-30 17:20:32 +12:00
parent e18e11a07b
commit 42d2045bae
17 changed files with 428 additions and 87 deletions

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="80px" height="52px" viewBox="0 0 80 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>5</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Physics---Default" transform="translate(-2095.000000, -1000.000000)" fill="#575757">
<polygon id="5" points="2135 1051.16279 2095 1000 2175 1000"></polygon>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 661 B

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="80px" height="52px" viewBox="0 0 80 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>5 copy</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Dropdown---Click" transform="translate(-1720.000000, -1920.000000)" fill="#575757">
<polygon id="5-copy" transform="translate(1760.000000, 1945.581395) scale(1, -1) translate(-1760.000000, -1945.581395) " points="1760 1971.16279 1720 1920 1800 1920"></polygon>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 770 B

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="459px" height="82px" viewBox="0 0 459 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>BALLOON</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-1554.000000, -1340.000000)" fill="#FFFFFF">
<path d="M1593.824,1379.008 C1602.56,1380.688 1611.408,1384.832 1611.408,1397.488 C1611.408,1414.848 1597.408,1420 1578.368,1420 L1554.176,1420 L1554.176,1342.496 L1575.344,1342.496 C1595.616,1342.496 1608.048,1347.984 1608.048,1362.32 C1608.048,1372.064 1600.992,1377.328 1593.824,1379.008 Z M1570.64,1354.368 L1570.64,1373.968 L1578.704,1373.968 C1586.544,1373.968 1591.248,1370.72 1591.248,1363.776 C1591.248,1356.608 1586.432,1354.368 1576.912,1354.368 L1570.64,1354.368 Z M1578.48,1407.792 C1587.664,1407.792 1594.272,1406 1594.272,1396.816 C1594.272,1388.192 1588.224,1385.168 1579.936,1385.168 L1570.64,1385.168 L1570.64,1407.792 L1578.48,1407.792 Z M1657.44,1402.64 L1633.136,1402.64 L1628.768,1420 L1611.632,1420 L1635.488,1342.496 L1655.536,1342.496 L1679.28,1420 L1661.808,1420 L1657.44,1402.64 Z M1654.304,1390.432 L1645.232,1354.704 L1636.272,1390.432 L1654.304,1390.432 Z M1702.912,1406.784 L1702.912,1342.496 L1686.448,1342.496 L1686.448,1420 L1731.808,1420 L1733.6,1406.784 L1702.912,1406.784 Z M1759.92,1406.784 L1759.92,1342.496 L1743.456,1342.496 L1743.456,1420 L1788.816,1420 L1790.608,1406.784 L1759.92,1406.784 Z M1829.92,1340.704 C1851.2,1340.704 1864.304,1355.264 1864.304,1381.248 C1864.304,1406.672 1851.2,1421.792 1829.92,1421.792 C1808.64,1421.792 1795.424,1407.12 1795.424,1381.248 C1795.424,1355.936 1808.64,1340.704 1829.92,1340.704 Z M1829.92,1353.024 C1818.944,1353.024 1812.784,1360.976 1812.784,1381.248 C1812.784,1401.52 1819.168,1409.472 1829.92,1409.472 C1841.008,1409.472 1846.944,1401.52 1846.944,1381.248 C1846.944,1360.976 1841.008,1353.024 1829.92,1353.024 Z M1907.312,1340.704 C1928.592,1340.704 1941.696,1355.264 1941.696,1381.248 C1941.696,1406.672 1928.592,1421.792 1907.312,1421.792 C1886.032,1421.792 1872.816,1407.12 1872.816,1381.248 C1872.816,1355.936 1886.032,1340.704 1907.312,1340.704 Z M1907.312,1353.024 C1896.336,1353.024 1890.176,1360.976 1890.176,1381.248 C1890.176,1401.52 1896.56,1409.472 1907.312,1409.472 C1918.4,1409.472 1924.336,1401.52 1924.336,1381.248 C1924.336,1360.976 1918.4,1353.024 1907.312,1353.024 Z M2012.592,1420 L2012.592,1342.496 L1997.696,1342.496 L1997.696,1376.544 C1997.696,1388.08 1999.152,1398.832 1999.936,1404.096 L1974.848,1342.496 L1954.128,1342.496 L1954.128,1420 L1969.024,1420 L1969.024,1389.872 C1969.024,1375.536 1967.68,1365.456 1966.784,1358.512 L1991.424,1420 L2012.592,1420 Z" id="BALLOON"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="393px" height="82px" viewBox="0 0 393 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>COTTON</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-1550.000000, -500.000000)" fill="#FFFFFF">
<path d="M1584.528,500.704 C1565.152,500.704 1550.256,515.04 1550.256,541.136 C1550.256,567.568 1564.368,581.792 1584.976,581.792 C1595.728,581.792 1603.904,577.088 1608.832,572.048 L1601.216,562.304 C1596.736,565.776 1592.256,568.8 1585.76,568.8 C1575.12,568.8 1567.616,560.624 1567.616,541.136 C1567.616,520.976 1575.232,513.136 1585.536,513.136 C1590.912,513.136 1595.392,515.04 1599.648,518.736 L1607.936,509.104 C1601.552,503.728 1594.832,500.704 1584.528,500.704 Z M1646.464,500.704 C1667.744,500.704 1680.848,515.264 1680.848,541.248 C1680.848,566.672 1667.744,581.792 1646.464,581.792 C1625.184,581.792 1611.968,567.12 1611.968,541.248 C1611.968,515.936 1625.184,500.704 1646.464,500.704 Z M1646.464,513.024 C1635.488,513.024 1629.328,520.976 1629.328,541.248 C1629.328,561.52 1635.712,569.472 1646.464,569.472 C1657.552,569.472 1663.488,561.52 1663.488,541.248 C1663.488,520.976 1657.552,513.024 1646.464,513.024 Z M1740.656,515.376 L1742.448,502.496 L1683.984,502.496 L1683.984,515.376 L1704.592,515.376 L1704.592,580 L1721.056,580 L1721.056,515.376 L1740.656,515.376 Z M1800.464,515.376 L1802.256,502.496 L1743.792,502.496 L1743.792,515.376 L1764.4,515.376 L1764.4,580 L1780.864,580 L1780.864,515.376 L1800.464,515.376 Z M1837.312,500.704 C1858.592,500.704 1871.696,515.264 1871.696,541.248 C1871.696,566.672 1858.592,581.792 1837.312,581.792 C1816.032,581.792 1802.816,567.12 1802.816,541.248 C1802.816,515.936 1816.032,500.704 1837.312,500.704 Z M1837.312,513.024 C1826.336,513.024 1820.176,520.976 1820.176,541.248 C1820.176,561.52 1826.56,569.472 1837.312,569.472 C1848.4,569.472 1854.336,561.52 1854.336,541.248 C1854.336,520.976 1848.4,513.024 1837.312,513.024 Z M1942.592,580 L1942.592,502.496 L1927.696,502.496 L1927.696,536.544 C1927.696,548.08 1929.152,558.832 1929.936,564.096 L1904.848,502.496 L1884.128,502.496 L1884.128,580 L1899.024,580 L1899.024,549.872 C1899.024,535.536 1897.68,525.456 1896.784,518.512 L1921.424,580 L1942.592,580 Z" id="COTTON"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="522px" height="82px" viewBox="0 0 522 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>CUSTOM …</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-603.000000, -1620.000000)" fill="#FFFFFF">
<path d="M637.528,1620.704 C618.152,1620.704 603.256,1635.04 603.256,1661.136 C603.256,1687.568 617.368,1701.792 637.976,1701.792 C648.728,1701.792 656.904,1697.088 661.832,1692.048 L654.216,1682.304 C649.736,1685.776 645.256,1688.8 638.76,1688.8 C628.12,1688.8 620.616,1680.624 620.616,1661.136 C620.616,1640.976 628.232,1633.136 638.536,1633.136 C643.912,1633.136 648.392,1635.04 652.648,1638.736 L660.936,1629.104 C654.552,1623.728 647.832,1620.704 637.528,1620.704 Z M729.032,1674.464 L729.032,1622.496 L712.568,1622.496 L712.568,1673.68 C712.568,1684.096 708.536,1689.248 699.464,1689.248 C690.504,1689.248 686.472,1684.096 686.472,1673.68 L686.472,1622.496 L670.008,1622.496 L670.008,1674.464 C670.008,1690.592 679.864,1701.792 699.464,1701.792 C719.064,1701.792 729.032,1690.032 729.032,1674.464 Z M768.008,1620.704 C752.328,1620.704 740.904,1629.328 740.904,1642.544 C740.904,1654.304 747.624,1661.024 764.424,1666.288 C776.184,1669.872 779.208,1672.56 779.208,1678.72 C779.208,1685.552 773.832,1689.36 765.88,1689.36 C757.928,1689.36 751.656,1686.448 746.28,1681.52 L737.656,1690.928 C744.04,1697.2 753.448,1701.792 766.328,1701.792 C785.144,1701.792 796.344,1691.824 796.344,1677.6 C796.344,1663.264 787.384,1657.44 773.384,1652.96 C760.728,1649.04 757.816,1646.8 757.816,1641.424 C757.816,1635.936 762.408,1633.024 769.128,1633.024 C775.4,1633.024 780.776,1635.04 786.152,1639.632 L794.104,1630.448 C787.384,1624.176 779.544,1620.704 768.008,1620.704 Z M856.152,1635.376 L857.944,1622.496 L799.48,1622.496 L799.48,1635.376 L820.088,1635.376 L820.088,1700 L836.552,1700 L836.552,1635.376 L856.152,1635.376 Z M893,1620.704 C914.28,1620.704 927.384,1635.264 927.384,1661.248 C927.384,1686.672 914.28,1701.792 893,1701.792 C871.72,1701.792 858.504,1687.12 858.504,1661.248 C858.504,1635.936 871.72,1620.704 893,1620.704 Z M893,1633.024 C882.024,1633.024 875.864,1640.976 875.864,1661.248 C875.864,1681.52 882.248,1689.472 893,1689.472 C904.088,1689.472 910.024,1681.52 910.024,1661.248 C910.024,1640.976 904.088,1633.024 893,1633.024 Z M1013.848,1700 L1007.912,1622.496 L986.744,1622.496 L974.76,1675.92 L961.992,1622.496 L941.048,1622.496 L935,1700 L951.016,1700 L952.696,1668.864 C953.256,1658 953.368,1647.696 952.696,1636.832 L966.696,1691.712 L982.264,1691.712 L995.368,1636.944 C995.032,1645.792 995.368,1657.44 996.04,1668.528 L997.72,1700 L1013.848,1700 Z M1060.104,1682.64 C1054.84,1682.64 1050.584,1687.008 1050.584,1692.16 C1050.584,1697.424 1054.84,1701.792 1060.104,1701.792 C1065.48,1701.792 1069.736,1697.424 1069.736,1692.16 C1069.736,1687.008 1065.48,1682.64 1060.104,1682.64 Z M1087.544,1682.64 C1082.28,1682.64 1078.024,1687.008 1078.024,1692.16 C1078.024,1697.424 1082.28,1701.792 1087.544,1701.792 C1092.92,1701.792 1097.176,1697.424 1097.176,1692.16 C1097.176,1687.008 1092.92,1682.64 1087.544,1682.64 Z M1114.984,1682.64 C1109.608,1682.64 1105.464,1687.008 1105.464,1692.16 C1105.464,1697.424 1109.608,1701.792 1114.984,1701.792 C1120.36,1701.792 1124.616,1697.424 1124.616,1692.16 C1124.616,1687.008 1120.36,1682.64 1114.984,1682.64 Z" id="CUSTOM-…"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="436" height="80" viewBox="0 0 436.00 80.00" enable-background="new 0 0 436.00 80.00" xml:space="preserve">
<g>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 21.7221,2.04751C 33.7849,2.04751 43.4492,4.80959 50.7149,10.3338C 57.9806,15.8579 61.6134,25.9875 61.6134,40.7225C 61.6134,55.1542 58.0562,65.3217 50.9419,71.225C 43.8276,77.1283 34.7164,80.08 23.6083,80.08L 1.47947,80.08L 1.47947,2.04751L 21.7221,2.04751 Z M 17.9146,14L 17.9146,68.1275L 24.6213,68.1275C 30.9555,68.1275 35.8546,66.1383 39.3186,62.16C 42.7826,58.1817 44.5146,51.0358 44.5146,40.7225C 44.5146,33.5942 43.6384,28.0583 41.886,24.115C 40.1337,20.1717 37.8049,17.5 34.8998,16.1C 31.9947,14.7 28.4579,14 24.2895,14L 17.9146,14 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 118.516,14L 90.5713,14L 90.5713,34.5275L 114.936,34.5275L 114.936,46.48L 90.5713,46.48L 90.5713,68.1275L 120.525,68.1275L 120.525,80.08L 74.1362,80.08L 74.1362,2.04751L 120.298,2.04751L 118.516,14 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 176.537,14.7525L 149.814,14.7525L 149.814,36.7675L 173.061,36.7675L 173.061,48.72L 149.814,48.72L 149.814,80.6225L 133.379,80.6225L 133.379,2.80001L 178.318,2.80001L 176.537,14.7525 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 224.707,62.16L 200.447,62.16L 196.098,79.5025L 178.982,79.5025L 202.805,1.68001L 222.803,1.68001L 246.504,79.5025L 229.073,79.5025L 224.707,62.16 Z M 221.58,50.2075L 212.516,14.2275L 203.469,50.2075L 221.58,50.2075 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 311.895,54.7225C 311.895,60.0775 310.777,64.8288 308.542,68.9762C 306.306,73.1237 302.97,76.3846 298.534,78.7588C 294.097,81.1329 288.712,82.32 282.378,82.32C 272.842,82.32 265.559,79.8117 260.529,74.795C 255.499,69.7783 252.984,63.0875 252.984,54.7225L 252.984,2.24001L 269.419,2.24001L 269.419,54.4775C 269.419,59.8092 270.461,63.7904 272.545,66.4212C 274.629,69.0521 277.907,70.3675 282.378,70.3675C 286.849,70.3675 290.147,69.0521 292.272,66.4212C 294.397,63.7904 295.46,59.8092 295.46,54.4775L 295.46,2.24001L 311.895,2.24001L 311.895,54.7225 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 343.193,66.64L 373.828,66.64L 372.029,80.08L 326.758,80.08L 326.758,2.24001L 343.193,2.24001L 343.193,66.64 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 433.281,15.12L 413.719,15.12L 413.719,80.0625L 397.301,80.0625L 397.301,15.12L 376.727,15.12L 376.727,1.68001L 435.079,1.68001L 433.281,15.12 Z "/>
</g>
</svg>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="144px" height="82px" viewBox="0 0 144 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>ICE</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-607.000000, -1060.000000)" fill="#FFFFFF">
<path d="M623.752,1140 L623.752,1062.496 L607.176,1062.496 L607.176,1140 L623.752,1140 Z M670.456,1060.704 C651.08,1060.704 636.184,1075.04 636.184,1101.136 C636.184,1127.568 650.296,1141.792 670.904,1141.792 C681.656,1141.792 689.832,1137.088 694.76,1132.048 L687.144,1122.304 C682.664,1125.776 678.184,1128.8 671.688,1128.8 C661.048,1128.8 653.544,1120.624 653.544,1101.136 C653.544,1080.976 661.16,1073.136 671.464,1073.136 C676.84,1073.136 681.32,1075.04 685.576,1078.736 L693.864,1069.104 C687.48,1063.728 680.76,1060.704 670.456,1060.704 Z M748.52,1074.48 L750.312,1062.496 L704.056,1062.496 L704.056,1140 L750.536,1140 L750.536,1127.904 L720.52,1127.904 L720.52,1106.512 L744.936,1106.512 L744.936,1094.64 L720.52,1094.64 L720.52,1074.48 L748.52,1074.48 Z" id="ICE"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="243px" height="78px" viewBox="0 0 243 78" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>LEAD Copy</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-607.000000, -502.000000)" fill="#FFFFFF">
<path d="M623.64,566.784 L623.64,502.496 L607.176,502.496 L607.176,580 L652.536,580 L654.328,566.784 L623.64,566.784 Z M708.648,514.48 L710.44,502.496 L664.184,502.496 L664.184,580 L710.664,580 L710.664,567.904 L680.648,567.904 L680.648,546.512 L705.064,546.512 L705.064,534.64 L680.648,534.64 L680.648,514.48 L708.648,514.48 Z M759.944,562.64 L735.64,562.64 L731.272,580 L714.136,580 L737.992,502.496 L758.04,502.496 L781.784,580 L764.312,580 L759.944,562.64 Z M756.808,550.432 L747.736,514.704 L738.776,550.432 L756.808,550.432 Z M809.224,502.496 C829.72,502.496 849.208,508.88 849.208,540.912 C849.208,572.16 830.168,580 811.128,580 L788.952,580 L788.952,502.496 L809.224,502.496 Z M805.416,514.592 L805.416,567.904 L812.136,567.904 C823.448,567.904 832.072,562.64 832.072,540.912 C832.072,518.736 823,514.592 811.8,514.592 L805.416,514.592 Z" id="LEAD-Copy"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="400px" height="80px" viewBox="0 0 400 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>RUBBER</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-607.000000, -1342.000000)" fill="#FFFFFF">
<path d="M632.04,1389.648 L623.64,1389.648 L623.64,1420 L607.176,1420 L607.176,1342.496 L631.368,1342.496 C652.088,1342.496 662.616,1350 662.616,1365.68 C662.616,1375.984 657.576,1382.144 647.272,1386.624 L667.32,1420 L648.616,1420 L632.04,1389.648 Z M623.64,1378 L632.264,1378 C640.888,1378 645.592,1374.416 645.592,1365.68 C645.592,1357.728 641,1354.256 631.032,1354.256 L623.64,1354.256 L623.64,1378 Z M733.848,1394.464 L733.848,1342.496 L717.384,1342.496 L717.384,1393.68 C717.384,1404.096 713.352,1409.248 704.28,1409.248 C695.32,1409.248 691.288,1404.096 691.288,1393.68 L691.288,1342.496 L674.824,1342.496 L674.824,1394.464 C674.824,1410.592 684.68,1421.792 704.28,1421.792 C723.88,1421.792 733.848,1410.032 733.848,1394.464 Z M788.84,1379.008 C797.576,1380.688 806.424,1384.832 806.424,1397.488 C806.424,1414.848 792.424,1420 773.384,1420 L749.192,1420 L749.192,1342.496 L770.36,1342.496 C790.632,1342.496 803.064,1347.984 803.064,1362.32 C803.064,1372.064 796.008,1377.328 788.84,1379.008 Z M765.656,1354.368 L765.656,1373.968 L773.72,1373.968 C781.56,1373.968 786.264,1370.72 786.264,1363.776 C786.264,1356.608 781.448,1354.368 771.928,1354.368 L765.656,1354.368 Z M773.496,1407.792 C782.68,1407.792 789.288,1406 789.288,1396.816 C789.288,1388.192 783.24,1385.168 774.952,1385.168 L765.656,1385.168 L765.656,1407.792 L773.496,1407.792 Z M857.72,1379.008 C866.456,1380.688 875.304,1384.832 875.304,1397.488 C875.304,1414.848 861.304,1420 842.264,1420 L818.072,1420 L818.072,1342.496 L839.24,1342.496 C859.512,1342.496 871.944,1347.984 871.944,1362.32 C871.944,1372.064 864.888,1377.328 857.72,1379.008 Z M834.536,1354.368 L834.536,1373.968 L842.6,1373.968 C850.44,1373.968 855.144,1370.72 855.144,1363.776 C855.144,1356.608 850.328,1354.368 840.808,1354.368 L834.536,1354.368 Z M842.376,1407.792 C851.56,1407.792 858.168,1406 858.168,1396.816 C858.168,1388.192 852.12,1385.168 843.832,1385.168 L834.536,1385.168 L834.536,1407.792 L842.376,1407.792 Z M931.416,1354.48 L933.208,1342.496 L886.952,1342.496 L886.952,1420 L933.432,1420 L933.432,1407.904 L903.416,1407.904 L903.416,1386.512 L927.832,1386.512 L927.832,1374.64 L903.416,1374.64 L903.416,1354.48 L931.416,1354.48 Z M970.952,1389.648 L962.552,1389.648 L962.552,1420 L946.088,1420 L946.088,1342.496 L970.28,1342.496 C991,1342.496 1001.528,1350 1001.528,1365.68 C1001.528,1375.984 996.488,1382.144 986.184,1386.624 L1006.232,1420 L987.528,1420 L970.952,1389.648 Z M962.552,1378 L971.176,1378 C979.8,1378 984.504,1374.416 984.504,1365.68 C984.504,1357.728 979.912,1354.256 969.944,1354.256 L962.552,1354.256 L962.552,1378 Z" id="RUBBER"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="687px" height="80px" viewBox="0 0 687 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>TUMBLEWEED</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-1547.000000, -782.000000)" fill="#FFFFFF">
<path d="M1603.792,795.376 L1605.584,782.496 L1547.12,782.496 L1547.12,795.376 L1567.728,795.376 L1567.728,860 L1584.192,860 L1584.192,795.376 L1603.792,795.376 Z M1671.888,834.464 L1671.888,782.496 L1655.424,782.496 L1655.424,833.68 C1655.424,844.096 1651.392,849.248 1642.32,849.248 C1633.36,849.248 1629.328,844.096 1629.328,833.68 L1629.328,782.496 L1612.864,782.496 L1612.864,834.464 C1612.864,850.592 1622.72,861.792 1642.32,861.792 C1661.92,861.792 1671.888,850.032 1671.888,834.464 Z M1761.824,860 L1755.888,782.496 L1734.72,782.496 L1722.736,835.92 L1709.968,782.496 L1689.024,782.496 L1682.976,860 L1698.992,860 L1700.672,828.864 C1701.232,818 1701.344,807.696 1700.672,796.832 L1714.672,851.712 L1730.24,851.712 L1743.344,796.944 C1743.008,805.792 1743.344,817.44 1744.016,828.528 L1745.696,860 L1761.824,860 Z M1815.248,819.008 C1823.984,820.688 1832.832,824.832 1832.832,837.488 C1832.832,854.848 1818.832,860 1799.792,860 L1775.6,860 L1775.6,782.496 L1796.768,782.496 C1817.04,782.496 1829.472,787.984 1829.472,802.32 C1829.472,812.064 1822.416,817.328 1815.248,819.008 Z M1792.064,794.368 L1792.064,813.968 L1800.128,813.968 C1807.968,813.968 1812.672,810.72 1812.672,803.776 C1812.672,796.608 1807.856,794.368 1798.336,794.368 L1792.064,794.368 Z M1799.904,847.792 C1809.088,847.792 1815.696,846 1815.696,836.816 C1815.696,828.192 1809.648,825.168 1801.36,825.168 L1792.064,825.168 L1792.064,847.792 L1799.904,847.792 Z M1860.944,846.784 L1860.944,782.496 L1844.48,782.496 L1844.48,860 L1889.84,860 L1891.632,846.784 L1860.944,846.784 Z M1945.952,794.48 L1947.744,782.496 L1901.488,782.496 L1901.488,860 L1947.968,860 L1947.968,847.904 L1917.952,847.904 L1917.952,826.512 L1942.368,826.512 L1942.368,814.64 L1917.952,814.64 L1917.952,794.48 L1945.952,794.48 Z M2031.632,860 L2045.184,782.496 L2029.616,782.496 L2019.648,847.232 L2008.336,782.496 L1990.976,782.496 L1979.216,847.232 L1970.368,782.496 L1953.904,782.496 L1967.344,860 L1988.176,860 L1999.488,799.408 L2010.24,860 L2031.632,860 Z M2099.392,794.48 L2101.184,782.496 L2054.928,782.496 L2054.928,860 L2101.408,860 L2101.408,847.904 L2071.392,847.904 L2071.392,826.512 L2095.808,826.512 L2095.808,814.64 L2071.392,814.64 L2071.392,794.48 L2099.392,794.48 Z M2158.528,794.48 L2160.32,782.496 L2114.064,782.496 L2114.064,860 L2160.544,860 L2160.544,847.904 L2130.528,847.904 L2130.528,826.512 L2154.944,826.512 L2154.944,814.64 L2130.528,814.64 L2130.528,794.48 L2158.528,794.48 Z M2193.472,782.496 C2213.968,782.496 2233.456,788.88 2233.456,820.912 C2233.456,852.16 2214.416,860 2195.376,860 L2173.2,860 L2173.2,782.496 L2193.472,782.496 Z M2189.664,794.592 L2189.664,847.904 L2196.384,847.904 C2207.696,847.904 2216.32,842.64 2216.32,820.912 C2216.32,798.736 2207.248,794.592 2196.048,794.592 L2189.664,794.592 Z" id="TUMBLEWEED"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="316px" height="82px" viewBox="0 0 316 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>WOOD</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-600.000000, -780.000000)" fill="#FFFFFF">
<path d="M678.184,860 L691.736,782.496 L676.168,782.496 L666.2,847.232 L654.888,782.496 L637.528,782.496 L625.768,847.232 L616.92,782.496 L600.456,782.496 L613.896,860 L634.728,860 L646.04,799.408 L656.792,860 L678.184,860 Z M730.936,780.704 C752.216,780.704 765.32,795.264 765.32,821.248 C765.32,846.672 752.216,861.792 730.936,861.792 C709.656,861.792 696.44,847.12 696.44,821.248 C696.44,795.936 709.656,780.704 730.936,780.704 Z M730.936,793.024 C719.96,793.024 713.8,800.976 713.8,821.248 C713.8,841.52 720.184,849.472 730.936,849.472 C742.024,849.472 747.96,841.52 747.96,821.248 C747.96,800.976 742.024,793.024 730.936,793.024 Z M808.328,780.704 C829.608,780.704 842.712,795.264 842.712,821.248 C842.712,846.672 829.608,861.792 808.328,861.792 C787.048,861.792 773.832,847.12 773.832,821.248 C773.832,795.936 787.048,780.704 808.328,780.704 Z M808.328,793.024 C797.352,793.024 791.192,800.976 791.192,821.248 C791.192,841.52 797.576,849.472 808.328,849.472 C819.416,849.472 825.352,841.52 825.352,821.248 C825.352,800.976 819.416,793.024 808.328,793.024 Z M875.416,782.496 C895.912,782.496 915.4,788.88 915.4,820.912 C915.4,852.16 896.36,860 877.32,860 L855.144,860 L855.144,782.496 L875.416,782.496 Z M871.608,794.592 L871.608,847.904 L878.328,847.904 C889.64,847.904 898.264,842.64 898.264,820.912 C898.264,798.736 889.192,794.592 877.992,794.592 L871.608,794.592 Z" id="WOOD"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="375px" height="82px" viewBox="0 0 375 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title>ZERO-G</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Physics-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Just-Text" transform="translate(-1548.000000, -1060.000000)" fill="#FFFFFF">
<path d="M1602.336,1075.152 L1602.336,1062.496 L1551.936,1062.496 L1551.936,1075.488 L1583.744,1075.488 L1548.352,1127.568 L1548.352,1140 L1601.104,1140 L1602.896,1126.672 L1567.616,1126.672 L1602.336,1075.152 Z M1659.008,1074.48 L1660.8,1062.496 L1614.544,1062.496 L1614.544,1140 L1661.024,1140 L1661.024,1127.904 L1631.008,1127.904 L1631.008,1106.512 L1655.424,1106.512 L1655.424,1094.64 L1631.008,1094.64 L1631.008,1074.48 L1659.008,1074.48 Z M1698.544,1109.648 L1690.144,1109.648 L1690.144,1140 L1673.68,1140 L1673.68,1062.496 L1697.872,1062.496 C1718.592,1062.496 1729.12,1070 1729.12,1085.68 C1729.12,1095.984 1724.08,1102.144 1713.776,1106.624 L1733.824,1140 L1715.12,1140 L1698.544,1109.648 Z M1690.144,1098 L1698.768,1098 C1707.392,1098 1712.096,1094.416 1712.096,1085.68 C1712.096,1077.728 1707.504,1074.256 1697.536,1074.256 L1690.144,1074.256 L1690.144,1098 Z M1771.904,1060.704 C1793.184,1060.704 1806.288,1075.264 1806.288,1101.248 C1806.288,1126.672 1793.184,1141.792 1771.904,1141.792 C1750.624,1141.792 1737.408,1127.12 1737.408,1101.248 C1737.408,1075.936 1750.624,1060.704 1771.904,1060.704 Z M1771.904,1073.024 C1760.928,1073.024 1754.768,1080.976 1754.768,1101.248 C1754.768,1121.52 1761.152,1129.472 1771.904,1129.472 C1782.992,1129.472 1788.928,1121.52 1788.928,1101.248 C1788.928,1080.976 1782.992,1073.024 1771.904,1073.024 Z M1815.92,1098.672 L1815.92,1111.216 L1850.64,1111.216 L1850.64,1098.672 L1815.92,1098.672 Z M1896.448,1060.704 C1876.624,1060.704 1860.272,1074.928 1860.272,1101.136 C1860.272,1127.792 1872.256,1141.792 1894.656,1141.792 C1905.072,1141.792 1914.592,1138.768 1922.32,1133.952 L1922.32,1095.76 L1893.76,1095.76 L1895.44,1107.744 L1906.304,1107.744 L1906.304,1126.672 C1902.832,1128.576 1898.912,1129.472 1894.768,1129.472 C1883.344,1129.472 1877.52,1121.968 1877.52,1101.248 C1877.52,1081.088 1886.256,1072.912 1897.232,1072.912 C1903.616,1072.912 1907.984,1074.928 1913.024,1079.072 L1921.872,1070 C1915.376,1064.4 1907.536,1060.704 1896.448,1060.704 Z" id="ZERO-G"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -36,6 +36,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
optionsOverlays = [],
optionsOverlaysIDs = [], // Text ids (names) of options overlays.
optionsOverlaysLabels = [], // Overlay IDs of labels for optionsOverlays.
optionsOverlaysSublabels = [], // Overlay IDs of sublabels for optionsOverlays.
optionsSliderData = [], // Uses same index values as optionsOverlays.
optionsColorData = [], // Uses same index values as optionsOverlays.
optionsEnabled = [],
@ -533,24 +534,32 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
properties: {
dimensions: { x: 0.06, y: 0.02, z: 0.01 },
localRotation: Quat.ZERO,
color: UI_BASE_COLOR,
color: UIT.colors.baseGrayShadow,
alpha: 1.0,
solid: true,
ignoreRayIntersection: false,
visible: true
},
newLabel: { // TODO: Rename to "label".
// Relative to picklist.
color: UIT.colors.white
}
},
"picklistItem": {
"picklistItem": { // Note: When using, declare before picklist item that it's being used in.
overlay: "cube",
properties: {
dimensions: { x: 0.1416, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
localPosition: Vec3.ZERO,
localRotation: Quat.ZERO,
color: { red: 100, green: 100, blue: 100 },
color: UIT.colors.baseGrayShadow,
alpha: 1.0,
solid: true,
ignoreRayIntersection: false,
visible: false
},
newLabel: { // TODO: Rename to "label".
// Relative to picklistItem.
color: UIT.colors.white
}
}
},
@ -560,10 +569,9 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
SLIDER_UI_ELEMENTS = ["barSlider", "imageSlider"],
COLOR_CIRCLE_UI_ELEMENTS = ["colorCircle"],
PICKLIST_UI_ELEMENTS = ["picklist", "picklistItem"],
MENU_HOVER_DELTA = { x: 0, y: 0, z: 0.006 },
OPTION_HOVER_DELTA = { x: 0, y: 0, z: 0.002 },
ITEM_RAISE_DELTA = { x: 0, y: 0, z: 0.004 },
PICKLIST_HOVER_DELTA = { x: 0, y: 0, z: 0.006 },
MIN_BAR_SLIDER_DIMENSION = 0.0001, // Avoid visual artifact for 0 slider values.
@ -1116,19 +1124,176 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
}
},
{
id: "presets",
id: "presetDefault",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/default-label.svg",
scale: 0.0436,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0436 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: {
method: "pickPhysicsPreset",
value: "default"
}
},
{
id: "presetLead",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/lead-label.svg",
scale: 0.0243,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0243 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetWood",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/wood-label.svg",
scale: 0.0316,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0316 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetIce",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/ice-label.svg",
scale: 0.0144,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0144 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetRubber",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/rubber-label.svg",
scale: 0.0400,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0400 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetCotton",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/cotton-label.svg",
scale: 0.0393,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0393 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetTumbleweed",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/tumbleweed-label.svg",
scale: 0.0687,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0687 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetZeroG",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/zero-g-label.svg",
scale: 0.0375,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0375 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "presetBalloon",
type: "picklistItem",
newLabel: {
url: "../assets/tools/physics/presets/balloon-label.svg",
scale: 0.0459,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0459 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
command: { method: "pickPhysicsPreset" }
},
{
id: "physicsPresets", // TODO: Rename to "physicsPresets".
type: "picklist",
properties: {
dimensions: { x: 0.1416, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
localPosition: {
x: UIT.dimensions.panel.x / 2 - UIT.dimensions.rightMargin - 0.1416 / 2,
y: 0.0480,
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2
}
},
newLabel: {
url: "../assets/tools/physics/presets/default-label.svg",
scale: 0.0436,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0436 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
sublabel: {
url: "../assets/tools/common/down-arrow.svg",
scale: 0.0080,
localPosition: {
x: 0.1416 / 2 - 0.0108 - 0.0080 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
},
color: UIT.colors.white // SVG is colored baseGrayHighlight
},
customLabel: {
url: "../assets/tools/physics/presets/custom-label.svg",
scale: 0.0522,
localPosition: {
x: -0.1416 / 2 + 0.017 + 0.0522 / 2,
y: 0,
z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset
}
},
label: "DEFAULT",
setting: {
key: "VREdit.physicsTool.presetLabel"
key: "VREdit.physicsTool.presetLabel", // TODO: Rename to "physicsPreset".
defaultValue: "presetDefault"
},
command: {
method: "togglePhysicsPresets"
@ -1145,60 +1310,6 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
"presetBalloon"
]
},
{
id: "presetDefault",
type: "picklistItem",
label: "DEFAULT",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetLead",
type: "picklistItem",
label: "LEAD",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetWood",
type: "picklistItem",
label: "WOOD",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetIce",
type: "picklistItem",
label: "ICE",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetRubber",
type: "picklistItem",
label: "RUBBER",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetCotton",
type: "picklistItem",
label: "COTTON",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetTumbleweed",
type: "picklistItem",
label: "TUMBLEWEED",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetZeroG",
type: "picklistItem",
label: "ZERO-G",
command: { method: "pickPhysicsPreset" }
},
{
id: "presetBalloon",
type: "picklistItem",
label: "BALLOON",
command: { method: "pickPhysicsPreset" }
},
{
id: "gravitySlider",
@ -1209,7 +1320,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
newLabel: {
localPosition: { x: 0, y: -0.04375, z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset },
url: "../assets/tools/physics/gravity-label.svg",
url: "../assets/tools/physics/sliders/gravity-label.svg",
scale: 0.0240
},
setting: {
@ -1230,7 +1341,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
newLabel: {
localPosition: { x: 0, y: -0.04375, z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset },
url: "../assets/tools/physics/bounce-label.svg",
url: "../assets/tools/physics/sliders/bounce-label.svg",
scale: 0.0233
},
setting: {
@ -1251,7 +1362,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
newLabel: {
localPosition: { x: 0, y: -0.04375, z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset },
url: "../assets/tools/physics/friction-label.svg",
url: "../assets/tools/physics/sliders/friction-label.svg",
scale: 0.0258
},
setting: {
@ -1272,7 +1383,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
newLabel: {
localPosition: { x: 0, y: -0.04375, z: UIT.dimensions.buttonDimensions.z / 2 + UIT.dimensions.imageOverlayOffset },
url: "../assets/tools/physics/density-label.svg",
url: "../assets/tools/physics/sliders/density-label.svg",
scale: 0.0241
},
setting: {
@ -1621,6 +1732,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
isHighlightingSlider,
isHighlightingColorCircle,
isHighlightingPicklist,
isHighlightingPicklistItem,
isPicklistOpen,
pressedItem = null,
pressedSource = null,
@ -1842,7 +1954,11 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
}
if (optionsItems[i].type === "picklist") {
optionsSettings[optionsItems[i].id].value = value;
optionsItems[i].label = value;
if (value === "custom") {
optionsItems[i].newLabel = optionsItems[i].customLabel;
} else {
optionsItems[i].newLabel = optionsItems[optionsOverlaysIDs.indexOf(value)].newLabel;
}
}
if (optionsItems[i].setting.command) {
doCommand(optionsItems[i].setting.command, value);
@ -1874,6 +1990,15 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
id = Overlays.addOverlay(UI_ELEMENTS.image.overlay, childProperties);
optionsOverlaysLabels[i] = id;
}
if (optionsItems[i].sublabel) {
childProperties = Object.clone(UI_ELEMENTS.image.properties);
childProperties = Object.merge(childProperties, UI_ELEMENTS[optionsItems[i].type].newLabel);
childProperties = Object.merge(childProperties, optionsItems[i].sublabel);
childProperties.url = Script.resolvePath(childProperties.url);
childProperties.parentID = optionsOverlays[optionsOverlays.length - 1];
id = Overlays.addOverlay(UI_ELEMENTS.image.overlay, childProperties);
optionsOverlaysSublabels[i] = id;
}
if (optionsItems[i].type === "barSlider") {
optionsSliderData[i] = {};
@ -2068,13 +2193,16 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
}
function setPresetsLabelToCustom() {
var CUSTOM = "CUSTOM";
if (optionsSettings.presets.value !== CUSTOM) {
optionsSettings.presets.value = CUSTOM;
Overlays.editOverlay(optionsOverlaysLabels[optionsOverlaysIDs.indexOf("presets")], {
text: CUSTOM
var label;
if (optionsSettings.physicsPresets.value !== "custom") {
optionsSettings.physicsPresets.value = "custom";
label = optionsItems[optionsOverlaysIDs.indexOf("physicsPresets")].customLabel;
Overlays.editOverlay(optionsOverlaysLabels[optionsOverlaysIDs.indexOf("physicsPresets")], {
url: Script.resolvePath(label.url),
scale: label.scale,
localPosition: label.localPosition
});
Settings.setValue(optionsSettings.presets.key, CUSTOM);
Settings.setValue(optionsSettings.physicsPresets.key, "custom");
}
}
@ -2309,11 +2437,19 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
case "togglePhysicsPresets":
if (isPicklistOpen) {
// Close picklist.
index = optionsOverlaysIDs.indexOf(parameter);
index = optionsOverlaysIDs.indexOf("physicsPresets");
// Lower picklist.
Overlays.editOverlay(optionsOverlays[index], {
localPosition: optionsItems[index].properties.localPosition
localPosition: isHighlightingPicklist
? Vec3.sum(optionsItems[index].properties.localPosition, OPTION_HOVER_DELTA)
: optionsItems[index].properties.localPosition,
color: isHighlightingPicklist
? UIT.colors.highlightColor
: UI_ELEMENTS.picklist.properties.color
});
Overlays.editOverlay(optionsOverlaysSublabels[index], {
url: Script.resolvePath("../assets/tools/common/down-arrow.svg")
});
// Hide options.
@ -2334,12 +2470,15 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
if (isPicklistOpen) {
// Open picklist.
index = optionsOverlaysIDs.indexOf(parameter);
index = optionsOverlaysIDs.indexOf("physicsPresets");
parentID = optionsOverlays[index];
// Raise picklist.
Overlays.editOverlay(parentID, {
localPosition: Vec3.sum(optionsItems[index].properties.localPosition, ITEM_RAISE_DELTA)
localPosition: Vec3.sum(optionsItems[index].properties.localPosition, PICKLIST_HOVER_DELTA)
});
Overlays.editOverlay(optionsOverlaysSublabels[index], {
url: Script.resolvePath("../assets/tools/common/up-arrow.svg")
});
// Show options.
@ -2360,15 +2499,17 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
case "pickPhysicsPreset":
// Close picklist.
doCommand("togglePhysicsPresets", "presets");
doCommand("togglePhysicsPresets");
// Update picklist label.
label = optionsItems[optionsOverlaysIDs.indexOf(parameter)].label;
optionsSettings.presets.value = label;
Overlays.editOverlay(optionsOverlaysLabels[optionsOverlaysIDs.indexOf("presets")], {
text: label
label = optionsItems[optionsOverlaysIDs.indexOf(parameter)].newLabel;
Overlays.editOverlay(optionsOverlaysLabels[optionsOverlaysIDs.indexOf("physicsPresets")], {
url: Script.resolvePath(label.url),
scale: label.scale,
localPosition: label.localPosition
});
Settings.setValue(optionsSettings.presets.key, label);
optionsSettings.physicsPresets.value = parameter;
Settings.setValue(optionsSettings.physicsPresets.key, parameter);
// Update sliders.
values = PHYSICS_SLIDER_PRESETS[parameter];
@ -2578,6 +2719,23 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
localPosition: highlightedSourceItems[highlightedItem].properties.localPosition
});
} else if (isHighlightingPicklist) {
// Unhighlight picklist and possibly lower.
if (intersectionItems[intersectedItem].type !== "picklistItem" && !isPicklistOpen) {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
localPosition: highlightedSourceItems[highlightedItem].properties.localPosition,
color: UI_ELEMENTS.picklist.properties.color
});
} else {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
color: UIT.colors.darkGray
});
}
} else if (isHighlightingPicklistItem) {
// Unhighlight picklist item.
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
color: UI_ELEMENTS.picklistItem.properties.color
});
}
// Update status variables.
highlightedItem = intersectedItem;
@ -2589,7 +2747,8 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
isHighlightingMenuButton = intersectionItems[highlightedItem].type === "menuButton";
isHighlightingSlider = SLIDER_UI_ELEMENTS.indexOf(intersectionItems[highlightedItem].type) !== NONE;
isHighlightingColorCircle = COLOR_CIRCLE_UI_ELEMENTS.indexOf(intersectionItems[highlightedItem].type) !== NONE;
isHighlightingPicklist = PICKLIST_UI_ELEMENTS.indexOf(intersectionItems[highlightedItem].type) !== NONE;
isHighlightingPicklist = intersectionItems[highlightedItem].type === "picklist";
isHighlightingPicklistItem = intersectionItems[highlightedItem].type === "picklistItem";
if (isHighlightingMenuButton) {
// Raise new menu button.
Overlays.editOverlay(menuHoverOverlays[highlightedItem], {
@ -2635,6 +2794,24 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
Overlays.editOverlay(intersectionOverlays[highlightedItem], {
localPosition: Vec3.sum(localPosition, OPTION_HOVER_DELTA)
});
} else if (isHighlightingPicklist) {
// Highlight picklist and possibly raise.
if (!isPicklistOpen) {
localPosition = intersectionItems[highlightedItem].properties.localPosition;
Overlays.editOverlay(intersectionOverlays[highlightedItem], {
localPosition: Vec3.sum(localPosition, OPTION_HOVER_DELTA),
color: UIT.colors.greenHighlight
});
} else {
Overlays.editOverlay(intersectionOverlays[highlightedItem], {
color: UIT.colors.greenHighlight
});
}
} else if (isHighlightingPicklistItem) {
// Highlight picklist item.
Overlays.editOverlay(intersectionOverlays[highlightedItem], {
color: UIT.colors.greenHighlight
});
} else if (!isHighlightingMenuButton && !isHighlightingColorCircle && !isHighlightingSlider) {
parentProperties = Overlays.getProperties(intersectionOverlays[intersectedItem],
["dimensions", "localPosition"]);
@ -2698,6 +2875,23 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
localPosition: highlightedSourceItems[highlightedItem].properties.localPosition
});
} else if (isHighlightingPicklist) {
// Unhighlight picklist and possibly lower.
if (!isHighlightingPicklistItem && !isPicklistOpen) {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
localPosition: highlightedSourceItems[highlightedItem].properties.localPosition,
color: UI_ELEMENTS.picklist.properties.color
});
} else {
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
color: UIT.colors.darkGray
});
}
} else if (isHighlightingPicklistItem) {
// Unhighlight picklist item.
Overlays.editOverlay(highlightedSourceOverlays[highlightedItem], {
color: UI_ELEMENTS.picklistItem.properties.color
});
}
// Update status variables.
highlightedItem = NONE;
@ -2709,6 +2903,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
isHighlightingSlider = false;
isHighlightingColorCircle = false;
isHighlightingPicklist = false;
isHighlightingPicklistItem = false;
}
highlightedSourceOverlays = intersectionOverlays;
highlightedSourceItems = intersectionItems;
@ -2769,7 +2964,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
if (intersectionItems && ((intersectionItems[intersectedItem].type === "picklistItem"
&& controlHand.triggerClicked() !== isPicklistItemPressed)
|| (intersectionItems[intersectedItem].type !== "picklistItem" && isPicklistItemPressed))) {
isPicklistItemPressed = isHighlightingPicklist && controlHand.triggerClicked();
isPicklistItemPressed = isHighlightingPicklistItem && controlHand.triggerClicked();
if (isPicklistItemPressed) {
doCommand(intersectionItems[intersectedItem].command.method, intersectionItems[intersectedItem].id);
}
@ -2777,7 +2972,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
if (intersectionItems && isPicklistOpen && controlHand.triggerClicked()
&& intersectionItems[intersectedItem].type !== "picklist"
&& intersectionItems[intersectedItem].type !== "picklistItem") {
doCommand("togglePhysicsPresets", "presets"); // TODO: This is a bit hacky.
doCommand("togglePhysicsPresets");
}
// Grip click.
@ -2977,6 +3172,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
isHighlightingSlider = false;
isHighlightingColorCircle = false;
isHighlightingPicklist = false;
isHighlightingPicklistItem = false;
for (id in optionsToggles) {
if (optionsToggles.hasOwnProperty(id)) {
optionsToggles[id] = false;