CGSG Class
Global properties for the current scene
Item Index
Methods
Properties
- animationManager
- canvas
- cgsgEventTypes
- collisionTestFactory
- context
- currentFrame
- displayRatio static
- eventManager
- fps
- framerateDelay
- ghostColor
- ghostContext
- globalDetectSelectionThreshold
- isBoundingBoxOnTop
- listTimelines
- maxFramerate
- performanceKeys
- resizeHandleThreshold static
- sceneGraph
- selectedNodes
- version static
Methods
Properties
context
CanvasRenderingContext2D
The main rendering 2D context for this scene
framerateDelay
Number
Number of frames to average the FPS. Reduce this number to get more accurate FPS
Default: CGSG_DEFAULT_FRAMERATE_DELAY
ghostContext
CanvasRenderingContext2D
The global ghost context for fake rendering
globalDetectSelectionThreshold
Number
Default threshold apply to all new nodes when detecting selection.
isBoundingBoxOnTop
Boolean
If set to true, the bounding boxes for selected nodes will be rendered on top of the scene If set to false, the bounding boxes for selected nodes will be rendered on top of the node
Default: true
listTimelines
Array
private
List of the timelines for the animations. A timeline consists of a list of animation keys for 1 attribute of 1 node
maxFramerate
Number
Maximum number of frames per second. Set it if you want your application to slow down.
Default: CGSG_DEFAULT_MAX_FRAMERATE
Example:
//limit the fps of the application to 30
CGSG.maxFramerate : 30,
performanceKeys
Object
Object that defines the performance keys. Change values to adapt your project.
CGSG.performanceKeys._collisionMethod : Key to specify collision detection mod Use setCollisionMethod to modify value, Default : CGSGCollisionMethod.REGION
CGSG.performanceKeys.collisionTester : Collision tester depending on _collisionMethod, Default : CGSGCollisionRegionTester
resizeHandleThreshold
Number
static
Default threshold to detect the handle boxes on a resizable node