// Utility routine to place an instance at location in the world. // Returns an awaitable thingy that returns the properties from the response. private Task <BT.Props> CreateInstanceAt(BT.ItemId dispId, double xx, double yy, double zz) { BT.Props props = new BT.Props(); BT.AbilityList abilities = new BT.AbilityList { new BT.AbilityInstance() { DisplayableItemId = dispId, Pos = new double[] { xx, yy, zz } } }; return(Client.CreateItemAsync(props, abilities)); }
private async Task <BT.ItemId> CreateTestDisplayable(string pUrl) { BT.Props props = new BT.Props(); BT.AbilityList abilities = new BT.AbilityList { new BT.AbilityDisplayable() { DisplayableUrl = pUrl, DisplayableType = "meshset", LoaderType = "GLTF" } }; BT.Props resp = await Client.CreateItemAsync(props, abilities); return(new BT.ItemId(resp["ItemId"])); }