From 025422792d134fefd4fe65a4815f6c5197849f4e Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 29 Oct 2015 10:13:28 -0700 Subject: [PATCH] Fixing the keyLIght Direction ui for edit.js --- examples/edit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/edit.js b/examples/edit.js index 09d30c712b..d1f6edb47a 100644 --- a/examples/edit.js +++ b/examples/edit.js @@ -1510,9 +1510,9 @@ PropertiesTool = function(opts) { if (entity.properties.rotation !== undefined) { entity.properties.rotation = Quat.safeEulerAngles(entity.properties.rotation); } - if (entity.properties.keyLightDirection !== undefined) { - entity.properties.keyLightDirection = Vec3.multiply(RADIANS_TO_DEGREES, Vec3.toPolar(entity.properties.keyLightDirection)); - entity.properties.keyLightDirection.z = 0.0; + if (entity.properties.keyLight.Direction !== undefined) { + entity.properties.keyLight.Direction = Vec3.multiply(RADIANS_TO_DEGREES, Vec3.toPolar(entity.properties.keyLight.Direction)); + entity.properties.keyLight.Direction.z = 0.0; } selections.push(entity); } @@ -1541,9 +1541,9 @@ PropertiesTool = function(opts) { var rotation = data.properties.rotation; data.properties.rotation = Quat.fromPitchYawRollDegrees(rotation.x, rotation.y, rotation.z); } - if (data.properties.keyLightDirection !== undefined) { - data.properties.keyLightDirection = Vec3.fromPolar( - data.properties.keyLightDirection.x * DEGREES_TO_RADIANS, data.properties.keyLightDirection.y * DEGREES_TO_RADIANS); + if (data.properties.keyLight.Direction !== undefined) { + data.properties.keyLight.Direction = Vec3.fromPolar( + data.properties.keyLight.Direction.x * DEGREES_TO_RADIANS, data.properties.keyLight.Direction.y * DEGREES_TO_RADIANS); } Entities.editEntity(selectionManager.selections[0], data.properties); if (data.properties.name != undefined) {