Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Create copy of mesh in javascript

sand
Registered User
Quote
2020-10-17 03:41:25

If i have a mesh node called 'Quad' how do I make a copy of it in javascript?


oleksandr
Registered User
Quote
2020-10-17 22:13:20

ccbCloneSceneNode - try this function, like this

var quad = ccbGetSceneNodeFromName('Quad');
var newquad = ccbCloneSceneNode(quad);

https://www.ambiera.com/coppercu...


sand
Registered User
Quote
2020-10-18 16:38:30

Thank you!
do you also know how to create a plane programmatically?


oleksandr
Registered User
Quote
2020-10-20 10:51:29

in the editor it possible with

var s = editorAddSceneNode("plane");

but looks like u need to make it in a game (runtime). In case with webgl this can help u https://www.ambiera.com/copperlicht/documentation/symbols/CL3D.Plane3d.html, but if u use publish for windows/macos/android I'm afraid it will not working there


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact