Verified Commit a5fb3735 authored by JohnMH's avatar JohnMH

Document BasePart and Color3Value, rewrite Camera and ContentProvider

parent c238b0b9
---
title: "BasePart"
superclass: "PVInstance"
---
This class is the base class of all physical parts in OpenBlox.
## Properties
{{% property bool Anchored %}}
The value of this property determines whether or not the object is affected by physics.
{{% property Color3 Color %}}
The value of this property determines the color used when rendering an object of this class.
{{% property bool CanCollide %}}
The value of this property determines whether or not objects of this class will collide with others.
{{% property double Transparency %}}
The value of this property determines the transparency of the rendered object.
{{% property Vector3 Position %}}
The value of this property determines the position of the object in 3D space.
{{% property Vector3 Rotation %}}
The value of this property determines the rotation of the object on each axis in degrees.
......@@ -5,8 +5,8 @@ superclass: "Instance"
The Camera class contains information about the viewpoint from which the scene will be rendered.
## Properties
## Methods
{{% property Viewport Viewport %}}
{{% method bool SaveScreenshot "string file" %}}
The value of this property determines where this camera's view will be rendered on the screen.
This method creates a screenshot of the current scene and saves it to the file specified.
---
title: "Color3Value"
superclass: "Instance"
---
The Color3Value class provides away for developers to use Color3 values within the DataModel.
## Properties
{{% property Color3 Value %}}
This property holds a Color3 value that can be accessed or changed by other scripts. The default value is equivalent to a new Color3 with an r, g and b value of 0.
......@@ -3,18 +3,32 @@ title: "ContentProvider"
superclass: "Instance"
---
The ContentProvider class allows developers to preload, get, and overwrite content that will be loaded later on. This can be a very powerful class, if used correctly.
The ContentProvider class provides scripts access to internal information about assets loaded and grants the ability to load assets from scripts.
## Properties
{{% property int RequestQueueSize %}}
The value of this property is equivalent to the number of asset requests enqueued. It cannot be changed.
## Methods
{{% method string GetContent "string url" %}}
{{% method string GetAsset "string url" %}}
This method loads content from the location given as {{%var%}}url{{%/var%}}. The {{%var%}}url{{%/var%}} argument can be any string, but if you haven't mapped content with [PutContent](#PutContent), only protocols supported by cURL will be loaded, with the exception of the `file://` protocol or OpenBlox's own `res://` protocol, which reads from the project's "res" directory.
The `file://` protocol is disabled, and we suggest the use of the OpenBlox provided protocol instead.
{{% method void Load "string url" %}}
This method loads content and doesn't return until the content has either been loaded or an error has occurred. The {{%var%}}url{{%/var%}} argument can be any string accepted by [GetContent](#GetContent).
This method loads content and doesn't return until the content has either been loaded or an error has occurred. The {{%var%}}url{{%/var%}} argument can be any string accepted by [GetAsset](#GetAsset).
{{% method void Preload "string url" %}}
This method preloads content so that it can be quickly used at a later time. The URL can be any string accepted by [GetContent](#GetContent).
This method preloads content so that it can be quickly used at a later time. The URL can be any string accepted by [GetAsset](#GetAsset).
{{% event AssetLoaded "string url" "string reason" %}}
This event is fired when an asset loads successfully.
{{% event AssetLoadFailed %}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment