<< Click to Display Table of Contents >>
DDDCore.js
Namespace |
SuperGIS.DDDCore |
|
|
Class |
shader |
|
|
Class |
FPSCounter() |
count frame per second (FPS) |
|
Method |
number |
getFrames() |
return frames. |
Method |
string |
getFPS() |
return frame per second (FPS). |
Method |
string |
toString() |
convert the input to string type. |
Class |
Camera(f, a, nr, fr) |
control camera |
|
Method |
array |
getEyeAt() |
return EyeAt (camera position). |
Method |
void |
setEyeAt(array v) |
set EyeAt (camera position). |
Method |
array |
getLook() |
return Look. |
Method |
void |
setLook(array v) |
set Look. |
Method |
array |
getLookAt() |
return the look at position on the globe. |
Method |
void |
setLookAt(array v) |
set the look at position on the globe. |
Method |
vec3 |
Ray(v) |
return a vector showing the line of sight. |
Method |
Boolean |
IsValidStatus() |
return a Boolean value indicates whether the status is valid. |
Method |
Status |
GetCameraStatus(object Status) |
return camera status. |
Method |
void |
RestoreCameraStatus(object Status) |
restore camera status |
Class |
Scene(object Parent, shader) |
control the Scene. |
|
Method |
CurrentPos |
getCursorPosition() |
return the current cursor position. |
Method |
void |
invalidate() |
redraw the Scene. |
Method |
Boolean |
getValid() |
reture a Boolean value indicates whether the Scene is valid. |
Method |
sceneCanvas.width |
getWidth() |
return the width of the Scene. |
Method |
sceneCanvas.height |
getHeight() |
return the height of the Scene. |
Method |
void |
setBackgroundColor(v) |
set the background color of the Scene, by default it is black. |
Method |
void |
resize(cx, cy) |
resize the Scene. |
Method |
array |
getCurrentPosition(tEvent) |
return the current position. |
Method |
Texture |
createTexture(object Texture, object ImageData, opts) |
create the Texture object. |
Method |
Boolean |
startRender(camera, framebuffer) |
start to render. |
Method |
void |
endRender() |
end rendering. |
Method |
void |
render(object Mesh, object Textures, object Materials, m, number OffsetScale) |
render an object. |
Method |
void |
drawText(string text, x, y, color, bkColor, size, family) |
draw texts. |
Method |
array |
measureText(sting text, size, family) |
measure the size of the text. |
Method |
void |
drawImage(timg, x, y, w, h, cx, cy, angle) |
draw an image. |
Method |
void |
drawRect(x, y, w, h, c) |
draw a rectangle. |
Method |
void |
drawLine(x1, y1, x2, y2, c, w) |
draw a line. |
Method |
void |
drawPolyline(pts, c, w) |
draw a polyline. |
Method |
void |
drawPolygon(ptss, c) |
draw a polygon. |
Method |
shader |
CreateShader(context, st, strShader) |
create the Shader object. |
Method |
shader |
getShader(context, id, st) |
return the Shader object. |
Class |
Light() |
control the light. |
|
Method |
Boolean |
getLight() |
return light setting. |
Method |
void |
setLight(Boolean v) |
set light setting. |
Method |
number |
getType() |
return the type of the light. |
Method |
void |
setType(number v) |
set the type of the light. |
Method |
array |
getLocation() |
return the light location. |
Method |
void |
setLocation(array v) |
set the light location. |
Method |
array |
getDirection() |
return the light direction. |
Method |
void |
setDirection(array v) |
set the light direction. |
Method |
array |
getColor() |
return light color. |
Method |
void |
setColor(array v) |
set light color. |
Method |
number |
getAmbient() |
return light ambient. |
Method |
void |
setAmbient(number v) |
set light ambient. |
Method |
number |
getBrightness() |
return brightness of the light. |
Method |
void |
setBrightness(number v) |
set brightness of the light. |
Class |
Pick(ori, dir, len, nod1, nod2, nod3) |
|
|
Property |
vec3 |
Origin |
return the origin of the pick. |
Property |
vec3 |
Direction |
return the direction of the pick. |
Property |
number |
Distance |
return the distance of the pick. |
Method |
vec3 |
getTarget() |
return the picked target. |
Method |
void |
Transform |
|
Class |
ModelElement(mesh) |
control the model elements. |
|
Method |
number |
getTexture() |
return the texture of the model. |
Method |
void |
setTexture(number v) |
set the texture of the model. |
Method |
number |
getMaterial() |
return the material of the model. |
Method |
void |
setMaterial(number v) |
set the material of the model. |
Class |
Mesh(mode) |
|
|
Method |
number |
getMode() |
get the mesh mode. |
Method |
void |
setMode(number v) |
set the mesh mode. |
Method |
array |
getVertexCoord() |
return an array of vertex coordinates. |
Method |
void |
setVertexCoord(array v) |
set an array of vertex coordinates. |
Method |
array |
getVertexOffset() |
return an array of vertex offset. |
Method |
void |
setVertexOffset(array v) |
set an array of vertex offset. |
Method |
array |
getVertexScale() |
return an array of vertex scale. |
Method |
void |
setVertexScale(array v) |
set an array of vertex scale. |
Method |
array |
getVertexColor() |
return an array of vertex color. |
Method |
void |
setVertexColor(arrayv) |
set an array of vertex color. |
Class |
Material() |
|
|
Method |
array |
getColor() |
return the material color. |
Method |
void |
setColor(array c) |
set the material color. |
Method |
number |
getAlpha() |
return the transparancy of material. |
Method |
void |
setAlpha(number v) |
set the transparancy of material. |
Method |
number |
getShininess() |
return the shininess of material. |
Method |
void |
setShininess(number v) |
set the shininess of material. |
Class |
Model(object Scene) |
|
|
Method |
Boolean |
getIsReady() |
return if the model is ready. |
Method |
void |
setIsReady(Boolean v) |
set if the model is ready. |
Method |
array |
getOrigin() |
return model origin. |
Method |
void |
setOrigin(array v) |
set model origin. |
Method |
number |
getOffsetScale() |
return model offset scale. |
Method |
void |
setOffsetScale(number v) |
set model offset scale. |
Method |
Elements[n] |
getElement() |
return Element object. |
Method |
void |
setElement(n, v) |
set Element object. |
Method |
Meshs[n] |
getMesh(n) |
return Mesh object. |
Method |
void |
setMesh(n, v) |
set Mesh object. |
Method |
Textures[n] |
getTexture(n) |
return Texture object. |
Method |
void |
setTexture(n, v) |
set Texture object. |
Method |
Material[n] |
getMaterial(n) |
return Material object. |
Method |
void |
setMaterial(n, v) |
set Material object. |
Method |
Textures |
getTextures() |
return Textures object. |
Method |
void |
setTextures(object Textures) |
set Textures object. |
Method |
number |
getTextureSize() |
return texture size. |
Class |
LoadImage(object This, srcPath, callbackFunction) |
|
|
Class |
JSONModel(object Scene, string Path, string Variant, number Resolution, funcLoaded) |
|
|
Class |
EarClipping(pts) |
|
|
© 2014 Supergeo Technologies Inc. All Rights Reserved.