print graser

docks66-json-schema
Yanick Champoux 2023-05-02 16:27:35 -04:00
parent 8af9ae620e
commit 1c01696a8b
4 changed files with 52 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<div>
<Arcs selected={arcs} size="40">
<Arcs selected={arcs} size={40}>
<text x="50%" y="50%">
{weaponClass}
</text>

View File

@ -0,0 +1,9 @@
<Hst.Story title="Export/PrintShip/Weapons/Graser">
<Graser arcs={["F", "FS"]} weaponClass={2} />
</Hst.Story>
<script>
import Graser from "./index.svelte";
export let Hst;
</script>

View File

@ -0,0 +1,35 @@
<div>
<Arcs selected={arcs} size={40}>
<polygon
points="0,30 30,30 15,4"
style="fill:black"
transform="translate(7,2) scale(0.85)"
/>
<text x="50%" y="50%" style="color: white">
{weaponClass}
</text>
</Arcs>
</div>
<script>
import Arcs from "$lib/components/ShipEdit/Weaponry/Weapon/Arcs.svelte";
export let weaponClass = 1;
export let arcs = [];
</script>
<style>
div {
margin: 0px 0.5rem;
}
div :global(path:hover) {
fill: white;
}
div :global(path.active:hover) {
fill: black;
}
text {
text-anchor: middle;
dominant-baseline: central;
font-size: var(--font-scale-10);
}
</style>

View File

@ -3,11 +3,13 @@ import Submunition from "./Submunition.svelte";
import PDS from "./PDS.svelte";
import Scattergun from "./Scattergun.svelte";
import Needlebeam from "./Needlebeam.svelte";
import Graser from "./Graser/index.svelte";
export default {
beam: Beam,
submunition: Submunition,
pds: PDS,
scattergun: Scattergun,
needle: Needlebeam,
graser: Graser,
beam: Beam,
submunition: Submunition,
pds: PDS,
scattergun: Scattergun,
needle: Needlebeam,
};