metafizzy / metafizzy/zdog

how animate a shape with a path

Open
#109 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.7k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

I draw a line with Shape, I want to change it with the time, how do I do?

I've try:

`
let s=new Zdog.Shape({
addTo: illo,
path: [ // triangle
{ x: 0, y: -40 },
{ x: 40, y: 40 },
{ x: -40, y: 40 },
],
closed: false, // unclosed
stroke: 20,
color: '#636'
});
s.path= [ // triangle
{ x: 0, y: -90 },
{ x: 10, y: 40 },
{ x: -40, y: 40 },
]`

but it seems that the new value of path is not updated :(

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Zdog.Shape handles the path property and how the illo is updated or rendered after the shape is created. Reproduce the reported reassignment with the supplied triangle example and determine what behavior should confirm that the path change is applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.