Other:
vector3d - a vector class
Standard Library(basic functions for math, strings, arrays, regex etc)
Note: This function is not available in the editor. Creates a new scene node based on an existing scene node. All the behaviors and actions will also be applied to the cloned node .
The parameter 'node' must be an existing scene node. You can get an existing scene node for example with ccbGetSceneNodeFromName()
Returns: The new scene node.
Examples:
varsourceNode =ccbGetSceneNodeFromName ("myNode" );
varnewscenenode =ccbCloneSceneNode (sourceNode );Above example will create a copy of an existing scene node with the name 'myNode'.
varname_increment =ccbGetCopperCubeVariable ("name_increment" ); varincremented_value =Number (name_increment +1 );ccbSetCopperCubeVariable ("name_increment" ,incremented_value ); varMainNode =ccbGetSceneNodeFromName ("node_to_be_cloned" ); varClonedNode =ccbCloneSceneNode (MainNode );ccbSetSceneNodeProperty (ClonedNode ,"Name" ,"new_name_for_clone" +"" +incremented_value +"" );Above example will create a clone of the existing node and will assign a new name to every node that is cloned with a number as suffix.
In order to make the above script work, you need to set a CopperCube Variable "name_increment" with a value of "0".
Note: This function is not available in the editor. Returns the currently active camera node of the scene.
Examples:
varCamera =ccbGetActiveCamera ();
varCameraName =ccbGetSceneNodeProperty (Camera ,"Name" );CameraName )Above example will get the current active camera from the scene and will print the name of the camera in the debug console.
Note: This function is not available in the editor. Sets a camera node as currently active camera for the scene.
The parameter 'node' must be an existing camera node. You can get an existing camera node for example with ccbGetSceneNodeFromName()
Examples:
varNewCamera =ccbGetSceneNodeFromName ("Camera2" );ccbSetActiveCamera (NewCamera );Above example will get the "Camera2" from the scene and make it the current active camera for the scene.
ccbGetChildSceneNode(parentSceneNode, childIndex)
Returns the child scene node of a parent scene node. ChildIndex must be >= 0 and less than the total childcount of that node that is < ccbGetSceneNodeChildCount
The parameter 'parentnode' must be an existing scene node. You can get an existing scene node for example with ccbGetSceneNodeFromName() and ChildIndex must be an integer lower than the total childCount of parentNode
Examples:
varParentNode =ccbGetSceneNodeFromName ("myNode" );
varChild =ccbGetChildSceneNode (parentNode , 0);
varChildname =ccbGetSceneNodeProperty (Child ,"Name" );Childname );Above example will get child at index 0 of a node with the name "myNode" and then print the name of the child node in the debug console.
varroot =ccbGetRootSceneNode (); varcount =ccbGetSceneNodeChildCount (root );for (vari =0 ;i <count ;i ++) { varchild =ccbGetChildSceneNode (root ,i );"node:" +ccbGetSceneNodeProperty (child ,"Name" ) +"\n" ); }Above example will print name of all the children of the root scene node in the debug console.
Returns the root scene node. You cannot remove it, but can make changes to its attributes like "Gravity", "Fog" (to enable/disable Fog), "Wind", "FogColor", "Realtime Shadows" (to enable/disable shadow mapping), "AmbientLight", "BackgroundColor". PostEffect properties are also supported: "Bloom", "Bloom_BlurIterations", "Bloom_Treshold", "Black and White", "Invert", "Blur", "Blur_Iterations", "Colorize", "Colorize_Color", "Vignette", "Vignette_Intensity", "Vignette_RadiusA", "Vignette_RadiusB" etc.
Examples:
varRootNode =ccbGetRootSceneNode ();
varFog =ccbGetSceneNodeProperty (RootNode ,"Fog" );Fog );Above example will get the state of Fog in your scene and then print "true" or "false" in the debug console.
Click the block controls to customize the button.
The back to top button scroll delay before the button shows is set to 200px as the default. As you scroll down the page, it displays after 200px of movement. However you have 4 height options to set via codeditor. 200px, 350px, 500px and 650px for the button to appear.
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopb" for 350 px in the first line of this block HTML
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopc" for 500 px in the first line of this block HTML
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopd" for 650 px in the first line of this block HTML
IF BUTTON NOT VISIBLE, PLS MOVE SIDEBAR TO THE RESPECTIVE HEIGHT YOU HAVE SET FOR BUTTON TO APPEAR FOR CUSTOMIZATION.
This is a global block and it only needs to be added and configured on one page and the settings will apply to all pages.
This block will be invisible on preview or publish retaining only the button.
BACK TO TOP FUNCTION WILL WORK ONLY AFTER PREVIEW OR PUBLISH.