2022-09-09 12:13:52 -05:00
|
|
|
import { name, version } from '../data.mjs'
|
2018-12-22 13:48:19 +01:00
|
|
|
|
2022-08-28 13:44:51 +02:00
|
|
|
export const plugin = {
|
|
|
|
name,
|
|
|
|
version,
|
2018-12-22 13:48:19 +01:00
|
|
|
macros: {
|
2021-01-31 09:22:15 +01:00
|
|
|
sprinkle: function (so) {
|
2022-01-18 14:57:14 +01:00
|
|
|
for (let pid of so.on) {
|
2019-08-03 15:03:33 +02:00
|
|
|
this.snippets[pid + '-' + so.snippet] = new this.Snippet(so.snippet, this.points[pid])
|
2022-01-18 14:57:14 +01:00
|
|
|
if (so.scale) this.snippets[pid + '-' + so.snippet].attr('data-scale', so.scale)
|
|
|
|
if (so.rotate) this.snippets[pid + '-' + so.snippet].attr('data-rotate', so.rotate)
|
|
|
|
}
|
2022-01-19 16:23:40 +01:00
|
|
|
},
|
|
|
|
},
|
2019-08-03 15:03:33 +02:00
|
|
|
}
|
2022-08-28 13:44:51 +02:00
|
|
|
|
|
|
|
// More specifically named exports
|
|
|
|
export const sprinklePlugin = plugin
|
|
|
|
export const pluginSprinkle = plugin
|