Просмотр исходного кода

Add various strands

tags/v0.1.0
Fen Dweller 6 лет назад
Родитель
Сommit
0cc412e922
3 измененных файлов: 117 добавлений и 1 удалений
  1. +1
    -0
      media/attribution.js
  2. +13
    -0
      media/objects/strand.svg
  3. +103
    -1
      presets/objects.js

+ 1
- 0
media/attribution.js Просмотреть файл

@@ -6181,6 +6181,7 @@ const attributionData = {
{ name: "credit-card.svg", source: null },
{ name: "credit-card-vertical.svg", source: null },
{ name: "flagpole.svg", source: null },
{ name: "strand.svg", source: null },
],
authors: [
"chemicalcrux"


+ 13
- 0
media/objects/strand.svg Просмотреть файл

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 45 253.44" style="enable-background:new 0 0 45 253.44;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#000000;stroke-miterlimit:10;}
.st1{fill:none;stroke:#000000;stroke-width:5;stroke-miterlimit:10;}
</style>
<path class="st0" d="M-47.15,251.72"/>
<path class="st0" d="M-47.15,14.91"/>
<path class="st1" d="M22.54,1.72c44.92,47.42,0,125,0,125s-45.08,77.41,0,125"/>
<path class="st0" d="M-47.15,14.61"/>
</svg>

+ 103
- 1
presets/objects.js Просмотреть файл

@@ -471,7 +471,109 @@ function makeObjects() {
],
"Chess Pieces",
"chess_"
))
));

results.push({
name: "Strand",
constructor: () => {
views = {};

viewInfo = {
opticalFibre: {
name: "Optical Fibre",
thickness: math.unit(0.375, "mm")
},
hair: {
name: "Hair",
thickness: math.unit(0.07, "mm")
},
spiderSilk: {
name: "Spider Silk",
thickness: math.unit(0.003, "mm")
},
suspensionCables: {
name: "Suspension Bridge Cables",
thickness: math.unit(3, "feet")
},
capillary: {
name: "Capillary",
thickness: math.unit(7.5, "micrometers")
},
vein: {
name: "Vein",
thickness: math.unit(10, "mm")
},
thread: {
name: "Thread",
thickness: math.unit(0.4, "mm")
},
powerCord: {
name: "Power Cord",
thickness: math.unit(0.25, "inches")
},
pianoWireBass: {
name: "Piano Wire (Bass)",
thickness: math.unit(8.5, "mm")
},
pianoWireTreble: {
name: "Piano Wire (Treble)",
thickness: math.unit(0.85, "mm")
},
guitarString: {
name: "Guitar String",
thickness: math.unit(0.03, "inches")
},
powerLineThin: {
name: "Power Line (Thin)",
thickness: math.unit(0.325, "inches")
},
powerLineThick: {
name: "Power Line (Thick)",
thickness: math.unit(0.720, "inches")
},
carbonNanotube: {
name: "Carbon Nanotube",
thickness: math.unit(4, "nm")
}

}

Object.entries(viewInfo).forEach(([key, value]) => {
views[key] = {
attributes: {
height: {
name: "Height",
power: 1,
type: "length",
base: math.multiply(value.thickness, 253.4385 / 5)
},
thickness: {
name: "Thickness",
power: 1,
type: "length",
base: value.thickness
},
},
image: {
source: "./media/objects/strand.svg"
},
name: value.name,
rename: true
}
if (value.mass) {
views[key].attributes.mass = {
name: "Mass",
power: 3,
type: "mass",
base: value.mass
};
}
});
return makeEntity({ name: "Strand" }, views);
}
})

results.sort((b1, b2) => {


Загрузка…
Отмена
Сохранить