From e007158fb8058c0c8f8e600a9f0352ab58823afd Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Thu, 20 Sep 2018 05:32:29 -0700 Subject: [PATCH] DRY the hands HTML since they are symmetrical --- src/components/saber-controls.js | 1 - src/index.html | 47 +++++++++++++------------------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/components/saber-controls.js b/src/components/saber-controls.js index 92b851b..e24110a 100644 --- a/src/components/saber-controls.js +++ b/src/components/saber-controls.js @@ -1,6 +1,5 @@ AFRAME.registerComponent('saber-controls', { schema: { - activeHand: {default: 'right'}, hand: {default: 'right', oneOf: ['left', 'right']}, bladeEnabled: {default: true} }, diff --git a/src/index.html b/src/index.html index 21f1070..fe3404b 100644 --- a/src/index.html +++ b/src/index.html @@ -55,34 +55,25 @@ line="opacity: 0.75"> - - - - - - + + {% macro saber (hand, otherHand, color) %} + + + + {% endmacro %} + + {{ saber('left', 'right', 'pink') }} + {{ saber('right', 'left', 'cyan') }} {% if not IS_PRODUCTION %}