(ctx: &mut ScriptContext<'_, API>)
| 2484 | ]; |
| 2485 | ctx.res.Draw2D().polygon(points.clone(), fill, 1.0); |
| 2486 | ctx.res |
| 2487 | .Draw2D() |
| 2488 | .polyline(vec![points[0], points[1], points[2], points[0]], line, 2.0); |
| 2489 | for point in points { |
| 2490 | ctx.res.Draw2D().circle(point, 4.0, [0.84, 1.0, 1.0, 1.0]); |
| 2491 | } |
| 2492 | } |
| 2493 | } |
| 2494 | } |
| 2495 | |
| 2496 | pub fn attach_preview_to_viewport<API: ScriptAPI + ?Sized>( |
| 2497 | ctx: &mut ScriptContext<'_, API>, |
| 2498 | root: NodeID, |
| 2499 | ) -> bool { |
| 2500 | let Some(panel) = find_named(ctx, "viewport_panel") else { |
no test coverage detected