JSViewFrustum
API for creating and modifying frustum objects.
Create a API with Module.createViewFrustum.
var object = Module.createViewFrustum("ID");Function
createViewFrustum(position, pan, tilt, x, y, distance)
Creates a frustum object.
Rotation information based on the pan input value: 0, 360 (north), 90 (east), 180 (south), 270 (west).
Rotation information based on the tilt input value: 0 (front), tilt<0 (top), tilt>0 (bottom).
pan
number
Frustum's Y-axis rotation setting.
tilt
number
Frustum's X-axis rotation setting.
x
number
Frustum's field of view width setting.
y
number
Frustum's field of view height setting.
distance
number
Frustum's length setting.
- Sample - Refer to function init. 
 
getFov() → JSVector2D
Returns the field of view size of the frustum.
- Return - JSVector2D : Returns the view size(width, height) of the frustum successfully. 
- null: Size return failed. 
 
getId() → string
Returns the ID of the object.
- Return - string: Successful return of the object's Key string. 
- null: If the object is null. 
 
lat strKey = object.getId();setFovX(value) → boolean
Changes the field of view width of the frustum.
value
number
Frustum width setting
- Return - true: Setting successful. 
- false: Setting failed. 
 
- Sample - Refer to function resutFrustum. 
 
setFovY(value) → boolean
Changes the field of view height of the frustum.
value
number
Frustum height setting
- Return - true: Setting successful. 
- false: Setting failed. 
 
- Sample - Refer to function resutFrustum. 
 
Getter / Setter
getColor(), setColor(color) → JSColor
Changes the color of the frustum object.
- Return - JSColor: Returns the color of the frustum successfully. 
- null: Color return failed. 
 
- Sample - Refer to function createViewFrustum. 
 
// ... or ...getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
- Return - string: Successful return of the object's description string. 
- null: If the object is null. 
 
var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
- Return - string: Successful return of the object's name. 
- null: If the object is null. 
 
var objName = object.getName();
// ... or ...
object.setName("MyObject");getPan(), setPan(pan) → number
Changes the Y-axis rotation value of the frustum.
Rotation information based on the pan input value: 0, 360 (north), 90 (east), 180 (south), 270 (west).
pan
number
Frustum Y-axis rotation setting
- Return - number: Y-axis rotation value. 
 
- Sample - Refer to function resutFrustum. 
 
// ... or ...getTilt(), setTilt(tilt) → number
Changes the X-axis rotation value of the frustum.
Rotation information based on the tilt input value: 0 (front), tilt<0 (top), tilt>0 (bottom).
tilt
number
Frustum X-axis rotation setting
- Return - number: X-axis rotation value. 
 
- Sample - Refer to function resutFrustum. 
 
// ... or ...getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
- Return - true: Object visible state. 
- false: Object hidden state. 
 
var objName = object.getName();
// ... or ...
object.setVisible(true);Last updated
