- VertoStudio
A singleton that represents the Verto Studio editor application
- Scene
A Verto Studio Scene
- Texture
- Material
- Camera
A 3D camera that uses spherical coordinates for positioning.
- Model
A Verto Studio 3D model
- Light
A Verto Studio 3D light
- SceneSelection
Represents a user selection of Models
- SelectedVertexItem
Represents a selected vertex
- VertexSelection
Represents a user selection of Vertices (Points)
- SelectedFaceItem
Represents a selected face
- FaceSelection
Represents a user selection of Faces (Triangles or Quads)
- ModelGenerator
A convenient ModelGenerator class
- Quat
A utility class for generating Quaternion values
- Vec3
A utility class representing a 3D Vector value
- Triangle
A utility class representing a Triangle face
- Quad
A utility class representing a Quad face
- Animation
A utility class that drives animations inside of Verto Studio's Graphics Engine
- VR
A special class containing functions for accessing the current VR state.
Note: This class must be imported via ```import { VR } from 'VR';``` before it can be used. This class will not be available on non-VR versions of Verto Studio.
- Point3D :
object
- Point4D :
object
- InputDialogCallback :
function
The inputDialog callback function
- DialogParam :
object
- DialogOptions :
object
- ModelEditFinishCallback :
function
The finish function used by Model.edit()
- ModelEditFunction :
function
The editor function used by Model.edit()
- AnimationCallback ⇒
boolean
The Animation handler function that is called once per animation frame.
- VRHMD :
object
- VRController :
object
A singleton that represents the Verto Studio editor application
Kind: global class
- VertoStudio
- .globalState :
object
- .alert(Msg)
- .version() ⇒
number
- .inputDialog(dialogOptions, callback)
- .onScriptEnd(callback)
- .isVR() ⇒
boolean
- .environmentType() ⇒
string
- .globalState :
Accesses the global state object. This object is persisted across multiple script executions.
Note: Any values stored in here will be readable by ALL other vertoJS scripts ran by the user.
Kind: static property of VertoStudio
Presents up an OS-themed modal alert dialog.
Kind: static method of VertoStudio
Param | Type | Description |
---|---|---|
Msg | string |
The message to display in the alert |
Returns the Verto Studio version.
Kind: static method of VertoStudio
Returns: number
- - The version of the application.
Presents an input dialog to the user with various parameter types.
Kind: static method of VertoStudio
Param | Type | Description |
---|---|---|
dialogOptions | DialogOptions |
The options for presenting the dialog. |
callback | InputDialogCallback |
The callback that handles the user response. |
Registers a callback to signify the very end of the current script's execution, including all outstanding animations and input dialogs. This method can be useful for restoring the state of objects modified by transient operations such as animations.
Kind: static method of VertoStudio
Param | Type | Description |
---|---|---|
callback | ScriptEndCallback |
The callback that signifies the end of the script execution. |
Kind: static method of VertoStudio
Returns: boolean
- True if running on a Virtual Reality device
Obtains the current environment type that Verto Studio is running in.
Kind: static method of VertoStudio
Returns: string
- 'PC', 'Tablet', 'Phone', 'Holographic', or 'VR'
A Verto Studio Scene
Kind: global class
- Scene
- .current :
Scene
- .models :
Array.<Model>
- .camera :
Camera
- .textures :
Array.<Texture>
- .materials :
Array.<Material>
- .selectionMode :
string
- .editTarget :
Model
- .editMode :
boolean
- .selection :
SceneSelection
|VertexSelection
|FaceSelection
- .lights() :
Array.<Light>
- .loadAllTextures()
- .selectAll()
- .selectNone()
- .selectInverse()
- .current :
scene.current : Scene
Accesses the currently active Scene
Kind: instance property of Scene
Read only: true
scene.models : Array.<Model>
The Scene's models
Kind: instance property of Scene
Read only: true
scene.camera : Camera
The Scene's current active camera
Kind: instance property of Scene
Read only: true
scene.textures : Array.<Texture>
The Scene's loaded textures
Kind: instance property of Scene
Read only: true
scene.materials : Array.<Material>
The Scene's materials
Kind: instance property of Scene
Read only: true
The current selection mode ('vertex' or 'face')
Kind: instance property of Scene
Read only: true
scene.editTarget : Model
The current edit target (defined if editMode is true)
Kind: instance property of Scene
Read only: true
Whether or not the Scene is currently in edit mode.
Kind: instance property of Scene
Read only: true
scene.selection : SceneSelection
| VertexSelection
| FaceSelection
The Scene selection
Kind: instance property of Scene
scene.lights() : Array.<Light>
The Scene's lights
Kind: instance method of Scene
Read only: true
Loads all of the Scene's textures
Kind: instance method of Scene
Selects all models, vertices, or faces depending upon the current Scene's selection mode & edit mode state.
Kind: instance method of Scene
Clears the current Scene's selection
Kind: instance method of Scene
Inverts the current Scene's selection
Kind: instance method of Scene
Kind: global class
Creates a Texture and adds it to a Scene
Note: On macOS platforms, this method may trigger a security open dialog to prompt the user to allow access to the texture file.
Param | Type | Description |
---|---|---|
[scene] | Scene |
The scene to add this texture to (defaults to Scene.current) |
name | string |
The unique name of this texture. |
path | string |
A full path to the texture's location on the disk. Currently PNG & JPG file formats are supported. |
The textures mipmap state
Kind: instance property of Texture
Kind: global class
- Material
- new Material([scene], [name])
- .texture :
Texture
- .textureTileY :
number
- .textureTileX :
number
- .shininess :
number
- .emissive :
Array.<number>
- .specular :
Array.<number>
- .ambient :
Array.<number>
- .diffuse :
Array.<number>
Creates a Material and adds it to a Scene
Param | Type | Description |
---|---|---|
[scene] | Scene |
The scene to add this material to (defaults to Scene.current) |
[name] | string |
The unique name of this material. |
material.texture : Texture
The Material's texture assignment
Kind: instance property of Material
The Material's texture tiling in the Y(V) direction
Kind: instance property of Material
The Material's texture tiling in the X(U) direction
Kind: instance property of Material
The Material's shininess component (phong model)
Kind: instance property of Material
The Material's RGBA emissive component (phong model)
Kind: instance property of Material
The Material's RGBA specular (reflective) component (phong model)
Kind: instance property of Material
The Material's RGBA ambient component (phong model)
Kind: instance property of Material
The Material's RGBA diffuse (main color) component (phong model)
Kind: instance property of Material
A 3D camera that uses spherical coordinates for positioning.
Kind: global class
camera.pos : Point3D
The Camera's current position in 3D space
Kind: instance property of Camera
Read only: true
The Camera's r-value distance from its center in spherical coordinates.
Kind: instance property of Camera
The Camera's phi position in spherical coordinates (in degrees).
Kind: instance property of Camera
The Camera's theta position in spherical coordinates (in degrees).
Kind: instance property of Camera
camera.center : Point3D
The Camera's center position in spherical coordinates.
Kind: instance property of Camera
Moves the camera to a given vantage point looking at a given center point.
Kind: instance method of Camera
Param | Type | Description |
---|---|---|
newCenter | Point3D |
The new center position for which the camera will look towards. |
newVantage | Point3D |
The new vantage position from where the camera will look. |
A Verto Studio 3D model
Kind: global class
- Model
- new Model()
- .name :
string
- .cullBackfaces :
boolean
- .quads :
Uint32Array
- .triangles :
Uint32Array
- .texcoords :
Float32Array
- .normals :
Float32Array
- .vertices :
Float32Array
- .material :
Material
- .hidden :
boolean
- .scale :
Array.<number>
- .orientation :
Array.<number>
- .pos :
Point3D
- .z :
number
- .y :
number
- .x :
number
- .edit(callback)
- .fromSceneSpace(p) ⇒
Point3D
- .toSceneSpace(p) ⇒
Point3D
Creates a new empty Model and adds it to a Scene
Accesses the Model's user-facing name.
Kind: instance property of Model
Change this to true to enable backface-culling on this model.
Kind: instance property of Model
Accesses the Model's Quad face index array
Note: Use Quad.array(model.quads) to obtain an array of Quad objects from this value.
Kind: instance property of Model
Read only: true
Accesses the Model's Triangle face index array
Note: Use Triangle.array(model.triangles) to obtain an array of Triangle objects from this value.
Kind: instance property of Model
Read only: true
Accesses the Model's texcoords vertex array
Note: Use Vec2.array(model.texcoords) to obtain an array of Vec2 objects from this value.
Kind: instance property of Model
Read only: true
Accesses the Model's normals vertex array
Note: Use Vec3.array(model.normals) to obtain an array of Vec3 objects from this value.
Kind: instance property of Model
Read only: true
Accesses the Model's position (vertices) vertex array
Note: Use Vec3.array(model.vertices) to obtain an array of Vec3 objects from this value.
Kind: instance property of Model
Read only: true
model.material : Material
Accesses the Model's material
Kind: instance property of Model
model.hidden : boolean
Accesses the Model's hidden state.
Kind: instance property of Model
Accesses the Model's 3D XYZ scale value.
Kind: instance property of Model
Accesses the Model's 3D XYZW quaternion orientation value
Note: You can use the Quat.fromAxisAngle() utility method to construct this value.
Kind: instance property of Model
model.pos : Point3D
Accesses the Model's 3D position
Kind: instance property of Model
Accesses the Model's 3D Z-position
Kind: instance property of Model
Accesses the Model's 3D Y-position
Kind: instance property of Model
Accesses the Model's 3D X-position
Kind: instance property of Model
Performs an edit on this model. For the edit to be completed, the provided callback function must be called with the proper new model data values.
Kind: instance method of Model
Param | Type | Description |
---|---|---|
callback | ModelEditFunction |
A function that implements the model edit. |
model.fromSceneSpace(p) ⇒ Point3D
Converts the given vector from scene space to this model's space
Kind: instance method of Model
Returns: Point3D
- - The converted position.
Param | Type | Description |
---|---|---|
p | Point3D | Point4D |
The position or vector to convert. |
model.toSceneSpace(p) ⇒ Point3D
Converts the given vector from this model's space to scene space.
Kind: instance method of Model
Returns: Point3D
- - The converted position.
Param | Type | Description |
---|---|---|
p | Point3D | Point4D |
The position or vector to convert. |
A Verto Studio 3D light
Kind: global class
- Light
- new Light()
- .type :
string
- .w :
number
- .z :
number
- .y :
number
- .x :
number
- .spotAngleCutoff :
number
- .spotIntensity :
number
- .spotDirection :
Point3D
- .attenuation :
Array.<number>
- .pos :
Point3D
- .specular :
Array.<number>
- .ambient :
Array.<number>
- .diffuse :
Array.<number>
Creates a new Light and adds it to a Scene
Note: The default Verto Studio phong shader only supports up to 8 lights per scene.
Accesses the Light's light type. One of 'point', 'spot', or 'direction'
Kind: instance property of Light
Accesses the Light's position w-component. This is either 0 for direction lights or 1 for point lights.
Kind: instance property of Light
Accesses the Light's position z-component.
Kind: instance property of Light
Accesses the Light's position y-component.
Kind: instance property of Light
Accesses the Light's position x-component.
Kind: instance property of Light
Accesses the Light's spot angle cutoff. In the range of 0 to 90
Kind: instance property of Light
Accesses the Light's spot intensity. In the range of 0 to 128
Kind: instance property of Light
light.spotDirection : Point3D
Accesses the Light's spot direction
Kind: instance property of Light
Accesses the Light's attenuation vector array. In the order of Constant, Linear, Quadratic.
Kind: instance property of Light
light.pos : Point3D
Accesses the Light's 3D position.
Kind: instance property of Light
The Lights's RGBA specular (highlight) component (phong model)
Kind: instance property of Light
The Lights's RGBA ambient component (phong model)
Kind: instance property of Light
The Lights's RGBA diffuse component (phong model)
Kind: instance property of Light
Represents a user selection of Models
Kind: global class
Creates a new empty Selection
Param | Type | Description |
---|---|---|
[scene] | Scene |
The scene for which this selection will be for. |
sceneSelection.items : Array.<Model>
The Selections items
Kind: instance property of SceneSelection
Read only: true
The Number of items in the selection
Kind: instance property of SceneSelection
Read only: true
Adds an item to the selection
Kind: instance method of SceneSelection
Param | Type | Description |
---|---|---|
item | Model |
The item to add to the selection. |
Removes an item from the selection
Kind: instance method of SceneSelection
Param | Type | Description |
---|---|---|
item | Model |
The item to remove from the selection. |
Clears all items from the selection
Kind: instance method of SceneSelection
Translates this Selection's items
Kind: instance method of SceneSelection
Param | Type | Description |
---|---|---|
delta | Point3D |
The translation amount. |
Translates this Selection's items about their local origin
Kind: instance method of SceneSelection
Param | Type | Description |
---|---|---|
axis | Point3D |
The rotation axis. |
angle | number |
The rotation amount (in degrees). |
Scales this Selection's items
Kind: instance method of SceneSelection
Param | Type | Description |
---|---|---|
scale | Point3D |
The 3D scale amount. |
Deletes this Selection's items from the scene
Kind: instance method of SceneSelection
Duplicate this Selection's items within the scene
Kind: instance method of SceneSelection
Represents a selected vertex
Kind: global class
The type of this selected item ('vertex')
Kind: instance property of SelectedVertexItem
The index of this selected vertex
Kind: instance property of SelectedVertexItem
Represents a user selection of Vertices (Points)
Kind: global class
- VertexSelection
- new VertexSelection([scene])
- .items :
Array.<SelectedVertexItem>
- .count :
integer
- .add(item)
- .remove(item)
- .clear()
- .translate(delta)
- .rotate(axis, angle)
- .scale(scale)
- .delete()
- .duplicate()
- .subdivide()
- .flipFaces()
- .weld()
- .selectConnected()
- .selectRing()
- .splitQuads()
- .mergeDoubles()
- .extrude(direction, cap)
Creates a new empty Selection for the currently edited model
Note: Verto Studio (the current scene) must be in edit mode to use this class
Param | Type | Description |
---|---|---|
[scene] | Scene |
The scene for which this selection will be for. |
vertexSelection.items : Array.<SelectedVertexItem>
The Selections items
Kind: instance property of VertexSelection
Read only: true
The Number of items in the selection
Kind: instance property of VertexSelection
Read only: true
Adds an item to the selection
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
item | SelectedVertexItem |
The item to add to the selection. |
Removes an item from the selection
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
item | SelectedVertexItem |
The item to remove from the selection. |
Clears all items from the selection
Kind: instance method of VertexSelection
Translates this Selection's items
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
delta | Point3D |
The translation amount. |
Translates this Selection's items about their local origin
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
axis | Point3D |
The rotation axis. |
angle | number |
The rotation amount (in degrees). |
Scales this Selection's items
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
scale | Point3D |
The 3D scale amount. |
Deletes this Selection's items from the model
Kind: instance method of VertexSelection
Duplicate this Selection's items within the scene
Kind: instance method of VertexSelection
Subdivides all faces made up by this selection
Kind: instance method of VertexSelection
Flips (flips face normals and winding direction) all faces made up by this selection.
Kind: instance method of VertexSelection
Welds this selection's vertices
Kind: instance method of VertexSelection
Expands the current selection by selecting all edge-connected vertices.
Kind: instance method of VertexSelection
Expands the current selection by selecting the subtended edge ring.
Kind: instance method of VertexSelection
Splits (quad to triangle) all quads made up by this selection
Kind: instance method of VertexSelection
Merges duplicate vertices within this selection.
Kind: instance method of VertexSelection
Extrude the faces made up by this selection.
Kind: instance method of VertexSelection
Param | Type | Description |
---|---|---|
direction | Point3D |
The extrusion vector. |
cap | boolean |
Whether or not to cap-off the extrusion (with new faces) |
Represents a selected face
Kind: global class
The type of this selected item ('triangle' or 'quad')
Kind: instance property of SelectedFaceItem
The index of the group this face belongs to within the model
Kind: instance property of SelectedFaceItem
The index of this selected face
Kind: instance property of SelectedFaceItem
Represents a user selection of Faces (Triangles or Quads)
Kind: global class
- FaceSelection
- new FaceSelection([scene])
- .items :
Array.<SelectedFaceItem>
- .count :
integer
- .add(item)
- .remove(item)
- .clear()
- .translate(delta)
- .rotate(axis, angle)
- .scale(scale)
- .delete()
- .duplicate()
- .subdivide()
- .flipFaces()
- .weld()
- .selectConnected()
- .selectRing()
- .splitQuads()
- .mergeDoubles()
- .extrude(direction, cap)
Creates a new empty Selection for the currently edited model
Note: Verto Studio (the current scene) must be in edit mode to use this class
Param | Type | Description |
---|---|---|
[scene] | Scene |
The scene for which this selection will be for. |
faceSelection.items : Array.<SelectedFaceItem>
The Selections items
Kind: instance property of FaceSelection
Read only: true
The Number of items in the selection
Kind: instance property of FaceSelection
Read only: true
Adds an item to the selection
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
item | SelectedFaceItem |
The item to add to the selection. |
Removes an item from the selection
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
item | SelectedFaceItem |
The item to remove from the selection. |
Clears all items from the selection
Kind: instance method of FaceSelection
Translates this Selection's items
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
delta | Point3D |
The translation amount. |
Translates this Selection's items about their local origin
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
axis | Point3D |
The rotation axis. |
angle | number |
The rotation amount (in degrees). |
Scales this Selection's items
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
scale | Point3D |
The 3D scale amount. |
Deletes this Selection's items from the model
Kind: instance method of FaceSelection
Duplicate this Selection's items within the scene
Kind: instance method of FaceSelection
Subdivides all faces made up by this selection
Kind: instance method of FaceSelection
Flips (flips face normals and winding direction) all faces made up by this selection.
Kind: instance method of FaceSelection
Welds this selection's vertices
Kind: instance method of FaceSelection
Expands the current selection by selecting all edge-connected vertices.
Kind: instance method of FaceSelection
Expands the current selection by selecting the subtended edge ring.
Kind: instance method of FaceSelection
Splits (quad to triangle) all quads made up by this selection
Kind: instance method of FaceSelection
Merges duplicate vertices within this selection.
Kind: instance method of FaceSelection
Extrude the faces made up by this selection.
Kind: instance method of FaceSelection
Param | Type | Description |
---|---|---|
direction | Point3D |
The extrusion vector. |
cap | boolean |
Whether or not to cap-off the extrusion (with new faces) |
A convenient ModelGenerator class
Kind: global class
ModelGenerator.genSphere(radius, slices, stacks) ⇒ Model
Generates a UV-sphere and adds it to the scene.
Kind: static method of ModelGenerator
Returns: Model
- - The newly generated model
Param | Type | Description |
---|---|---|
radius | number |
The sphere radius |
slices | integer |
The number of U-subdivisions |
stacks | integer |
The number of V-subdivisions |
ModelGenerator.genTorus(radius1, radius2, rings, segments) ⇒ Model
Generates a torus and adds it to the scene.
Kind: static method of ModelGenerator
Returns: Model
- - The newly generated model
Param | Type | Description |
---|---|---|
radius1 | number |
The first radius |
radius2 | number |
The second radius |
rings | integer |
The number of ring subdivisions |
segments | integer |
The number of segment subdivisions |
ModelGenerator.genPlane(wt, ln) ⇒ Model
Generates a XZ plane and adds it to the scene.
Kind: static method of ModelGenerator
Returns: Model
- - The newly generated model
Param | Type | Description |
---|---|---|
wt | number |
The plane width |
ln | number |
The plane length |
ModelGenerator.genCube(size) ⇒ Model
Generates a flat-shaded cube and adds it to the scene.
Kind: static method of ModelGenerator
Returns: Model
- - The newly generated model
Param | Type | Description |
---|---|---|
size | number |
The cube size. |
A utility class for generating Quaternion values
Kind: global class
- Quat
- .fromAxisAngle(angleDegrees, x, y, z) ⇒
Array.<number>
- .apply(q, v)
- .fromAxisAngle(angleDegrees, x, y, z) ⇒
Generates a rotation quaternion from axis-angle.
Kind: static method of Quat
Returns: Array.<number>
- - The 4-tuple quaternion array value.
Param | Type | Description |
---|---|---|
angleDegrees | number |
The rotation angle in degrees. |
x | number |
Rotation Axis X |
y | number |
Rotation Axis Y |
z | number |
Rotation Axis Z |
Applies a quaternion's rotation transform to a position.
Kind: static method of Quat
Param | Type | Description |
---|---|---|
q | Array.<number> |
Quaternion value representing a rotation. |
v | Vec3 |
the position. |
A utility class representing a 3D Vector value
Kind: global class
- Vec3
- new Vec3(x, [y], [z])
- instance
- static
- .array(va) ⇒
Array.<Vec3>
- .float32Array(v3a) ⇒
Float32Array
- .array(va) ⇒
Creates a Vec3 from XYZ values
Param | Type | Description |
---|---|---|
x | number | Point3D |
x-value or any point object with x,y,z values |
[y] | number |
y-value |
[z] | number |
y-value |
Equality comparison
Kind: instance method of Vec3
Param | Type |
---|---|
rhs | Vec3 |
Kind: instance method of Vec3
Returns: number
- This vector's geometric length
Kind: instance method of Vec3
Returns: number
- The vector dot product
Param | Type |
---|---|
rhs | Vec3 |
vec3.cross(rhs) ⇒ Vec3
Kind: instance method of Vec3
Returns: Vec3
- The vector cross product
Param | Type |
---|---|
rhs | Vec3 |
Perform vector addition (+=)
Kind: instance method of Vec3
Param | Type |
---|---|
vec | Vec3 |
vec3.added(vec) ⇒ Vec3
Perform vector addition (+)
Kind: instance method of Vec3
Param | Type |
---|---|
vec | Vec3 |
Perform vector subtraction (-=)
Kind: instance method of Vec3
Param | Type |
---|---|
vec | Vec3 |
vec3.subtracted(vec) ⇒ Vec3
Perform vector subtraction (-)
Kind: instance method of Vec3
Param | Type |
---|---|
vec | Vec3 |
Perform component-wise multiplication (*=)
Kind: instance method of Vec3
Param | Type | Description |
---|---|---|
sc | number |
A scalar |
vec3.scalarMultiplied(sc) ⇒ Vec3
Perform component-wise multiplication (*)
Kind: instance method of Vec3
Param | Type | Description |
---|---|---|
sc | number |
A scalar |
Negates this vector
Kind: instance method of Vec3
vec3.negated() ⇒ Vec3
Negates this vector
Kind: instance method of Vec3
Normalizes this vector
Kind: instance method of Vec3
vec3.normalized() ⇒ Vec3
Normalizes this vector
Kind: instance method of Vec3
Vec3.array(va) ⇒ Array.<Vec3>
Converts low-level vertex array type to convenient Vec3 array
Kind: static method of Vec3
Param | Type | Description |
---|---|---|
va | Float32Array |
A vertex array (tightly packed sets of XYZ float values) |
Converts convenient Vec3 array to optimized low-level vertex array
Kind: static method of Vec3
Param | Type | Description |
---|---|---|
v3a | Array.<Vec3> |
The array of Vec3's to convert |
A utility class representing a Triangle face
Kind: global class
- Triangle
- new Triangle(a, b, c)
- instance
- static
- .array(ia) ⇒
Array.<Triangle>
- .uint32Array(i3a) ⇒
Uint32Array
- .array(ia) ⇒
Creates a Triangle from indices
Param | Type | Description |
---|---|---|
a | integer |
First triangle index |
b | integer |
Second triangle index |
c | integer |
Third triangle index |
Equality comparison
Kind: instance method of Triangle
Param | Type |
---|---|
rhs | Triangle |
triangle.reversed() ⇒ Triangle
Kind: instance method of Triangle
Returns: Triangle
- This triangle with reversed index order.
Triangle.array(ia) ⇒ Array.<Triangle>
Converts low-level index array type to convenient Triangle array
Kind: static method of Triangle
Param | Type | Description |
---|---|---|
ia | Uint32Array |
A Triangle array (tightly packed sets of ABC integer values) |
Converts convenient Triangle array to optimized low-level index array
Kind: static method of Triangle
Param | Type | Description |
---|---|---|
i3a | Array.<Triangle> |
The array of Triangles to convert |
A utility class representing a Quad face
Kind: global class
- Quad
- new Quad(a, b, c, d)
- instance
- static
- .array(ia) ⇒
Array.<Quad>
- .uint32Array(i4a) ⇒
Uint32Array
- .array(ia) ⇒
Creates a Quad from indices
Param | Type | Description |
---|---|---|
a | integer |
First quad index |
b | integer |
Second quad index |
c | integer |
Third quad index |
d | integer |
Fourth quad index |
Equality comparison
Kind: instance method of Quad
Param | Type |
---|---|
rhs | Quad |
quad.reversed() ⇒ Quad
Kind: instance method of Quad
Returns: Quad
- This quad with reversed index order.
Quad.array(ia) ⇒ Array.<Quad>
Converts low-level index array type to convenient Triangle array
Kind: static method of Quad
Param | Type | Description |
---|---|---|
ia | Uint32Array |
A Quad array (tightly packed sets of ABCD integer values) |
Converts convenient Quad array to optimized low-level index array
Kind: static method of Quad
Param | Type | Description |
---|---|---|
i4a | Array.<Quad> |
The array of Quads to convert |
A utility class that drives animations inside of Verto Studio's Graphics Engine
Kind: global class
Starts an animation that calls the given callback 30 or 60 times per second. When running in Verto Studio, the scene will automatically redraw itself after each time the handler is called.
Note: When running in Verto Studio, only one animation is permitted to run at a single time.
Kind: static method of Animation
Param | Type | Description |
---|---|---|
[fps] | integer |
The FPS to run this animation at. Defaults to 30. Currently valid values are 60 or 30. |
callback | AnimationCallback |
The callback that is called once per animation frame. |
Stops the current animation if one is in progress.
Kind: static method of Animation
A special class containing functions for accessing the current VR state.
Note: This class must be imported via ```import { VR } from 'VR';``` before it can be used. This class will not be available on non-VR versions of Verto Studio.
Kind: global class
VR.hmd : VRHMD
Accesses the currently active VR HMD representing the position of the user's head in VR.
Kind: static property of VR
Read only: true
VR.controllers : Array.<VRController>
Accesses the current state of the VR controllers.
Controller index 0 always represents the user's dominant hand.
Kind: static property of VR
Read only: true
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
X position |
y | number |
Y position |
z | number |
Z position |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
X position |
y | number |
Y position |
z | number |
Z position |
w | number |
W position |
The inputDialog callback function
Kind: global typedef
Param | Type | Description |
---|---|---|
[values] | Object |
The parameter values modified by the user. |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
name | string |
The parameter name |
type | string |
The parameter type (one of string , decimal , integer , or bool ) |
[min] | number |
The min value for the slider range affecting numeric param types. |
[max] | number |
The max value for the slider range affecting numeric param types. |
value | string | number | boolean |
The parameter name |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
[title] | string |
The dialog title |
params | Array.<DialogParam> |
The dialog parameters |
The finish function used by Model.edit()
Kind: global typedef
Param | Type | Description |
---|---|---|
newVerts | Float32Array |
The new vertices (can be constructed via Vec3.float32Array() utility method) |
newNorms | Float32Array |
The new normals (can be constructed via Vec3.float32Array() utility method) |
newTexcoords | Float32Array |
The new texture coordinates (can be constructed via Vec2.float32Array() utility method) |
newTriangles | Uint32Array |
The new triangle indices (can be constructed via Triangle.uint32Array() utility method) |
newQuads | Uint32Array |
The new quad indices (can be constructed via Quad.uint32Array() utility method) |
The editor function used by Model.edit()
Kind: global typedef
Param | Type | Description |
---|---|---|
m | Model |
The model being edited (this model). |
finish | ModelEditFinishCallback |
The method that must be called at the end of the edit to provide the new model data values. |
The Animation handler function that is called once per animation frame.
Kind: global typedef
Returns: boolean
- True to keep animating, false to stop the animation.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
pos | Point3D |
The HMD position. |
up | Point3D |
The HMD up vector. |
forward | Point3D |
The forward (gaze) vector from the HMD. |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
pos | Point3D |
The controller position. |
up | Point3D |
The controller up vector. |
forward | Point3D |
The forward (selection ray) vector from the controller. |
cursorPos | Point3D |
The ray-casted cursor position for this controller. |
cursorNorm | Point3D |
The ray-casted cursor normal for this controller. |
trigger | number |
The pressed state of the controller's trigger button. |
grip | number |
The pressed state of the controller's grip button. |
button1 | number |
The pressed state of the controller's first generic button. |
button2 | number |
The pressed state of the controller's second generic button. |