pub struct TextPanel {
pub content: String,
pub size: f32,
pub color: [f32; 3],
pub background: [f32; 3],
pub links: Vec<TextLink>,
}Expand description
Readable text a browser typesets onto a placement’s surface (a quad
prefab is the natural carrier). The browser owns fonts and layout — the
world ships only the words, exactly like the old web shipping text and
letting the browser render it.
Fields§
§content: String§size: f32Approximate line height as a fraction of panel height (default 0.09 — about ten lines to a panel).
color: [f32; 3]Foreground RGB (default near-black ink).
background: [f32; 3]Background RGB (default warm parchment).
links: Vec<TextLink>Hyperlinks inside the text — the Thread’s <a> tag. Each link
names a phrase of content and the Locator it leads to; browsers
render the phrase as a link (colored, underlined) and interacting with
the panel follows it — text you can walk through, exactly like the old
web’s anchor.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextPanel
impl<'de> Deserialize<'de> for TextPanel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TextPanel
Auto Trait Implementations§
impl Freeze for TextPanel
impl RefUnwindSafe for TextPanel
impl Send for TextPanel
impl Sync for TextPanel
impl Unpin for TextPanel
impl UnsafeUnpin for TextPanel
impl UnwindSafe for TextPanel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more