instantreality forum
news: Welcome to the instantreality forums!
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2018, 03:38:27 am

Login with username, password and session length

Pages: [1]
Author Topic: Creating instance of prototype with Script  (Read 1388 times)
Posts: 2

View Profile
« on: November 09, 2015, 10:53:07 am »

Hallo! My JS-code is creating instance of prototype than bring scene initialization. Commenting code is done, but script-code is not done. Why!? Healp me, please. Thank you!

<?xml version="1.0" encoding="UTF-8"?>
<X3D version="3.2"> <Scene>
<ProtoDeclare name="proto">
   <Appearance> <Material diffuseColor="0 1 0"/> </Appearance>

<Transform DEF="box">
   <ProtoInstance name="proto">
</Transform >

 <Script DEF="scr">   
   <![CDATA[ ecmascript:
   function initialize(){
     var scen= Browser.currentScene;
     var exemp= scen.createNode("ProtoInstance"); SFString("proto");
     Browser.println(scen.getNamedNode("бокс").children[0].name); // "proto"

Pages: [1]
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines