From 607404d99633fda4c47d07bb4c4eb231d21a4d5b Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 26 Feb 2020 11:15:45 -0500 Subject: [PATCH] Simplify test scene so it only contains our keybinding as extra --- data/assets/camera_paths_test.scene | 74 ++--------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) diff --git a/data/assets/camera_paths_test.scene b/data/assets/camera_paths_test.scene index 34c2241a26..90463865c3 100644 --- a/data/assets/camera_paths_test.scene +++ b/data/assets/camera_paths_test.scene @@ -1,63 +1,6 @@ +asset.require('./base') -local assetHelper = asset.require('util/asset_helper') local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - -local sunTransforms = asset.require('scene/solarsystem/sun/transforms') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') - - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') - -asset.require('scene/solarsystem/sun/sun') -asset.require('scene/solarsystem/sun/glare') -asset.require('scene/solarsystem/planets') -asset.request('scene/milkyway/milkyway/volume') - --- Add non planet object -local modelFolder = asset.syncedResource({ - Name = "Apollo Models", - Type = "HttpSynchronization", - Identifier = "apollo_11_models", - Version = 1 -}) - -local object = { - Identifier = "ExampleModel", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = {100000000, 1000, 10000} - } - }, - Renderable = { - Type = "RenderableModel", - Geometry = { - Type = "MultiModelGeometry", - GeometryFile = modelFolder .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj" - }, - ColorTexture = modelFolder .. "/gray.png", - LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier) - }, - GUI = { - Name = "Example Model", - Path = "" - } -} -assetHelper.registerSceneGraphNodesAndExport(asset, { object }) - -assetHelper.requestAll(asset, 'scene/digitaluniverse') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') - --- Load web gui -local webGui = asset.require('util/webgui') - -asset.request('customization/globebrowsing') -- Keybindings that are specific for this scene local Keybindings = { @@ -76,28 +19,17 @@ local Keybindings = { Documentation = "Stop a camera path.", GuiPath = "/Interaction", Local = false - }, - { - Key = "h", - Name="Toggle Planet Trails", - Command = "local list = openspace.getProperty('{planetTrail_solarSystem}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end", - Documentation = "Toggles the visibility of planet trails", - GuiPath = "/Rendering", - Local = false - }, + } } asset.onInitialize(function () - webGui.setCefRoute("onscreen") + sceneHelper.bindKeys(Keybindings) local now = openspace.time.currentWallTime() -- Jump back one day to be able to show complete weather data on Earth. openspace.time.setTime(openspace.time.advancedTime(now, "-1d")) openspace.globebrowsing.goToGeo("Earth", 58.5877, 16.1924, 20000000) - - sceneHelper.bindKeys(Keybindings) - openspace.setDefaultGuiSorting() end) asset.onDeinitialize(function ()