mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge pull request #4784 from thoys/20522
Added transparency and positioning updating of Planky button
This commit is contained in:
commit
c7952311e5
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
});
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
@ -133,7 +133,10 @@ function cleanup() {
|
|||
}
|
||||
|
||||
function onUpdate() {
|
||||
|
||||
if (windowWidth != Window.innerWidth) {
|
||||
windowWidth = Window.innerWidth;
|
||||
Overlays.editOverlay(button, {x: getButtonPosX()});
|
||||
}
|
||||
}
|
||||
|
||||
Script.update.connect(onUpdate)
|
||||
|
|
Loading…
Reference in a new issue