API Docs for: v2.1.0
Show:

CGSG Class

Defined in: src\globals.js:78
Module: Util

Global properties for the current scene

Methods

setCollisionMethod

(
  • method
)

Defined in src\globals.js:244

Redefines the collision method

Parameters:

Properties

animationManager

CGSGAnimationManager

Defined in src\globals.js:255

Animation manager

canvas

HTMLElement

Defined in src\globals.js:128

The canvas container for this scene

cgsgEventTypes

Object

Defined in src\globals.js:280

All kinds of events defined by the CGSceneGraph framework.

collisionTestFactory

CGSGCollisionTesterFactory

Defined in src\globals.js:212

Instance of CollisionTesterFactory

context

CanvasRenderingContext2D

Defined in src\globals.js:136

The main rendering 2D context for this scene

currentFrame

Number

Defined in src\globals.js:120

The current frame in hte global timeline

displayRatio

CGSGScale static

Defined in src\globals.js:104

Current display ratio

eventManager

CGSGEventManager

Defined in src\globals.js:262

Event manager to use to bind events to objects.

fps

Number

Defined in src\globals.js:196

Current framerate of the application

framerateDelay

Number

Defined in src\globals.js:176

Number of frames to average the FPS. Reduce this number to get more accurate FPS

Default: CGSG_DEFAULT_FRAMERATE_DELAY

ghostColor

String public

Defined in src\globals.js:151

the color used for the ghost mode rendering

ghostContext

CanvasRenderingContext2D

Defined in src\globals.js:143

The global ghost context for fake rendering

globalDetectSelectionThreshold

Number

Defined in src\globals.js:270

Default threshold apply to all new nodes when detecting selection.

isBoundingBoxOnTop

Boolean

Defined in src\globals.js:203

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

Defined in src\globals.js:167

List of the timelines for the animations. A timeline consists of a list of animation keys for 1 attribute of 1 node

maxFramerate

Number

Defined in src\globals.js:185

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

Defined in src\globals.js:221

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

Defined in src\globals.js:112

Default threshold to detect the handle boxes on a resizable node

sceneGraph

CGSGSceneGraph

Defined in src\globals.js:96

The scene graph itself

Default: null

selectedNodes

Array

Defined in src\globals.js:160

List of the current selected nodes in the scenegraph.

version

String static

Defined in src\globals.js:88

Current version of the framework