From b3af1840c798df4ee26ff393a1ef3912b23c9db3 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Thu, 7 May 2015 00:14:49 +0200 Subject: [PATCH 1/2] Added transparency and positioning updating of Planky button --- examples/example/games/planky.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/example/games/planky.js b/examples/example/games/planky.js index 77711958ea..3d8e5b9cf8 100644 --- a/examples/example/games/planky.js +++ b/examples/example/games/planky.js @@ -52,7 +52,7 @@ var button = Overlays.addOverlay('image', { width: BUTTON_DIMENSIONS.width, height: BUTTON_DIMENSIONS.height, imageURL: HIFI_PUBLIC_BUCKET + 'marketplace/hificontent/Games/blocks/planky_button.svg', - alpha: 1 + alpha: 0.8 }); @@ -133,7 +133,10 @@ function cleanup() { } function onUpdate() { - + if (windowWidth != Window.innerWidth) { + windowWidth = Window.innerWidth; + Overlays.editOverlay(button, {x: getButtonPosX()}); + } } Script.update.connect(onUpdate) From b76e22c9529f21b42e481d5f1d5290434bfe82e0 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Thu, 7 May 2015 01:14:16 +0200 Subject: [PATCH 2/2] spelling mistake --- examples/example/games/planky.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example/games/planky.js b/examples/example/games/planky.js index 3d8e5b9cf8..450a411ad8 100644 --- a/examples/example/games/planky.js +++ b/examples/example/games/planky.js @@ -93,7 +93,7 @@ function resetBlocks() { type: 'Model', modelURL: HIFI_PUBLIC_BUCKET + 'marketplace/hificontent/Games/blocks/block.fbx', shapeType: 'box', - name: 'JengaBlock' + ((layerIndex * BLOCKS_PER_LAYER) + blockIndex), + name: 'PlankyBlock' + ((layerIndex * BLOCKS_PER_LAYER) + blockIndex), dimensions: BLOCK_SIZE, position: { x: basePosition.x + localTransform.x,