Automated: create new component page |
add more info |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|Name=Blit To Display | |Name=Blit To Display | ||
}} | }} | ||
BlitToDisplay is a component that is able to make a user's game window display a 2d texture of any kind (including render textures) and is also able to create new game windows to display images as well. | |||
This component takes no regard for permissions at the time of writing. This component generates new windows without confirmation. New windows generated are created on new monitors or the main monitor, and are made to fit the screen. | |||
Combining this with [[Component:DisplayInfo]] allows for getting the size of the user's screen, which can be used to adjust the texture displayed by this component to better fit the generated window. | |||
== Usage == | == Usage == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|TargetUser|{{RootFieldType|UserRef}}|TypeAdv0=true| | |TargetUser|{{RootFieldType|UserRef}}|TypeAdv0=true| The user to display the image on their screen for. Using the local user does work. | ||
|Texture|{{RootFieldType|AssetRef`1|[[Type: | |Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv1=true| The texture to display to the screen. A render texture may be used here. | ||
|DisplayIndex|Int| | |DisplayIndex|Int| which game window to display <code>Texture</code> to. If the window number doesn't exist, one is created automatically. If 0 is used, the main game window will be used. | ||
|BackgroundColor|ColorX| | |BackgroundColor|ColorX| The color to display behind the image. | ||
|FlipHorizontally|Bool| | |FlipHorizontally|Bool| flip the image horizontally before displaying to the screen. | ||
|FlipVertically|Bool| | |FlipVertically|Bool| flip the image vertically before displaying to the screen. | ||
}} | }} | ||
== Behavior == | == Behavior == | ||
Disabling this component does not disable its effects. Setting <code>TargetUser</code> to null does though. New windows created by this component will close the game if closed. It is unknown if this is a bug. This component can and will blind desktop users if <code>DisplayIndex</code> is set to 0 and <code>TargetUser</code> targets a desktop user. | |||
== Examples == | == Examples == | ||
[[User:989onan|989onan's]] MMD player uses this to display the animated camera for the dances to the main screen. | |||
== See Also == | == See Also == | ||
Line 23: | Line 29: | ||
[[Category:Components:Rendering{{#translation:}}|Blit To Display]] | [[Category:Components:Rendering{{#translation:}}|Blit To Display]] | ||
[[Category:Components{{#translation:}}|Blit To Display]] | [[Category:Components{{#translation:}}|Blit To Display]] | ||
Latest revision as of 17:10, 19 November 2024
BlitToDisplay is a component that is able to make a user's game window display a 2d texture of any kind (including render textures) and is also able to create new game windows to display images as well.
This component takes no regard for permissions at the time of writing. This component generates new windows without confirmation. New windows generated are created on new monitors or the main monitor, and are made to fit the screen.
Combining this with Component:DisplayInfo allows for getting the size of the user's screen, which can be used to adjust the texture displayed by this component to better fit the generated window.
Usage
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
TargetUser
|
direct UserRef | The user to display the image on their screen for. Using the local user does work. |
Texture
|
ITexture2D | The texture to display to the screen. A render texture may be used here. |
DisplayIndex
|
Int | which game window to display Texture to. If the window number doesn't exist, one is created automatically. If 0 is used, the main game window will be used.
|
BackgroundColor
|
ColorX | The color to display behind the image. |
FlipHorizontally
|
Bool | flip the image horizontally before displaying to the screen. |
FlipVertically
|
Bool | flip the image vertically before displaying to the screen. |
Behavior
Disabling this component does not disable its effects. Setting TargetUser
to null does though. New windows created by this component will close the game if closed. It is unknown if this is a bug. This component can and will blind desktop users if DisplayIndex
is set to 0 and TargetUser
targets a desktop user.
Examples
989onan's MMD player uses this to display the animated camera for the dances to the main screen.