Skip to content

Instantly share code, notes, and snippets.

@sifbuilder
Last active October 8, 2016 23:12
Show Gist options
  • Save sifbuilder/217e7d0790b712d5f247a03f9dd60d1e to your computer and use it in GitHub Desktop.
Save sifbuilder/217e7d0790b712d5f247a03f9dd60d1e to your computer and use it in GitHub Desktop.
d3animas declarative grammer for animation of natural forms

d3animas

declarative generation of animations of natural forms - genezing on superforms

Grammer

shape m1 m2 n1 n2 n3 a b

rad		radio
rot		rotation, degrees
segs	segments in path

hc 		trace segments
hf 		trace fill
hs 		trace stroke
hw 		trace width
ho 		trace opacity

v0		radio faktor
v1		angle faktor

pta		dot a of form points, 0
ptb		dot b of form points, -1

style cf color fill cs color stroke cw color width

time duration - clock time duration timeunits - abstract time duration wait limit - abstract start - end - step

t: td duration 4000 elan in miliseconds t0 start 0 time to start in basic units t1 end 1000 basic units t2 step 1 tick per step in basic units t3 periods 5 periods in elan (5: 200 basic units per period)

trajectories tx ty

c || [c1, c2, cn], {}	:	single 
[[], {}]							: consecutive
[[[], []]], [[[], {}]]	: parallel

form __mapper('xsf')(formparams).render() scales __mapper('scales').render(formparams) console __mapper('consol').render(formparams) e dots __mapper('dots').render() ts

xsf render scales and console click on form reenders scales and console

xsf clear clears fuel, dots

Author

introduced by sifbuilder

based upon

encouraging to read

building on

having found useful

License

MIT

d3animas

declarative generation of animations of natural forms - genesizing on superforms

Author

introduced by sifbuilder

based upon

encouraging to read

building on

having found useful

Setup

$ npm install

Running

$ npm start

Build

$ npm run build

License

MIT

/* -------------------------- */
/* aniconsPlugin */
/* -------------------------- */
var aniconsPlugin = function aniconsPlugin() {
d3.select("#controls")
.append("div")
.attr("class", "animas")
.style("width", "600px")
.selectAll(".anima")
.data(d3.entries(__mapper().config.animation.types))
.enter().append("button")
.attr("class", "anima")
.text(function(d) { return d.key; })
.style("font", "5px century-gothic")
.style("width", "28px")
.style("padding", "0px")
.style("margin", "0px")
.on("click", function(d) {
let anima = d.value
__mapper().xsf.clear()
// __mapper().dots.clear()
if (__mapper("tim").timer) __mapper("tim").timer.stop()
__mapper().animation.render(anima)
console.log("_______________")
__mapper({'fuel': fuelPlugin()}).fuel.clear() // clear fuel
if (__mapper('traces')) for (let i in __mapper('traces').traces) __mapper('traces').traces[i].clear()
});
var aniconsPlugin = function Plugin() {}
aniconsPlugin.render = function(params) {}
return aniconsPlugin
}
/* -------------------------- */
/* animationPlugin */
/* -------------------------- */
var animationPlugin = function animationPlugin() {
var isPureArray = d => d.reduce((prev, curr) => prev && typeof curr !== 'object' , true)
var isDoubleArray = d => (Array.isArray(d) && Array.isArray(d[0]) && d.length === 1 )
var isPureObject = d => (!Array.isArray(d) && typeof d === 'object')
var prescalateval = function(k, v) {
let w = v
if (typeof(v) === "number" && v > 1000) {
let sk = __mapper("scales").scales()[k]
let skd = sk.domain()
let randomlimit = 100
let rn = skd[1] + (0.5 - Math.random()) * randomlimit
w = rn
}
return w
}
var prescalate = function(k, v) {
// v, f, o, da, a
var scls = []
let d, r
let w = v
if (typeof(v) === "number") { // v :: c
w = prescalateval(k, v)
}
if (typeof(v) === "string") { // v :: "c"
w = v
}
if (isPureObject(v)) { // v :: {}
w = v
}
if (Array.isArray(v)) {
if (isPureArray(v)) {
if (v.length === 1) { // v :: [a]
w = [prescalateval(k, v)]
}
if (v.length > 1) { // v :: [a, b, c]
w = d3.range(v.length).map(function(item, idx){
return prescalateval(k, v[item])
})
}
}
if (isDoubleArray(v)) { // [[ ]]
w = v
}
if (!isPureArray(v) && !isDoubleArray(v)) {
w = v
}
}
return w
}
var scalate = function(v) {
// v, f, o, da, a
var scls = []
let d, r
if (typeof(v) === "number") { // v :: c
d = [0, 1]
r = [v, v]
scls.push(d3.scaleLinear()
.domain(d)
.range(r))
}
if (typeof(v) === "string") { // v :: "c"
d = [0, 1]
r = [v, v]
scls.push(d3.scaleLinear()
.domain(d)
.range(r))
}
if (isPureObject(v)) { // v :: {}
let tspoints = []
let pts = []
tspoints = xsfPlugin()(v).tspoints()
for (let j=0; j < tspoints.length; j++) {
pts[j] = 0
pts[j] = tspoints[j][0]
}
let d = d3.range(pts.length).map(function(item, idx){
return idx / (pts.length - 1)
})
r = pts // ty
scls.push(d3.scaleLinear()
.domain(d)
.range(r))
}
if (Array.isArray(v)) {
if (isPureArray(v)) {
if (v.length === 1) { // v :: [a]
d = [0, 1]
r = [v[0], v[0]]
scls.push = d3.scaleLinear()
.domain(d)
.range(r)
}
if (v.length > 1) { // v :: [a, b, c]
// d = d3.range(v.length).map(function(item, idx){
d = v.map(function(item, idx){
return idx / (v.length - 1)
})
r = v
scls.push(d3.scaleLinear()
.domain(d)
.range(r))
}
}
if (isDoubleArray(v)) { // [[ ]]
let seqScales = scalate(v[0]) // scales of internal array
let ns = d3.scaleLinear() // neutral scale
.domain([0])
.range([0])
for (let j=0; j<seqScales.length; j++) {
ns = d3.scaleLinear() // sequential scales
.domain(ns.domain().concat(seqScales[j].domain()))
.range(ns.range().concat(seqScales[j].range()))
}
scls.push(ns)
}
if (!isPureArray(v) && !isDoubleArray(v)) {
var seqscales = v.reduce((prev,curr) => prev.concat(scalate(curr)), [])
scls = scls.concat(seqscales)
}
}
return scls
}
// ==============================================
var prescalp = function prescalp (formdef) {
let p = []
for (let k in formdef) {
let v = formdef[k] // k:v
p[k] = prescalate(k,v)
}
return p
}
var scalp = function scalp (formdef, dt) {
let p = []
for (let k in formdef) {
let v = formdef[k] // k:v
let scls = scalate(v)
let c = 0
for (let m = 0; m < scls.length; m++) {
c = c + scls[m](dt) // image of time param
}
p[k] = c
}
return p
}
function animationPlugin(params = {}) {
return animationPlugin
}
animationPlugin.render = function(anima = {}) {
console.log("animas enter ", anima)
for (let i in __mapper('traces').traces) __mapper('traces').traces[i].clear()
var starttime // start time
var amimas = [] // make array
if (!Array.isArray(anima)) animas = [anima]
else animas = anima
var durations = []
var waits = []
var limits = []
var periods = []
var steps = []
var ts = []
var traces = []
let timeunits = __mapper('config').animation.timeunits // abstract life span
var slots = [] // time step generate slots
for (let i= 0; i < animas.length; i++) {
durations[i] = __mapper('config').animation.duration
if ((typeof(animas[i].tt) !== "undefined") && (animas[i].tt.td !== undefined)) {
durations[i] = animas[i].tt.td
}
}
for (let i= 0; i < animas.length; i++) {
waits[i] = durations[i] * __mapper('config').animation.wait /timeunits
limits[i] = durations[i] * __mapper('config').animation.limit /timeunits
steps[i] = durations[i] * __mapper('config').animation.step /timeunits
periods[i] = __mapper('config').animation.periods
window[i] = false
}
for (let i= 0; i < animas.length; i++) {
let timeinverse = false
// time
if (typeof(animas[i].tt) !== 'undefined') {
if ((Math.sign(animas[i].tt.t0) === -1) ||
(Math.sign(animas[i].tt.t1) === -1)) timeinverse = true
waits[i] = durations[i] * (Math.abs(animas[i].tt.t0) || 0) / timeunits
limits[i] = durations[i] * (Math.abs(animas[i].tt.t1) || timeunits) / timeunits
// steps[i] = durations[i] * (Math.abs(animas[i].tt.t2) || 1) / timeunits
// get length of a step
steps[i] = Math.abs(animas[i].tt.t2) || 1
periods[i] = Math.abs(animas[i].tt.t3) || 1
window[i] = (animas[i].tt.tw) ? true : false
}
let d = (window[i] === false) ?
[waits[i], limits[i]] : // time contration
[0, durations[i]] // time window
let r = (timeinverse === false) ? [0, 1] : [1, 0]
ts[i] = d3.scaleLinear() // scale of life
.domain(d)
.range(r)
for (let k in animas[i]) { // your genetic marks
let v = animas[i][k] // what they are worth
// trace
if (k === "hc" && v > 0) {
if (__mapper('traces').traces[i] === undefined) __mapper('traces').traces[i] = tracesPlugin("animatrace_" + i)
__mapper('traces').traces[i].hc(v)
}
if (k === "hs" && v > 0) {
if (__mapper('traces').traces[i] === undefined) __mapper('traces').traces[i] = tracesPlugin("animatrace_" + i)
var color = __mapper("config").colors.scale
let stroke = color(v / 1000) // [0,1]
__mapper('traces').traces[i].hs(stroke)
}
}
}
let maxlimit = Math.max(...limits) // all the animas together living time
// living
var animation = function(elapsed) { // called by timer
if (starttime == undefined) starttime = elapsed
for (let i= 0; i < animas.length; i++) { // i anima
let t_elapsed = elapsed - starttime // ticks in animation
let elan = durations[i] // limits[i] - waits[i]
// let elapsedInPeriod = t_elapsed % periods[i] // elapsed ticks in period
let elapsedInPeriod = (t_elapsed % ( elan / periods[i])) * periods[i]
let dt = ts[i](elapsedInPeriod) // time in period
let thisstep = Math.round(t_elapsed / steps[i]) // this step
if (slots[i] == undefined) slots[i] = []
if ((waits[i] <= t_elapsed) && (t_elapsed <= limits[i])) {
if (slots[i][thisstep] !== 1) {
let f = scalp(animas[i], dt) // *****************
let params = Object.assign({}, f, {"layer": "xsf", "id": f.id || 'xsf' + i}) // keep them alone
__mapper().xsf(params).render()
if (params.hc >= 1 && __mapper('traces') && __mapper('traces').traces[i]) {
__mapper('traces').traces[i].addstep([f.tx, f.ty])
__mapper('traces').traces[i].render()
}
slots[i][thisstep] = 1
}
}
if (elapsed > maxlimit) { // stop when all animas have spired
if (__mapper("tim")) __mapper("tim").timer.stop()
}
}
}
animas = animas.map(d => prescalp(d))
// console.log("animas post", JSON.stringify(animas[0], null, 2))
console.log("animas post",animas)
if (__mapper('consol')) __mapper('consol').render(animas)
__mapper({"tim": Object.assign(__mapper().tim, {
'fn': animation,
'wait': 0,
'timer': d3.timer(animation, 0),
'started': true,
'ticking': true,
})
})
}
return animationPlugin
}
;
[
{"id":"mountains","t0":0,"t1":100,"m":41.97,"n1":1.6,"n2":1.17,"n3":0.68,"a":1,"b":0.95,"tx":340,"ty":785,"rot":[0,0.5],"rad":658.11,"segs":82.27,"c":54,"pta":0,"ptb":0},
{"id":"sun1","m":17.47,"n1":10.07,"n2":50,"n3":50,"a":1,"b":1,"tx":[130,130],"ty":[100,90],"rot":[0.75,1.5],"rad":[80,80],"segs":365,"c":[25,25]},
{"id":"sun2","m":1.6,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[510,570],"ty":[110,95],"rot":[1.15,2.5],"rad":[100,105],"segs":365,"c":[48,49]},
{"id":"see","m":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[350,350],"ty":[890,890],"rot":[1.15,2.5],"rad":[630,630],"segs":365,"c":[95,90]},
{"id":"ship1","t0":0, "t1":100, "m":[4,7],"n1":[0.5,0.5],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":1,"b":0.1,"tx":[230,380],"ty":[120,310],"rot":[1.5,1.5],"rad":[40,120],"segs":256,"c":[35,40]},
{"id":"ship2","t0":0, "t1":100, "m":7,"n1":[0.5,0.5],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":1,"b":0.1
,"tx":{"m":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":350,"ty":840,"rot":0,"rad":630,"segs":365}
,"ty":[120,310]
,"rot":[1.57,1.57],"rad":[40,170],"segs":256,"c":[35,40], "hc":1},
{"id":"star1","t0":0,"t1":100,"m":8,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":0.1
,"tx":{"m":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":350,"ty":570,"rot":0,"rad":630,"segs":365, "pta": 200, "ptb": 300 }
,"ty":{"m":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":350,"ty":570,"rot":0,"rad":630,"segs":365, "pta": 200, "ptb": 300}
,"rot":1.5,"rad":[25,30],"segs":[256,100],"c":59.99, "hc":1},
{"id":"star2","t0":0,"t1":100,"m":8,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":0.1,"tx":[350, 390],"ty":110,"rot":1.5,"rad":20.01,"segs":[100,256],"c":59.99},
{"id":"star3", "m":7.62,"n1":3.19,"n2":1.28,"n3":6.98,"a":0.01,"b":6.35
,"tx": {"m":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,"tx":350,"ty":640,"rot":0,"rad":630,"segs":365 ,"pta": 200, "ptb": 300}
,"ty": {"m":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,"tx":350,"ty":640,"rot":0,"rad":630,"segs":365 , "pta": 200, "ptb": 300}
,"rot":[0,5.5],"segs":300,"rad":100,"c":[85,90]}
]
/* -------------------------- */
/* buttonsPlugin */
/* -------------------------- */
var buttonsPlugin = function buttonsPlugin() {
d3.select("#controls")
.append("div")
.attr("class", "buttons")
.selectAll(".button")
.data(d3.entries(__mapper().config.form.types))
.enter().append("button")
.attr("class", "button")
.text(function(d) { return d.key; })
.style("font", "5px century-gothic")
.style("width", "28px")
.style("padding", "0px")
.style("margin", "0px")
.on("click", function(d) {
let formparams = {}
for (var param in d.value) { // m in { ... }
let k = param, v = d.value[param] // k:m, v:12
formparams[k] = v;
}
__mapper({'fuel': fuelPlugin()}).fuel.clear() // clear fuel
for (let i in __mapper('traces').traces) __mapper('traces').traces[i].clear() // clear traces
__mapper('xsf').clear() // clear xsf
if (__mapper("tim").timer) __mapper("tim").timer.stop() // stop timer
__mapper({'dots': dotsPlugin()}).dots.clearAll()
if (__mapper("scales")) __mapper("scales").render(formparams)
if (__mapper("consol")) __mapper("consol").render(formparams)
__mapper("xsf")(formparams).render()
// __mapper("dots")(__mapper("xsf").formparams()).render() // update dots
})
var buttonsPlugin = function buttonsPlugin() { }
buttonsPlugin.render = function(formparams) { }
return buttonsPlugin
}
/* -------------------------- */
/* config */
/* -------------------------- */
var config = {}
config.mode = "anima" // "form" "anima"
config.width = 600
config.height = 400
config.traces = {}
config.traces.traces = []
config.traces.show = true
config.fuel = {}
config.fuel.fuel = []
config.fuel.show = true
config.dots = {}
config.dots.dots = []
config.dots.show = true
config.image = {}
config.image.show = true // false true // image
config.controls = {}
config.controls.multiplier = 1000
config.frame = {}
config.buttons = {}
config.anicons = {}
config.consol = {}
config.params = {}
config.params.shape = {}
config.params.shape.m1 = {}
config.params.shape.m2= {}
config.params.shape.n1= {}
config.params.shape.n2 = {}
config.params.shape.n3 = {}
config.params.shape.a = {}
config.params.shape.b = {}
config.controls.show = true // false true controls
if (config.controls.show) {
config.frame.show = false
config.buttons.show = true
config.consol.show = true
config.anicons.show = true
} else {
config.frame.show = false
config.buttons.show = false
config.consol.show = false
config.anicons.show = false
}
config.fuel = {}
config.fuel.fill = "yellow"
config.fuel.tries = 10
config.fuel.radius = 1
config.fuel.candidates = 15
config.fuel.margin = 20 // distance between inhabitants
config.fuel.nohitfill = "yellow"
config.fuel.nohitradius = 0
config.colors = {}
config.colors.scales = {
bos: d3.scaleLinear()
.domain([0, 0.5, 1])
.range(["black", "Wheat", "steelblue"])
.interpolate(d3.interpolateCubehelix.gamma(3)),
lab: d3.interpolateLab("#FF2400", "yellow"),
hsl: d3.interpolateLab("brown", "steelblue"),
plasma: d3.interpolatePlasma,
cool: d3.interpolateCool,
warm: d3.interpolateWarm,
magma: d3.interpolateMagma,
inferno: d3.interpolateInferno,
viridis: d3.interpolateViridis,
cubehelix: d3.interpolateCubehelixDefault,
rainbow: d3.interpolateRainbow,
}
config.colors.scale = config.colors.scales.lab
config.mousedown = function() {
if (config.tim.debug && !config.tim.started) { // not started
config.tim.timer = d3.timer(config.tim.fn, config.tim.wait)
config.tim.started = true
config.tim.ticking = true
} else if (config.tim.debug && config.tim.ticking) { // ticking
config.tim.timer.stop()
config.tim.ticking = false
} else if (config.tim.debug && !config.ticking) {
config.tim.timer.restart(config.tim.fn, config.tim.wait) // not ticking
config.tim.ticking = true
}
}
config.form = {}
config.form.size = 100000
config.form.side = Math.sqrt(config.form.size)
config.form.superrad = config.form.rad * Math.sqrt(2)
config.form.init = {} // ----------- reset params
config.form.init.layer = "xsf"
config.form.init.id = "xsf"
config.form.init.t0 = 0
config.form.init.t1 = 1000
config.form.init.t2 = 1
config.form.init.t3 = 1
config.form.init.m1 = 4
config.form.init.m2 = 4
config.form.init.n1 = 2
config.form.init.n2 = 2
config.form.init.n3 = 2
config.form.init.a = 1
config.form.init.b = 1
config.form.init.pta = 0
config.form.init.ptb = -1
config.form.init.c = 0
config.form.init.tx = config.width / 2 // 300
config.form.init.ty = config.height / 2 // 200
config.form.init.rot = 90
config.form.init.segs = 360
config.form.init.rad = config.form.side / 2
config.form.init.fuel = 0
config.form.init.dots = 0
config.form.init.hc = 0
config.form.init.v0 = 0
config.form.init.v1 = 1
config.form.init.x0 = 0
config.form.init.y0 = 0
config.form.init.kx = 1
config.form.init.ky = 1
config.form.forms = {}
config.form.circleform = {"layer": "frame", "id": "circle", "m":0.64,"n1":-1.57,"n2":0,"n3":10,"a":1,"b":1,"tx":config.form.init.tx,"ty":config.form.init.ty ,"rot":0,"rad":config.form.init.rad}
config.form.rectform = {"layer": "frame", "id": "rect", "m":4,"n1":100,"n2":100,"n3":100,"a":1,"b":1,"tx":config.form.tx,"ty":config.form.ty,"rot":0,"rad":config.form.superrad}
config.form.types = {
asterisk: {"m1": 12, "m2": 12, "n1": .3, "n2": 0, "n3": 10, "a": 1, "b": 1, "v0": 0, "v1": 1, "tx":340, "ty":165, "rot": 90, "rad":160, "segs":360, "pta":0, "ptb":-1, "cf":54, "fuel":0},
bean: {"m1": 2, "m2": 2, "n1": 1, "n2": 4, "n3": 8, "a": 1, "b": 1, "rot": 0, "fuel":1, "rad":160},
butterfly: {"m1": 3, "m2": 3, "n1": 1, "n2": 6, "n3": 2, "a": .6, "b": 1, "rot": 90, "fuel":0, "rad":160},
circle: {"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rot": 0, "rad":160},
clover: {"m1": 6, "m2": 6, "n1": .3, "n2": 0, "n3": 10, "a": 1, "b": 1, "rot": 0, "rad":160},
cloverFour: {"m1": 8, "m2": 8, "n1": 10, "n2": -1, "n3": -8, "a": 1, "b": 1, "rot": 0, "rad":160},
cross: {"m1": 8, "m2": 8, "n1": 1.3, "n2": .01, "n3": 8, "a": 1, "b": 1, "rot": 0, "rad":160},
diamond: {"m1": 4, "m2": 4, "n1": 1, "n2": 1, "n3": 1, "a": 1, "b": 1, "rot": 0, "rad":160},
drop: {"m1": 1, "m2": 1, "n1": 0.5, "n2": 0.5, "n3": 0.5, "a": 1, "b": 1, "rot": 90, "rad":160},
ellipse: {"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 9, "b": 6, "rot": 0, "rad":160},
gear: {"m1": 19, "m2": 19, "n1": 100, "n2": 50, "n3": 50, "a": 1, "b": 1, "rot": 0, "rad":160},
heart: {"m1": 1, "m2": 1, "n1": .8, "n2": 1, "n3": -8, "a": 1, "b": .18, "rot": 90, "rad":160},
hexagon: {"m1": 6, "m2": 6, "n1": 1000, "n2": 400, "n3": 400, "a": 1, "b": 1, "rot": 0, "rad":160},
malteseCross: {"m1": 8, "m2": 8, "n1": .9, "n2": .1, "n3": 100, "a": 1, "b": 1, "rot": 0, "rad":160},
pentagon: {"m1": 5, "m2": 5, "n1": 1000, "n2": 600, "n3": 600, "a": 1, "b": 1, "rot": 0, "rad":160},
rectangle: {"m1": 4, "m2": 4, "n1": 100, "n2": 100, "n3": 100, "a": 2, "b": 1, "rot": 0, "rad":160},
roundedStar: {"m1": 5, "m2": 5, "n1": 2, "n2": 7, "n3": 7, "a": 1, "b": 1, "rot": 0, "rad":160},
square: {"m1": 4, "m2": 4, "n1": 100, "n2": 100, "n3": 100, "a": 1, "b": 1, "rot": 0, "rad":160},
star: {"m1": 5, "m2": 5, "n1": 30, "n2": 100, "n3": 100, "a": 1, "b": 1, "rot": 0, "rad":160},
triangle: {"m2": 3, "m1": 3, "n1": 100, "n2": 200, "n3": 200, "a": 1, "b": 1, "rot": 0, "rad":160},
random: {"id":"random", "m2": 1001, "m1": 1001, "n1": 1001, "n2": 1001, "n3": 1001, "a": 1001, "b": 1001, "rot": 90, "rad":160},
fly: {"m1":10.07,"m2":13.45,"n1":0.75,"n2":0.32,"n3":10,"a":1,"b":1,"pta":0,"ptb":-1,"cf":0,"tx":340,"ty":165,"rot":90,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0},
geo1: {"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,"pta":0,"ptb":-1,"cf":1000,"tx":350,"ty":200,"rot":0,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0,"tt":458.05,"v0":0,"v1":80},
geo2: {"m1":4,"m2":-140.01,"n1":-398,"n2":9,"n3":2,"a":1,"b":1,"pta":0,"ptb":-1,
"cf":884,
"tx":350,"ty":200,"rot":0,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0,"v0":1,"v1":-71},
geo3: {"m1":-1000,"m2":-156,"n1":-1000,"n2":0,"n3":576,"a":21,"b":-572,"pta":0,"ptb":-1,"cf":1000,"tx":350,"ty":200,"rot":0,"segs":360,"rad":160,"fuel":0,"dots":0,"hc":0,"tt":201.96,"v0":143,"v1":-1000},
geo4: {"m1":-722,"m2":-680,"n1":-2,"n2":75,"n3":661,"a":283,"b":160,"pta":0,"ptb":-1,"cf":742,"tx":368,"ty":200,"rot":90,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,"tt":297.93,"v0":245,"v1":-957},
geo5: {"m1":-1000,"m2":-803,"n1":30,"n2":-17,"n3":100,"a":1,"b":1,"pta":0,"ptb":-1,"cf":333,"tx":350,"ty":200,"rot":270,"segs":360,"rad":106.99,"fuel":0,"dots":0,"hc":0,"tt":458,"v0":114,"v1":1000},
geo6: {"m1":-144,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,"pta":0,"ptb":-1,"cf":708,"tx":350,"ty":200,"rot":540,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0},
geo7: {"m1":-839,"m2":-8,"n1":8,"n2":-212,"n3":381,"a":24.9,"b":20,"pta":0,"ptb":-1,"cf":809,"tx":350,"ty":182,"rot":1188,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0},
geo8: {"m1":-737,"m2":-195,"n1":144,"n2":59,"n3":381,"a":20.98,"b":20,"pta":0,"ptb":-1,"cf":572,"tx":350,"ty":200,"rot":972,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0},
geo9: {"m1":-144,"m2":2,"n1":1,"n2":4,"n3":8,"a":622.7,"b":20,"pta":0,"ptb":-1,"cf":419,"tx":350,"ty":200,"rot":90,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0},
bird: {"m1":5,"m2":5,"n1":70,"n2":30,"n3":100,"a":2.7,"b":2.8,
"tx":350,"ty":200,
"rot":-90,"rad":60,"segs":360,
"cf":50,
"v0":1,"v1":-1
},
bean2: {"m1":12,"m2":12,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"pta":0,"ptb":-1,
"cf":54,"tx":350,"ty":165,
"rot":0,"segs":360,"rad":160,"fuel":0,"hc":0,
"v0":1,"v1":-6,
"dots":1,"cf":910},
drop2: {"m1": 1, "m2": 1, "n1": .5, "n2": .5, "n3": .5, "a": 1, "b": 1, "rot": 1.57,"v0":1,"v1":-6, "dots":1,"cf":800,"tx":350,"ty":165},
decagon: {"layer":"xsf","id":"xsf","t0":0,"t1":1000,"t2":1,"t3":1,"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,"pta":0,"ptb":-1,"cf":410,"tx":350,"ty":165,"rot":0,"segs":360,"rad":158.11388300841898,"fuel":0,"dots":0,"hc":0,"v0":0,"v1":-80, "dots":1},
geo10: {"layer":"xsf","id":"xsf","t0":0,"t1":1000,"t2":1,"t3":1,"m1":-76,"m2":10,"n1":1000,"n2":150,"n3":350,"a":1,"b":1,"pta":0,"ptb":-1,"cf":900,"tx":350,"ty":165,"rot":0,"segs":360,"rad":160,"fuel":0,"dots":1,"hc":0,"v0":0,"v1":1},
geo11: {"layer":"xsf","id":"xsf","t0":0,"t1":1000,"t2":1,"t3":1,"m1":144,"m2":5,"n1":70,"n2":30,"n3":100,"a":2.7,"b":2.8,"pta":0,"ptb":-1,"cf":20,"tx":350,"ty":200,"rot":90,"segs":360,"rad":60,"fuel":0,"dots":0,"hc":0,"v0":0,"v1":1,"tt":168.99, "dots":1},
}
config.form.initparams = {
// {"tt":{"t0":0, "t1":1000, "t2":1, "t3":1}},
"layer": "xsf", "id": "xsf",
"m1": -76,
"m2": 10,
"n1": 1000,
"n2": 150,
"n3": 350,
"a": 1,
"b": 1, // init form
"tx": config.form.init.tx,
"ty": config.form.init.ty,
"segs":360,
"rot": 90,
"rad": config.form.init.rad,
"dots":0,
"fuel":0,
"hc":0,
"cf":900,"cs":400,"cw":1,
"pta":0, "ptb":-1,
"v0":0, "v1":1
}
config.tim = {}
config.tim.debug = false
config.tim.started = false
config.tim.ticking = false
config.tim.fn = function(){console.log("tick")}
config.tim.wait = 0
config.tim.timer = null
config.animation = {}
config.animation.timeunits = 1000 //
config.animation.duration = 4000 // td
config.animation.wait = 0 // t0
config.animation.limit = 1000 // t1
config.animation.step = 1 // t2
config.animation.periods = 1 // t3
config.animation.forms = []
config.animation.types = {
asterisk:[{"id":"asterisk","m1":[12,120],"m2":[12,120],"n1":0.3,"n2":[0,0],"n3":10,"a":1,"b":1,"tx":[340,340],"ty":[165,165],"rot":[0, 90],"rad":[158,60],"cf":[10,40],"segs":360}],
line:[{"id":"line","m1":[8.37,8.37],"m2":[8.37,8.37],"n1":[1.79,1.79],"n2":[980.4,980.4],"n3":[8,8],"a":[1.33,1.33],"b":1,"tx":[240,400],"ty":[100,265],"rot":[90,560],"rad":[30,80],"segs":256,"cf":[55,10],
"hc":50, "hs":400,
}],
see:[
{"id":"ship","m1":2.85,"m2":2.85,"n1":2.85,"n2":6,"n3":10.02,"a":3.73,"b":1,"tx":[350,350],"ty":[265,270],"rot":[60,120, 60, 120, 90],"rad":[90,90],"segs":360,
"cf":[450,455]},
{"id":"see",
"m":19.8,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":[330,330],"ty":[770,800],
"rot":[90,180],"rad":[600,600],"segs":360,
"cf":[995,999]},
{"id":"sun","m1":[6,40],"m2":[6,40],"n1":[100,120],"n2":[200,220],"n3":[200,230],"a":1,"b":1,"tx":[60,500],"ty":[175,90],"rot":[1.5,4.5],"rad":[30,130],"segs":360,
"cf":[500,550]},
],
drops:[
{"tt":{"t0":0, "t1":1000, "t3":5}, "id":"drop1","m1":[1,4],"m2":[1,4],"n1":[0.5,0.7],"n2":[0.5,0.5],"n3":[0.5,0.6],"a":1,"b":0.1,"tx":[240,400],"ty":[140,300],"rot":90,"rad":[190,90],"segs":360,"cf":[100,700]},
{"tt":{"t0":0, "td":1000, "t1":1000, "t2":100}, "id":"drop2","m":[1.5,8],"n1":[0.5,0.95],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":1,"b":0.1,"tx":[235,390],"ty":[150,310],"rot":90,"rad":[180,80],"segs":360,"cf":[550,900]},
{"id":"heart1","tt":{"t0":0, "t1":1000, "t3":100}, "m":[1,1],"n1":[1.8,1.8],"n2":[1,1],"n3":[-8,-8],"a":20,"b":0.18,"tx":[520,520],"ty":[100,100],"rot":100,"rad":[90,40],"segs":360,"cf":[980,970]}
],
landscape:[
{
"id":"star1",
"tx":[340,370],"ty":35,
"m1":26.42,"m2":26.42,"n1":2.1,"n2":6.87,"n3":10,"a":1,"b":1,
"rot":[180,270],"rad":24.04,"segs":360,
"pta":0,"ptb":-1,
"cf":85
},
{
"id":"star2",
"tx":320,"ty":[40,45],
"m1":16.42,"m2":16.42,"n1":1.1,"n2":7.87,"n3":10,"a":1,"b":1,
"rot":[270,270],"rad":24.04,"segs":360,
"pta":0,"ptb":-1,
"cf":95},
{
"id":"flower",
"tx":340,"ty":[165,180],
"m1":1000,"m2":1000,"n1":10,"n2":-1,"n3":-8,"a":1,"b":1,
"rot":180,"rad":[10,24],"segs":360,
"pta":0,"ptb":-1,
"cf":[46,53]
},
{
"id":"sun",
"tx":[240,440],"ty":[65,100],
"m1":480.6,"m2":480.6,"n1":1,"n2":4,"n3":8,"a":1,"b":1,
"rot":[0,720],
"rad":38.11,"segs":360,
"pta":0,"ptb":-1,
"cf":[60, 24],
"v0":0, "v1":4,
},
{
"id":"stem",
"tx":340,"ty":100,
"m1":8.8,"m2":[8.8,76],"n1":1.37,"n2":[936.3,358.1],"n3":8,"a":1,"b":1,
"rot":90,"rad":28.11,"segs":360,
"pta":0,"ptb":-1,
}
],
time:[
{"id":"circleright","tt":{"td":20000,"t0":0,"t1":100}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":50,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":"circlereverse","tt":{"td":10000,"t0":0,"t1":-100}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":100,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":"circlestepped","tt":{"td":4000,"t0":0,"t1":800,"t2":100}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":150,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":"tiltsingle","tt":{"td":4000,"t0":0,"t1":800,"t3":5}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":200,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":[1,9],"tt":{"td":4000,"t0":0,"t1":800,"t2":50}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":250,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":[10,20],"tt":{"td":4000,"t0":0,"t1":-800,"t2":80}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":300,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
{"id":"circlerightdelayed","tt":{"td":4000,"t0":200,"t1":600}, "m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[2,2],"a":[1,1],"b":[1,1],"tx":[200,500],"ty":350,"rot":[0,0],"rad":[20,20],"segs":360,"cf":[80,90]},
],
ellipse:[{
"id":"ellipsesun",
"m1":[4,4],"m2":[4,362],"n1":[2,2],"n2":[2, 2],"n3":[2,2],"a":[12,9,12],"b":[6,6],
"tx":[340,340],"ty":[165,165],
"rot":[-30,30],"rad":[130,130],"segs":360,
"cf":[440, 500, 450]
}],
ship:[{"id":"ship","m1":[4,4],"m2":[4,4],"n1":[2,2],"n2":[2,2],"n3":[0.38,1.02],"a":[9,19],"b":6,"tx":[240,500],"ty":[265,100],"rot":[0,0],"rad":[30,130],"segs":360,"cf":[5,50]}],
gear:[{"id":"gear","m1":[19,19],"m2":[19,19],"n1":[100,10],"n2":[50,370],"n3":[50,230],"a":1,"b":1,"tx":[240,500],"ty":[265,100],"rot":[90,270],"rad":[30,130],"segs":360,"cf":[5,50]}],
heart:[{"id":"heart1","m1":[1,1.6],"m2":[1,1.6],"n1":[1.8,0.9],"n2":[1,1],"n3":[-8,0.6],"a":1,"b":0.18,"tx":[240,360],"ty":[100,165],"rot":1.5 * 180 / Math.PI,"rad":[120,30],"segs":256,"cf":[5,40]},
{"id":"heart2","m1":[1,1.6],"m2":[1,1.6],"n1":[1.8,0.9],"n2":[1,1],"n3":[-8,0.6],"a":1,"b":0.18,"tx":[400,380],"ty":[300,145],"rot":[90,120],"rad":[100,25],"segs":256,"cf":[15,50]}],
maltese:
{"layer": "maltese", "id": "maltese","m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1, "segs":360,"rot":0,"rad":40,"cf":[50,55], "pta":0, "ptb":-1,
"tx":
[{"tx":350,"ty":170,"m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1, "rad":60, "segs":256,"rot":0, "pta":0, "ptb":-1},
{"tx":0,"ty":0, "m1":8, "m2":8, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":60, "rot": 0, "segs":256, "pta":0, "ptb":-1},
],
"ty":
[{"tx":120,"ty":120,"m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1, "rad":20, "segs":256,"rot":90, "pta":0, "ptb":-1},
{"tx":0,"ty":0, "m1":8, "m2":8, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":80, "segs":256, "rot": 90, "pta":0, "ptb":-1}
],
"hc":500},
pentagon:[
{
"id":"back","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":[300,300],"ty":[250,250],
"rot":0,"rad":[630,630],"segs":360,
"cf":[5,5],
"fuel":0,
},
{
"tt":{"t0":0,"t1":1000, "t2":1, "t3":1},
"id":[1,10],
"m1":[5,5],"m2":[5,5],"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":200,"ty":200,
"rot":[0,360],"segs":360,
"rad":[120,10],
"cf":[500,1000],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":1, "t3":1},
"id":[11,20],
"m1":[5,5],"m2":[5,5],"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":200,"ty":200,
"rot":[36,396],"segs":360,
"rad":[120,10],
"cf":[500,1000], // "cs":[500,1000],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":1, "t3":1},
"id":"c8",
"m1":4,"m2":-144,"n1":[1,1000],"n2":-127,"n3":2,"a":-59,"b":1,"pta":0,
"pta":0,"ptb":-1,"cf":884,
"tx":450,"ty":200,
"rot":0,"segs":360,"rad":120,"fuel":0,"dots":0,"hc":0,
"cf":[600,450],// "cs":[1000,450],
"v0":1,"v1":-71
},
],
triangles:[
{
"tt":{"t0":0,"t1":1000, "t2":10, "t3":1},
"id":[1,10],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":100,"ty":75,
"rot":[0,360],"segs":360,
"rad":[60,10],
"cf":[500,1000],
"v0":0,"v1":-1,
},
{
"tt":{"t0":0,"t1":1000, "t2":50, "t3":1},
"id":[0,1],
"m1":3,"m2":3,"n1":[100,100],"n2":200,"n3":200,"a":1,"b":1,"pta":0,
"pta":0,"ptb":-1,
"tx":320,"ty":75,
"rot":[30,390],"segs":360,
"rad":[60,0],"fuel":0,"dots":0,"hc":0,
"cf":[1000,450],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":100, "t3":1},
"id":[11,20],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":2,"b":2,
"tx":[{"tx":100, "m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rot":0, "rad":60, "segs":320, "pta":0,"ptb":-3}],
"ty":[{"tx":175, "m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rot":90, "rad":20, "segs":360, "pta":0,"ptb":-3}],
"pta":0,"ptb":-3,
"rot":270,"segs":360,
"rad":[40,10],
"cf":[500,1000],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":100, "t3":1},
"id":[31,32],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":[300,300],"ty":175,
"rot":[0,60],
"segs":360,
"rad":[60,20],
"cf":[500,1000],
"v0":[0,0],
"v1":[1,1],
},
{
"tt":{"t0":0,"t1":1000, "t2":50, "t3":1},
"id":[40,41],
"m1":3,"m2":3,"n1":[100,100],"n2":200,"n3":200,"a":1,
"b":1,"pta":0,
"pta":0,"ptb":-1,
"tx":100,"ty":[325,225],
"rot":[30,390],"segs":360,
"rad":[60,0],"fuel":0,"dots":0,"hc":0,
"cf":[1000,450],
"v0":1,"v1":-41,
},
{
"tt":{"t0":0,"t1":1000, "t2":10, "t3":1},
"id":[51,55],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":[{"tx":300, "m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rot":0, "rad":60, "segs":320}],
"ty":[{"tx":300, "m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rot":90, "rad":60, "segs":320}],
"rot":[0,360],"segs":720,
"rad":[30,30],
"cf":[500,1000],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":10, "t3":1},
"id":[150,160],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":500,"ty":75,
"rot":[0,360],"segs":360,
"rad":[40,40],
"cf":[500,1000],
"v0":0,"v1":1,
},
{
"tt":{"t0":0,"t1":1000, "t2":10, "t3":1},
"id":[160,170],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":500,"ty":200,
"rot":[0,360],"segs":360,
"rad":[40,10],
"cf":[500,1000],
"v0":0,"v1":-11,
},
{
"tt":{"t0":0,"t1":1000, "t2":20, "t3":1},
"id":[180,190],
"m1":[3,3],"m2":[3,3],"n1":100,"n2":200,"n3":200,"a":1,"b":1,
"tx":[{
"tx":500,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"rot":0,
"rad":20}
],
"ty":[{
"tx":340,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"rot":90,
"rad":20}
],
"rot":[0,720],"segs":360,
"rad":[40,40],
"cf":[500,500],"cs":[350,350],
"v0":0,"v1":1,
},
],
stars1:[
{"id":"square","m1":[6,40],"m2":[6,40],"n1":[100,120],"n2":[200,220],"n3":[200,230],"a":1,"b":1,"tx":[240,500],"ty":[265,100],"rot":[90,720],"rad":[30,130],"segs":360,"cf":[5,50]},
{"id":"stem","m1":[9.85,9.85],"m2":[9.85,9.85],"n1":[6.25,6.25],"n2":[13.02,13.02],"n3":[3.57,3.57],"a":[13.8,13.8],"b":1,"tx":[220,360],"ty":[100,265],"rot":[90,720],"rad":[30,80],"segs":360,"cf":[55,10]},
{"id":"cross","m1":[16,19],"m2":[16,19],"n1":[64,68],"n2":[20,23],"n3":[54,58],"a":[3,5],"b":[16,18],"tx":[240,400],"ty":[100,265],"rot":[90,360],"rad":[30,80],"segs":256,"cf":[55,10]},
{"tx":[290,440],"ty":[90,255],"id":"star","m":24.9,"n1":11.97,"n2":100,"n3":100,"a":1,"b":1,"rot":[0,270],"rad":[20,90],"segs":256,"cf":53,"pta":0,"ptb":-1,"t0":0,"t1":100},
{"id":"stars3", "m1":[12,300],"m2":[12,300],"n1":.3,"n2":[0,5],"n3":10,"a":1,"b":1,"tx":[340,300],"ty":[165,300],"rot":0,"rad":[158,90],"cf":[10,40],"segs":360},
{"id":"stars2", "t0": 0, "t1": 90, "m1":[4,8],"m2":[4,8],"n1":2,"n2":[2,5],"n3":2,"a":9,"b":6,"tx":[340,300],"ty":[300,165],"rot":0,"rad":[158,90],"segs":256,"cf":[10,40]}
],
loups: [
{"id":"back","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[300,300],"ty":[250,250],"rot":0,"rad":[630,630],"segs":360,"cf":[5,5]
,"hc":0
,"fuel":0
},
{"m1":11.75,"m2":358.1,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":400,
"ty":100,
"rad":60,
"cf":945},
{
"t0":0,"t1":-1000,
"layer":"loups", "id":"plane",
"m1":[4.5,4.7],"m2":[550,560],"n1":[28,28],"n2":[25,26],"n3":[35,40],"a":[30,31],"b":[19,20],
"tx":{
"tx":255,
"m1":4,"m2":4,"n1":100,"n2":-100,"n3":100,"a":-1,"b":-1,
"rot":0},
"ty":{
"tx":125,
"m1":4,"m2":4,"n1":100,"n2":-100,"n3":100,"a":-1,"b":-1,
"rot":90},
"rot":[90,90],"rad":[158,50],"segs":360,
"cf":54,
"pta":0,"ptb":-1,
"hc":50,
},
{
"layer":"loups", "id":"loup",
"tt":{"t0":0,"t1":1000,"t3":10},
"m1":6.25,"m2":[6.5,5.75],"n1":-1.57,"n2":0,"n3":10,"a":1,"b":1,
"tx":[[[510,500],[510,500]]],
"ty":300,
"rot":210,"rad":100,"segs":360,"pta":0,"ptb":-1,
"cf":5,
"hc":0,
"fuel":0,
},
],
copter:[
{"tt":{"td":5000, "t0":0, "t1":1000},
// ,"m1":17.47,"m2":16.47,"n1":10.07,"n2":50,"n3":50,"a":1,"b":1
// ,"m1":9.65,"m2":14.3,"n1":1.17,"n2":0.32,"n3":4.54,"a":1,"b":1
// ,"m1":65.99,"m2":65.99,"n1":19.37,"n2":11.32,"n3":142.5,"a":9.36,"b":1.79
// ,"m1":358.1,"m2":358.1,"n1":3.07,"n2":9.85,"n3":200,"a":1,"b":1
// ,"m1":8.57,"m2":7.1,"n1":5.82,"n2":6.25,"n3":19.96,"a":2.33,"b":1
// , "m1":5.82,"m2":730.5,"n1":0.32,"n2":0,"n3":17.71,"a":4.94,"b":0.97
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":[100,150],"segs":360,
"tx":
{"tx":300,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"rad":60, "segs":360,"rot":0,
"pta":0, "ptb":180, // no return
},
"ty":
{"tx":200,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"rad":60, "segs":360,
"rot":90,
"pta":0, "ptb":-4,
},
"hc":500,
"cf":50}
],
copters:[
{"id":"back",
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"tx":300,
"ty":250,
"rot":0,"rad":630,"segs":360,"cf":5,
"hc":0
},
{
"id":"ship1",
"tt":{"t1":9000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":100,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 9, "b": 6, "rad":40, "segs":360,"rot":0, "v0":0, "v1":1}
,"ty":
{"tx":100,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 9, "b": 6, "rad":40, "segs":360,"rot":90, "pta":0, "ptb":-1 , "v0":0, "v1":0}
,"hc":500
,"cf":50
},
{
"id":"ship2",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":200,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":40, "segs":360,"rot":0, "v0":0, "v1":1}
,"ty":
{"tx":100,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":40, "segs":360,"rot":90, "pta":0, "ptb":-3 , "v0":0, "v1":0}
,"hc":500
,"cf":50
},
{
"id":"ship3",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":300,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":40, "segs":360,"rot":0, "v0":1, "v1":4}
,"ty":
{"tx":100,"ty":0,"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1, "rad":40, "segs":360,"rot":90, "pta":0, "ptb":-1 , "v0":1, "v1":4}
,"hc":500
,"cf":50
},
{
"id":"ship4",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":720
,"tx":
{"tx":400,"ty":0,"m1": 12, "m2": 12, "n1": 0.3, "n2": 0, "n3": 10, "a": 1, "b": 1, "rad":40, "segs":360,"rot":0, "pta":0, "ptb":-1, "v0":1, "v1":-3}
,"ty":
{"tx":100,"ty":0,"m1": 12, "m2": 12, "n1": 0.3, "n2": 0, "n3": 10, "a": 1, "b": 1, "rad":40, "segs":360,"rot":90, "pta":0, "ptb":-1, "v0":1, "v1":-3}
,"hc":500
,"cf":50
},
{
"id":"ship5",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":500,"ty":0,
"m1":12,"m2":144,"n1":-2,"n2":0,"n3":10,"a":1,"b":1,
"rad":60, "segs":360,"rot":90, "pta":0, "ptb":-1,
"v0":1, "v1":3}
,"ty":
{"tx":100,"ty":0,
"m1":12,"m2":144,"n1":-2,"n2":0,"n3":10,"a":1,"b":1,
"rad":60, "segs":360,"rot":180, "pta":0, "ptb":-1 ,
"v0":1, "v1":3}
,"hc":500
,"cf":50
},
{
"id":"ship6",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":100,"ty":0,
"m1":3,"m2":-8,"n1":9,"n2":7,"n3":2,"a":-2,"b":-2,
"v0":2,"v1":-2,
"rad":40, "segs":360,"rot":0, "pta":0, "ptb":-1}
,"ty":
{"tx":200,"ty":0,
"m1":3,"m2":-8,"n1":9,"n2":7,"n3":2,"a":-2,"b":-2,
"v0":2,"v1":-2,
"rad":40, "segs":360,"rot":90, "pta":0, "ptb":-1}
,"hc":500
,"cf":50
},
{
"id":"ship7",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":200,"ty":0,
"m1":12,"m2":12,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":-6,
"rad":60, "segs":360,"rot":90, "pta":0, "ptb":-1}
,"ty":
{"tx":200,"ty":0,
"m1":12,"m2":12,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":-6,
"rad":60, "segs":360,"rot":180, "pta":0, "ptb":-1}
,"hc":500
,"cf":50
},
{
"id":"ship8",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":300,"ty":0,
"m1":4,"m2":4,"n1":489,"n2":161,"n3":100,"a":2,"b":1,
"v0":1,"v1":-3,
"rad":50, "segs":360,"rot":0, "pta":0, "ptb":-1}
,"ty":
{"tx":200,"ty":0,
"m1":4,"m2":4,"n1":489,"n2":161,"n3":100,"a":2,"b":1,
"v0":1,"v1":-3,
"rad":50, "segs":360,"rot":90, "pta":0, "ptb":-1}
,"hc":500
,"cf":50
},
{
"id":"ship9",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7
,"rot":[90, 90],"rad":30,"segs":360
,"tx":
{"tx":400,"ty":0,
"m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1,
"v0":1,"v1":4,
"rad":40, "segs":720,"rot":0, "pta":0, "ptb":-1}
,"ty":
{"tx":200,"ty":0,
"m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1,
"v0":1,"v1":4,
"rad":40, "segs":720,"rot":90, "pta":0, "ptb":-1}
,"hc":500
,"cf":50
},
{
"id":"ship10a",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":500,"ty":0,
"m1":5,"m2":5,"n1":2,"n2":7,"n3":7,"a":1,"b":1,
"v0":1,"v1":-5,
"rad":70,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":200,"ty":0,
"m1":5,"m2":5,"n1":2,"n2":7,"n3":7,"a":1,"b":1,
"v0":1,"v1":-5,
"rad":70,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship10b",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":500,"ty":0,
"m1":5,"m2":5,"n1":2,"n2":7,"n3":7,"a":1,"b":1,
"v0":1,"v1":5,
"rad":70,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":200,"ty":0,
"m1":5,"m2":5,"n1":2,"n2":7,"n3":7,"a":1,"b":1,
"v0":1,"v1":5,
"rad":70,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship11",
"tt":{"t1":18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":100,"ty":0,
"m1":29,"m2":18,"n1":7,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":3,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":300,"ty":0,
"m1":29,"m2":18,"n1":7,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":3,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship12",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":200,"ty":0,
"m1":-144,"m2":-432,"n1":-958,"n2":76,"n3":500,"a":-653,"b":127,
"v0":1,"v1":-5,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":300,"ty":0,
"m1":-144,"m2":-432,"n1":-958,"n2":76,"n3":500,"a":-653,"b":127,
"v0":1,"v1":-5,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship13",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":300,"ty":0,
"m1":-42,"m2":25,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"v0":2,"v1":12,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":300,"ty":0,
"m1":-42,"m2":25,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"v0":2,"v1":12,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship14",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":400,"ty":0,
"m1":5,"m2":5,"n1":483,"n2":551,"n3":568,"a":1,"b":1,
"v0":1,"v1":5,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":300,"ty":0,
"m1":5,"m2":5,"n1":483,"n2":551,"n3":568,"a":1,"b":1,
"v0":1,"v1":5,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
{
"id":"ship15",
"tt":{"t1":-18000},
"m1":13.45,"m2":19.37,"n1":10.7,"n2":18.95,"n3":18.68,"a":18.21,"b":10.7,
"rot":[90, 90],"rad":30,"segs":360,
"tx":
{"tx":500,"ty":0,
"m1":12,"m2":26,"n1":-2,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":3,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":300,"ty":0,
"m1":12,"m2":26,"n1":-2,"n2":0,"n3":10,"a":1,"b":1,
"v0":1,"v1":3,
"rad":60,"segs":360,"pta":0,"ptb":-1,
"rot":90}
,"hc":500
,"cf":50
},
],
background:[
{"id":"back",
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
// "v0":1,"v1":-71,
"v0":1,"v1":[-71,71],
"tx":300,
"ty":250,
"rot":0,"rad":630,"segs":360,"cf":5,
"hc":0
},
],
comp1:[
{
"id":"spiral",
"tt":{"td":9000},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":350,
"ty":200,
"hc":500,
"cf":590,
"v0":1,"v1":[-11,11],
},
],
spiral1:[
{
"id":"spiral2",
"tt":{"td":9000,"t0":0,"t1":1000,"t2":60,"t3":1},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":[[
{
"tx":200,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":0,
"rad":90,"segs":360,
"pta":0,"ptb":-6,
"v0":0,"v1":-12,
},
]],
"ty":[[
{
"tx":200,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":90,
"rad":90,"segs":360,
"pta":0,"ptb":-6,
"v0":0,"v1":-12,
}
]],
"rad":15,
"hc":500,"hs":400,
"pta":0,"ptb":-1,
"cf":550,"cs":850,
},
{
"id":"spiral3",
"tt":{"td":9000,"t0":0,"t1":1000,"t2":60,"t3":1},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":[[
{
"tx":400,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":0,
"rad":90,"segs":360,
"pta":0,"ptb":-1,
"v0":1,"v1":-3,
},
]],
"ty":[[
{
"tx":200,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":90,
"rad":90,"segs":360,
"pta":0,"ptb":-1,
"v0":1,"v1":-3,
}
]],
"rad":15,
"hc":500,"hs":400,
"pta":0,"ptb":-1,
"cf":550,"cs":850,"cw":0.1,
},
],
timedot:[
{
"id":"spiral1",
"tt":{"td":4000,"t0":0,"t1":500,"t2":1,"t3":1},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":[100, 500],
"ty":100,
"rad":5,
"hc":500,"hs":100,
"pta":0,"ptb":-1,
"cf":550,"cs":850,
},
{
"id":"spiral2",
"tt":{"td":4000,"t0":500,"t1":1000,"t2":1,"t3":1},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":[100, 500],
"ty":200,
"rad":5,
"hc":500,"hs":100,
"pta":0,"ptb":-1,
"cf":550,"cs":850,
},
{
"id":"spiral3",
"tt":{"td":4000,"t0":0,"t1":1000,"t2":1,"t3":1},
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"rot":[90, 90],"rad":120,"segs":360,
"tx":[100, 500],
"ty":300,
"rad":5,
"hc":500,"hs":100,
"pta":0,"ptb":-1,
"cf":550,"cs":850,
},
],
comps:[
{
"id":"c3",
"tt":{"td":9000,"t0":0,"t1":-1000},
"m1":[0,144],"m2":[-143,-90],"n1":754,"n2":-212,"n3":2,"a":-24.9,"b":1
,"v0":1,"v1":-71
,"rot":[0, 0],"rad":90,"segs":360
,"tx":150
,"ty":200
,"hc":500
,"cf":190
},
{
"id":"c4",
"tt":{"td":9000,"t0":0,"t1":1000},
"m1":[0,144],"m2":[-143,-67],"n1":754,"n2":-212,"n3":2,"a":-24.9,"b":1
,"v0":1,"v1":-71
,"rot":[0, 0],"rad":90,"segs":360
,"tx":400
,"ty":200
,"hc":500
,"cf":50
},
],
comp2:[
{"id":"c5",
"m1":4,"m2":-144,"n1":[600,700],"n2":9,"n3":[-750,-30],"a":[1,1],"b":1,
"pta":0,"ptb":-1,"cf":884,
"tx":125,
"ty":200,
"rot":0,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,
"tt":456.86,
"v0":1,"v1":71
},
],
pols:[
{"id":"c6",
"m1":4,"m2":-144,"n1":754,"n2":[-144,-25],"n3":76,"a":-59,"b":8,
"pta":0,"ptb":-1,"cf":884,
"tx":300,
"ty":200,
"rot":0,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,
"tt":456.86,
"v0":1,"v1":-1000
},
{"id":"c7",
"m1":8,"m2":93,"n1":1000,"n2":[-212,8],"n3":2,"a":-25,"b":1,
"pta":0,"ptb":-1,"cf":884,
"tx":475,
"ty":200,
"rot":0,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,
"tt":456.86,
"v0":1,"v1":-71
},
{"id":"c8",
"m1":4,"m2":-144,"n1":[1,1000],"n2":-127,"n3":[1,1000],"a":-59,"b":1,"pta":0,
"pta":0,"ptb":-1,"cf":884,
"tx":125,"ty":200,
"rot":0,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,
"tt":456.86,
"v0":1,"v1":-71
},
],
decas:[
{
"id":"form1",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"pta":0,"ptb":-1,
"cf":0,
"tx":100,
"ty":50,
"rot":60,"segs":360,"rad":40,
"fuel":0,"dots":0,"hc":0,
"v0":1,"v1":-71,
},
{
"id":"ref1",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"pta":0,"ptb":-1,
"cf":0,
"tx":175,
"ty":200,
"rot":60,"segs":360,"rad":120,
"fuel":0,"dots":0,"hc":0,
"v0":1,"v1":[-70,-71],
},
{
"id":"move1",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":{
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":100,
"rot":0,"segs":999,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":-71
},
"ty":{
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":350,
"rot":90,"segs":999,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":-71
},
"pta":0,"ptb":-1,
"cf":0,
"rot":60,"segs":360,"rad":12,
"fuel":0,"dots":0,
"hc":500,"hs":600, "ho":1,
"v0":1,"v1":-71,
},
{
"id":"form2",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"pta":0,"ptb":-1,"cf":275,
"tx":500,"ty":50,
"rot":60,"segs":360,"rad":40,"fuel":0,"dots":0,"hc":0,
"v0":1,"v1":108,
"t":{"t0":0,"t1":1000,"t2":1,"t3":1}
},
{
"id":"ref2",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"pta":0,"ptb":-1,"cf":275,
"tx":425,"ty":200,
"rot":60,"segs":360,"rad":120,"fuel":0,"dots":0,"hc":0,
"v0":1,"v1":[107,108],
"t":{"t0":0,"t1":1000,"t2":1,"t3":1}
},
{
"id":"move2",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":{
"m1":10,"m2":10,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":500,
"rot":0,"segs":360,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":108
},
"ty":{
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":350,
"rot":90,"segs":360,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":108
},
"pta":0,"ptb":-1,
"cf":0,
"rot":60,"segs":360,"rad":12,
"fuel":0,"dots":0,
"hc":500,"hs":600, "ho":1,
"v0":1,"v1":108
},
{
"id":"ref0",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"pta":0,"ptb":-1,
"cf":0,
"tx":300,
"ty":50,
"rot":60,"segs":360,"rad":40,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":1,
},
{
"id":"move0",
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":{
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":300,
"rot":0,"segs":360,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":1
},
"ty":{
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"tx":350,
"rot":90,"segs":360,"rad":36,
"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":1
},
"pta":0,"ptb":-1,
"cf":0,
"rot":60,"segs":360,"rad":12,
"fuel":0,"dots":0,
"hc":500,"hs":600, "ho":1,
"v0":0,"v1":1,
},
],
comp9:[{"m1":4,"m2":[-300,300],"n1":2,"n2":-34,"n3":-25,"a":223.84,"b":480.6,"pta":0,"ptb":-1,"cf":0,"tx":300,"ty":200,"rot":0,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0
},
],
comp12:[
{"m1":10,"m2":10,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,"pta":0,"ptb":-1,"cf":275,"tx":350,"ty":200,"rot":60,"segs":360,"rad":160,"fuel":0,"dots":0,"hc":0,"v0":1,"v1":90,"t0":0,"t1":1000,"t2":1,"t3":1
}
],
comp13:[
{"m1":10,"m2":10,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,"pta":0,"ptb":-1,"cf":275,"tx":350,"ty":200,"rot":60,"segs":360,"rad":160,"fuel":0,"dots":0,"hc":0,"v0":1,"v1":72,"t0":0,"t1":1000,"t2":1,"t3":1}
],
comp14:[
{"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,"pta":0,"ptb":-1,"cf":0,"tx":350,"ty":200,"rot":60,"segs":360,"rad":160,"fuel":0,"dots":0,"hc":0,"v0":1,"v1":315,"t0":0,"t1":1000,"t2":1,"t3":1}
],
waves:[
{"id":"ship","m1":2.85,"m2":2.85,"n1":2.85,"n2":6,"n3":10.02,"a":3.73,"b":1,"rot":90
,"tx":[350,350],"ty":[245,270]
,"rad":40,"segs":360,"cf":[50,55], "pta":0, "ptb":-1 },
{"id":"see","m1":19.8,"m2":19.8,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[330,330],"ty":[770,800],"rot":[90,270],"rad":[600,600],"segs":360,"cf":[95,99]},
{"id":"sun","m1":[6,40],"m2":[6,40],"n1":[100,120],"n2":[200,220],"n3":[200,230],"a":1,"b":1,"tx":[60,500],"ty":[175,90],"rot":[90,360],"rad":[30,130],"segs":360,"cf":[5,50]},
{"id":"drop1", "m1": 1.1, "m2": 1.1, "n1": 0.5, "n2": .5, "n3": .5, "a": 1, "b": 1, "rot": 90, "cf":[25,45], "tx":[330,330],"ty":[70,600],"rad":[20,60], "segs":360},
{"id":"drop2", "m1": 1.2,"m2": 1.2, "n1": 0.5, "n2": .5, "n3": .5, "a": 1, "b": 1, "rot": 90, "cf":[15,35], "tx":[300,310],"ty":[75,600],"rad":[10,20], "segs":360},
{"id":"drop3", "m1": 1.1,"m2": 1.1, "n1": 0.5, "n2": .5, "n3": .5, "a": 1, "b": 1, "rot": 90, "cf":[15,35], "tx":[280,295],"ty":[65,600],"rad":[10,30], "segs":360},
],
face:[
{"t0":0, "t1":80, "id":"pencil","m1":3.27,"m2":3.27,"n1":4.12,"n2":10.9,"n3":2.93,"a":5.34,"b":14.1
,"tx":
{"tx":345,"ty":170,"m1":20,"m2":20,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6, "rad":160, "segs":256,"rot":0, "pta":0, "ptb":-1 }
,"ty":
{"tx":170,"ty":170,"m1":8,"m2":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1, "rad":160, "segs":256,"rot":90, "pta":0, "ptb":-1}
,"rot":0,"rad":40,"segs":360,"cf":[50,55], "pta":0, "ptb":-1, "hc": 5400
},
{"t0":80, "t1":100, "id":"eye1","m1":[4,4],"m2":[4,4],"n1":[0.17,1.17],"n2":[0,0],"n3":[0.38,1],"a":[1,1],"b":1,"tx":[395,395],"ty":[120,120],"rot":[0,0],"rad":[30,30],"segs":360,"cf":[500,950], "hc": 0,
"v0":1,"v1":-1},
{"t0":80, "t1":100, "id":"cristal1","m1":[4,4],"m2":[4,4],"n1":[0.1,2],"n2":[2,2],"n3":[1.38,2],"a":[5,1],"b":[1,1],"tx":[395,395],"ty":[120,120],"rot":[0,0],"rad":[10,10],"segs":360,"cf":[80,90], "hc": 0},
{"t0":80, "t1":100, "id":"eye2","m1":[4,4],"m2":[4,4],"n1":[0.17,1.17],"n2":[0,0],"n3":[0.38,1],"a":[1,1],"b":1,"tx":[295,295],"ty":[120,120],"rot":[0,0],"rad":[30,30],"segs":360,"cf":[500,950], "hc": 0},
{"t0":80, "t1":100, "id":"cristal2","m1":[4,4],"m2":[4,4],"n1":[0.1,2],"n2":[2,2],"n3":[1.38,2],"a":[5,1],"b":[1,1],"tx":[295,295],"ty":[120,120],"rot":[0,0],"rad":[10,10],"segs":360,"cf":[80,90], "hc": 0},
{"t0":80, "t1":100, "id":"lips",
"m1":[-4,-4],"m2":[4,4],"n1":[0,3],"n2":[1,1],"n3":[2,2],"a":[6,6],"b":[6,6],
"tx":[342,342],"ty":[227,227],
"rot":[90,90],"rad":[30,40],"segs":360,"cf":[500,0], "hc": 0, "v0":0, "v1":1, "dots":0},
{"t0":80, "t1":100, "id":"teeths",
"m1":[-4,-4],"m2":[1,1],"n1":[0.5,0.5],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":[1,1],"b":1,
"tx":[342,342],"ty":[227,227],
"rot":[90,90],"rad":[30,40],"segs":360,"cf":[0,450], "hc": 0, "v0":0, "v1":-1, "dots":0},
],
// {"layer":"xsf","id":"xsf0","m1":-4,"m2":3,"n1":2,"n2":1,"n3":-2,"a":-1,"b":-0.3284489413621783,"tx":300,"ty":200,"segs":360,"rot":90,"rad":158.11388300841898,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"t0":0,"t1":1000,"t2":1,"t3":1,"c":0}
// {"layer":"xsf","id":"xsf1","m1":4,"m2":-7,"n1":5,"n2":3,"n3":8,"a":1.0077314500013017,"b":1.007044210001186,"tx":350,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":-3.865725000650855,"cs":150,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":385.8568297775459,"hs":550,"ho":1}
starbridge: [
{"id":"back",
"m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":[301,300],
"ty":[250,250],
"rot":0,"rad":[630,630],"segs":360,"cf":[5,5],
"v0":1,"v1":-71,
"fuel":0,"hc":0,"dots":0},
{"id":"mountains",
"m1":41.97,"m2":41.97,"n1":1.6,"n2":1.17,"n3":0.68,"a":1,"b":0.95,
"tx":340,"ty":585,
"rot":[0,0.5],"rad":388.11,"segs":[90,90],
"cf":[369,269],
"pta":0,"ptb":-1, "fuel":0,
"v0":1,"v1":-25
},
{"id":"see",
"m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[350,350],"ty":[930,930],"rot":[90,180],"rad":[630,630],"segs":360,"cf":[985,999]},
{
"id":"ship2",
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,
"pta":0,"ptb":-1,
"cf":500,
"tx":500,
"ty":100,
"rot":[0,45],"segs":360,"rad":100,"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":80},
{
"id":"ship1",
"m1":144,"m2":-195,"n1":-178,"n2":-195,"n3":76,"a":-8,"pta":0,"ptb":-1,
"cf":[400,508],
"tx":{
"m1":4,"m2":4,"n1":25,"n2":3.85,"n3":2,"a":9,"b":6,
"tx":350,"ty":270,
"rot":0,"rad":260,"segs":360,
"pta": 180,"ptb":360 },
"ty":{
"m1":4,"m2":4,"n1":25,"n2":3.85,"n3":2,"a":9,"b":6,
"tx":350,"ty":270,
"rot":-90,"rad":260,"segs":360,
"pta": 180,"ptb":360},
"rot":[0,360],"segs":360,"rad":50,"fuel":0,"dots":0,"hc":0,
"v0":42,"v1":331
},
{"id":[1,10],
"m1":24,"m2":24,"n1":[30,300],"n2":30,"n3":509.02,"a":539.4,"b":9,
"pta":1.47,"ptb":2.12,
"cf":[500,0],
"tx":120,"ty":111,
"rot":432,"segs":300.24,"rad":[100,240],"fuel":1,"dots":0,"hc":0,
"v0":0,"v1":1
},
{
"id":"star2",
"m1":-737,"m2":-195,"n1":144,"n2":59,"n3":381,"a":20.98,"b":20,
"pta":0,"ptb":-1,
"cf":[522,900],
"tx":
{"tx":290,"ty":0,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,
"v0":1,"v1":-1,
"rad":180,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":250,"ty":0,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,
"v0":1,"v1":-1,
"rad":180,"segs":360,"pta":0,"ptb":-1,
"rot":90},
"rot":972,"segs":360,"rad":158.11,"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":1,
},
// {"id":"bridge",
// "m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
// "tx":[[
// {"m1":2,"m2":2,"n1":3,"n2":3,"n3":0.2,"a":0.9,"b":6,"tx":350,"ty":0,"rot":0,"rad":50,"segs":360,"pta":1,"ptb":-1},
// {"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,"tx":350,"ty":0,"rot":0,"rad":150,"segs":360,"pta":1,"ptb":-1}]],
// "ty":{"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,"tx":240,"ty":90,"rot":90,"rad":120,"segs":360,"pta":1,"ptb":-1}
// ,"rot":[0,360],"segs":300,"rad":20 ,"fuel":1,"cf":850}
// ],
// flower2: [
// {"id":"back","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[300,300],"ty":[280,280]
// ,"rot":0,"rad":[630,630],"segs":360
// ,"cf":[5,5]
// ,"fuel":0},
// {"id":"flower",
// "tt":{"t0":0,"t1":1000, "t2":1, "t3":1 },
// "m1":[24,24],"m2":[24,24],"n1":[1,1],"n2":[1,-3],"n3":[2,12],"a":[9,9],"b":[9,9],
// "tx":[380,380],"ty":[195,195],
// "rot":[0,0],"rad":[20,150],"segs":360,"cf":[10,0]
// ,"fuel":1},
],
battlefield:[
{"id":"back","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[300,300],"ty":[250,250],"rot":0,"rad":[630,630],"segs":360,"cf":[530,0], "hc":0, "fuel":0},
{"id":"opencloud","m1":2,"m2":2,"n1":2,"n2":8,"n3":6,"a":1,"b":1,"tx":[300,300],"ty":[-50,100],"rot":270,"rad":[30,330],"segs":360,"cf":[0,0], "fuel":1},
{"id":"mountains","t0":0,"t1":100,"m1":41.97,"m2":41.97,"n1":1.6,"n2":1.17,"n3":0.68,"a":1,"b":0.95,"tx":340,"ty":805,"rot":[0,0.5],"rad":658.11,"segs":[82,81.93],"cf":[369,269],"pta":0,"ptb":-1, "fuel":0},
{"id":"sun1","m1":12,"m2":12,"n1":10.07,"n2":50,"n3":50,"a":1,"b":1,"tx":[130,130],"ty":[100,90],"rot":[60,90],"rad":[80,80],"segs":360,"cf":[598,538]},
{"id":"sun2","m1":1.6,"m2":1.6,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[510,570],"ty":[110,95],"rot":[90,180],"rad":[100,105],"segs":360,"cf":[575,521]},
{"id":"see","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[350,350],"ty":[890,890],"rot":[90,180],"rad":[630,630],"segs":360,"cf":[985,999]},
{"id":"ship1","t0":0, "t1":100, "m1":[4,7],"m2":[4,7],"n1":[0.5,0.5],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":1,"b":0.1,"tx":[230,380],"ty":[120,310],"rot":[90,90],"rad":[40,120],"segs":256,"cf":[500,500]},
{"id":"ship2"
,"tt":{"t0":0, "t1":1000}
,"m1":7,"m2":7,"n1":[0.5,0.5],"n2":[0.5,0.5],"n3":[0.5,0.5],"a":1,"b":0.1
,"tx":{"m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":350,"ty":840,"rot":0,"rad":630,"segs":360}
,"ty":[120,310]
,"rot":[90,90],"rad":[40,270],"segs":256
,"cf":[435,440]
, "hc":500},
{
"id":"stara",
"tt":{"t0":0,"t1":1000, "t2":1, "t3":1 },
"m":8,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":0.1,
"tx":{
"m1":4,"m2":4,"n1":25,"n2":3.85,"n3":2,"a":9,"b":6,
"tx":350,"ty":270,
"rot":0,"rad":260,"segs":360,
"pta": 180,"ptb":360 },
"ty":{
"m1":4,"m2":4,"n1":25,"n2":3.85,"n3":2,"a":9,"b":6,
"tx":350,"ty":270,
"rot":-90,"rad":260,"segs":360,
"pta": 180,"ptb":360},
"rot":90,"rad":[25,30],"segs":[256,100],
"cf":130,
"hc":500
},
{"id":"starb",
"m1":8,"m2":8,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":0.1,
"tx":{
"m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":350,"ty":550,
"rot":0,"rad":630,"segs":360,
"pta": 200, "ptb": 300 },
"ty":{
"m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
"tx":150,
"rot":90,"rad":30,"segs":360,
"pta": 200,"ptb": 300
},
"rot":90,"rad":[25,30],"segs":[256,100],
"cf":530,
"hc":500
},
{"id":"star2","t0":0,"t1":100,"m1":8,"m2":8,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":0.1,"tx":[350, 390],"ty":110,"rot":90,"rad":20.01,"segs":[100,256],"cf":530},
{
"id":"star3",
"m1":7.62,"m2":7.62,"n1":3.19,"n2":1.28,"n3":6.98,"a":0.01,"b":6.35,
"tx": {"tx":250,
"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"rot":0,"rad":380,"segs":360,
"pta": 200, "ptb": 325},
"ty": {"tx":350,
"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"rot":-90,"rad":380,"segs":360 ,
"pta": 200, "ptb": 325},
"rot":[0,360],"segs":300,"rad":100,"cf":130, "hc":500,
},
],
hearts:[
{"t0":0, "t1":30,"id":"heart01","m1":[1,1],"m2":[1,1],"n1":[1.8,2],"n2":[1,2],"n3":[-4,2],"a":[1,15,1],"b":[0.18,1],"tx":[240,360],"ty":[130,165],"rot":1.5 * 180 / Math.PI,"rad":[120,30],"segs":256,"cf":[5,40]},
{"t0":0, "t1":30,"id":"heart02","m1":[1,1.2],"m2":[1,1.2],"n1":[1.9, 0.72],"n2":[1.2,3],"n3":[-3.8,0.6],"a":[12,5],"b":0.18,"tx":[280,363],"ty":[140,218],"rot":90,"rad":[100,25],"segs":256,"cf":[15,50]},
{"t0":30, "t1":70,"id":"heart11","m1":[1,1.23],"m2":[1,1.23],"n1":[1.8,2],"n2":[1,2],"n3":[-4,2.1],"a":[1,1],"b":[0.18,1],"tx":[240,340],"ty":[280,165],"rot":1.5 * 180 / Math.PI,"rad":[120,30],"segs":256,"cf":[5,40]},
{"t0":30, "t1":70,"id":"heart12","m1":[1,1.18],"m2":[1,1.18],"n1":[1.9, 0.52],"n2":[1.16,1.53],"n3":[-3.8,0.5],"a":[12,5],"b":0.18,"tx":[272,343],"ty":[300,222],"rot":90,"rad":[100,28],"segs":256,"cf":[15,50]},
],
spacebridge:[
// {"id":"back","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[300,300],"ty":[250,250]
// ,"rot":0,"rad":[630,630],"segs":360
// ,"cf":[5,5]
// ,"fuel":0},
// {"m1":11.75,"m2":358.1,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,
// "tx":500,
// "ty":100,
// "rad":60,
// "cf":945},
// {"id":"see","m1":4,"m2":4,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6,"tx":[350,350],"ty":[890,890],"rot":[90,180],"rad":[630,630],"segs":360,"cf":[5,10]},
{"id":[100,101],
"tt":{"t0":200,"t1":1000, "t2":1, "t3":1 },
"m1":7.62,"m2":7.62,"n1":3.19,"n2":1.28,"n3":6.98,"a":0.01,"b":6.35,
"tx": {"m":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"tx":350,
"rot":0,"rad":630,"segs":360,
"pta":240,"ptb": 290},
"ty": {"m":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"tx":350,
"rot":0,"rad":630,"segs":360,
"pta": 240, "ptb": 290},
"rot":[0,270],"segs":300,"rad":100, "fuel":1, "hc":500,
"cf":10},
// {"id":[1,10]
// ,"tt":{"t0":0,"t1":200, "t2":20, "t3":1 }
// ,"m1":5,"m2":5,"n1":30,"n2":100,"n3":100,"a":1,"b":1
// ,"tx": {"m1":34,"m2":26,"n1":24,"n2":3,"n3":3,"a":9,"b":2,"tx":250,"ty":660,"rot":0,"rad":530,"segs":360 ,"pta": 240, "ptb": 290}
// ,"ty": {"m1":48,"m2":25,"n1":27,"n2":4,"n3":2,"a":2,"b":6,"tx":250,"ty":640,"rot":0,"rad":580,"segs":360 , "pta": 240, "ptb": 290}
// ,"rot":[0,270],"segs":[60,60],"rad":10, "fuel":0
// ,"cf":999},
// {"id":[11,20]
// ,"tt":{"t0":0,"t1":200, "t2":20, "t3":1 }
// ,"m1":6,"m2":6,"n1":30,"n2":100,"n3":100,"a":1,"b":1
// ,"tx": {"m1":64,"m2":26,"n1":24,"n2":3,"n3":3,"a":9,"b":2,"tx":250,"ty":560,"rot":0,"rad":530,"segs":360 ,"pta": 240, "ptb": 320}
// ,"ty": {"m1":78,"m2":25,"n1":27,"n2":4,"n3":2,"a":2,"b":6,"tx":250,"ty":540,"rot":0,"rad":580,"segs":360 , "pta": 240, "ptb": 320}
// ,"rot":[0,270],"segs":[60,60],"rad":10, "fuel":0
// ,"cf":999},
// {"id":[21,30],
// "tt":{"t0":0,"t1":200, "t2":20, "t3":1 },
// "m1":6,"m2":6,"n1":30,"n2":100,"n3":100,"a":1,"b":1
// ,"tx": {"m1":129,"m2":129,"n1":24,"n2":3,"n3":3,"a":9,"b":2,"tx":250,"ty":560,"rot":0,"rad":530,"segs":360 ,"pta": 240, "ptb": 320}
// ,"ty": {"m1":168,"m2":168,"n1":27,"n2":4,"n3":2,"a":2,"b":6,"tx":250,"ty":540,"rot":0,"rad":580,"segs":360 , "pta": 240, "ptb": 320},
// "rot":[0,270],"segs":[60,60],"rad":10, "fuel":0,
// "cf":999}
],
spiral:[
{
"tt":{"td":16000,"t0":0,"t1":1000, "t2":1, "t3":1},
"id":"circle",
"m1":42,"m2":1,"n1":0.5,"n2":0.5,"n3":0.5,"a":1,"b":1,
"tx": [
[0,450],
{"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"tx":50,"ty":0,
"rot":0,"rad":30,"segs":360 ,
"pta": 20, "ptb": 350,
"v0":1,"v1":-25}],
"ty": [
[100,0],
{"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"tx":0,"ty":0,
"rot":90,"rad":30,"segs":360 ,
"pta": 20, "ptb": 350,
"v0":0,"v1":1},
{"m1":4,"m2":4,"n1":30,"n2":3,"n3":2,"a":9,"b":6,
"tx":100,"ty":0,
"rot":90,"rad":30,"segs":360 ,
"pta": 20, "ptb": 350,
"v0":1,"v1":-25}],
"rot":[-90,-30],"rad":60,"segs":360,"cf":[555,999],
"fuel":1,"hc":500},
{
"tt":{"td":16000,"t0":0,"t1":1000, "t2":1, "t3":1},
"id":"star2",
"m1":-737,"m2":-195,"n1":144,"n2":59,"n3":381,"a":20.98,"b":20,
"pta":0,"ptb":-1,
"cf":[522,900],
"tx":
{"tx":290,"ty":0,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,
"v0":1,"v1":-1,
"rad":180,"segs":360,"pta":0,"ptb":-1,
"rot":0},
"ty":
{"tx":250,"ty":0,
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":9,"b":6,
"v0":1,"v1":-1,
"rad":180,"segs":360,"pta":0,"ptb":-1,
"rot":90},
"rot":972,"segs":360,"rad":58.11,"fuel":0,"dots":0,"hc":0,
"v0":0,"v1":1,
"fuel":1,"hc":500
},
],
circle:[
{"id":"back","m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"tx":340,"ty":165,
"rot": 90,
"segs":360,"rad":158.11,
"cf":[200,250,500],
"pta":0,"ptb":-1,
},
{"id":"sun","t0":0,"t1":1000,"t2":1,"t3":1,"m1":19,"m2":19,"n1":100,"n2":50,"n3":50,"a":1,"b":1,"pta":0,"ptb":-1,"cf":[0,0,550],"tx":400,"ty":100,"rot":0,"segs":360,"rad":[20,60],"fuel":0,"dots":0,"hc":0,"v0":0,"v1":1},
{"id":"stem","t0":0,"t1":1000,"t2":1,"t3":1,"m1":2,"m2":2,"n1":1,"n2":-8,"n3":[-1,-70],"a":246,"b":1,"pta":0,"ptb":-1,"cf":[0,0,750],"tx":300,"ty":280,"rot":90,"segs":360,"rad":68,"fuel":0,"dots":0,"hc":0,"v0":0,"v1":1},
{"id":"flower","t0":0,"t1":1000,"t2":1,"t3":1,"m1":[1,26],"m2":[1,26],"n1":[110,200],"n2":60,"n3":[0.5,5],"a":26,"b":-25,"pta":0,"ptb":-1,"cf":[0,0,750],"tx":300,"ty":[300,150],"rot":-90,"segs":360,"rad":[10,140],"fuel":0,"dots":0,"hc":0,"v0":0,"v1":1},
{"id":"front",
"t1":-1000,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 1, "b": 1,
"tx":340,"ty":165,
"rot": 90,
"segs":360,"rad":158.11,
"cf":[0,0],
"pta":0,"ptb":[ 360, 1, 360, 1],
"v0":0,"v1":1
},
],
multistar:[
{"layer":"xsf","id":"xsf0","m1":432,"m2":246,"n1":-42,"n2":-127,"n3":42,"a":41,"b":127,"tx":350,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":386,"cs":-1,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":386.16646214997377,"hs":550,"ho":1}
],
longdisk:[
{"id": "needle",
"m1":0.585,
"m2":-0.025,
"n1":[0.01, 0.5],
"n2":[0, 0],
"n3":[0.00001,0.000001],
"a":0,
"b":[0.212,0],
"tx":350,
"ty":165,
"segs":360,
"rot":90,
"rad":[160, 160],
"dots":0,
"fuel":0,
"hc":0,
"cf":449.93902500063996,
"cs":-1,
"cw":1,
"pta":0,
"ptb":-1,
"v0":0,"v1":1,
"tt":386.16646214997377,
"hs":550,"ho":1,
"v0":0,"v1":1}
],
randomanima:[
{"id": "randomanima",
"td":1000,
"m1":[1001, 1001, 1001],
"m2":[1001, 1001, 1001],
"n1":[1001, 1001, 1001],
"n2":[1001, 1001, 1001],
"n3":[1001, 1001, 1001],
"a":[1001, 1001, 1001],
"b":[1001, 1001, 1001],
"tx":350,
"ty":165,
"segs":360,
"rot":90,
"rad":[160, 160],
"dots":0,
"fuel":0,
"hc":0,
"cf":450,
"cs":-1,
"cw":1,
"pta":0,
"ptb":-1,
"v0":0,"v1":1,
"hs":550,"ho":1,
"v0":0,
"v1":1}
],
stars3:[
{
"tt":{"td":9000,"t0":0,"t1":9000, "t2":1, "t3":1},
"id":"back",
"m1":4,"m2":4,"n1":2,"n2":2,"n3":2,"a":1,"b":1,
"tx":300,
"ty":250,
"rot":0,"rad":630,"segs":360,"cf":5,
"hc":0
},
{
"id":"ship1",
"tt":{"td":9000,"t0":0,"t1":9000, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":30,"n2":100,"n3":100,"a":1,"b":1,
"rot":[0, 360],"rad":3,"segs":120,
"tx":
{"tx":300,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":40, "segs":360,
"rot":0,
"pta":0, "ptb":-6 ,
"v0":1, "v1":6},
"ty":
{"tx":200,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":40, "segs":360,
"rot":90,
"pta":0, "ptb":-6 ,
"v0":1, "v1":6},
"hc":40 , "hs":650, // trace
"cf":650, "cs":650, // ship
},
{
"id":"ship2",
"tt":{"td":9000,"t0":0,"t1":9000, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":30,"n2":100,"n3":100,"a":1,"b":1,
"rot":[0, 360],"rad":3,"segs":120,
"tx":
{"tx":300,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":50, "segs":360,
"rot":0,
"pta":0, "ptb":-9 ,
"v0":0, "v1":1},
"ty":
{"tx":200,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":50, "segs":360,
"rot":90,
"pta":0, "ptb":-9 ,
"v0":0, "v1":1},
"hc":40 , "hs":650, // trace
"cf":650, "cs":650, // ship
},
{
"id":"ship9",
"tt":{"td":9000,"t0":0,"t1":9000, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":30,"n2":100,"n3":100,"a":1,"b":1,
"rot":[0, 360],"rad":3,"segs":120,
"tx":
{"tx":300,
"m1":5,"m2":5,"n1":20,"n2":60,"n3":60,"a":1,"b":1,
"rad":185, "segs":360,
"rot":0,
"pta":0, "ptb":-9 ,
"v0":0, "v1":1},
"ty":
{"tx":200,
"m1":5,"m2":5,"n1":20,"n2":60,"n3":60,"a":1,"b":1,
"rad":185, "segs":360,
"rot":90,
"pta":0, "ptb":-9 ,
"v0":0, "v1":1},
"hc":40 , "hs":650, // trace
"cf":650, "cs":650, // ship
},
],
stars4:[
{
"id":"ship1",
"tt":{"td":9000,"t0":0,"t1":500, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":30,"n2":100,"n3":100,"a":1,"b":1,
"rot":[0, 360],"rad":3,"segs":120,
"tx":
[[100,350],
{"tx":0,
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"rad":80, "segs":720,
"rot":0,
"pta":0, "ptb":-1 ,
"v0":1, "v1":6},
{"tx":0,
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"rad":80, "segs":720,
"rot":0,
"pta":0, "ptb":-1 ,
"v0":1, "v1":-6},
],
"ty":
[
{"tx":150,
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"rad":80, "segs":720,
"rot":90,
"pta":0, "ptb":-1 ,
"v0":1, "v1":6},
],
"fuel":0,
"hc":4000 , "hs":900, // trace
"cf":900, "cs":900, // ship
},
{
"id":"ship2",
"tt":{"td":9000,"t0":300,"t1":1000, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"rot":[0, 720],"rad":[3,30],"segs":120,
"tx":[150, 500],
"ty":[150, 120],
"kx":1.5,
"ky":0.5,
"fuel":0,
"pta":0, "ptb":-1 ,
"v0":1, "v1":-6,
"hc":0 , "hs":550, // trace
"cf":0, "cs":550, // ship
},
{
"id":"ship3",
"tt":{"td":9000,"t0":350,"t1":1000, "t2":1, "t3":1},
"m1":5,"m2":5,"n1":1000,"n2":150,"n3":150,"a":1,"b":1,
"rot":[0, 720],"rad":[3,30],"segs":120,
"tx":[150, 500],
"ty":[160, 180],
"kx":1.1,
"ky":0.7,
"fuel":0,
"pta":0, "ptb":-1 ,
"v0":1, "v1":6,
"hc":0 , "hs":450, // trace
"cf":0, "cs":450, // ship
},
],
anima:
[
// {"m1": [1, 4, 4, 4, 4, 4],
// "m2": [1, 4],
// "n1": [0.5, 2, 2, 2, 2, 2],
// "n2": [2, 0.5],
// "n3": [0.5, 2, 2, 2, 2, 2],
// "a": [1, 6, 6, 6, 6, 6],
// "b": [1, 9, 9, 9, 9, 9],
// "rot": 90,
// "tx":[350,350],
// "ty":[165,165],
// "dots":0
// }
// {
// "tt":{"t0":0,"t1":500, "t2":1, "t3":1},
// "m1": [1, 4],
// "m2": [1, 4],
// "n1": [0.5, 3],
// "n2": [0.5, 1],
// "n3": [0.5, 2],
// "a": [1, 6],
// "b": [1, 6],
// "pta":0,
// "ptb":-1,
// "cf":{
// "m1":4,
// "m2":4,
// "n1":2,
// "n2":2,
// "n3":2,
// "a":1,
// "b":1,
// "pta":0,
// "ptb":-1
// },
// "cs": 150,
// "tx":[350,350],
// "ty":165, // [165,400],
// "rot":90,
// "segs":360,
// "rad":[160,160],
// "fuel":0,
// "hc":0, "hs":550, "ho":1,
// "v0":0,"v1":1,
// "dots":0
// },
{
"tt":{"t0":0,"t1":1000, "t2":1, "t3":1},
"m1": [1, 1, 1, 1, 1, 0.2],
"m2": [1, 0.2],
"n1": [0.5, 0.8],
"n2": [0.5, 0.5],
"n3": [0.5, 1],
"a": [1, 0.1],
"b": [1, 0.18],
"m1": [0.2, 1],
"m2": [0.2, 1],
"n1": [0.8, 0.5],
"n2": [0.5, 0.5],
"n3": [1, 0.5],
"a": [0.1, 1],
"b": [0.18, 1],
"pta":0,
"ptb":-1,
"cf":[0,450],
"cs": 150,
"tx":[350,350],
"ty":165, // [165,400],
"rot":90,
"segs":360,
"rad":[160,160],
"fuel":0,
"hc":0, "hs":550, "ho":1,
"v0":0,"v1":1,
"dots":0
},
// {"id": "needle",
// "m1":0.585,
// "m2":-0.025,
// "n1":[0.01, 0.5],
// "n2":[0, 0],
// "n3":[0.00001,0.000001],
// "a":0,
// "b":[0.212,0],
// "tx":350,
// "ty":165,
// "segs":360,
// "rot":90,
// "rad":[160, 160],
// "dots":0,
// "fuel":0,
// "hc":0,
// "cf":449.93902500063996,
// "cs":-1,
// "cw":1,
// "pta":0,
// "ptb":-1,
// "v0":0,"v1":1,
// "tt":386.16646214997377,
// "hs":550,"ho":1,
// "v0":0,"v1":1}
],
// skull: {"layer":"xsf","id":"xsf1","m1":1,"m2":3,"n1":1,"n2":0,"n3":34,"a":1.0002627999972902,"b":1.000239439997531,"tx":350,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":-0.13139999864506535,"cs":150,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":386.08103341586207,"hs":550,"ho":1}
// bear : {"layer":"xsf","id":"xsf1","m1":4,"m2":11,"n1":-3,"n2":3,"n3":8,"a":1.0077314500013017,"b":1.007044210001186,"tx":350,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":-3.865725000650855,"cs":150,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":385.8568297775459,"hs":550,"ho":1}
// drop: {"layer":"xsf","id":"xsf0","m1":0.449,"m2":-1,"n1":0.212,"n2":-0.907,"n3":0.025,"a":0.9998780500012799,"b":-0.246,"tx":350,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":449.93902500063996,"cs":150,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":386.16646214997377,"hs":550,"ho":1,"v0":0.001,"v1":-0.364}
// steps on
// {"m1":-144,"m2":4,"n1":1,"n2":[2,15],"n3":7,"a":1,"b":1,"pta":0,"ptb":-1,"cf":708,"tx":336,"ty":100,"rot":270,"segs":360,"rad":90,"fuel":0,"dots":0,"hc":0,"v0":0,"v1":432,"layer":null,"id":null,"t0":0,"t1":1000,"t2":1,"t3":1,"tt":457.79}
rocket1:[
{"layer":"xsf","id":"rocket1",
"tt":{"td":6000, "t0":0, "t1":-400, "t2":1, "t3":1, "tw":0},
"m1":-7.66,"m2":-3.73,"n1":16.24,"n2":5.98,"n3":17,"a":8.98,"b":0.19,
"tx":[{"tx":320,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":40, "segs":360,
"rot":0,
"pta":90, "ptb":180 ,
"v0":0, "v1":0}],
"ty":[
{"tx":100,
"m1": 4, "m2": 4, "n1": 2, "n2": 2, "n3": 2, "a": 6, "b": 6,
"rad":40, "segs":360,
"rot":90,
"pta":90, "ptb":180 ,
"v0":0, "v1":1}],
"segs":360,
"rot":[-90,-30],
"rad":90,"dots":0,"fuel":0,
"hc":40,"hs":450,
"cf":54,"cs":450,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{"layer":"xsf","id":"fuel",
"tt":{"td":6000, "t0":400, "t1":1000, "t2":1, "t3":1, "tw":0},
"m1":[6,2],"m2":0.84,"n1":[2,2],"n2":[113,113],"n3":364,"a":-164,"b":0.19,
"tx":[320, 320],
"ty":[190, 270],
"segs":360,
"rot":-90,
"rad":60,"dots":0,"fuel":0,
"hc":40,"hs":450,
"cf":54,"cs":54,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
"fuel":1,
"ky":[1,0.4]
},
{"layer":"xsf","id":"rocket1",
"tt":{"td":6000, "t0":400, "t1":1000, "t2":1, "t3":1, "tw":0},
"m1":-7.66,"m2":-3.73,"n1":16.24,"n2":5.98,"n3":17,"a":8.98,"b":0.19,
"tx":[320, 320],
"ty":[100, 195],
"segs":360,
"rot":-90,
"rad":90,"dots":0,"fuel":0,
"hc":40,"hs":450,
"cf":54,"cs":450,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
"ky":1
},
],
// lingth: {"layer":"xsf","id":"0random","m1":-1.172844926046709,"m2":[18.202117701694753,22],"n1":4.8971667433713755,"n2":10.18108914298886,"n3":1.170017720503214,"a":-4.961653504761162,"b":-6.393658109914263,"tx":300,"ty":200,"segs":360,"rot":90,"rad":100,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
random: [
{
"id":"rect1",
"m1": 4, "m2": 4, "n1": 100, "n2": 100, "n3": 100, "a": 1, "b": 2,
"tx":160, "ty":195,
"rot": -4, "rad":200,
"kx":1.3,"ky":1.0,
"cf":60, "cs":650,
},
{
"id":"rect2",
"m1": 4, "m2": 4, "n1": 100, "n2": 100, "n3": 100, "a": 1, "b": 2,
"tx":435, "ty":195,
"rot": 4, "rad":200,
"kx":1.3,"ky":1.0,
"cf":60, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random11",
"tx":100, "ty":85,
"m1": [1001, 1002], "m2": 1001, "n1": 1001, "n2": 1001, "n3": 1001, "a":[1001, 1002], "b": 1001,
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random12",
"tt":{"td":1000},
"tx":200, "ty":65,
"m1": [1001, 1002], "m2": 1001, "n1": 1001, "n2": 1001, "n3": 1001, "a":[1001, 1002], "b": 1001,
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random13",
"tx":400, "ty":65,
"m1": 1001, "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random14",
"tx":500, "ty":85,
"m1": 1001, "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random21",
"tx":110, "ty":210,
"m1": 1001, "m2": 1001, "n1": 1001, "n2": [1001, 1002], "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random22",
"tx":210, "ty":190,
"m1": 1001, "m2": 1001, "n1": 1001, "n2": [1001, 1002], "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000},
"id":"random23",
"tx":390, "ty":190,
"m1": 1001, "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": 1001, "a":[1001, 1002], "b": 1001,
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random24",
"tx":490, "ty":210,
"m1": 1001, "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": 1001, "a":[1001, 1002], "b": 1001,
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random31",
"tx":130, "ty":335,
"m1": [1001, 1002], "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": [1001, 1002], "a":1001, "b": 1001,
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"tx":230, "ty":315,
"m1": [1001, 1002], "m2": 1001, "n1": [1001, 1002], "n2": 1001, "n3": [1001, 1002], "a":1001, "b": 1001,
"rot": 75, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":450, "cs":650,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random33",
"tx":370, "ty":315,
"m1": 1001, "m2": [1001, 1002], "n1": 1001, "n2": [1001, 1002], "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
{
"tt":{"td":1000,"t0":0,"t1":1000,"t2":1,"t3":1},
"id":"random34",
"tx":470, "ty":335,
"m1": 1001, "m2": [1001, 1002], "n1": 1001, "n2": [1001, 1002], "n3": 1001, "a":1001, "b": [1001, 1002],
"rot": 105, "rad":50,
"v0":0,"v1":1,
"kx":1.0,"ky":1.0,
"cf":950, "cs":450,
},
],
// fly: {"layer":"xsf","id":"random","m1":9.376323695575222,"m2":5.207981871992011,"n1":15.734896690518418,"n2":-19.083784893678548,"n3":-16.52796710191664,"a":-2.974024535303874,"b":13.640515798226618,"tx":320,"ty":105.26838333337865,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":40,"cf":54,"cs":450,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":270.4133841801238,"hs":450,"ky":1}
// heart: {"layer":"xsf","id":"random","m1":212,"m2":1.1211775962968318,"n1":-11.744692494126161,"n2":15.210815368997501,"n3":14.824726897055456,"a":-11.094747628719608,"b":13.566224533623927,"tx":320,"ty":105.26838333337865,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":40,"cf":54,"cs":450,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":270.4133841801238,"hs":450,"ky":1}
// head: {"layer":"xsf","id":"random","m1":4.860489698459833,"m2":15.218805823025487,"n1":8.148189953352869,"n2":-15.20991195267559,"n3":12.487689723947373,"a":1.5105212785935063,"b":7.038922511476926,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":40,"cf":54,"cs":450,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":289.51872461420805,"hs":450}
// body {"layer":"xsf","id":"random","m1":-4.702620092612566,"m2":-16.00496651485595,"n1":2.329094211537832,"n2":-3.8284423455813155,"n3":-1.7908733009857958,"a":-12.26569099370698,"b":-18.749786441966705,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":40,"cf":54,"cs":450,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":289.51872461420805,"hs":450}
//
// plane: {"layer":"xsf","id":"random","m1":-76,"m2":-59,"n1":-25,"n2":-1.883857565749416,"n3":15.68332653295431,"a":-4.568705718909474,"b":19.92454765940593,"tx":340,"ty":165,"segs":360,"rot":270,"rad":142,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":0}
// bull: {"layer":"xsf","id":"random","m1":-6.744785008345344,"m2":-15.726333569625242,"n1":7.5902764893744745,"n2":2.224359017018971,"n3":3.057895646237103,"a":11.64302225758214,"b":14.543195340709172,"tx":320,"ty":125.82187083332565,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":40,"cf":54,"cs":450,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":206.94209625729403,"hs":450,"ky":1}
// egg: {"layer":"xsf","id":"0random","m1":1.83469919704737,"m2":-2.878857416364893,"n1":0.30737943915095034,"n2":-3.7020289748145503,"n3":8.960611152036687,"a":-7.596071446547736,"b":-8.015245090640708,"tx":300,"ty":200,"segs":360,"rot":273,"rad":100,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// body: {"layer":"xsf","id":"0random","m1":4.2572549061664375,"m2":[10,11],"n1":-6.639619908991168,"n2":10.369256701761078,"n3":8.162397823262404,"a":0.9849263415913336,"b":-1.2646539494175144,"tx":300,"ty":200,"segs":360,"rot":90,"rad":100,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
eyes: [
{"layer":"xsf","id":"000random","m1":4,"m2":[0,1],"n1":2.6,"n2":7,"n3":10,"a":10.5,"b":5.43,"tx":300,"ty":200,"segs":360,"rot":90,"rad":100,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":[10,400],"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1
},
],
// http://www.thisiscolossal.com/2015/11/blooms-of-insect-wings-created-by-photographer-seb-janiak/
wings: [
{"layer":"xsf",
"id":"000random",
"m1":10.285093750753012,"m2":-4.637916410905989,"n1":11.97928466491084,"n2":-4.498739418717026,"n3":-5.869070371598335,"a":9.195612623634624,"b":11.577215288774747,
"ty":200,"segs":360,"rot":90,"rad":100,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":[10,400],"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1
},
],
// "body": {"layer":"xsf","id":"random","m1":-15.83,"m2":-8.49,"n1":15.66,"n2":13.15,"n3":12.99,"a":-18.7,"b":-6.08,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":500,"cf":54,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"hs":600,"ho":1,"t":328.04}
// warrior: {"layer":"xsf","id":"random","m1":4.96,"m2":15.36,"n1":16.16,"n2":-14.23,"n3":-9.48,"a":16.32,"b":15.52,"tx":300,"ty":200,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1},
// {"layer":"xsf","id":"random","m1":17.63,"m2":11.29,"n1":-18.88,"n2":13.95,"n3":18.07,"a":-12.99,"b":4.38,"tx":300,"ty":200,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// lemon: {"layer":"xsf","id":"random","m1":-13.59,"m2":-4.33,"n1":19.89,"n2":3.65,"n3":3.26,"a":-16.04,"b":6.6,"tx":300,"ty":200,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// wing: {"layer":"xsf","id":"random","m1":-8.95,"m2":18.74,"n1":9.07,"n2":2.01,"n3":-13.07,"a":16.35,"b":0.1,"tx":300,"ty":200,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// eagle: {"layer":"xsf","id":"random","m1":-4.09,"m2":-9.95,"n1":7.8,"n2":11,"n3":14.3,"a":-11.18,"b":-6.34,"tx":300,"ty":200,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":900,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// stick : {"layer":"xsf","id":"random","m1":144,"m2":-5.07,"n1":16.62,"n2":[55,79],"n3":19.57,"a":18.94,"b":16.18,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":538,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// doubleface: {"layer":"xsf","id":"random","m1":-17.52,"m2":4.38,"n1":15.44,"n2":7.79,"n3":7.18,"a":13.67,"b":15.08,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":500,"cf":54,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"hs":600,"ho":1,"t":399.27}
comps1317:[
{
"tt":{"td":1000},
"id":"comp1",
"m1":-17.61,"m2":-15.18,"n1":3.5,"n2":-3.89,"n3":-12.66,"a":10.14,"b":6.26,
"rot":[90, 90],"rad":90,"segs":360,
"dots":0,"fuel":0,
"tx":150,"ty":100,
"hc":500,
"cf":[300,590],"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{"layer":"xsf","id":"comp2",
"m1":-12.71,"m2":14.92,"n1":8.57,"n2":-4.84,"n3":-13.08,"a":-11.7,"b":11.88,
"tx":300,"ty":100,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp3",
"m1":-16.63,"m2":-0.06,"n1":11.97,"n2":-13.12,"n3":-13.13,"a":7.28,"b":6.66,
"tx":450,"ty":100,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":500,
"cf":[400,590],"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"id":"comp4",
"m1":-2.59,"m2":-7.76,"n1":14.51,"n2":11.72,"n3":4.37,"a":-17.2,"b":-13.98,
"rot":[90, 90],"rad":90,"segs":360,
"dots":0,"fuel":0,
"tx":150,"ty":300,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"comp5",
"m1":-19.42,"m2":-0.57,"n1":-10.5,"n2":-5.89,"n3":17.27,"a":-8.42,"b":11.36,
"tx":300,"ty":300,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp6",
"m1":3.34,"m2":10.22,"n1":13.3,"n2":-0.79,"n3":-16.11,"a":-9.45,"b":-3.01,
"tx":450,"ty":300,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":500,
"cf":600,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp7",
"m1":-4.39,"m2":5.54,"n1":-10.1,"n2":-2.02,"n3":17.75,"a":-16.59,"b":-10.04,
"tx":520,"ty":40,
"segs":360,"rot":90,"rad":60,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp8",
"m1":9.57,"m2":1.03,"n1":16.67,"n2":12.96,"n3":12.83,"a":-12.09,"b":-9.49,
"tx":230,"ty":200,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp9",
"m1":15.93,"m2":3.91,"n1":16.84,"n2":9.26,"n3":9.74,"a":-0.92,"b":-15,
"tx":380,"ty":200,
"segs":360,"rot":90,"rad":40,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{"layer":"xsf","id":"comp10",
"m1":-0.84,"m2":11.05,"n1":19.46,"n2":-18.47,"n3":4.52,"a":0.31,"b":-8.04,
"tx":510,"ty":200,
"segs":360,"rot":90,"rad":40,"dots":0,"fuel":0,
"hc":500,
"cf":590,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
}
,
{"layer":"xsf","id":"comp11",
"m1":-5.83,"m2":0.17,"n1":3.03,"n2":4.61,"n3":-12.9,"a":19.48,"b":18.45,
"tx":110,"ty":200,
"segs":360,"rot":90,"rad":40,"dots":0,"fuel":0,
"hc":500,
"cf":600,"cs":400,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
}
],
pentagons:[
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon11",
"m1": 5, "m2": 5, "n1": 1000, "n2": 600, "n3": 600, "a": 1, "b": 1,
"tx":[100,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon12",
"m1":5,"m2":5,"n1":331,"n2":585,"n3":585,"a":1,"b":1,
"tx":[225,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon13",
"m1":5,"m2":5,"n1":144,"n2":585,"n3":585,"a":1,"b":1,
"tx":[350,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon14",
"m1":-144,"m2":134,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":[475,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon21",
"m1":5,"m2":5,"n1":9,"n2":7,"n3":7,"a":1,"b":1,
"tx":[100,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon22",
"m1":5,"m2":5,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":[225,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1000
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon23",
"m1":5,"m2":5,"n1":1000,"n2":8,"n3":600,"a":1,"b":1,
"tx":[350,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":144,
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon24",
"m1":5,"m2":5,"n1":42,"n2":600,"n3":600,"a":1,"b":1,
"tx":[475,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon11",
"m1": 5, "m2": 5, "n1": 1000, "n2": 600, "n3": 600, "a": 1, "b": 1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[60,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[100,999, 0, 100],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon12",
"m1":5,"m2":5,"n1":331,"n2":585,"n3":585,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[80,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[200,999, 0, 200],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon13",
"m1":5,"m2":5,"n1":144,"n2":585,"n3":585,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[100,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[300,999, 0, 300],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon14",
"m1":-144,"m2":134,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon21",
"m1":5,"m2":5,"n1":9,"n2":7,"n3":7,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[120,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[400,999, 0, 400],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon22",
"m1":5,"m2":5,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[140,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[500,999, 0, 500],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1000,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon23",
"m1":5,"m2":5,"n1":1000,"n2":8,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[160,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[600,999, 0, 600],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":144,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon24",
"m1":5,"m2":5,"n1":42,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[180,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[700,999, 0, 600],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
// circle {"layer":"xsf","id":"00comp11","m1":178,"m2":280,"n1":280,"n2":314,"n3":-93,"a":1,"b":8,"tx":340,"ty":165,"segs":360,"rot":0,"rad":150,"dots":0,"fuel":0,"hc":500,"cf":54,"cs":400,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":381,"tt":301.8}
// eyes on a {"layer":"xsf","id":"0random","m1":1.56,"m2":-3.76,"n1":21,"n2":-32,"n3":-41,"a":36,"b":-13.97,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":433.63,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1,"tt":221.58}
forms:[
{
"layer":"xsf","id":"random",
"m1":-3.3,"m2":-8,"n1":-8,"n2":9,"n3":9,"a":15.56,"b":11.84,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":-3.49,"m2":-2.82,"n1":18.76,"n2":19.8,"n3":16.04,"a":-14.35,"b":10.88,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":-19.53,"m2":6.37,"n1":17.73,"n2":-6.9,"n3":0.98,"a":0.49,"b":-8.49,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":12.35,"m2":-9.73,"n1":14.12,"n2":-6.99,"n3":2.16,"a":0.08,"b":-19.91,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
lights:[
{
"layer":"xsf","id":"random",
"m1":-25,"m2":-330,"n1":382,"n2":[324,244],"n3":9,"a":-8,"b":144,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":-1.3,"m2":15.37,"n1":25,"n2":42,"n3":12.14,"a":12.72,"b":3.62,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":212,"m2":-93,"n1":[0,1,10],"n2":178,"n3":9,"a":-25,"b":-25,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":212,"m2":-93,"n1":[0,1,10],"n2":178,"n3":9,"a":-25,"b":-25,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
heads:[
{
"layer":"xsf","id":"random",
"m1":-1.18,"m2":12.37,"n1":7.15,"n2":7.99,"n3":5.86,"a":5.52,"b":-14.37,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
}
],
bodies:[
{
"layer":"xsf","id":"body11",
"m1":-4.8,"m2":-13.2,"n1":-10.51,"n2":15.04,"n3":11.77,"a":9.94,"b":14.62,
"tx":150,"ty":100,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"body12",
"m1":-4.35,"m2":-11.47,"n1":-11.09,"n2":19.1,"n3":15.52,"a":-8.17,"b":-13.39,
"tx":300,"ty":100,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"body13",
"m1":-4.35,"m2":14.5,"n1":8.7,"n2":-18.28,"n3":-18.89,"a":17.95,"b":-8.19,
"tx":450,"ty":100,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"body21",
"m1":-3.48,"m2":13.31,"n1":14.26,"n2":-17.76,"n3":-10.64,"a":12.1,"b":15.85,
"tx":150,"ty":300,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"body22",
"m1":6.51,"m2":-11.65,"n1":-4.58,"n2":7.83,"n3":8.67,"a":12.39,"b":5.86,
"tx":300,"ty":300,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"body23",
"m1":-14.33,"m2":10.36,"n1":-12.29,"n2":19.58,"n3":13.28,"a":-10.98,"b":15.63,
"tx":450,"ty":300,
"segs":360,"rot":90,"rad":90,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
suns:[
{
"layer":"xsf","id":"random",
"m1":144,"m2":161,"n1":8,"n2":8,"n3":14.19,"a":-4.62,"b":-12.8,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
}
],
animals:[
{
"layer":"xsf","id":"random",
"m1":2.48,"m2":13.61,"n1":-4.87,"n2":10.17,"n3":9.69,"a":-17.66,"b":18.25,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":-8.29,"m2":-5.36,"n1":6.52,"n2":-12.7,"n3":-13.37,"a":13.36,"b":18.66,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
fruits:[
{
"layer":"xsf","id":"random",
"m1":-7.73,"m2":1.7,"n1":-2.72,"n2":4.21,"n3":9.07,"a":13.9,"b":1.78,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":2.11,"m2":-0.56,"n1":-15.63,"n2":19.38,"n3":11.18,"a":13.5,"b":-16.21,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":15.49,"m2":-1.5,"n1":-10.65,"n2":17.99,"n3":14.46,"a":12.49,"b":-5.97,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":9.32,"m2":-2.79,"n1":-19.64,"n2":16.67,"n3":10.24,"a":13.5,"b":18.95,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"layer":"xsf","id":"random",
"m1":17.12,"m2":1.62,"n1":-6.88,"n2":10.32,"n3":16.69,"a":17.33,"b":2.22,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
],
geos:[
{
"layer":"xsf","id":"random",
"m1":-25,"m2":-364,"n1":11.79,"n2":6.8,"n3":-5.65,"a":18.54,"b":-3.37,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":432,
},
{
"layer":"xsf","id":"random",
"m1":-25,"m2":-568,"n1":32,"n2":-42,"n3":161,"a":8,"b":-3.37,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":432,
},
,
{
"layer":"xsf","id":"random",
"m1":7,"m2":2,"n1":13,"n2":10,"n3":11,"a":-14,"b":6,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":432,
},
{
"layer":"xsf","id":"random",
"m1":3.66,"m2":-5.43,"n1":1.87,"n2":1.24,"n3":17.79,"a":-16.69,"b":0.96,
"tx":340,"ty":165,
"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,
"hc":0,"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":432,
},
// face ** {"layer":"xsf","id":"random","m1":551,"m2":2.89,"n1":16.46,"n2":-7.55,"n3":-0.96,"a":-17.55,"b":-11.13,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":466,"td":1000,"hs":550,"ho":1}
],
zs:[
{
"id":"zs11",
"m1":16,"m2":16,"n1":-1,"n2":6,"n3":6,"a":-25,"b":26,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"id":"zs12",
"m1":16,"m2":16,"n1":60,"n2":-76,"n3":144,"a":-144,"b":60,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"id":"zs13",
"m1":16,"m2":16,"n1":0.3,"n2":0,"n3":10,"a":1,"b":1,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"id":"zs21",
"m1":16,"m2":16,"n1":0.3,"n2":-1,"n3":10,"a":1,"b":1,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"id":"zs21",
"m1":16,"m2":16,"n1":[26,93],"n2":-59,"n3":93,"a":93,"b":9,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
],
blackhole:[
{
"id":"zs21",
"m1":-11.77,"m2":602,"n1":5.08,"n2":4.05,"n3":6.65,"a":9.58,"b":-4.73,
"tx":340,"ty":165,
"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
// cone {"layer":"xsf","id":"0zs21","m1":1,"m2":1,"n1":2,"n2":9,"n3":721,"a":-59,"b":0.18,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// cone 2 {"layer":"xsf","id":"0zs21","m1":1,"m2":1,"n1":958,"n2":-144,"n3":721,"a":93,"b":0.18,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// semicircle {"layer":"xsf","id":"0zs21","m1":1,"m2":1,"n1":0.8,"n2":1,"n3":-8,"a":1,"b":0,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// semicircle 2 {"layer":"xsf","id":"0zs21","m1":1,"m2":1,"n1":1000,"n2":-25,"n3":-42,"a":-102,"b":0,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// packman on b {"layer":"xsf","id":"0zs21","m1":1,"m2":1,"n1":1000,"n2":-25,"n3":-110,"a":-59,"b":-59,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// heart
],
// butterfly fly {"layer":"xsf","id":"random","m1":-10.71,"m2":0.48,"n1":17.96,"n2":-13.79,"n3":-10.48,"a":17.91,"b":6.03,"tx":340,"ty":165,"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// "m1":-11.86,"m2":4.5,"n1":8.01,"n2":-5.25,"n3":-7.76,"a":-14.66,"b":6.93,
// body {"layer":"xsf","id":"random","m1":-9.23,"m2":12,"n1":-15.5,"n2":18.03,"n3":17.17,"a":-6.15,"b":7.77,"tx":340,"ty":165,"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// {"layer":"xsf","id":"random","m1":-4.77,"m2":-13.59,"n1":-5.4,"n2":4.85,"n3":11.84,"a":-14.73,"b":-1.82,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// fly {"layer":"xsf","id":"random","m1":-6.82,"m2":-2.98,"n1":17.84,"n2":-17.33,"n3":-13.74,"a":-2.16,"b":6.82,"tx":340,"ty":165,"segs":360,"rot":0,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
//
// {"layer":"xsf","id":"random","m1":-15.21,"m2":-2.25,"n1":3.02,"n2":-6.2,"n3":-17.92,"a":15.99,"b":-0.51,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
//{"layer":"xsf","id":"random","m1":7.73,"m2":-0.85,"n1":2.48,"n2":-16.39,"n3":-9.26,"a":-16.33,"b":6.14,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// face {"layer":"xsf","id":"random","m1":6.18,"m2":4.68,"n1":3.02,"n2":3.43,"n3":-5.98,"a":-15.62,"b":15.37,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// {"layer":"xsf","id":"random","m1":0.55,"m2":-0.93,"n1":0.31,"n2":-6.75,"n3":-4.14,"a":-16.91,"b":8.54,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// flower {"layer":"xsf","id":"random","m1":-15.29,"m2":-2.56,"n1":2.09,"n2":-1.25,"n3":17.93,"a":4.95,"b":0.6,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// body {"layer":"xsf","id":"random","m1":6.06,"m2":15.79,"n1":-6.02,"n2":16.03,"n3":15.18,"a":7.68,"b":-5.6,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
//{"layer":"xsf","id":"random","m1":-6.9,"m2":-6.79,"n1":7.04,"n2":-8.75,"n3":-15.26,"a":9.16,"b":19.05,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
// base {"layer":"xsf","id":"random","m1":4,"m2":13.59,"n1":18.37,"n2":18.23,"n3":17.84,"a":4.04,"b":9.26,"tx":340,"ty":165,"segs":360,"rot":90,"rad":160,"dots":0,"fuel":0,"hc":0,"cf":54,"cs":473.18,"cw":1,"pta":0,"ptb":-1,"v0":0,"v1":1}
apple:[
{
"id":"zs21",
"m1":-2.53,"m2":7.51,"n1":16.41,"n2":-18.84,"n3":6.9,"a":-15.22,"b":12.26,
"tx":340,"ty":165,
"segs":360,"rot":-90,"rad":160,"dots":0,"fuel":0,
"hc":0,
"cf":54,"cs":473.18,"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
],
} // end zs
config.animation.initanima = config.animation.types.apple // .anima
;
/* -------------------------- */
/* consolPlugin */
/* -------------------------- */
var consolPlugin = function consolPlugin() {
var consoleinput = null
consoleinput = d3.select("#controls")
.append("div")
.attr("class", "consols")
.selectAll(".consol")
.data([consoleText])
.enter().append("input")
.attr('type', "text")
.attr('id', 'consol')
.attr("class", "consol")
.attr('style', 'width: 590px;')
.style("font", "12px sans-serif") // _e_
.style("fill-opacity", 1)
.on("change", changedconsol)
var replacer = function (key,value) {
if (typeof(value) === 'number') {
let r = Math.floor(value * 100) / 100
return r
}
else if (typeof(value) === 'object') return value
else if (typeof("value") === "string") return value
else return value
}
var consoleText = (__mapper().config.consol
&& __mapper().config.consol.text) ? __mapper().config.consol.text : '{}'
function changedconsol() {
let anima = JSON.parse(this.value)
__mapper('xsf').clear()
__mapper({'fuel': fuelPlugin()}).fuel.clear() // clear fuel
__mapper('animation').render(anima)
}
var consolPlugin = function consolPlugin() { }
consolPlugin.render = function(params) { // render is based on superform
var p = params
consoleinput.property('value', d => JSON.stringify(p, replacer)) // consol
}
consolPlugin.clear = function() {
var p = Object.assign({})
if (!consolElemsEnter.empty()) {
consolElemsEnter.property('value', d => JSON.stringify(p, initialstate.consol.replacer)) // consol
}
}
return consolPlugin
}
/* -------------------------- */
/* controlsPlugin */
/* -------------------------- */
var controlsPlugin = function controlsPlugin() {
var format = d3.format(".4n")// d3.format(".2f") //
var xsfdomain = __mapper("scales").xsfdomain()
var controlElems = d3.select("#controls")
.append("div")
.attr("class", "controls")
.style("height", 10)
var controlElem = controlElems
.selectAll("div")
.data(d3.entries(xsfdomain))
.style("height", 10)
.enter().append("div")
.attr("id", d => d.key )
.style("font", "5px century-gothic")
controlElem.append("label")
.text( d => d.key )
.style("font", "5px century-gothic")
.style("height", "5px")
.style("padding", "2px")
controlElem.append("input")
.attr("type", "range")
.attr("min", d => xsfdomain[d.key][0])
.attr("max", d => xsfdomain[d.key][2])
.style("height", 10)
.property("value", d => xsfdomain[d.key][0])
.style("font", "5px century-gothic")
.on("change", onChangedcontrol)
.on("input", onChangedcontrol);
controlElem.append("span")
.text(function(d) {
return format(xsfdomain[d.key][1]); })
.style("font", "5px century-gothic")
function onChangedcontrol(d) { // onchange
let k = d.key, v, formattedv
v = __mapper("scales").scales()[d.key].invert(this.value)
formattedv = v // / __mapper("config").controls.multiplier // _e_
let params = {}
params[k] = formattedv
d3.select(this.nextSibling).text(formattedv) // update scale value
__mapper("xsf")(params).render() // render form
__mapper({'fuel': fuelPlugin()}).fuel.clear() // clear fuel
if (__mapper("dots")) __mapper('dots')(__mapper('xsf').formparams()).render() // update dots
if (__mapper("consol")) __mapper().consol.render(__mapper('xsf').formparams())
}
var controlsPlugin = function controlsPlugin() {}
controlsPlugin.render = function(params) { }
return controlsPlugin
}
;
if (typeof require === "function") {
var d3 = require('d3.v4.js')
}
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3c = global.d3c || {})));
}(this, function (exports) { 'use strict';
/* ---------------------- */
/* register */
/* ---------------------- */
function register(payload = {}) {
var currentListeners = []
var nextListeners = currentListeners
var period = payload.period || 400 // time period in milliseconds
var fps = payload.fps || 60 // frames per second
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice()
}
}
function register() {}
register.start = function start() {
var started = false
var listeners = currentListeners = nextListeners
for (var i = 0; i < listeners.length; i++) {
listeners[i]()
}
return register
}
register.subscribe = function subscribe (listener) {
if (typeof listener !== 'function') {
throw new Error('Expected listener to be a function.')
}
var isSubscribed = true
ensureCanMutateNextListeners()
nextListeners.push(listener)
return function unsubscribe() {
if (!isSubscribed) {
return
}
isSubscribed = false
ensureCanMutateNextListeners()
var index = nextListeners.indexOf(listener)
nextListeners.splice(index, 1)
}
}
return register
}
/* --------------------- */
/* quad */
/* --------------------- */
function quad ( x0= 0, y0= 0, x1= 100, y1= 100) {
let extent = [
[x1 - 1 , y0 - 1],
[x1 + 1 , y1 + 1] ]
let bestcandie = function () {}
let candidates = 10
var quad = d3.quadtree() // quad
.extent(extent)
.x(function(d) {return d[0]})
.y(function(d) {return d[1]})
quad.diagonal = function(d, p) { // error: d is undefined
var v = p || 1
var s = d.source
var t = d.target
var rd = 1 + d3.randomNormal(0, v)() // v
var r = "M" + s.x + "," + s.y
+ "C" + (s.x + rd * ((t.x - s.x))) + "," + s.y
+ " " + (s.x + rd * ((t.x - s.x))) + "," + t.y
+ " " + t.x + "," + t.y;
return r
}
quad.findmanyothers = function(x, y, r=Infinity, thesemany = 1) {
var ret = []
let quadCopy = quad.copy()
let limit = Math.min(thesemany, quadCopy.data().length)
let found = 0
while (found < limit) {
let p = quadCopy.find(x, y, r)
if (p == null) {
break
} else {
let px = p.x
let py = p.y
let dist = (px - x) * (px - x) + (py - y) * (py- y)
if (dist > 1.e-6) {
ret.push(p)
++found
}
quadCopy.remove(p)
}
}
return ret
}
quad.findmany = function(x, y, r=Infinity, thesemany = 1) {
var ret = []
let quadCopy = quad.copy()
let limit = Math.min(thesemany, quadCopy.data().length)
for (let i = 0; i < limit; i++) {
let p = quadCopy.find(x, y, r)
quadCopy.remove(p)
ret.push(p)
}
return ret
}
quad.candysearch = function(r=Infinity, polygon = null) {
// seach best free spot in populated polygon
let fp = [x0 + Math.random() * (x1 - x0), Math.random() * (y1 - y0), 0] // first point
quad.add(fp)
let x, y = 0; // x,y is bestCandidate
let z2 = 0; // z2 is bestDistance
let p = null // p is point closest to candidate
let d2 = Infinity
for (let i = 0; i < candidates; ++i) {
let isin = true
let c = [x0 + Math.random() * (x1 - x0), y0 + Math.random() * (y1 - y0)]
if (polygon) {
isin = d3.polygonContains(polygon, c) // check relation with poly
}
if (isin) {
let q = quad.find(c[0], c[1], 1000) // closest inhabitant
let dx = q ? c[0] - q[0] : Infinity // x delta if p
let dy = q ? c[1] - q[1] : Infinity // y delta if p
let d2 = dx * dx + dy * dy // distance from candidate to closest
if (d2 > z2) p = c // set point to candidate
if (d2 > z2) z2 = d2 // raise separation target
}
}
if (p && d2 > r) quad.add(p) // add selected point
return p // return selected point
}
quad.bestcandie = function(_) {
return arguments.length ? (bestcandie = typeof _ === "function" ? _ : constant(!!_), quad) : bestcandie;
}
quad.candidates = function (_) { // kandidates
return (arguments.length) ? (candidates = _ ,quad) : candidates
}
quad.rds = function (_) { // radius
return (arguments.length) ? (rds = _ ,quad) : rds
}
return quad
}
/* ------------- */
/* layer */
/* ------------- */
function layer(payload) {
var width = 600
var height = 400
if ( d3.select('.Plugin-style-block').empty() ) {
d3.select('head').append('style').attr('class', 'Plugin-style-block')
.html('');
}
if (payload == null ) {
// d3.selectAll("svg").data([]).exit().remove()
var svgLayer = d3.select('body').selectAll("svg").data(['svg'])
.enter().append("svg")
.attr("class", "svg")
.attr("id", "svg")
.attr("width", function() {return (typeof width !== 'undefined') ? width : 600})
.attr("height", function() {return (typeof height !== 'undefined') ? height : 400})
.style("border", "1px solid lightgray")
return svgLayer
} else if (payload == 'image') {
if ( d3.select('.image').empty() ) {
var img = svg.selectAll("image").data([0])
.enter()
.insert("svg:image")
.attr("xlink:href", "./image.jpg")
.attr("x", "0")
.attr("y", "0")
.attr("width", function() {return (typeof width !== 'undefined') ? width : 600})
.attr("height", function() {return (typeof height !== 'undefined') ? height : 400})
return img
}
} else {
// d3c.layer({cls: 'svg:g.links', item: 'path.link:data/diagonal')
var dfn = function(d, i) {
return (d.id !== undefined) ? d.id :
(d.key !== undefined) ? d.key : i
}
// cls aggregate
let parent = (payload.parent !== undefined) ? payload.parent : 'svg'
let cls = payload.cls || 'layer'
let clsParts = cls.split(':') // parent:g.class
if (clsParts.length > 1) {
parent = clsParts[0] // get parent
let classPath = clsParts[1]
let clsSubParts =classPath.split('.') // parent:g.class
if (clsSubParts.length > 1) {
cls = clsSubParts[1] // get layer class
}
}
// item aggregate
var item = payload.item // needed
var subclass = payload.subclass || item
var itemParts = item.split('.')
var data = payload.data || []
if (itemParts.length > 1) {
item = itemParts[0]
subclass = itemParts[1]
var dataParts = subclass.split(':')
if (dataParts.length > 1) {
subclass = dataParts[0]
data = dataParts[1]
}
}
var idfn = payload.idfn || dfn
var layerMark = d3.select(parent).selectAll('.' + cls).data([cls])
var layerEnter = layerMark.enter().append("g").attr("class", cls)
var elemsUpdate = d3.select("." + cls).selectAll(item + '.' + subclass).data(data, idfn)
var elemsEnter = elemsUpdate.enter().append(item).attr("class", subclass)
var elemsMerge = elemsEnter.merge(elemsUpdate)
var elemsExit = elemsUpdate.exit() //.remove()
return {e: elemsEnter , u: elemsUpdate, x: elemsExit, m: elemsMerge}
}
}
/* ================================= */
/* movControls */
/* ================================= */
function mov (selection) {
console.log(selection)
function dragsubject() {
return this
}
function dragstarted(d) { // --------------- dragstarted
d3.select(this).raise().classed("active", true)
d.x0 = d3.event.x // set x position at begining of drag
d.y0 = d3.event.y // set x position at begining of drag
}
function dragged(d) { // --------------- dragged
d.dx = d3.event.x - d.x0 // set delta x of current drag
d.dy = d3.event.y - d.y0 // set delta y of current drag
var ddx = (d.ddx || 0) + (d.dx || 0 ) // set delta x of current drag
var ddy = (d.ddy || 0) + (d.dy || 0 ) // set delta y of current drag
d3.select(this)
.attr("transform", "translate(" + ddx + "," + ddy + ")")
}
function dragended(d) { // --------------- dragended
d.ddx = (d.ddx || 0) + d.dx // set accumulated x drag displacment
d.ddy = (d.ddy || 0) + d.dy // set accumulated y drag displacment
d.dx = 0 // reset last x drag displacment
d.dy = 0 // reset last y drag displacment
}
var drag = d3.drag()
drag
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended)
selection.call(drag)
return drag
}
/* ================================= */
/* drag Control */
/* ================================= */
function drag (selection) {
function dragsubject() {
return this
}
function dragstarted(d) {
d3.select(this).raise().classed("active", true)
}
function dragged(d) {
d3.select(this).attr("x", d.x = d3.event.x).attr("y", d.y = d3.event.y);
}
function dragended(d) {
}
var drag = d3.drag()
drag
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended)
selection.call(drag)
return drag
}
/* ================================= */
/* pos Control */
/* ================================= */
function pos (selection) { // selection
function prevent(e) {
}
function subject() {
return this
}
function started(d) {
}
function moved(d) {
function createPostipElem() {
var padLayer = d3.select('body').selectAll('g.refs').data(['refs']).enter().insert("g", "svg").attr("class", "refs")
var postipElem = d3.select("g.refs").selectAll("div.postip").data(['divMousePos']).enter().append("div").attr("class", "postip").call(drawPostipElem)
}
function drawPostipElem (postip) {
postip
.attr("viewBox", "0 0 10 10")
.style("top", "-5px")
.style("position", "absolute")
.style("padding", "10px")
.style("background", "rgba(255, 255, 255, .90)")
.style("border", "1px solid lightgray")
.style("pointer-events", "none")
.style("z-index", "100")
.style('border', '1px solid orange')
.style('color', 'grey')
.classed('postip-hidden', true)
.style("opacity", 0)
}
function textPadFn (a) {
var s = String("_______" + Math.floor(a.ox) + " : " + Math.floor(a.oy) + "_______")
return s
}
// https://github.com/1wheel/swoopy-drag/blob/master/lib/d3-jetpack.js
function displayTextPad(a) {
d3.select('.postip')
.classed('postip-hidden', false)
.style('opacity', 1)
.html('')
.selectAll('div')
.data([textPadFn]).enter()
.append('div')
.html(function(textPadFn) {
return (textPadFn(a))
})
}
function moveTextPad(node) {
var postip = d3.select('div.postip')
if (!postip.size()) return
var e = d3.event,
x = e.clientX,
y = e.clientY,
doctop = (window.scrollY)? window.scrollY : (document.documentElement && document.documentElement.scrollTop)? document.documentElement.scrollTop : document.body.scrollTop,
n = postip.node(),
nBB = n.getBoundingClientRect()
postip.style('top', (y+doctop-nBB.height-18)+"px");
postip.style('left', Math.min(Math.max(0, (x-nBB.width/2)), window.innerWidth - nBB.width)+"px");
prevent(e)
}
var datum = d, // d datum
node = this, // elem
parent = node.parentNode,
origin = d3.mouse(parent),
ox = origin[0],
oy = origin[1]
var action = {ox: ox, oy: oy}
createPostipElem()
displayTextPad(action)
moveTextPad(node)
}
function ended(d) {
var node = d3.select(this) // selection
var datum = node.datum() // datum
d3.select('div.postip')
.classed('postip-hidden', true)
.style('opacity', 0)
d3.selectAll('.postipped')
.classed('postipped', false)
}
function d3Control(selection) {
selection.on("mouseenter.pos", started)
selection.on("mousemove.pos", moved)
selection.on("mouseout.pos", ended)
}
selection.call(d3Control)
return d3Control
}
/* ================================= */
/* tip Control */
/* ================================= */
function tip (selection) {
function prevent(e) {
if(e.stopPropagation) e.stopPropagation();
if(e.preventDefault) e.preventDefault();
return false;
}
function createTooltip() {
var tooltipLayer = d3.select('body').selectAll('g.refs').data(['refs']).enter().insert("g", "svg").attr("class", "refs")
var toolTipElem = d3.select("g.refs").selectAll("div.tooltip").data(['divTooltip']).enter().append("div").attr("class", "tooltip").call(drawTooltipElem)
}
function drawTooltipElem (tooltip) {
tooltip
.attr("viewBox", "0 0 10 10")
.style("top", "-5px")
.style("position", "absolute")
.style("padding", "10px")
.style("background", "rgba(255, 255, 255, .90)")
.style("border", "1px solid lightgray")
.style("pointer-events", "none")
.style("z-index", "100")
.style('border', '1px solid red')
.style('color', 'grey')
.classed('tooltip-hidden', true)
.style("opacity", 0)
}
// ------------------------- diaplay action.datum
// https://github.com/1wheel/swoopy-drag/blob/master/lib/d3-jetpack.js
function displayTooltip(node) {
var d = node.datum()
if (d.hasOwnProperty('tip')) { // true
// console.log('_______________ has tip')
var fieldFns = d3.keys(d) // get text keys in datum
.filter(function(str){
var r = (str === 'tip')
return r
})
.map(function(str){
return function (d) { return str + ': ' + '<b>' + wordwrap(d[str].toString()) + '</b>' }})
} else {
var fieldFns = d3.keys(d) // get text keys in datum
.filter(function(str){
var r = (typeof d[str] != 'object') && (d[str] != 'array')
return r
})
.map(function(str){
return function (d) { return str + ': ' + '<b>' + textwrap(wordwrap(d[str].toString())) + '</b>' }})
}
var tooltip = d3.select('.tooltip')
.classed('tooltip-hidden', false)
.style('opacity', 1)
.html('')
.selectAll('div')
.data(fieldFns).enter()
.append('div')
.html(function(fieldFns) {
var r = fieldFns(d)
return r
})
}
// ------------------------- moveMoveTooltip
function moveMoveTooltip() {
var tooltip = d3.select('.tooltip')
if (!tooltip.size()) return
var e = d3.event,
x = e.clientX,
y = e.clientY,
doctop = (window.scrollY)? window.scrollY : (document.documentElement && document.documentElement.scrollTop)? document.documentElement.scrollTop : document.body.scrollTop,
n = tooltip.node(),
nBB = n.getBoundingClientRect()
tooltip.style('top', (y+doctop-nBB.height-18)+"px");
tooltip.style('left', Math.min(Math.max(0, (x-nBB.width/2)), window.innerWidth - nBB.width)+"px");
prevent(e)
}
function wordwrap (line, maxCharactersPerLine) {
var w = line.split(' '),
lines = [],
words = [],
maxChars = maxCharactersPerLine || 40,
l = 0;
w.forEach(function(d) {
if (l+d.length > maxChars) {
lines.push(words.join(' '));
words.length = 0;
l = 0;
}
l += d.length;
words.push(d);
});
if (words.length) {
lines.push(words.join(' '));
}
return lines.join('<br/>')
}
function textwrap (line, maxCharactersPerLine) {
var c = line.split(''),
lines = [],
chars = [],
maxChars = maxCharactersPerLine || 40,
l = 0;
c.forEach(function(d) {
if (l+d.length > maxChars) {
lines.push(chars.join(''));
chars.length = 0;
l = 0;
}
l += d.length;
chars.push(d);
});
if (chars.length) {
lines.push(chars.join(' '));
}
return lines.join('<br/>')
}
function started(d) {
// if datum().tiped !== false
var node = d3.select(this) // selection
var datum = node.datum() // datum
createTooltip(node)
displayTooltip(node)
moveMoveTooltip(node)
}
function moved(d) {
var node = d3.select(this) // selection
var datum = node.datum() // datum
createTooltip(node)
displayTooltip(node)
moveMoveTooltip(node)
}
function ended(d) {
var node = d3.select(this) // set selection
var datum = node.datum() // set datum
d3.select('.tooltip') // select tooltip ref
.classed('tooltip-hidden', true)
.style('opacity', 0)
d3.selectAll('.tooltipped')
.classed('tooltipped', false)
}
function d3Control(selection) {
selection.on("mouseenter.tip", started)
selection.on("mousemove.tip", moved)
selection.on("mouseout.tip", ended)
}
selection.call(d3Control)
return d3Control
}
exports.register = register
exports.layer = layer
exports.quad = quad
exports.drag = drag
exports.pos = pos
exports.mov = mov
exports.tip = tip
}));
/* -------------------------- */
/* dotsPlugin 8*/
/* -------------------------- */
var dotsPlugin = function dotsPlugin() {
var dots = [] // data root
dots[0] = {}
dots[0].params = {
layer: 'dots',
id: 'dot0',
rad: 10,
segs: 24,
}
dots[0].stroke = 'grey'
dots[0].fill = 'grey'
dots[0].dotidx = Math.round(24 * (0)) // dot pt in form
dots[0].xstartdrag = 0 //
dots[1] = {}
dots[1].params = {
layer: 'dots',
id: 'dot1',
rad: 10,
segs: 24,
}
dots[1].id = 'dot1'
dots[1].stroke = 'blue'
dots[1].fill = 'blue'
dots[1].dotidx = Math.round(24 * (0)) // dot pt in form
dots[1].xstartdrag = 0
var formparams = {}
var tfpoints = [] // form points
var cls = [] // dots class
function dotsPlugin(params) { // dotsPlugin
formparams = Object.assign({}, formparams, params, {"dots":0} )
tfpoints = xsfPlugin()(formparams).tfpoints() // form points
return dotsPlugin
}
dotsPlugin.render = function () { // render on formparmas
for (let i = 0; i < dots.length; i++) {
let tx = tfpoints[dots[i].dotidx][0] // xsf point x
let ty = tfpoints[dots[i].dotidx][1] // xsf point y
let dotparms = Object.assign(dots[i].params, {"tx":tx, "ty":ty})
let p = Object.assign({}, formparams, dotparms) // same as xsf but other tx, ty, rad, segs
dots[i].path = xsfPlugin()(p).fpath() // i mark path
}
cls = (formparams.layer || "layer") + "_" + (formparams.id || "id") + "_dots" // set class on form
var dotsLayerUpdate = d3.select('svg').selectAll("." + cls).data(['dots'])
var dotsLayerEnter = dotsLayerUpdate
.enter().append("g").attr("class", cls)
.merge(dotsLayerUpdate)
var dotElemsUpdate = dotsLayerEnter.selectAll('.dot').data(dots, d => d.params.id)
.attr("class", "dot")
.attr("d", d => d.path)
.style("stroke-width", "1.5px")
.style("stroke", d => {
return d.color})
.style("fill", d => d.fill)
.style("stroke", d => d.stroke)
.call(d3.drag()
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended))
var dotElemsEnter = dotElemsUpdate
.enter().append("path")
.attr("class", "dot")
.attr("d", d => d.path)
.style("stroke-width", "1.5px")
.style("stroke", d => d.color)
.style("fill", d => d.fill)
.style("stroke", d => d.stroke)
.call(d3.drag()
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended))
}
dotsPlugin.clear = function() { // clear .dot elems
var elemsUpdate = d3.select('svg').selectAll('.dot').data([])
elemsUpdate
.exit().remove()
}
dotsPlugin.clearAll = function() { // clear .dot elems
var elemsUpdate = d3.select('svg').selectAll('.dot').data([])
elemsUpdate
.exit().remove()
}
function dragstarted(d, i) {
this.parentNode.appendChild(this)
dots[i].xstartdrag = d3.event.x
dots[i].ystartdrag = d3.event.y
}
function dragged(d, i) {
let dx = d3.event.dx // x delta drag
let ddx = d3.event.x - dots[i].xstartdrag // x delta from drag start
let dy = d3.event.dy // y delta drag
let ddy = d3.event.y - dots[i].ystartdrag // y delta from drag start
var idx11 = (dots[i].dotidx + 1 ) % __mapper('xsf').formparams().segs // next robin on segs
var idx10 = (dots[i].dotidx ) % __mapper('xsf').formparams().segs // robin on segs
var xpt11 = __mapper('xsf')().x(idx11) // next mark point
var xpt10 = __mapper('xsf')().x(idx10) // mark point
var pttabs = Math.abs(xpt11 - xpt10) // delta on mark point
if (((xpt11 - xpt10) < 1.e-6) || (Math.sign(xpt11 - xpt10) === Math.sign(dx))
&& (pttabs <= Math.abs(ddx))) {
dots[i].dotidx = idx11 //
var p = Object.assign({}, __mapper('xsf')().formparams(), {"pta": dots[0].dotidx, "ptb": dots[1].dotidx})
__mapper({'xsf': xsfPlugin(p)}) // register xsf - sf
dotsPlugin.render()
}
}
function dragended(d, i) {
dots[i].xstartdrag = d3.event.x
}
return dotsPlugin
}
;
[
{"id":"pencil","m":3.27,"n1":4.12,"n2":10.9,"n3":2.93,"a":5.34,"b":14.1
,"tx":
{"tx":345,"ty":170,"m":20,"n1":25,"n2":2.85,"n3":2,"a":9,"b":6, "rad":160, "segs":256,"rot":0, "pta":0, "ptb":-1 }
,"ty":
{"tx":345,"ty":170,"m":8,"n1":0.9,"n2":0.1,"n3":100,"a":1,"b":1, "rad":160, "segs":256,"rot":0, "pta":0, "ptb":-1}
,"rot":0.20,"rad":40,"segs":365,"c":[50,55], "pta":0, "ptb":-1 },
]
/* -------------------------- */
/* framePlugin 8*/
/* -------------------------- */
var framePlugin = function framePlugin() {
var tx = __mapper().config.form.tx // get initial tx from window context
var ty = __mapper().config.form.ty // get initial ty from window context
var c = __mapper().config.form.circleform
var cp = {"segs": 350, "layer": "frame", "id": "circle", "fill": "transparent","stroke":"red"}
var cparams = Object.assign({}, c, cp)
var r = __mapper().config.form.rectform
var rp = {"segs": 350, "layer": "frame", "id": "rect", "fill": "transparent", "stroke":"green"}
var rparams = Object.assign({}, r, rp)
let rxsf = xsfPlugin().render(rparams)
let cxsf = xsfPlugin().render(cparams)
}
;
/* -------------------------- */
/* fuelPlugin 8*/
/* -------------------------- */
var fuelPlugin = function fuelPlugin() {
const fill = __mapper("config").fuel.fill
const tries = __mapper("config").fuel.tries
const radius = __mapper("config").fuel.radius
const candidates = __mapper("config").fuel.candidates
const margin = __mapper("config").fuel.margin
const nohitfill = __mapper("config").fuel.nohitfill
const nohitradius = __mapper("config").fuel.nohitradius
let formparams = {}
let parentclassCandies = "candies"
let parentclassNoncandies = "noncandies"
let cls = "candy"
let quad = d3c.quad() // = d3c.quad()
let polygon = []
let candies = []
let noncandies = []
let fueltimer = null
var fuelPlugin = function fuelPlugin (params) {
formparams = Object.assign({}, formparams, params, {"fuel":0, "dots":0} )
let xsf = xsfPlugin()(formparams)
var zone = [
formparams.tx - formparams.rad
, formparams.ty - formparams.rad
, formparams.tx + formparams.rad
, formparams.ty + formparams.rad
]
quad = d3c.quad(...zone)
polygon = xsf.tfpoints()
return fuelPlugin
}
var fueltimerfn = function fueltimerfn (elapsed) {
if (candies.length > tries) fueltimer.stop() // stop on tries limit
var candy = quad
.candidates(candidates)
.candysearch(margin, polygon)
if (!candy) fueltimer.stop() // stop if no new candidate
if (candy) candies.push(candy)
elemsUpdate = d3.select("." + parentclassCandies).selectAll(cls).data(candies)
elemsEnter = elemsUpdate.enter().append("circle")
elemsMerge = elemsEnter.merge(elemsUpdate)
.attr("class", cls)
.attr("cx", function (d) { return d[0] })
.attr("cy", function (d) { return d[1] })
.attr("r", function (d) { return radius })
.attr("fill", function (d) { return fill })
elemsExit = elemsUpdate.exit().remove()
elemsUpdate = d3.select("." + parentclassNoncandies).selectAll(cls).data(noncandies)
elemsEnter = elemsUpdate.enter().append("circle")
elemsMerge = elemsEnter.merge(elemsUpdate)
.attr("class", cls)
.attr("cx", function (d) { return d[0] })
.attr("cy", function (d) { return d[1] })
.attr("r", function (d) { return nohitradius })
.attr("fill", function (d) { return nohitfill })
elemsExit = elemsUpdate.exit().remove()
}
fuelPlugin.render = function() {
layerMark = d3.select("svg").selectAll("." + parentclassCandies).data(['cls'])
layerEnter = layerMark.enter().append("g").attr("class", parentclassCandies)
layerMark = d3.select("svg").selectAll("." + parentclassNoncandies).data(['cls'])
layerEnter = layerMark.enter().append("g").attr("class", parentclassNoncandies)
fueltimer = d3.timer(fueltimerfn, 0)
}
fuelPlugin.clear = function() {
quad.removeAll(quad.data())
candies = []
noncandies = []
if (fueltimer) fueltimer.stop()
let p = d3.select("." + parentclassCandies).selectAll("." + cls).remove()
let q = d3.select("." + parentclassNoncandies).selectAll("." + cls).remove()
}
return fuelPlugin
}
;
/* -------------------------- */
/* imagePlugin 8*/
/* -------------------------- */
var imagePlugin = function imagePlugin() {
var _svg = __mapper('svg').svg()
var imgs = _svg.selectAll("image").data([0])
imgs.enter()
.append("svg:image")
.attr("xlink:href", "./spacex.jpg")
.attr("x", "0")
.attr("y", "0")
.attr("width", "600")
.attr("height", "400")
function imagePlugin() { }
return imagePlugin
}
;
<!DOCTYPE html>
<meta charset="utf-8">
<title>d3animas</title>
<style>
#controls {
position: absolute;
width: 270px;
padding: 5px;
}
#controls span,
#controls label {
position: relative;
top: -5px;
padding: 5px;
display: inline-block;
width: 8px;
}
#controls .buttons {
width: 600px;
#controls .anims {
width: 600px;
}
</style>
<div id="controls"></div>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="config.js"></script>
<script src="consol.js"></script>
<script src="mapper.js"></script>
<script src="svglayer.js"></script>
<script src="xsf.js"></script>
<script src="controls.js"></script>
<script src="scales.js"></script>
<script src="buttons.js"></script>
<script src="anicons.js"></script>
<script src="animation.js"></script>
<script src="traces.js"></script>
<script src="frame.js"></script>
<script src="image.js"></script>
<script src="dots.js"></script>
<script src="index.js"></script>
/* -------------------------- */
/* app */
/* -------------------------- */
var __mapper = mapperPlugin() // mapper
__mapper({'config': config}) // config
__mapper({'svg': svglayerPlugin()}) // svg layer
__mapper({'tim': config.tim}) // timer - animation
__mapper({'scales': scalesPlugin()}) // scales
if (__mapper('config').controls.show)__mapper({'controls': controlsPlugin()}) // controls
if (__mapper('config').consol.show) __mapper({'consol': consolPlugin()}) // console
if (__mapper('config').buttons.show) __mapper({'buttons': buttonsPlugin()}) // buttons
if (__mapper('config').anicons.show) __mapper({'anicons': aniconsPlugin()}) // aniczons
if (__mapper('config').traces.show) __mapper({'traces': __mapper("config").traces}) // traces
__mapper({'xsf': xsfPlugin()})
__mapper({'animation': animationPlugin()}) // animation - animas, console
if (__mapper('config').frame.show) __mapper({'frame':framePlugin()}) // frame
if (__mapper('config').image.show) __mapper({'image':imagePlugin()}) // image
if ( __mapper('config').mode === 'anima' )
__mapper('animation').render( __mapper('config').animation.initanima)
if ( __mapper('config').mode === 'form' )
__mapper('xsf')(__mapper('config').form.initparams).render()
function tickFn(_elapsed) {
__mapper('animation').render( __mapper('config').animation.initanima)
}
if ( __mapper('config').mode === 'seq' )
for (let i = 0; i<5; i++) { d3.interval(tickFn, 1000) }
// d3c.pos(__mapper('svg').svg())
;
MIT License
Copyright (c) 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/* -------------------------- */
/* mapperPlugin */
/* -------------------------- */
var mapperPlugin = function mapperPlugin() {
var state = {} //
// var mapperPlugin = function mapperPlugin() {}
var mapperPlugin = function mapperPlugin(_) {
if (arguments.length < 1) {
return state
}
if (typeof _ === 'object') {
state = Object.assign({}, state, _)
return state
}
if (typeof _ === 'string') {
if (state[_] !== undefined) {
return state[_]
}
}
}
return mapperPlugin
}
[
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon11",
"m1": 5, "m2": 5, "n1": 1000, "n2": 600, "n3": 600, "a": 1, "b": 1,
"tx":[100,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon12",
"m1":5,"m2":5,"n1":331,"n2":585,"n3":585,"a":1,"b":1,
"tx":[225,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon13",
"m1":5,"m2":5,"n1":144,"n2":585,"n3":585,"a":1,"b":1,
"tx":[350,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon14",
"m1":-144,"m2":134,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":[475,310],"ty":[100,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon21",
"m1":5,"m2":5,"n1":9,"n2":7,"n3":7,"a":1,"b":1,
"tx":[100,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon22",
"m1":5,"m2":5,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":[225,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1000
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon23",
"m1":5,"m2":5,"n1":1000,"n2":8,"n3":600,"a":1,"b":1,
"tx":[350,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":144,
},
{
"tt":{"td":18000,"t0":0,"t1":300, "t2":1, "t3":1},
"id":"pentagon24",
"m1":5,"m2":5,"n1":42,"n2":600,"n3":600,"a":1,"b":1,
"tx":[475,310],"ty":[300,200],
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon11",
"m1": 5, "m2": 5, "n1": 1000, "n2": 600, "n3": 600, "a": 1, "b": 1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[60,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[100,999, 0, 100],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon12",
"m1":5,"m2":5,"n1":331,"n2":585,"n3":585,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[80,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[200,999, 0, 200],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon13",
"m1":5,"m2":5,"n1":144,"n2":585,"n3":585,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[100,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[300,999, 0, 300],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon14",
"m1":-144,"m2":134,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[40,80],
"dots":0,"fuel":0,
"hc":0,
"cf":[1,999],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon21",
"m1":5,"m2":5,"n1":9,"n2":7,"n3":7,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[120,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[400,999, 0, 400],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon22",
"m1":5,"m2":5,"n1":1000,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[140,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[500,999, 0, 500],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1000,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon23",
"m1":5,"m2":5,"n1":1000,"n2":8,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[160,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[600,999, 0, 600],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":144,
},
{
"tt":{"td":18000,"t0":300,"t1":1000, "t2":1, "t3":10},
"id":"pentagon24",
"m1":5,"m2":5,"n1":42,"n2":600,"n3":600,"a":1,"b":1,
"tx":310,"ty":200,
"rot": [0,360],
"segs":360,
"rad":[180,280, 40],
"dots":0,"fuel":0,
"hc":0,
"cf":[700,999, 0, 600],"cs":[400,500],"cw":1,
"pta":0,"ptb":-1,
"v0":0,"v1":1,
},
]
/* -------------------------- */
/* scalesPlugin 8*/
/* -------------------------- */
var scalesPlugin = function scalesPlugin() {
var multiplier = 1000
var xsfdomain = {
"m1": [-1000, 4, 1000],
"m2": [-1000, 4, 1000],
"n1": [-1000, 2, 1000],
"n2": [-1000, 2, 1000],
"n3": [-1000, 2, 1000],
"a": [-1000, 1,1000],
"b": [-1000, 1, 1000],
"v0": [-1, 0, 1],
"v1": [-1000, 0, 1000],
"tx": [-10, 40, 90],
"ty": [-10, 30, 60] ,
"rot": [0, 90, 360],
"rad": [24, 128, 512],
"segs": [24,360,720] ,
"pta": [0,20,512],
"ptb": [0,20,512],
"cf": [0, 500, 1000]}
var xsfrange = {
"m1": [-1000, 4, 1000],
"m2": [-1000, 4, 1000],
"n1": [-1000, 2, 1000],
"n2": [-1000, 2, 1000],
"n3": [-1000, 2, 1000],
"a": [-1000, 1,1000],
"b": [-1000, 1, 1000],
"v0": [-1,0,1],
"v1": [-1000,0,1000],
"tx": [-10,40,90],
"ty": [-10,30,60] ,
"rot": [0, 90, 360],
"rad": [24, 128, 512],
"segs": [24,360,720] ,
"pta": [0,80,1000],
"ptb": [0,80,1000],
"cf": [0,500, 1000]
}
var params = {}
var scales = {}
var format = d3.format(".4n")
for (let k in xsfdomain) { //set scales
scales[k] = d3.scaleLinear()
.domain([xsfdomain[k][0], xsfdomain[k][1], xsfdomain[k][2]])
.range([xsfrange[k][0], xsfrange[k][1], xsfrange[k][2]])
}
__mapper({'scales': scales}) // update scales
var scalesPlugin = function scalesPlugin() {}
scalesPlugin.render = function(params) {
for (var p in params) { // m in { ... }
let k = p, v = params[p] // k:m, v:12
if ((k !== null) && (scales[k] !== undefined)) {
let control = d3.select("#" + k)
control.select("input").property("value", scales[k](v));
control.select("span").text(format(v));
}
}
}
scalesPlugin.scales = function() {
return scales
}
scalesPlugin.xsfdomain = function() {
return xsfdomain
}
scalesPlugin.xsfrange = function() {
return xsfrange
}
return scalesPlugin
}
;
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment