Multi-selection Tutorial

Select an object

There are 3 ways to select an object with cgSceneGraph:

  • Programatically :
                                        this.sceneGraph.selectNode(myNode); //this = the main class, ie CGSGScene inherited class
                                        
  • Single click with mouse :
    You first need to declare your node as clickable, ie as draggable or resizable:
                                       myNode.isDraggable = true;
                                        //or
                                        myNode.isResizable = true;
                                        
  • Drag selection with mouse :
    You also first need to declare your node as clickable, ie as draggable or resizable, and to activate the multi selection via mouse:
                                        this.isDragSelectEnabled = true; //this = the main class, ie CGSGScene inherited class
    
                                       //then
                                       myNode.isDraggable = true;
                                        //or
                                        myNode.isResizable = true;
                                        



Select several objects in the same time

To multi-select nodes on the scene it's very easy, you just have to set the "allowMultiSelect" property of the CGSGScene to true :

                                   this.allowMultiSelect = true;
                                    
Then you can multi-select objects by:
  • drawing a selection zone on the scene with the mouse cursor
  • or just by pressing [Ctrl] key on keyboard while clicking on selectable nodes.

WHAT'S UP?


cgSceneGraph v1.4.2

New Nodes, even faster, more interactions, ... cgSceneGraph v1.4.2 is released :)
Please, send us your feedback and requests on GitHub

CONTACT

mail to: gwennael.buchet@gmail.com