Skip to content

Conversation

@michaelybecker
Copy link
Contributor

Description:
Fixes #2930 + adds customisable title color prop

Changes proposed:

  • Adds prop to change link portal background color (rather than the hardcoded red)
  • Adds prop to change link title color
  • Refactors link declaration schema to be accordingly specific: borderColor, innerColor and titleColor
  • Updates docs accordingly

|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| color | Background color of the portal. | white |
| borderColor | Border color of the portal. | white |
| innerColor | Inner (background) color of the portal. | red |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps backgroundColor

if (!data.image || oldData.image === data.image) { return; }
el.setAttribute('material', 'pano',
typeof data.image === 'string' ? data.image : data.image.src);
typeof data.image === 'string' ? data.image : data.image.src);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to change this


// Set Portal
el.setAttribute('geometry', {primitive: 'circle', radius: 1.0, segments: 64});
el.setAttribute('geometry', { primitive: 'circle', radius: 1.0, segments: 64 });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to change this

pano: {type: 'map', is: 'uniform'},
borderEnabled: {default: 1.0, type: 'int', is: 'uniform'},
strokeColor: {default: 'white', type: 'color', is: 'uniform'}
pano: { type: 'map', is: 'uniform' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to add spaces to objects

@ngokevin ngokevin changed the title add customizeable colors to link portal and title add customizeable colors to link portal and title (fixes #2930) Oct 2, 2017
@ngokevin ngokevin merged commit b73d176 into aframevr:master Oct 2, 2017
@ngokevin
Copy link
Member

ngokevin commented Oct 2, 2017

thanks!

@michaelybecker
Copy link
Contributor Author

@ngokevin thanks and sorry about the weird spaces - working through some linting issues in my local dev env. Won't happen next time;)

@ngokevin
Copy link
Member

ngokevin commented Oct 2, 2017

Nah don't care, just fixed it up to merge it quick

@michaelybecker michaelybecker deleted the fix-link-color branch October 3, 2017 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants