public static ScriptingEngine CreateFromDocument(SceneGraphNode document) { ScriptingEngine engine; engine = new ScriptingEngine(); engine.StartV8(document); CurrentContext = engine; return(engine); }
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); }