{"id":18406838,"url":"https://github.com/wildpeaks/proto-monospacetext","last_synced_at":"2026-01-23T00:55:56.882Z","repository":{"id":140338979,"uuid":"112219300","full_name":"wildpeaks/proto-monospacetext","owner":"wildpeaks","description":"PROTO MonospaceText","archived":false,"fork":false,"pushed_at":"2017-11-29T18:05:36.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T20:53:43.756Z","etag":null,"topics":["vrml"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wildpeaks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T16:18:37.000Z","updated_at":"2017-11-28T11:31:16.000Z","dependencies_parsed_at":"2023-04-11T09:02:09.509Z","dependency_job_id":null,"html_url":"https://github.com/wildpeaks/proto-monospacetext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildpeaks%2Fproto-monospacetext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildpeaks%2Fproto-monospacetext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildpeaks%2Fproto-monospacetext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildpeaks%2Fproto-monospacetext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wildpeaks","download_url":"https://codeload.github.com/wildpeaks/proto-monospacetext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631724,"owners_count":21136560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vrml"],"created_at":"2024-11-06T03:11:02.976Z","updated_at":"2026-01-23T00:55:56.876Z","avatar_url":"https://github.com/wildpeaks.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MonospaceText\n\nVRML PROTO (based on `Transform`) that **displays a monospace text** using monospace font `Consolas`.\n\nIt can optionally **automatically crop the text to fit** constraints (characters per line,\nnumber of lines, width, height), using an ellipsis to indicate when content has been cropped.\n\nIt also **provides the bounding box of the resulting text**, so you can do things like adding\na border around the text, a background, or using the text like a tooltip that should\nbe placed one side or the other depending on the space available.\n\nIt can also **align text horizontally \u0026 vertically**.\n\nAlso, the font **size, bold, and italic can be modified** at runtime (therefore also animatable), unlike `FontStyle.size` and `FontStyle.style`.\n\n\tEXTERNPROTO MonospaceText [\n\t\texposedField  SFNode    appearance\n\t\texposedField  MFString  string\n\t\texposedField  SFString  align\n\t\texposedField  SFString  valign\n\t\texposedField  SFFloat   fontSize\n\t\texposedField  SFBool    bold\n\t\texposedField  SFBool    italic\n\t\texposedField  SFInt32   maxChars\n\t\texposedField  SFInt32   maxLines\n\t\texposedField  SFFloat   maxWidth\n\t\texposedField  SFFloat   maxHeight\n\t\teventOut      SFVec2f   bboxCenter\n\t\teventOut      SFVec2f   bboxSize\n\t] \"proto.MonospaceText.wrl#MonospaceText\"\n\n\n-------------------------------------------------------------------------------\n\n## Property `appearance`\n\n**Appearance** (material, texture, shaders) of the text, like `Shape.appearance`.\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFNode`\n - Default Value: `Appearance{material Material{emissiveColor 1 1 1 diffuseColor 0 0 0}}`\n\n\n-------------------------------------------------------------------------------\n\n## Property `string`\n\n**Text lines** to display (like `Text.string`).\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `MFString`\n - Default Value: `[]`\n\n\n-------------------------------------------------------------------------------\n\n## Property `align`\n\n**Horizontal alignment** (`left`, `center`, or `right`).\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFString`\n - Default Value: `\"left\"`\n\n\n-------------------------------------------------------------------------------\n\n## Property `valign`\n\n**Vertical alignment** (`top`, `center`, or `bottom`).\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFString`\n - Default Value: `\"top\"`\n\n\n-------------------------------------------------------------------------------\n\n## Property `fontSize`\n\n**Size of the text** (in VRML units), like `FontStyle.size`.\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFFloat`\n - Default Value: `1`\n\n\n-------------------------------------------------------------------------------\n\n## Property `bold`\n\nSpecifies if the font should be **bold** (`TRUE`) or not (`FALSE`), like `\"BOLD\"` in `FontStyle.style`.\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFBool`\n - Default Value: `FALSE`\n\n\n-------------------------------------------------------------------------------\n\n## Property `italic`\n\nSpecifies if the font should be ***italic*** (`TRUE`) or not (`FALSE`), like `\"ITALIC\"` in `FontStyle.style`.\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFBool`\n - Default Value: `FALSE`\n\n\n-------------------------------------------------------------------------------\n\n## Property `maxChars`\n\n**Maximum number of characters per line** (`-1` means \"no limit\").\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFInt32`\n - Default Value: `-1`\n\nNote that it *doesn't wordwrap*, merely adds ellipsis if it's too long.\n\n\n-------------------------------------------------------------------------------\n\n## Property `maxLines`\n\n**Maximum number of lines** (`-1` means \"no limit\").\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFInt32`\n - Default Value: `-1`\n\n\n-------------------------------------------------------------------------------\n\n## Property `maxWidth`\n\n**Maximum width** in VRML units (`-1` means \"no limit\").\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFFloat`\n - Default Value: `-1`\n\n\n-------------------------------------------------------------------------------\n\n## Property `maxHeight`\n\n**Maximum height** in VRML units (`-1` means \"no limit\").\n\nDefinition:\n - Field Type: `exposedField`\n - Data Type: `SFFloat`\n - Default Value: `-1`\n\n\n-------------------------------------------------------------------------------\n\n## Event `bboxCenter`\n\n2D position in VRML units of the **center of the bounding box** of displayed text.\n\nNote: this is *not the same as the anchor* (local position `[0, 0]`) which also depends on the alignment.\n\nDefinition:\n - Field Type: `eventOut`\n - Data Type: `SFVec2f`\n\n\n-------------------------------------------------------------------------------\n\n## Event `bboxSize`\n\n**Size (width, height)** in VRML units of the displayed text.\n\nDefinition:\n - Field Type: `eventOut`\n - Data Type: `SFVec2f`\n\nFor example, with alignment top-left, the bounding box is:\n - top: `0`\n - left: `0`\n - right: `size.x`\n - bottom: `-size.y`\n\nWith aligment top-right instead, the bounding box is:\n - top: `0`\n - left: `-size.x`\n - right: `0`\n - bottom: `-size.y`\n\n\n-------------------------------------------------------------------------------\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildpeaks%2Fproto-monospacetext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildpeaks%2Fproto-monospacetext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildpeaks%2Fproto-monospacetext/lists"}