Example #1
0
        public static ScriptingEngine CreateFromDocument(SceneGraphNode document)
        {
            ScriptingEngine engine;

            engine = new ScriptingEngine();

            engine.StartV8(document);

            CurrentContext = engine;

            return(engine);
        }
Example #2
0
        public static ScriptingEngine CreateFromManager(SceneManager manager)
        {
            SceneGraphNode  document;
            ScriptingEngine engine;

            engine = new ScriptingEngine();

            if (manager.SceneGraph != null)
            {
                document = manager.SceneGraph.GetRoot();

                if (Script.EngineEnabled)
                {
                    engine.StartV8(document);
                }
            }

            CurrentContext = engine;

            return(engine);
        }