What happened to Scene.getCamera()? in Javascript

36 views
Skip to first unread message

Jim Thomson

unread,
Aug 19, 2017, 11:09:16 AM8/19/17
to CoSpaces Scripting
Hi

I have been off CoSpaces working on other projects for a while. I am trying to work on some more advanced scenes, but  am I right that Scene.getCamera() is gone, and there is no replacement method()? It would be nice if there were notations in the api about deprecated methods, makes for fewer curse words on my end. ;)

Daniel Pers

unread,
Aug 20, 2017, 3:30:25 AM8/20/17
to CoSpaces Scripting
Hi Jim
The camera is now available by default in the list of objects (in Blockly). There is therefore no need for Scene.getCamera().
I regret that Delightex doesn't communicate on this kind of evolutions of CoSpaces.

Eugene Belyaev

unread,
Aug 20, 2017, 5:00:31 AM8/20/17
to cospaces-...@googlegroups.com
Scene.getCamera() is not gone, you can still use it. It is just not a public method and is marked as an error in the editor.

Eugene Belyaev

unread,
Aug 20, 2017, 5:11:39 AM8/20/17
to cospaces-...@googlegroups.com

"But please keep in mind that there are no public methods available for the camera object at the moment. You can use it but they can change anytime."

Jim Thomson

unread,
Aug 20, 2017, 11:25:22 AM8/20/17
to CoSpaces Scripting
Blockly is extremely limited, so I disagree entirely with 'no need'. Example: try using Blockly moveTo as compared to Javascript moveTo for moving to another object. 

Daniel Pers

unread,
Aug 20, 2017, 11:34:46 AM8/20/17
to CoSpaces Scripting
You can use somme JavaScript with Blockly to do what you want.

Jim Thomson

unread,
Aug 20, 2017, 11:05:40 PM8/20/17
to CoSpaces Scripting
Daniel, Blockly is fine for many things, and the code block is also fine for many things but, trying to use the code block for complex interaction is like trying to put toothpaste back in a tube. 

Benjamin Singh

unread,
Sep 4, 2017, 4:37:57 AM9/4/17
to CoSpaces Scripting
Hi Jim,

all methods listed in the API documentation are not going to change and/or going to be removed. However, here in the forums we gave away some internal methods which are not documented. They can change indeed. Scene.getCamera() is one of them (even though it's still working). We're going to provide public camera methods in the future.

Benjamin
Reply all
Reply to author
Forward
0 new messages