sparkles: Added snippet.attr and snippet.clone examples
This commit is contained in:
parent
0ded78b854
commit
aee747037f
5 changed files with 35 additions and 1 deletions
12
packages/examples/src/snippet_attr.js
Normal file
12
packages/examples/src/snippet_attr.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { box } from "./shared";
|
||||
|
||||
export default part => {
|
||||
let { Point, points, Snippet, snippets } = part.shorthand();
|
||||
|
||||
points.anchor = new Point(50, 15);
|
||||
snippets.demo = new Snippet("logo", points.anchor)
|
||||
.attr("data-scale", 0.8)
|
||||
.attr("data-rotate", 180);
|
||||
|
||||
return box(part);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue