route-graphics 1.28.1 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -1
- package/dist/RouteGraphics.js +136 -136
- package/package.json +1 -1
- package/src/cli/renderConfig.js +15 -9
package/README.md
CHANGED
|
@@ -98,6 +98,31 @@ WebGPU device loss emits `rendererContextLost`; because a lost WebGPU device is
|
|
|
98
98
|
not restorable, consumers must recreate the Route Graphics instance rather than
|
|
99
99
|
wait for `rendererContextRestored`.
|
|
100
100
|
|
|
101
|
+
### Semantic bounds hit testing
|
|
102
|
+
|
|
103
|
+
`hitTestElementBounds({ x, y })` accepts renderer-space coordinates and returns
|
|
104
|
+
all hit branches from front to back. Each branch contains a root-to-deepest
|
|
105
|
+
`path`; every path entry includes the semantic element `id`, `type`, and live
|
|
106
|
+
world-space bounds. `bounds.corners` preserves rotation and
|
|
107
|
+
`x`/`y`/`width`/`height` is the enclosing axis-aligned rectangle. Container
|
|
108
|
+
scroll offsets and viewport clipping are applied, while opacity and transparent
|
|
109
|
+
pixels do not create click-through holes.
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
const hits = app.hitTestElementBounds({ x: pointerX, y: pointerY });
|
|
113
|
+
const frontmostPath = hits[0]?.path ?? [];
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Route Graphics deliberately returns rendered semantic identities rather than
|
|
117
|
+
editor document identities, and it does not apply consumer-specific filtering.
|
|
118
|
+
Consumers remain responsible for mapping each render occurrence to an authored
|
|
119
|
+
selection owner and ignoring any renderer elements they do not want to select.
|
|
120
|
+
|
|
121
|
+
Bounds queries are observational. They do not alter or suppress existing
|
|
122
|
+
hover, click, drag, keyboard, input, slider, or scroll behavior. A consumer can
|
|
123
|
+
therefore observe a pointer gesture for selection while Route Graphics
|
|
124
|
+
continues processing the same authored interaction.
|
|
125
|
+
|
|
101
126
|
For complete usage details, go to:
|
|
102
127
|
|
|
103
128
|
- [Getting Started](http://route-graphics.routevn.com/docs/introduction/getting-started/)
|
|
@@ -180,6 +205,9 @@ assets:
|
|
|
180
205
|
uiFont:
|
|
181
206
|
path: ./assets/fonts/NotoSans-Regular.ttf
|
|
182
207
|
type: font/ttf
|
|
208
|
+
fallbackFont:
|
|
209
|
+
path: ./assets/fonts/Fallback-Regular.ttf
|
|
210
|
+
type: font/ttf
|
|
183
211
|
elements:
|
|
184
212
|
- id: title
|
|
185
213
|
type: text
|
|
@@ -189,7 +217,7 @@ elements:
|
|
|
189
217
|
textStyle:
|
|
190
218
|
fill: "#ffffff"
|
|
191
219
|
fontSize: 42
|
|
192
|
-
fontFamily: uiFont
|
|
220
|
+
fontFamily: [uiFont, fallbackFont]
|
|
193
221
|
- id: avatar
|
|
194
222
|
type: sprite
|
|
195
223
|
x: 60
|