Skip to content

Commit 5d33a0a

Browse files
committed
Update script docs
Make some of the wording more technical sounding, also add a link to the push_graph function and fix a few typos.
1 parent db4d76d commit 5d33a0a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/scenic/script.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ defmodule Scenic.Script do
1919
2020
Simply put, Scenic.Script produces a list of static drawing commands that are
2121
sent, unmodified, to the drivers through the ViewPort. These scripts are
22-
generated for you when you use push_graph, or you can create them yourself
23-
by using this api.
22+
generated for you when you use `Scenic.Scene.push_graph/3`, or you can create
23+
them yourself by using this api.
2424
2525
If you use Scenic.Script directly, you can create more complicated and/or
2626
reusable graphics than you could by using Graphs alone.
@@ -31,17 +31,17 @@ defmodule Scenic.Script do
3131
that which changes frequently. When a graph is pushed to the ViewPort, the
3232
entire thing is compiled into a script, which is sent as a whole to the Drivers.
3333
34-
If that graph references a script tho, only the reference is sent, not the contents
35-
of the script. This means you can modify the graph frequently without sending
36-
the contents of the scripts.
34+
However if that graph references a script, only the reference to the script is
35+
sent, not the contents of the script. This means you can modify the graph
36+
frequently without sending the contents of the scripts.
3737
3838
The opposite is also true. You can generate and push the scripts frequently
3939
without causing the graphs that reference them to be recompiled or resent.
4040
41-
And example of this might be a graph that implements a chart of some sort.
42-
43-
The contents of the chart could be a script that is updated as new data comes
44-
in without needed all the chrome around it to be recompiled or sent.
41+
An example of this might be a graph that implements a chart of some sort. The
42+
contents of the chart could be a script that is updated as new data comes in
43+
without needing all the chrome around it to be recompiled or sent for every
44+
update.
4545
4646
## API Patterns
4747

0 commit comments

Comments
 (0)