You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-5Lines changed: 33 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,9 +63,37 @@ mix task.
63
63
64
64
## Upgrading to v0.10
65
65
66
-
Version 0.10 of Scenic contains breaking changes, which will need to be updated in your app in order to run. This is all good through as it enables goodness in the forms of proper font metrics and dynamic raw pixel textures.
67
-
68
-
### Changes to the Cache
66
+
Version 0.10 of Scenic contains both deprecations and breaking changes, which will need to be updated in your app in order to run. This is all good through as it enables goodness in the forms of proper font metrics and dynamic raw pixel textures.
67
+
68
+
### Deprecations
69
+
70
+
*`push_graph/1` is deprecated in favor of returning `{:push, graph}`
from the `Scenic.Scene` callbacks. Since this is only a deprecation `push_graph/1` will
73
+
continue to work, but will log a warning when used. `push_graph/1` will be removed in a
74
+
future release.
75
+
* This allows us to utilize the full suite of OTP GenServer callback behaviors (such as
76
+
timeout and `handle_continue`)
77
+
* Replacing the call of `push_graph(graph)` within a callback function depends slightly
78
+
on the context in which it is used.
79
+
* in `init/2`:
80
+
*`{:ok, state, [push: graph]}`
81
+
* in `filter_event/3`:
82
+
*`{:halt, state, [push: graph]}`
83
+
*`{:cont, event, state, [push: graph]}`
84
+
* in `handle_cast/2`:
85
+
*`{:noreply, state, [push: graph]}`
86
+
* in `handle_info/2`:
87
+
*`{:noreply, state, [push: graph]}`
88
+
* in `handle_call/3`:
89
+
*`{:reply, reply, state, [push: graph]}`
90
+
*`{:noreply, state, [push: graph]}`
91
+
* in `handle_continue/3`:
92
+
*`{:noreply, state, [push: graph]}`
93
+
94
+
### Breaking Changes
95
+
96
+
##### Changes to the Cache
69
97
70
98
The most important (and immediate) change you need to deal with is to the cache. In order to handle static items with different life-cycle requirements, the cache has been broken out into multiple smaller caches, each for a specific type of content.
71
99
@@ -78,13 +106,13 @@ The module `Scenic.Cache` is gone and should be replace with the appropriate cac
78
106
| Font Metrics |`Scenic.Cache.Static.FontMetrics`|
Note that caches are marked as either static or dynamic. Things that do not change and can be referred to by a hash of their content go into Static caches. This allows for future optimizations, such as caching these assets on a CDN.
84
112
85
113
The Dynamic.Texture cache is for images that change over time. For example, this could be an image coming off of a camera, or something that you generate directly in your own code. Note that Dynamic caches are more expensive overall as they will not get the same level of optimization in the future.
86
114
87
-
### Custom Fonts
115
+
#####Custom Fonts
88
116
89
117
If you have used custom fonts in your application, you need to use a new process to get them to load and render.
0 commit comments