/// <summary> /// Runs once at beginning of export. Sets up the root node /// and scene. /// </summary> /// <returns></returns> public bool Start() { Debug.WriteLine("Starting..."); _transformStack.Push(Transform.Identity); float scale = 1f; // could play with this to match units in a different viewer. rootNode = new glTFNode(); rootNode.name = "rootNode"; //rootNode.matrix = new List<float>() //{ // scale, 0, 0, 0, // 0, scale, 0, 0, // 0, 0, scale, 0, // 0, 0, 0, scale //}; rootNode.children = new List <int>(); Nodes.AddOrUpdateCurrent("rootNode", rootNode); glTFScene defaultScene = new glTFScene(); defaultScene.nodes.Add(0); Scenes.Add(defaultScene); return(true); }
public void Start(bool exportProperties = true) { this._exportProperties = exportProperties; Node rootNode = new Node(0); rootNode.children = new List <int>(); nodeDict.Add(rootNode.id, rootNode); parentStack.Push(rootNode.id); glTFScene defaultScene = new glTFScene(); defaultScene.nodes.Add(0); scenes.Add(defaultScene); }