Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Type: Difference between revisions

Template page
m add vector/matrix support
m pass name through
Line 25: Line 25:
  | Vector2
  | Vector2
  | Vector3
  | Vector3
  | Vector4 = {{type/vector|{{{1}}}|mod={{{2|{{{mod|}}}}}}}}
  | Vector4 = {{type/vector|{{{1}}}|name=Vector|mod={{{2|{{{mod|}}}}}}}}
  | Matrices
  | Matrices
  | matrices
  | matrices
  | Matrix2
  | Matrix2
  | Matrix3
  | Matrix3
  | Matrix4 = {{type/vector|{{{1}}}|mod={{{2|{{{mod|}}}}}}}}
  | Matrix4 = {{type/vector|{{{1}}}|name=Matrix|mod={{{2|{{{mod|}}}}}}}}
  | {{type/custom|{{{1}}}|mod={{{2|{{{mod|}}}}}}}}
  | {{type/custom|{{{1}}}|mod={{{2|{{{mod|}}}}}}}}
   }}
   }}

Revision as of 18:00, 27 September 2024

Displays a type widget.

Stylesheet: Template:Type/style.css (edit to add colors and decorations for custom types)

Examples

  • Template:Type/builtin {{type|nil}}
  • Template:Type/builtin
  • Template:Type/builtin (optional number)
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/vector (Template:Type/vector, Template:Type/vector, Template:Type/vector)
  • Template:Type/vector (Template:Type/vector, Template:Type/vector, Template:Type/vector)
  • Template:Type/custom (custom type that exists)
  • Template:Type/custom (custom type that doesn't exist)
  • Template:Type/link (links to the Main Page) {{type|Main Page|link=Main Page}}

Testcases page.

Displays and links to types.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type name1

no description

Suggested values
nil boolean integer number string function table
Unknownrequired
Type modifiersmod 2

Modifiers to the type, like array / optional

Suggested values
[] ? []?
Contentoptional
Custom link targetlink 3

no description

Page nameoptional
Contents