Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
poster-portrait-src="example.com/poster.jpg">
<amp-story-page id="cover">
<amp-story-grid-layer template="fill">
<amp-story-360 layout="fill" heading-start="95" pitch-start="-10" zoom-start="4" heading-end="-45" pitch-end="-20" zoom-end="1" duration="30s" scene-heading="8.5" scene-pitch="5" scene-roll="-1">
<amp-story-360 layout="fill" heading-start="95" pitch-start="-10" zoom-start="4" heading-end="-45" pitch-end="-20" zoom-end="1" duration="30s" scene-heading="8.5" scene-pitch="5" scene-roll="-1" controls="gyroscope">
<amp-img src="img/panorama1.jpg" width="7168" height="3584"></amp-img>
</amp-story-360>
</amp-story-grid-layer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PASS
| poster-portrait-src="example.com/poster.jpg">
| <amp-story-page id="cover">
| <amp-story-grid-layer template="fill">
| <amp-story-360 layout="fill" heading-start="95" pitch-start="-10" zoom-start="4" heading-end="-45" pitch-end="-20" zoom-end="1" duration="30s" scene-heading="8.5" scene-pitch="5" scene-roll="-1">
| <amp-story-360 layout="fill" heading-start="95" pitch-start="-10" zoom-start="4" heading-end="-45" pitch-end="-20" zoom-end="1" duration="30s" scene-heading="8.5" scene-pitch="5" scene-roll="-1" controls="gyroscope">
| <amp-img src="img/panorama1.jpg" width="7168" height="3584"></amp-img>
| </amp-story-360>
| </amp-story-grid-layer>
Expand Down
30 changes: 17 additions & 13 deletions extensions/amp-story-360/validator-amp-story-360.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,29 @@ tags: { # <amp-story-360>
requires_extension: "amp-story-360"
mandatory_ancestor: "AMP-STORY"
spec_url: "https://amp.dev/documentation/components/amp-story-360"
attrs: {
name: "controls"
value: "gyroscope"
}
attrs: {
name: "duration"
value_regex: "([0-9\\.]+)\\s*(s|ms)"
}
attrs: {
name: "heading-start"
name: "heading-end"
value_regex: "-?\\d+\\.?\\d*"
}
}
attrs: {
name: "pitch-start"
value_regex: "-?\\d+\\.?\\d*"
}
attrs: {
name: "zoom-start"
value_regex: "\\d+\\.?\\d*"
}
attrs: {
name: "heading-end"
name: "heading-start"
value_regex: "-?\\d+\\.?\\d*"
}
attrs: {
name: "pitch-end"
value_regex: "-?\\d+\\.?\\d*"
}
attrs: {
name: "zoom-end"
value_regex: "\\d+\\.?\\d*"
name: "pitch-start"
value_regex: "-?\\d+\\.?\\d*"
}
attrs: {
name: "scene-heading"
Expand All @@ -70,6 +66,14 @@ tags: { # <amp-story-360>
name: "scene-roll"
value_regex: "-?\\d+\\.?\\d*"
}
attrs: {
name: "zoom-end"
value_regex: "\\d+\\.?\\d*"
}
attrs: {
name: "zoom-start"
value_regex: "\\d+\\.?\\d*"
}
child_tags: {
mandatory_num_child_tags: 1
child_tag_name_oneof: "AMP-IMG"
Expand Down