Compare commits
4 commits
578afce3c4
...
0d97b3a56f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d97b3a56f | ||
|
|
ae12d30b2a | ||
|
|
676d4e13f5 | ||
|
|
4c14a0e66d |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 74 KiB |
|
|
@ -174,6 +174,64 @@ namespace lib_svg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function isogon
|
||||||
|
(
|
||||||
|
sides : int,
|
||||||
|
radius : float,
|
||||||
|
{
|
||||||
|
"tilt": tilt = 0,
|
||||||
|
"position": position = lib_vector.cartesian(0, 0),
|
||||||
|
"transformations": transformations = [],
|
||||||
|
"classes": classes = [],
|
||||||
|
}
|
||||||
|
:
|
||||||
|
{
|
||||||
|
tilt ?: float;
|
||||||
|
position ?: lib_vector.type_vector;
|
||||||
|
transformations ?: Array<string>;
|
||||||
|
classes ?: Array<string>;
|
||||||
|
}
|
||||||
|
=
|
||||||
|
{
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: lib_xml.type_node
|
||||||
|
{
|
||||||
|
const factor : float = (1 / sides);
|
||||||
|
return (
|
||||||
|
path
|
||||||
|
(
|
||||||
|
(
|
||||||
|
lib_list.sequence(sides)
|
||||||
|
.map
|
||||||
|
(
|
||||||
|
i => (
|
||||||
|
lib_vector.add
|
||||||
|
(
|
||||||
|
lib_vector.polar
|
||||||
|
(
|
||||||
|
(((i * factor) + tilt) * (2 * Math.PI)),
|
||||||
|
radius
|
||||||
|
)
|
||||||
|
,
|
||||||
|
position
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"class": classes.join(" "),
|
||||||
|
"transform": transformations.join(" "),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -82,15 +82,15 @@ namespace mod_vtm
|
||||||
let children_token : Array<lib_xml.type_node> = [];
|
let children_token : Array<lib_xml.type_node> = [];
|
||||||
// Stein
|
// Stein
|
||||||
{
|
{
|
||||||
let node_stone : lib_xml.type_node = (
|
const node_stone : lib_xml.type_node = (
|
||||||
lib_xml.create_normal
|
lib_svg.isogon
|
||||||
(
|
(
|
||||||
"circle",
|
6,
|
||||||
|
0.1,
|
||||||
{
|
{
|
||||||
"cx": (0.0).toFixed(lib_svg.float_precision),
|
"position": lib_vector.cartesian(0, 0),
|
||||||
"cy": (0.0).toFixed(lib_svg.float_precision),
|
"tilt": (1/4 + 1/12),
|
||||||
"r": (0.125).toFixed(lib_svg.float_precision),
|
"classes": ["stone"],
|
||||||
"class": "stone",
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -104,30 +104,37 @@ namespace mod_vtm
|
||||||
(
|
(
|
||||||
(symbol, index) =>
|
(symbol, index) =>
|
||||||
{
|
{
|
||||||
let r : float = 0.06125;
|
const r : float = 0.0800;
|
||||||
let x : float = (+0.1+(2*r*1.25)*index);
|
const x : float = (+0.1+(2*r*1.25)*index);
|
||||||
let y : float = (-0.1);
|
const y : float = (-0.1);
|
||||||
let node_entry : lib_xml.type_node = (
|
const node_entry : lib_xml.type_node = (
|
||||||
lib_xml.create_normal
|
lib_svg.group
|
||||||
(
|
(
|
||||||
"circle",
|
|
||||||
{
|
{
|
||||||
"cx": x.toFixed(lib_svg.float_precision),
|
"transform": (
|
||||||
"cy": y.toFixed(lib_svg.float_precision),
|
|
||||||
"r": r.toFixed(lib_svg.float_precision),
|
|
||||||
/*
|
|
||||||
"x": (x-r).toFixed(lib_svg.float_precision),
|
|
||||||
"y": (y-r).toFixed(lib_svg.float_precision),
|
|
||||||
"width": (2*r).toFixed(lib_svg.float_precision),
|
|
||||||
"height": (2*r).toFixed(lib_svg.float_precision),
|
|
||||||
*/
|
|
||||||
"class": (
|
|
||||||
[
|
[
|
||||||
"entry",
|
lib_svg.translation(x, y),
|
||||||
"symbol_" + symbol.toFixed(0),
|
lib_svg.rotation(index * (1/12)),
|
||||||
].join(" ")
|
].join(" ")
|
||||||
),
|
)
|
||||||
}
|
},
|
||||||
|
[
|
||||||
|
lib_svg.isogon
|
||||||
|
(
|
||||||
|
3,
|
||||||
|
r,
|
||||||
|
{
|
||||||
|
"position": lib_vector.cartesian(0, 0),
|
||||||
|
"tilt": (1/4),
|
||||||
|
"classes":
|
||||||
|
[
|
||||||
|
"entry",
|
||||||
|
"symbol_" + symbol.toFixed(0),
|
||||||
|
]
|
||||||
|
,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
children_tape.push(node_entry);
|
children_tape.push(node_entry);
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,18 @@ $hue_symbol_3: (((($sigma*3)+$offset)%1)*360);
|
||||||
$saturation_symbol: 75%;
|
$saturation_symbol: 75%;
|
||||||
$lightness_symbol: 50%;
|
$lightness_symbol: 50%;
|
||||||
|
|
||||||
|
@keyframes spin
|
||||||
|
{
|
||||||
|
from
|
||||||
|
{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to
|
||||||
|
{
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.frame
|
.frame
|
||||||
{
|
{
|
||||||
stroke: none;
|
stroke: none;
|
||||||
|
|
@ -44,8 +56,12 @@ $lightness_symbol: 50%;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.token
|
.stone
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
stroke-width: 0.05;
|
||||||
|
stroke: hsl( 0, 0%, 0%);
|
||||||
|
*/
|
||||||
stroke: none;
|
stroke: none;
|
||||||
fill: hsl( 0, 0%, 0%);
|
fill: hsl( 0, 0%, 0%);
|
||||||
}
|
}
|
||||||
|
|
@ -109,10 +125,15 @@ $lightness_symbol: 50%;
|
||||||
|
|
||||||
.entry
|
.entry
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
stroke: black;
|
stroke: black;
|
||||||
stroke-width: 0.01;
|
stroke-width: 0.01;
|
||||||
*/
|
/*
|
||||||
stroke: none;
|
stroke: none;
|
||||||
|
*/
|
||||||
|
|
||||||
|
animation-name: spin;
|
||||||
|
animation-duration: 4s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
66
tools/deploy
66
tools/deploy
|
|
@ -1,10 +1,60 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
rsync \
|
import sys as _sys
|
||||||
--verbose \
|
import os as _os
|
||||||
--recursive \
|
import argparse as _argparse
|
||||||
--delete \
|
|
||||||
--rsh=ssh \
|
|
||||||
build/* \
|
|
||||||
mehl:~/websites/folksprak.org/htdocs/vtm/
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
## args
|
||||||
|
argument_parser = _argparse.ArgumentParser()
|
||||||
|
argument_parser.add_argument(
|
||||||
|
type = str,
|
||||||
|
dest = "target_system",
|
||||||
|
metavar = "<target-system>",
|
||||||
|
help = "either 'localhost' or SSH handle of the target system",
|
||||||
|
)
|
||||||
|
argument_parser.add_argument(
|
||||||
|
"-t",
|
||||||
|
"--target-directory",
|
||||||
|
type = str,
|
||||||
|
dest = "target_directory",
|
||||||
|
default = "/opt/zeitbild",
|
||||||
|
metavar = "<target-directory>",
|
||||||
|
help = "directory on the target system, where the files shall be put; default: /opt/zeitbild",
|
||||||
|
)
|
||||||
|
argument_parser.add_argument(
|
||||||
|
"-b",
|
||||||
|
"--build-directory",
|
||||||
|
type = str,
|
||||||
|
dest = "build_directory",
|
||||||
|
default = "/tmp/zeitbild",
|
||||||
|
metavar = "<build-directory>",
|
||||||
|
help = "directory to where the build was put",
|
||||||
|
)
|
||||||
|
args = argument_parser.parse_args()
|
||||||
|
|
||||||
|
## exec
|
||||||
|
if (not _os.path.exists(args.build_directory)):
|
||||||
|
_sys.stderr.write("-- build directory not found; probably you need to run /tools/build\n")
|
||||||
|
_sys.exit(1)
|
||||||
|
else:
|
||||||
|
_os.system(
|
||||||
|
" ".join([
|
||||||
|
"rsync",
|
||||||
|
"--recursive",
|
||||||
|
"--links",
|
||||||
|
"--update",
|
||||||
|
"--delete",
|
||||||
|
"--verbose",
|
||||||
|
("%s/" % args.build_directory),
|
||||||
|
(
|
||||||
|
("%s" % args.target_directory)
|
||||||
|
if (args.target_system == "localhost") else
|
||||||
|
("%s:%s" % (args.target_system, args.target_directory, ))
|
||||||
|
),
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ cmd_rm := rm -rf
|
||||||
cmd_echo := echo # -e
|
cmd_echo := echo # -e
|
||||||
cmd_cp := cp -r -u -v
|
cmd_cp := cp -r -u -v
|
||||||
cmd_cat := cat
|
cmd_cat := cat
|
||||||
|
cmd_ln := ln --symbolic
|
||||||
cmd_tsc := tsc --target ES5 --allowUnreachableCode
|
cmd_tsc := tsc --target ES5 --allowUnreachableCode
|
||||||
cmd_sass := sassc
|
cmd_sass := sassc
|
||||||
|
|
||||||
|
|
@ -14,7 +15,8 @@ all: \
|
||||||
${dir_build}/vtm.css \
|
${dir_build}/vtm.css \
|
||||||
${dir_build}/vtm.dat.js \
|
${dir_build}/vtm.dat.js \
|
||||||
${dir_build}/vtm.js \
|
${dir_build}/vtm.js \
|
||||||
music
|
music \
|
||||||
|
${dir_build}/index.html
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
clear:
|
clear:
|
||||||
|
|
@ -101,3 +103,7 @@ music:
|
||||||
@ ${cmd_md} ${dir_build}/music
|
@ ${cmd_md} ${dir_build}/music
|
||||||
@ ${cmd_cp} ${dir_source}/music/* ${dir_build}/music/
|
@ ${cmd_cp} ${dir_source}/music/* ${dir_build}/music/
|
||||||
.PHONY: music
|
.PHONY: music
|
||||||
|
|
||||||
|
${dir_build}/index.html:
|
||||||
|
@ ${cmd_ln} vtm.html ${dir_build}/index.html
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue