Skip to content

Commit 89a541a

Browse files
committed
Merge remote-tracking branch 'upstream/staging' into bus-bunching
2 parents 8812056 + 0fef0e2 commit 89a541a

File tree

161 files changed

+1463
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1463
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "temple-photo-op",
3+
"type": "web",
4+
"title": "Temple Photo Op",
5+
"description": "Experience beautiful LDS temples.",
6+
"action_hints": ["pick a temple"],
7+
"queueable": false,
8+
"layout": "full",
9+
"lifetime": 240
10+
}
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
/** @jsxImportSource @emotion/react */
2+
import { css } from "@emotion/react";
3+
import React, { useState } from "react";
4+
import { useMessaging } from "@footron/controls-client";
5+
import {
6+
FormControl,
7+
NativeSelect,
8+
InputLabel,
9+
Checkbox,
10+
FormControlLabel,
11+
FormGroup, Slider
12+
} from "@material-ui/core";
13+
import { useCallback } from "react";
14+
15+
const containerStyle = css`
16+
padding: 16px;
17+
overflow-x: hidden;
18+
19+
p {
20+
margin: 0 0 16px;
21+
}
22+
`;
23+
24+
const names = [
25+
[ 0, 'Aba, Nigeria' ],
26+
[ 1, 'Accra, Ghana' ],
27+
[ 2, 'Albuquerque, New Mexico' ],
28+
[ 3, 'Anchorage, Alaska' ],
29+
[ 4, 'Apia, Samoa' ],
30+
[ 5, 'Asuncion, Paraguay' ],
31+
[ 6, 'Atlanta, Georgia' ],
32+
[ 7, 'Barranquilla, Colombia' ],
33+
[ 8, 'Baton Rouge, Louisiana' ],
34+
[ 9, 'Bentonville, Arkansas' ],
35+
[ 10, 'Bern, Switzerland' ],
36+
[ 11, 'Billings, Montana' ],
37+
[ 12, 'Birmingham, Alabama' ],
38+
[ 13, 'Bismarck, North Dakota' ],
39+
[ 14, 'Bogota, Colombia' ],
40+
[ 15, 'Boise, Idaho' ],
41+
[ 16, 'Bountiful, Utah' ],
42+
[ 17, 'Brigham City, Utah' ],
43+
[ 18, 'Brisbane, Australia' ],
44+
[ 19, 'Buenos Aires, Argentina' ],
45+
[ 20, 'Calgary, Alberta' ],
46+
[ 21, 'Campinas, Brazil' ],
47+
[ 22, 'Caracas, Venezuela' ],
48+
[ 23, 'Cardston, Alberta' ],
49+
[ 24, 'Cebu City, Philippines' ],
50+
[ 25, 'Cedar City, Utah' ],
51+
[ 26, 'Chicago, Illinois' ],
52+
[ 27, 'Ciudad Juarez, Mexico' ],
53+
[ 28, 'Colonia Juarez, Mexico' ],
54+
[ 29, 'Columbia River, Washington' ],
55+
[ 30, 'Columbia, South Carolina' ],
56+
[ 31, 'Columbus, Ohio' ],
57+
[ 32, 'Concepcion, Chile' ],
58+
[ 33, 'Copenhagen, Denmark' ],
59+
[ 34, 'Cordoba, Argentina' ],
60+
[ 35, 'Dallas, Texas' ],
61+
[ 36, 'Denver, Colorado' ],
62+
[ 37, 'Detroit, Michigan' ],
63+
[ 38, 'Draper, Utah' ],
64+
[ 39, 'Edmonton, Alberta' ],
65+
[ 40, 'Fort Collins, Colorado' ],
66+
[ 41, 'Fortaleza, Brazil' ],
67+
[ 42, 'Frankfurt, Germany' ],
68+
[ 43, 'Freiberg, Germany' ],
69+
[ 44, 'Fresno, California' ],
70+
[ 45, 'Fukuoka, Japan' ],
71+
[ 46, 'Gila Valley, Arizona' ],
72+
[ 47, 'Gilbert, Arizona' ],
73+
[ 48, 'Guadalajara, Mexico' ],
74+
[ 49, 'Guatemala City, Guatemala' ],
75+
[ 50, 'Guayaquil, Ecuador' ],
76+
[ 51, 'Hague, Netherlands ' ],
77+
[ 52, 'Hartford, Connecticut' ],
78+
[ 53, 'Hong Kong, China' ],
79+
[ 54, 'Houston, Texas' ],
80+
[ 55, 'Idaho Falls, Idaho' ],
81+
[ 56, 'Indiana, Indianapolis' ],
82+
[ 57, 'Johannesburg, South Africa' ],
83+
[ 58, 'Jordan River, Utah' ],
84+
[ 59, 'Kinshasa, Democratic Republic of Congo' ],
85+
[ 60, 'Kirtland, Ohio' ],
86+
[ 61, 'Kona, Hawaii' ],
87+
[ 62, 'Kyiv, Ukraine' ],
88+
[ 63, 'Laie, Hawaii' ],
89+
[ 64, 'Las Vegas, Nevada' ],
90+
[ 65, 'Lima, Peru' ],
91+
[ 66, 'Logan, Utah' ],
92+
[ 67, 'London, England' ],
93+
[ 68, 'Los Angeles, California' ],
94+
[ 69, 'Louisville, Kentucky' ],
95+
[ 70, 'Lubbock, Texas' ],
96+
[ 71, 'Madrid, Spain' ],
97+
[ 72, 'Manaus, Brazil' ],
98+
[ 73, 'Manhattan, New York' ],
99+
[ 74, 'Manila, Philippines' ],
100+
[ 75, 'Manti, Utah' ],
101+
[ 76, 'Medford, Oregon' ],
102+
[ 77, 'Melbourne, Australia' ],
103+
[ 78, 'Memphis, Tennessee' ],
104+
[ 79, 'Merida, Mexico' ],
105+
[ 80, 'Meridian, Idaho' ],
106+
[ 81, 'Mesa, Arizona' ],
107+
[ 82, 'Mexico City, Mexico' ],
108+
[ 83, 'Monterrey, Mexico' ],
109+
[ 84, 'Montevideo, Uruguay' ],
110+
[ 85, 'Monticello, Utah' ],
111+
[ 86, 'Mount Timpanogos, Utah' ],
112+
[ 87, 'Nashville, Tennessee' ],
113+
[ 88, 'Nauvoo, Illinois' ],
114+
[ 89, 'Newport Beach, California' ],
115+
[ 90, 'Nukualofa, Tonga' ],
116+
[ 91, 'Oakland, California' ],
117+
[ 92, 'Oaxaca, Mexico' ],
118+
[ 93, 'Ogden, Utah' ],
119+
[ 94, 'Oklahoma City, Oklahoma' ],
120+
[ 95, 'Oquirrh Mountain, Utah' ],
121+
[ 96, 'Orlando, Florida' ],
122+
[ 97, 'Palmyra, New York' ],
123+
[ 98, 'Panama City, Panama' ],
124+
[ 99, 'Papeete, Tahiti' ],
125+
[ 100, 'Paris, France' ],
126+
[ 101, 'Payson, Utah' ],
127+
[ 102, 'Perth, Australia' ],
128+
[ 103, 'Philadelphia, Pennsylvania' ],
129+
[ 104, 'Phoenix, Arizona' ],
130+
[ 105, 'Port-au-Prince, Haiti' ],
131+
[ 106, 'Portland, Oregon' ],
132+
[ 107, 'Porto Alegre, Brazil' ],
133+
[ 108, 'Preston, England' ],
134+
[ 109, 'Provo City Center, Utah' ],
135+
[ 110, 'Provo, Utah' ],
136+
[ 111, 'Quetzaltenango, Guatemala' ],
137+
[ 112, 'Raleigh, North Carolina' ],
138+
[ 113, 'Recife, Brazil' ],
139+
[ 114, 'Redlands, California' ],
140+
[ 115, 'Reno, Nevada' ],
141+
[ 116, 'Rexburg, Idaho' ],
142+
[ 117, 'Rome, Italy' ],
143+
[ 118, 'Salt Lake City, Utah' ],
144+
[ 119, 'San Antonio, Texas' ],
145+
[ 120, 'San Diego, California' ],
146+
[ 121, 'San Jose, Costa Rica' ],
147+
[ 122, 'San Salvador, El Salvador' ],
148+
[ 123, 'Santiago, Chile' ],
149+
[ 124, 'Sao Paulo, Brazil' ],
150+
[ 125, 'Sapporo, Japan' ],
151+
[ 126, 'Seattle, Washington' ],
152+
[ 127, 'Snowflake, Arizona' ],
153+
[ 128, 'Spokane, Washington' ],
154+
[ 129, 'St George, Utah' ],
155+
[ 130, 'St Paul, Minnesota' ],
156+
[ 131, 'Star Valley, Wyoming' ],
157+
[ 132, 'Stockholm, Sweden' ],
158+
[ 133, 'Suva, Fiji' ],
159+
[ 134, 'Sydney, Australia' ],
160+
[ 135, 'Taipei, Taiwan' ],
161+
[ 136, 'Tampico, Mexico' ],
162+
[ 137, 'Tegucigalpa, Honduras' ],
163+
[ 138, 'Toronto, Ontario' ],
164+
[ 139, 'Trujillo, Peru' ],
165+
[ 140, 'Tucson, Arizona' ],
166+
[ 141, 'Tuxtla Gutiérrez, Mexico' ],
167+
[ 142, 'Vancouver, Washington' ],
168+
[ 143, 'Veracruz, Mexico' ],
169+
[ 144, 'Vernal, Utah' ],
170+
[ 145, 'Villahermosa, Mexico' ],
171+
[ 146, 'Washington, D.C.' ],
172+
[ 147, 'Winter Quarters, Nebraska' ],
173+
174+
]
175+
176+
const ControlsComponent = (): JSX.Element => {
177+
const [name, setName] = useState<string>("");
178+
179+
const { sendMessage } = useMessaging<any>();
180+
181+
const handleNameChange = (event: React.ChangeEvent<{ name?: string; value: string }>) => {
182+
const name = event.target.value;
183+
setName(name);
184+
sendMessage(name)
185+
};
186+
187+
return (
188+
<div css={containerStyle}>
189+
<FormGroup>
190+
<p>
191+
<b>Pick a temple from the list to see it on the big screen! (It will show for 60 seconds)</b>
192+
</p>
193+
<FormControl>
194+
<InputLabel htmlFor="name-native-helper">Name</InputLabel>
195+
<NativeSelect
196+
inputProps={{
197+
name: 'Name',
198+
id: 'name-native-helper',
199+
}}
200+
id="demo-simple-select"
201+
value={name}
202+
name="Name"
203+
onChange={handleNameChange}
204+
>
205+
<option value="all">All names</option>
206+
{
207+
names.map((name) => <option key={"id"} value={name[0]}>{name[1]}</option>)
208+
}
209+
</NativeSelect>
210+
</FormControl>
211+
</FormGroup>
212+
</div>
213+
);
214+
};
215+
216+
export default ControlsComponent;

experiences/temple-photo-op/thumb.jpg

187 KB
Loading
Binary file not shown.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
var fader_defaults = {
3+
in: 500,
4+
stay: 2000,
5+
out: 500,
6+
delaynext: 1000
7+
};
8+
9+
function fader_set_defaults( new_defaults ) {
10+
var attrs = [ 'in', 'stay', 'out', 'delaynext' ];
11+
for ( var ind=0; ind < attrs.length; ind++ ) {
12+
if ( new_defaults[ attrs[ind] ] ) {
13+
fader_defaults[ attrs[ind] ] = new_defaults[ attrs[ind] ];
14+
}
15+
}
16+
}
17+
18+
function fader_start() {
19+
var fades = document.querySelectorAll('.fader');
20+
if ( fades.length == 0 ) {
21+
return;
22+
}
23+
24+
var events = [];
25+
for ( var ind=0; ind<fades.length; ind++ ) {
26+
events.push( {
27+
objref: fades[ind],
28+
in: fades[ind].dataset.in ? Number( fades[ind].dataset.in ): fader_defaults.in,
29+
stay: fades[ind].dataset.stay ? Number( fades[ind].dataset.stay ): fader_defaults.stay,
30+
out: fades[ind].dataset.out ? Number( fades[ind].dataset.out ): fader_defaults.out,
31+
delaynext: fades[ind].dataset.delaynext ? Number( fades[ind].dataset.delaynext ): fader_defaults.delaynext,
32+
} );
33+
}
34+
main_fader( events, 0 );
35+
}
36+
37+
var event_count = 0;
38+
var do_fading = true;
39+
40+
function stop_fading() {
41+
do_fading = false;
42+
}
43+
44+
function resume_fading() {
45+
do_fading = true;
46+
}
47+
48+
function main_fader( events, ind ) {
49+
var evt = events[ind];
50+
51+
event_count += 1;
52+
if ( do_fading ) {
53+
$( evt.objref ).children().fadeIn( evt.in,function() {
54+
setTimeout( function() {$( evt.objref ).children().fadeOut( evt.out, function(){ event_count -= 1; } ) }, evt.stay );
55+
});
56+
}
57+
58+
if ( ind < events.length-1 ) {
59+
setTimeout( function(){ main_fader(events,ind+1); }, evt.delaynext );
60+
} else {
61+
setTimeout( function(){ try_to_loop(events) }, evt.delaynext );
62+
}
63+
}
64+
65+
function try_to_loop( events ) {
66+
// loop back to the beginning
67+
if ( event_count > 0 ) {
68+
setTimeout( function(){ try_to_loop(events); }, 1000 );
69+
} else {
70+
main_fader( events, 0 );
71+
}
72+
}

0 commit comments

Comments
 (0)