text
stringlengths
1
22.8M
Horace Greeley Knapp was an American architect. He had been established as an architect for 20 years but was "still quite a young man" in 1894, when profiled in a directory of New York City. He was born in rural Rockland County, New York. Several of his works are listed on the National Register of Historic Places (NRHP). Works include: Bennett Deyrup House (1887), 309 N Broadway, Upper Nyack, NY American Federation of Human Rights Headquarters (1919-1924), 9070 S. Douglas Blvd. Larkspur, Colorado, NRHP-listed Blaine County Courthouse (Hailey, Idaho), 1st and Croy Sts. Hailey, Idaho, NRHP-listed Homer Pound House, 314 2nd Ave., S. Hailey, Idaho, NRHP-listed Wells Building, Buffalo, New York Taylor's Theater and Office Building, Buffalo, New York Real Estate Exchange Building, Buffalo, New York "Gray Crags" on the Palisades, New York, built for W. S. Opdyke. He was described as an architect of New York City, with offices at 335 Broadway, in 1919 when he designed the AFHR headquarters building in Colorado. In 1894 his offices were at 106 and 108 Fulton Street. References Architects from New York City
Aberconwy House, 2 Castle Street, Conwy, Wales is a medieval merchant's house and one of the oldest dateable houses in Wales. Constructed in the 15th century it is, along with Plas Mawr, one of the two surviving merchant's houses within the town. Its historical and architectural importance is reflected in its status as a Grade I listed building. The house is administered by the National Trust. History Following the conquest of Wales by Edward I in the late 13th century, Conwy, with its castle and walls, became an important strategic and commercial centre. The town was granted a Royal charter in 1284 and English settlers, particularly from the counties of Cheshire and Lancashire, were encouraged to populate the new borough. Aberconwy House is a rare survivor of a number of such houses-cum-warehouses built by English merchants trading on the Welsh Marches in the medieval period. Tree-ring analysis of the roof timbers shows that the trees were felled . This dating makes it one of the oldest dateable houses in Wales and its importance was recognised in 1950 when it was designated a Grade I listed building. In the 19th and 20th centuries, the house served as a temperance hotel and, following closure and other subsequent uses, it was left to the National Trust for Places of Historic Interest or Natural Beauty in 1934. The Trust undertook an extensive restoration in 1976 and the house is now run as a museum. Architecture and description The house is of two upper storeys, over a cellar. The top floor is jettied, with the overhanging structure supported on corbel stones, "a mark of prosperity". The building is constructed around a timber frame which shows a Kentish or Wealden influence. Notes References External links Aberconwy House on the National Trust website Grade I listed buildings in Conwy County Borough Houses in Conwy County Borough Museums in Conwy County Borough Historic house museums in Wales National Trust properties in Wales
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; var pkgs = require( './../lib' ); pkgs( onPkgs ); function onPkgs( error, list ) { if ( error ) { throw error; } console.dir( list ); } ```
is a women's private university headquartered in Toyoake, Aichi, Japan, with its so-called Nagoya Campus there. There is another campus in Toyota, Aichi. The school was established in 1990 as a junior college and then became a four-year college in 1998. The earliest predecessor was a nursing school established in 1903, which became a girls' high school in 1923, which continues to operate today. References External links Official website Universities and colleges established in 1903 Private universities and colleges in Japan Universities and colleges in Aichi Prefecture 1903 establishments in Japan Toyoake, Aichi Toyota, Aichi
The 2014–15 Boston University Terriers men's ice hockey team represented Boston University in the 2014–15 NCAA Division I men's ice hockey season. The team is coached by David Quinn, in his 2nd season with the Terriers. The Terriers play their home games at Agganis Arena on campus in Boston, Massachusetts, competing in Hockey East. Personnel Roster As of end of season. |} Coaching staff Standings Schedule |- !colspan=12 style=""| Exhibition |- !colspan=12 style=""| Regular Season |- !colspan=12 style=""| Postseason Rankings References Boston University Terriers men's ice hockey seasons Boston University Boston University Boston University Boston University Boston University Boston University Boston University
Dampierre-sur-Salon () is a commune in the Haute-Saône department in the region of Bourgogne-Franche-Comté in eastern France. See also Communes of the Haute-Saône department References Communes of Haute-Saône
Agliana is a comune (municipality) in the Province of Pistoia in the Italian region of Tuscany, located about northwest of Florence and about southeast of Pistoia. Agliana borders the municipalities of Montale, Montemurlo, Pistoia, Prato, and Quarrata. Notable people Giuseppe Morosi, professional footballer Twin towns Agliana is twinned with: Mallemort, France Tifariti, Western Sahara Beit Sahour, Palestine References External links Comune di Agliana (in Italian) Cities and towns in Tuscany Articles which contain graphical timelines
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; // MODULES // var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive; var abs = require( '@stdlib/math/base/special/abs' ); var incrmmax = require( '@stdlib/stats/incr/mmax' ); var format = require( '@stdlib/string/format' ); // MAIN // /** * Returns an accumulator function which incrementally computes a moving maximum absolute value. * * @param {PositiveInteger} W - window size * @throws {TypeError} must provide a positive integer * @returns {Function} accumulator function * * @example * var accumulator = incrmmaxabs( 3 ); * * var m = accumulator(); * // returns null * * m = accumulator( 2.0 ); * // returns 2.0 * * m = accumulator( -5.0 ); * // returns 5.0 * * m = accumulator( 3.0 ); * // returns 5.0 * * m = accumulator( 5.0 ); * // returns 5.0 * * m = accumulator(); * // returns 5.0 */ function incrmmaxabs( W ) { var max; if ( !isPositiveInteger( W ) ) { throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) ); } max = incrmmax( W ); return accumulator; /** * If provided a value, the accumulator function returns an updated maximum absolute value. If not provided a value, the accumulator function returns the current maximum absolute value. * * @private * @param {number} [x] - input value * @returns {(number|null)} maximum absolute value or null */ function accumulator( x ) { if ( arguments.length === 0 ) { return max(); } return max( abs( x ) ); } } // EXPORTS // module.exports = incrmmaxabs; ```
```swift // // AutoFillCreateNewEntryDialog.swift // MacBox // // Created by Strongbox on 12/10/2023. // import SwiftUI @available(macOS 13.0, *) struct AutoFillCreateNewEntryDialog: View { @State var disableAllControlsBeforeDismiss = false @State var title: String = "" @State var url: String = "" @State var username: String = "" @State var password: String = "" @State var concealed: Bool = true @State var groups: [String] = ["Database", "group2", "group3", "group4"] @State var selectedGroupIdx: Int = 0 func generateNewPassword() { password = PasswordMaker.sharedInstance().generate(forConfigOrDefault: Settings.sharedInstance().passwordGenerationConfig) concealed = false } enum FocusedField { case title case username case password case url } @FocusState private var focusedField: FocusedField? var completion: ((_ cancel: Bool, _ title: String, _ username: String, _ password: String, _ url: String, _ selectedGroupIdx: Int?) -> Void)? var body: some View { VStack(spacing: 20) { VStack(spacing: 4) { Image("StrongBox-256x256") .resizable() .frame(width: 40, height: 40) .foregroundStyle(.tint) VStack(spacing: 4) { Text("autofill_create_new_entry_title") .font(.title) Text("autofill_create_new_entry_message") .fixedSize(horizontal: false, vertical: true) .multilineTextAlignment(.center) .font(.subheadline) } } VStack(spacing: 16) { VStack(alignment: .leading, spacing: 4) { Text("generic_field_name_group").foregroundColor(.secondary) Picker("", selection: $selectedGroupIdx) { ForEach(groups.indices, id: \.self) { idx in HStack { Image(systemName: idx == 0 ? "house.fill" : "folder.fill") Text(groups[idx]) .font(.body) .foregroundColor(.primary) } } } .controlSize(.large) .padding(.leading, -8) .pickerStyle(.automatic) .disabled(disableAllControlsBeforeDismiss) } VStack(alignment: .leading, spacing: 4) { HStack(spacing: 4) { Image(systemName: "person.badge.key.fill") .foregroundColor(.secondary) Text("generic_fieldname_title") .foregroundColor(.secondary) } TextField("generic_fieldname_title", text: $title) .foregroundColor(.primary) .controlSize(.large) .textFieldStyle(.roundedBorder) .focused($focusedField, equals: .title) .disabled(disableAllControlsBeforeDismiss) } VStack(alignment: .leading, spacing: 4) { HStack(spacing: 4) { Image(systemName: "person.fill") .foregroundColor(.secondary) Text("generic_fieldname_username") .foregroundColor(.secondary) } TextField("generic_fieldname_username", text: $username) .foregroundColor(.primary) .controlSize(.large) .textFieldStyle(.roundedBorder) .focused($focusedField, equals: .username) .disabled(disableAllControlsBeforeDismiss) } VStack(alignment: .leading, spacing: 4) { HStack(spacing: 4) { Image(systemName: "ellipsis.rectangle.fill") .foregroundColor(.secondary) Text("generic_fieldname_password") .foregroundColor(.secondary) } HStack { PasswordConcealRevealTextField(text: $password, isSecure: $concealed, titleKey: "generic_fieldname_password") .focused($focusedField, equals: .password) .disabled(disableAllControlsBeforeDismiss) Button { generateNewPassword() } label: { Image(systemName: "arrow.clockwise.circle.fill").imageScale(.large) } .buttonStyle(.borderless) .disabled(disableAllControlsBeforeDismiss) } } VStack(alignment: .leading, spacing: 4) { HStack(spacing: 4) { Image(systemName: "link.circle") .foregroundColor(.secondary) Text("generic_fieldname_url") .foregroundColor(.secondary) } TextField("generic_fieldname_url", text: $url) .foregroundColor(.primary) .controlSize(.large) .textFieldStyle(.roundedBorder) .focused($focusedField, equals: .url) .disabled(disableAllControlsBeforeDismiss) } } HStack(spacing: 12) { Button { disableAllControlsBeforeDismiss = true completion?(true, title, username, password, url, nil) } label: { Text("generic_cancel") } .controlSize(.large) .keyboardShortcut(.cancelAction) .disabled(disableAllControlsBeforeDismiss) Button { disableAllControlsBeforeDismiss = true completion?(false, title, username, password, url, selectedGroupIdx) } label: { HStack(spacing: 4) { Image(systemName: "plus.circle.fill") Text("mac_save_action") .foregroundColor(.white) .font(.headline) } .padding(.horizontal) } .controlSize(.large) .cornerRadius(5) .keyboardShortcut(.defaultAction) .disabled(disableAllControlsBeforeDismiss) } } .padding(20) .frame(maxWidth: 400) .onAppear { focusedField = .title } } } ```
Bad Heilbrunn is a municipality in the district of Bad Tölz-Wolfratshausen in Bavaria in Germany. References Bad Tölz-Wolfratshausen Spa towns in Germany
The Most Honourable Order of the Crown of Johor (Malay: Darjah Mahkota Johor Yang Amat Mulia) is an Order of chivalry awarded by the Sultan of Johor. It was first instituted on July 31, 1886. It is awarded in three classes: Knight Grand Commander (Dato' Sri Paduka-S.P.M.J.), Knight Commander (Dato' Paduka-D.P.M.J.) and Companion (Setia-S.M.J.). Male recipients of these royal awards, the Dato' Sri Paduka Mahkota Johor (SPMJ) and the Dato' Paduka Mahkota Johor (DPMJ) are entitled to be addressed with the honorary title “Dato” (equivalent to ‘Sir’) and their female spouse “Datin” (equivalent to ‘Lady’). Female recipients are given the honorary title Datin Paduka (equivalent to 'Dame') but there is no accompanying title for their male spouse. The Order of the Crown of Johor is the oldest royal order in the country, introduced some 30 years before any of the other Malaysian royal households introduced a similar order. The awards are bestowed based on three main criteria namely; loyalty, meticulous service and diligence. Since these royal awards were first conferred in 1886, only 712 individuals have been honoured, an average of only five honours per year making it reputedly the rarest and hence most prestigious ‘Datoship’ (or knighthood) to get in Malaysia. Awards are conferred at the sultan's discretion, in conjunction with the birthday of the Sultan of Johor. The annual Honours List is published in most mainstream Malaysian media and newspapers. Notable recipients Knight Grand Commander (S.P.M.J) Franz Ferdinand Jaafar Haji Muhammad Abdul Rahman Andak Abdul Rahman Mohamed Yassin (1941) Hassan Yunus (1959) Mohamed Noah Omar (1960) Suleiman Abdul Rahman (1960) Abdul Razak Hussein (1961) Ismail Abdul Rahman (1965) Aw Cheng Chye (1968) Hussein Onn Mustapha Harun (1970) Sulaiman Ninam Shah (1970) Sardon Jubir (1972) Abdul Kadir Yusuf (1973) Mohamed Rahmat (1975) Awang Hassan (1977) Mahathir Mohamad (1979) Lee Kuan Yew (1984) Edmund W. Barker (1984) Jaffar Hussein (1986) Leonardus Benyamin Moerdani (1986) Mariam Abdul Aziz (1987) Try Sutrisno Tan Hiok Nee Toh Ah Boon Abdul Rahman Ya'kub Abdul Taib Mahmud Ibrahim Ismail Syed Nasir Ismail Musa Hitam Samy Vellu Goh Chok Tong (1991) Tan Hong Chiang (1973) Muhyiddin Yassin (1991) Syed Hamid Albar Abdul Ghani Othman (2004) Ali Hamsa (2013) Noorainee Abdul Rahman (2013) Mohamed Khaled Nordin (2013) Osman Sapian (2018) Hasni Mohammad (2021) Lee Hsien Loong (2022) </div> Knight Commander (D.P.M.J) Onn Jaafar (1940) Tan Cheng Lock (1949) Aw Cheng Chye (1963) Toh Ah Boon Syed Jaafar Albar T. Sachithanandan Hishammuddin Hussein Zeti Akhtar Aziz Wan Mokhtar Wan Ahmad Abdul Rahim Thamby Chik Shake (singer) Tan Hong Chiang </div> Companion (S.M.J.) Wong Ah Fook Lim Ah Siang Abdul Ghani Othman Muhyiddin Yassin Sharifah Aini </div> See also Orders, decorations, and medals of the Malaysian states and federal territories#Johor Orders, decorations, and medals of Johor Order of precedence in Johor List of post-nominal letters (Johor) References External links World Medal Index, Decorations of Johor Colecciones Militares (Antonio Prieto Barrio), Decorations of Johor Coronation website of Sultan Ibrahim Johor, Crown, Order of the Crown of Johor
The North Northamptonshire LTC Tournament . also known simply as the North Northamptonshire LTC was a brief Victorian era men's and women's grass court tennis tournament founded in 1880. It was organised by the North Northamptonshire Lawn Tennis Club who held the event at different locations in North Northamptonshire, England. The tournament ran annually for four editions only until 1883. History North Northamptonshire LTC Tournament was founded in 1880 by the North Northamptonshire Lawn Tennis Club who held the event at different locations in North Northamptonshire, England through until 1883. The inaugural event was held on 20 July 1880 at Drayton Park at Drayton House on the Drayton Estate, Lowick, near Kettering, but could not be completed until August 1880, and at Broughton Park, Broughton, Northamptonshire. The winner of the gentleman's singles was Mr. W.H. Collins. A description of the event that concluded on 23 June 1881: North Northamptonshire Lawn Tennis Club usually held two versions of this tournament one in the spring around April and the other early summer in June, they are referred to as the first and second meetings. The final edition concluded on 18 August 1883 at Drayton Park, Kettering the winner of last gentleman's singles was Mr. H.S. Roughton. Spring (First Meeting) Men's Singles Summer (Second Meeting) Men's Singles Men's Doubles Women's Doubles Mixed Doubles Notes Challenge Round: the final round of a tournament, in which the winner of a single-elimination phase faces the previous year's champion, who plays only that one match. The challenge round was used in the early history of tennis (from 1877 through 1921), in some tournaments not all.* Indicates challenger References Sources Routledges Sporting Annual (1882) George Routledge and Son. London. The Evening Post (20 March 1922) Dublin, Ireland Defunct tennis tournaments in the United Kingdom Grass court tennis tournaments
Postnormal times (PNT) is a concept developed by Ziauddin Sardar as a development of post-normal science. Sardar describes the present as "postnormal times", "in an in-between period where old orthodoxies are dying, new ones have yet to be born, and very few things seem to make sense." Context In support of engaging communities of various scope and scale on how to best navigate PNT and imagine preferred pathways toward the future(s), Sardar and Sweeney published an article in the journal Futures outlining The Three Tomorrows method, which fills a gap in the field as "many methods of futures and foresight seldom incorporate pluralism and diversity intrinsically in their frameworks, and few, if any, emphasize the dynamic and merging nature of futures possibilities, or highlight the ignorance and uncertainties we constantly confront". Theory and criticism Rakesh Kapoor criticized PNT in 2011 as a Western concept that does not apply to India and other emerging markets. Sam Cole criticised the three Cs of PNT (chaos, complexity and contradictions) as "Alliterative Logic, theorizing through alliterative word-triads that is not based on empirical evidence". Jay Gary has suggested that PNT is embryonic, needs a more robust framework, and should be extended to include C S Holling's adaptive cycle. Scientists working on complex evolving systems have pointed out that PNT recalls the "Long Waves" of Kondratiev and Joseph Schumpeter's view of waves of "creative destruction". PNT is one of the core areas of research for the Center for Postnormal Policy and Futures Studies at East-West University in Chicago, Illinois, US. A number of articles and editorials on PNT have been published in the journal East-West Affairs. References External links Center for Postnormal Policy and Futures Studies East-West Affairs: A Quarterly Journal of North-South Relations in Postnormal Times 'The Centre for Postnormal Policy and Futures Studies (CPPFS) is an international research and consultancy network that promotes futures literacy...' Scientific method Philosophy of science Science and technology studies
Lida Martinoli (1914–1991) was an Argentine dancer, choreographer, and theatre performer in Buenos Aires. Born in Rosario, Santa Fe in 1914, she was the daughter of the artists Fanny Montiano and Carlos Martinoli. She studied ballet at La Scala in Milan before returning to Buenos Aires in 1932. She joined the corps de ballet of the Teatro Colón, where she danced until 1956. At the Teatro Colón, she served as prima ballerina during the 1940s, dancing the choreographies of Vaslav Nijinsky and Margarita Wallmann and starring in her version of The Nutcracker with Michael Borovski and Maria Ruvanova. In 1953, as prima ballerina for Teatro Colón, she performed at Carnegie Hall in her North American debut. When she retired from dancing, Martinoli began to choreograph, and is known for her kitschy and outlandish dances - the choreography for "La Leprosa" required the actor to stick ham to themselves that fell off during the dance, imitating the symptoms of leprosy. She died in Santa Fe in 1991. Screenwriters Kado Kostzer and Afredo Rodriguez Arias wrote the play "Familie d'Artistes" about Lida and the Martinoli family in 1989, which was staged at the Teatro Maipo in Buenos Aires in 1991. References 1914 births 1991 deaths Argentine female dancers Argentine dancers Argentine choreographers Argentine women choreographers People from Rosario, Santa Fe
Tom Town Historic District, also known as Calton Mill, Carter Canning Co., and Sperandio Canning Co., is a national historic district located along Little Flat Creek approximately 4.5 miles south of Pleasant Ridge, Barry County, Missouri. The district consists of two buildings (a mill and a cannery) and a single structure (a boiler house) which are the last remnants of an historic Ozarks agricultural complex. It was added to the National Register of Historic Places in 1989. References Historic districts on the National Register of Historic Places in Missouri Industrial buildings and structures on the National Register of Historic Places in Missouri Buildings and structures in Barry County, Missouri National Register of Historic Places in Barry County, Missouri
Rikki Klieman (born 1948) is an American criminal defense lawyer and television personality. A native of Chicago, she is a legal analyst for CBS News, having previously worked in criminal defense in Boston and taught at Columbia Law School. Additionally, she is an author, actress, and is married to William Bratton, former chief of the Los Angeles Police Department and former Police Commissioner of the New York Police Department. Early life Klieman was born in 1948 to a Ukrainian Jewish immigrant family in Chicago, where she danced, acted, and sang as a youth. Klieman attended Northwestern University where she was a theater major and had plans of becoming an actress. However, she decided to attend law school. Klieman graduated from Boston University School of Law in 1975 with her Juris Doctor. During law school she externed for U.S. District Court judge Walter Jay Skinner. Legal career After law school Klieman was an assistant district attorney for the Middlesex County District Attorney's Office, before she joined the Boston, Massachusetts, law firm of Friedman & Atherton and then started her own private practice. In 1983 she was named by Time magazine as one of the five best female attorneys in the United States. In 1993 in the case of Commonwealth v. Twitchell she defended the Christian Scientist parents whose two-year-old son died of an untreated bowel obstruction. From 1996 to 2003 she was a member of the faculty of Columbia Law School, and previously taught at the law school of her alma mater, Boston University. Other Klieman worked for TruTV until October 30, 2009, when its news division was absorbed into CNN's existing crime/justice coverage unit. She has also acted in the guest-recurring role of lawyer Kathy Berson on TV series Las Vegas during the 2005–06 season. More recently, she has appeared on the TV show Shark. She also wrote her autobiography with co-author Peter Knobler, Fairy Tales Can Come True: How a Driven Woman Changed Her Destiny. She's been married to her third husband, Bill Bratton, the former police chief of Boston, New York City, and Los Angeles, since 1999. Klieman is his fourth wife. In 2013 she appeared as Katrina McCarthy in the season 4 episode "Justice Served" of the CBS police procedural drama Blue Bloods, as well as appearing in 2014 in the season 5 episode "Loose Lips" as Judge Fowler, and again appeared as Judge Fowler in 2015 in the 6th-season episode "Rush to Judgment" of Blue Bloods. As of 2015, Klieman regularly appears as a legal analyst for CBS News' morning news show CBS This Morning. References External links 1948 births Living people American people of Ukrainian-Jewish descent Boston University School of Law alumni Boston University School of Law faculty Columbia Law School faculty Lawyers from Chicago Massachusetts lawyers Northwestern University Pritzker School of Law alumni Warner Bros. Discovery people CBS News people American women legal scholars American legal scholars American women academics 20th-century American lawyers 20th-century American women lawyers 21st-century American lawyers 21st-century American women lawyers
The amity-enmity complex theory was introduced by Sir Arthur Keith in his work, A New Theory of Human Evolution (1948). He posited that humans evolved as differing races, tribes, and cultures, exhibiting patriotism, morality, leadership and nationalism. Those who belong are part of the in-group, and tolerated; all others are classed as out-group, and subject to hostility: "The code of enmity is a necessary part of the machinery of evolution. He who feels generous towards his enemy... has given up his place in the turmoil of evolutionary competition." Conscience in humans evolved a duality: to protect and save friends, and also to hate and fight enemies. Keith's work summarized earlier opinions on human tribalism by Charles Darwin, Alfred Russel Wallace, and Herbert Spencer. Case studies United States; racial segregation: Keith suggested that racial segregation imposed by Jim Crow laws was a 'vast experiment' in which ten million “coloreds” were 'marked off (in 1948) from the rest by a frontier as sharply defined and jealously guarded as the frontiers of a kingdom'. Apartheid in South Africa: White 'dominance' was 'deeply seated in the primitive organization of the Human brain.' Keith alleged that Boer and British settlers both agree 'there is an impassable frontier between them and the native races of Africa and Asia'. Jews in Europe: 'The Jews maintain a racial frontier (in 1948), such as dominant races surround themselves with; they carry themselves as if racially distinct...the Jewish frontier may be strengthened by the faith which is (sic) the standard of the race.' Keith alleged that Jews had a 'dual code; conduct towards their fellows is based on amity, that to all outside their circle is based on enmity. The use of the dual code is the mark of an evolving race.' The Indian caste system. The dhimmi status imposed on non-muslims in areas submitted to islamic law. Peter Corning cites: Shia versus Sunni, Catholic versus Protestant, the American Civil War and World War I as further examples of this 'syndrome'. Disruption The amity-enmity complex maintains 'tribal spirit' and thus unity, of the community, 'as long as personal contact between its members is possible.' If the community grows beyond this limitation, then disruption, swarming and disintegration occur. Modern mass communication enables communities 'of 100 million' to remain intact. Cyclical effect Keith expressed regret that this phenomenon, which explains so much, had not become common knowledge: "[W]e eternally experience the misery... of each new manifestation of the complex, then invent some new 'ism' to categorize this behavior as an evil, dealing with a common behavioral trait piecemeal [instead of] finally grasping and understanding the phenomenon." Modern examples of tribal instinct Colleges, sports teams, churches, trades unions, female fashions and political parties enable people to exhibit tribal loyalty within large, mass-communicating nations. 'In politics we have to take sides.' But all these 'petty manifestations' are cast aside in time of war. Bismarck, Abraham Lincoln and Lloyd George are cited as statesmen who knew how to exploit the tribal spirit for political ends. In later works According to Peter Bowler, Konrad Lorenz, Robert Ardrey and Desmond Morris were successors to Keith in promoting the 'anthropology of aggression' theory. Ardrey pointed out that similar behavior can be observed in most primates, especially baboons and chimps. "Nationalism as such is no more than a human expression of the animal drive to maintain and defend a territory... the mentality of the single Germanic tribe under Hitler differed in no way from that of early man or late baboon." The amity-enmity complex is a serious obstacle to world peace and world government, and may even lead to nuclear holocaust: "How can we get along without war?... if we fail to get along without war, the future will be as lacking in human problems as it will be remarkably lacking in men." Desmond Morris makes a prescriptive point: "We must try to step outside our groups and look down on human battlefields with the unbiased eye of a hovering Martian." And he warns that "the truly violent species all appear to have exterminated themselves, a lesson we should not overlook." The inherited aggression of the amity-enmity rivalry between communities is rationalized under a "persistent cloak of ideology... a matter of ideals, moral principles, social philosophies or religious beliefs.... [O]nly an immense amount of intellectual restraint will save the situation." After World War II, a debate about the place of instinct and learning (the nature-versus-nurture debate) has occurred. According to Steven Pinker, the "bitter lessons of lynchings, world wars, and the Holocaust" have caused "prevailing theories of mind" to be "refashioned to make racism and sexism as untenable as possible. The doctrine of the blank slate became entrenched in intellectual life." Pinker makes the point that "conflicts of interest are inherent to the human condition." Man is a product of nature, as much as malarial mosquitoes; both "are doing exactly what evolution designed them to do, even if the outcome makes people suffer... [We] cannot call their behavior pathological... [T]he belief that violence is an aberration is dangerous." Objections to the theory Research by Dian Fossey and Jane Goodall raised awareness of a gentler side to the great apes in opposition to the 'anthropology of aggression' theory, but 'both sides of the debate were working with limited models of ape behaviour'. See also Asabiyyah Historic recurrence History of evolutionary thought Ideocracy Kafir, Takfir Ideology Realistic conflict theory Social Darwinism State collapse References Causes of war Evolution Power (social and political) theories Social psychology Social theories Group processes
Englewood station may refer to: Englewood station (Chicago) in the Englewood neighborhood of Chicago, Illinois Englewood station (Chicago and Western Indiana Railroad) in the Englewood neighborhood of Chicago, Illinois Englewood station (Erie Railroad) in Englewood, New Jersey Englewood station (RTD) in Englewood, Colorado Englewood Avenue (MBTA station) in Brookline, Massachusetts
Chlosyne harrisii, or Harris's checkerspot, is a member of the family Nymphalidae that is found in North America. They range from the Canadian Atlantic provinces, excluding Newfoundland and Labrador, to Manitoba and North Dakota south to West Virginia and Ohio. They can often be seen in bogs, meadows and almost anywhere else its host plant occurs. The typical elevations for this species range from 0 to 1,742 feet (531 m). It is listed as a species of special concern and believed extirpated in the US state of Connecticut. Description The adult is often confused with another member of the same genus, the silvery checkerspot (Chlosyne nycteis). The adult's wingspan is 3.6–5.1 cm. The upperside of the wing is orange with black markings. The underside of the wing has a single red-orange stripe and a reddish-orange, white and black marked pattern on the rest of the hindwing. Life cycle There is one flight which occurs between June and July. The caterpillar of this species feeds on the flat-topped white aster (Aster umbellatus) while adults feed on flower nectar. The female lays eggs in a cluster formation under the leaves of its host plants. The caterpillar overwinters during its third instar. References Jim P. Brock, Kenn Kaufman (2003). Kaufman Field Guide to Butterflies of North America. Boston: Houghton Mifflin. . Butterflies of North America harrisii Taxa named by Samuel Hubbard Scudder Butterflies described in 1864
The men's 400 metres event at the 1990 Commonwealth Games was held on 27 and 28 January at the Mount Smart Stadium in Auckland. Medalists Results Heats Qualification: First 6 of each heat (Q) and the next 6 fastest (q) qualified for the quarterfinals. Quarterfinals Qualification: First 4 of each heat (Q) and the next 2 fastest (q) qualified for the semifinals. Semifinals Qualification: First 4 of each heat (Q) and the next 1 fastest (q) qualified for the final. Final References Semifinals results Heats and Quarterfinals results 400 1990
```java package com.ctrip.xpipe.redis.meta.server.keeper.applier.manager; import com.ctrip.xpipe.api.command.Command; import com.ctrip.xpipe.api.command.CommandFuture; import com.ctrip.xpipe.api.command.CommandFutureListener; import com.ctrip.xpipe.api.retry.RetryPolicy; import com.ctrip.xpipe.command.AbstractCommand; import com.ctrip.xpipe.command.CommandRetryWrapper; import com.ctrip.xpipe.exception.ErrorMessage; import com.ctrip.xpipe.redis.core.entity.ApplierTransMeta; import com.ctrip.xpipe.redis.core.keeper.applier.container.ApplierContainerErrorCode; import com.ctrip.xpipe.redis.core.keeper.applier.container.ApplierContainerException; import com.ctrip.xpipe.redis.core.keeper.applier.container.ApplierContainerService; import com.ctrip.xpipe.retry.RetryDelay; import java.util.concurrent.ScheduledExecutorService; /** * @author ayq * <p> * 2022/4/2 16:50 */ public abstract class AbstractApplierCommand<V> extends AbstractCommand<V> { protected final ApplierContainerService applierContainerService; protected final ApplierTransMeta applierTransMeta; protected ScheduledExecutorService scheduled; protected int timeoutMilli; protected int checkIntervalMilli = 1000; public AbstractApplierCommand(ApplierContainerService applierContainerService, ApplierTransMeta applierTransMeta, ScheduledExecutorService scheduled, int timeoutMilli, int checkIntervalMilli) { this.applierContainerService = applierContainerService; this.applierTransMeta = applierTransMeta; this.scheduled = scheduled; this.timeoutMilli = timeoutMilli; this.checkIntervalMilli = checkIntervalMilli; } @Override protected void doExecute() throws Exception { getLogger().info("[doExecute]{}", this); doOperation(); } @SuppressWarnings("unchecked") private void doOperation() { try{ doApplierContainerOperation(); checkUntilStateOk(); }catch(ApplierContainerException e){ ErrorMessage<ApplierContainerErrorCode> error = (ErrorMessage<ApplierContainerErrorCode>) e.getErrorMessage(); if(error != null && isSuccess(error)){ checkUntilStateOk(); }else{ future().setFailure(e); } }catch(Exception e){ future().setFailure(e); } } protected void checkUntilStateOk(){ CommandRetryWrapper.buildTimeoutRetry(timeoutMilli, createRetryPolicy(), createCheckStateCommand(), scheduled).execute().addListener(new CommandFutureListener<V>() { @Override public void operationComplete(CommandFuture<V> commandFuture) throws Exception { if(commandFuture.isSuccess()){ getLogger().info("[checkUntilStateOk][ok]{}", AbstractApplierCommand.this); future().setSuccess(commandFuture.get()); }else{ getLogger().info("[checkUntilStateOk][fail]{}, {}", AbstractApplierCommand.this, commandFuture.cause()); future().setFailure(commandFuture.cause()); } } }); } protected RetryPolicy createRetryPolicy() { return new RetryDelay(checkIntervalMilli); } protected abstract Command<V> createCheckStateCommand(); protected abstract boolean isSuccess(ErrorMessage<ApplierContainerErrorCode> error); protected abstract void doApplierContainerOperation(); @Override public String getName() { return String.format("[%s(%s)]", getClass().getSimpleName(), applierTransMeta); } } ```
Don't Cry Wolf () is a 2003 Swedish comedy film directed by Clas Lindberg. Lindberg won the Audience Award at the 2003 Kristiansand International Children's Film Festival for the film. Selected cast Kjell Bergqvist ... Roland Ström, Lillebror's father Daniel Bragderyd ... Lillebror Helena Korsvall ... Alex, Lillebror's sister Inga Ålenius ... Märta, Lillebror's grandmother David Schlein-Andersen ... Jens Karin Bjurström ... Veronika, Jens's mother Rikard Svensson ... Slim, thief Ivan Mathias Petersson ... Frank, thief Conny Andersson ... Peter, thief Willy Karlsson ... Granit Svante Grundberg... Guard at the museum Gösta Hurtig-Möller ... Guard at the museum Putte Elgh ... Guard at the museum Lennart Gustavsson ... Chief at the museum Helen Vedle ... Cashier at the museum External links 2003 films 2000s Swedish-language films 2000s children's comedy films Swedish children's films Films directed by Clas Lindberg 2003 comedy films 2000s Swedish films
Michel Brunet Perrault (born 20 July 1925) is a Canadian composer, conductor, music educator, and percussionist. As a composer, his work largely pulls on Canadian folk melodies and his compositions include classical of harmony and counterpoint. Perrault has been commissioned to write works for such notable organizations as the Canadian Broadcasting Corporation, Les Grands Ballets Canadiens, and the Victoria Symphony Orchestra. From the late 1970s through the 1990s he wrote a considerable amount of music for the Gerald Danovitch Saxophone Quartet. Much of his music has been published by his own publishing company, Les Publications Bonart. Early life Born in Montreal, Quebec, Perrault studied at McGill University under Louis Decair from 1941-1943. He then entered the Conservatoire de musique du Québec à Montréal where he was a pupil of Réal Gagnier from 1943-1944. He also studied privately with Gabriel Cusson between 1943-1946. He then studied in France at the École Normale de Musique de Paris with Nadia Boulanger, Georges Dandelot, and Arthur Honegger from 1946-1947. After returning to Canada he studied privately with Conrad Letendre. Career Perrault served as a percussionist in the Montreal Symphony Orchestra from 1944–1946 and 1949-1965. He held the same post with the Little Symphony of Montreal in 1945-1946. During the 1950s and 1960s he worked in a variety of capacities for the CBC, including serving as the conductor of the CBC Montreal Orchestra and working as a composer of music for radio. In 1950 he was awarded the Radiomonde prize for his radio scores. From 1958-1962 Perrault held the post of music director of Les Grands Ballets Canadiens; in 1965 the company performed his composition Suite Canadienne. In 1970 he co-founded the Institut de recherche Pantonal Inc. Among his notable pupils are Yves Lapierre and Albert Viau. In the 1980s he composed music for Gerald Danovitch and his quartet. In 2015 Perrault was appointed to the Order of Canada. That year he released an album, Gentleman Crooner. References 1925 births Living people Canadian composers Canadian male composers Male conductors (music) Canadian percussionists Conservatoire de musique du Québec à Montréal alumni École Normale de Musique de Paris alumni McGill University alumni Canadian music educators Musicians from Montreal 21st-century Canadian conductors (music) 21st-century Canadian male musicians
USS Seminole may refer to the following ships of the United States Navy: , launched in 1859, commissioned in 1860 and decommissioned in 1865. , a tug, built in 1879, purchased as Kate Jones in 1898 and commissioned the same year. She was decommissioned in 1898, and transferred to the War Department in 1900. , commissioned in 1940 and sunk by enemy action in October 1942. , commissioned in 1945 and decommissioned in 1970. United States Navy ship names
Jalan Tengku Muhamad, Federal Route 227, is a federal road in Kuantan, Pahang, Malaysia. The road connects Alor Akar in the north to Teluk Cempedak in the south. It was named after the former second and fourth Menteri Besar (Chief Minister) of Pahang, Tengku Muhammad ibni Almarhum Sultan Ahmad Al-Mu’adzam Shah. The Kilometre Zero of the Federal Route 227 starts at Alor Akar junctions. At most sections, the Federal Route 227 was built under the JKR R5 road standard, with a speed limit of 90 km/h. List of junctions References Malaysian Federal Roads
```ruby # frozen_string_literal: true require 'rails_helper' describe ActivityPub::VoteSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:poll_vote) } describe 'type' do it 'returns correct serialized type' do expect(serialization['type']).to eq('Create') end end end ```
Bayou Arcana: Songs of Loss and Redemption is a graphic novel anthology of 11 stories created by a team of male writers and female artists, first published in 2012. It draws heavily on the United States' 'Southern Gothic' tradition of mysticism in both the storytelling themes and visual art. Much of the stories' content is also related to cultural issues of oppression and retribution in the context of the history of the Southern United States Stories The Tale of Ol’ Mercy - story: Jimmy Pearson, art: Valia Kapadai (10 pages) Comfort and Joy - story: Darren Ellis, art: Davina Unwin (11 pages) Irons in the Fire - story: Corey Brotherson, art: Jennie Gyllblad (11 pages) True Reflections - story: Steve Tanner, art: Alex Thompson (10 pages) Tohopoka - story: Alexi Conman, art: Vicky Stonebridge (12 pages) Promises - story: Matt Gibbs, art: Sara Dunkerton (6 pages) Small World - story: Matthew Craig, art: Dani Abram (14 pages) Grinder Blues - story: Jimmy Pearson, art: Lynsey Hutchinson (11 pages) Swamp Pussy and the Hanged Man – story: Cy Dethan, art: Nic Wilkinson (12 pages) Six Bullets - story: Jimmy Pearson, art: Patricia Echavarri-Riego (12 pages) The ‘Skeeter - story: Jimmy Pearson, art: Jenny Clements (12 pages) Themes Bayou Arcana is an attempt to increase gender equality in the comic industry. According to The Guardian, "The anthology is the product an experiment that brings together an all-female team of artists with an all-male team of writers and it is an illustration of how a new generation of female artists and readers is radically changing the face of comics." 5 of the artists, and 3 of the writers will be attending the Kapow 2012 comic convention as members of an interview panel which has been commented on by the press as another positive step for women in the comic industry. References External links Markosia (Publisher) Website Bayou Arcana on Amazon Horror comics Comics anthologies Southern Gothic novels 2012 comics debuts
L'Abbaye is a municipality in the canton of Vaud, Switzerland, located in the Jura-Nord Vaudois district in the Vallée de Joux. It takes its name from Lac de Joux Abbey, a Premonstratensian monastery. History L'Abbaye was created as an independent municipality in 1571 from the municipality of Le Lieu. Geography L'Abbaye has an area, , of . Of this area, or 34.0% is used for agricultural purposes, while or 60.7% is forested. Of the rest of the land, or 3.7% is settled (buildings or roads), or 1.0% is either rivers or lakes and or 0.8% is unproductive land. Of the built up area, housing and buildings made up 1.9% and transportation infrastructure made up 1.4%. Out of the forested land, 54.2% of the total land area is heavily forested and 6.5% is covered with orchards or small clusters of trees. Of the agricultural land, 0.0% is used for growing crops and 9.3% is pastures and 24.7% is used for alpine pastures. All the water in the municipality is in lakes. The municipality was part of the La Vallée District until it was dissolved on 31 August 2006, and L'Abbaye became part of the new district of Jura-Nord Vaudois. The municipality is located on the eastern shore of the Lac de Joux at an elevation of between and . It is located at the heart of the vallé de Joux in the Jura. It includes also the villages of Les Bioux and Le Pont. Coat of arms The blazon of the municipal coat of arms is Or, a Bear's Head sable lined Argent ensigned on a Billet Gules bendwise three Escallops bendwise Or. Demographics L'Abbaye has a population () of . , 12.8% of the population are resident foreign nationals. Over the last 10 years (1999–2009 ) the population has changed at a rate of 4.1%. It has changed at a rate of 5.2% due to migration and at a rate of -1.1% due to births and deaths. Most of the population () speaks French (1,226 or 94.0%), with German being second most common (33 or 2.5%) and Portuguese being third (19 or 1.5%). There are 14 people who speak Italian. Of the population in the municipality 428 or about 32.8% were born in L'Abbaye and lived there in 2000. There were 426 or 32.7% who were born in the same canton, while 154 or 11.8% were born somewhere else in Switzerland, and 200 or 15.3% were born outside of Switzerland. In there were 7 live births to Swiss citizens and 2 births to non-Swiss citizens, and in same time span there were 15 deaths of Swiss citizens. Ignoring immigration and emigration, the population of Swiss citizens decreased by 8 while the foreign population increased by 2. There were 2 Swiss men and 3 Swiss women who immigrated back to Switzerland. At the same time, there were 2 non-Swiss men and 3 non-Swiss women who immigrated from another country to Switzerland. The total Swiss population change in 2008 (from all sources, including moves across municipal borders) was an increase of 5 and the non-Swiss population increased by 9 people. This represents a population growth rate of 1.1%. The age distribution, , in L'Abbaye is; 120 children or 9.4% of the population are between 0 and 9 years old and 170 teenagers or 13.3% are between 10 and 19. Of the adult population, 120 people or 9.4% of the population are between 20 and 29 years old. 135 people or 10.5% are between 30 and 39, 199 people or 15.5% are between 40 and 49, and 188 people or 14.7% are between 50 and 59. The senior population distribution is 156 people or 12.2% of the population are between 60 and 69 years old, 113 people or 8.8% are between 70 and 79, there are 71 people or 5.5% who are between 80 and 89, and there are 10 people or 0.8% who are 90 and older. , there were 476 people who were single and never married in the municipality. There were 662 married individuals, 102 widows or widowers and 64 individuals who are divorced. , there were 569 private households in the municipality, and an average of 2.2 persons per household. There were 219 households that consist of only one person and 39 households with five or more people. Out of a total of 602 households that answered this question, 36.4% were households made up of just one person. Of the rest of the households, there are 173 married couples without children, 150 married couples with children There were 21 single parents with a child or children. There were 6 households that were made up of unrelated people and 33 households that were made up of some sort of institution or another collective housing. there were 262 single family homes (or 58.9% of the total) out of a total of 445 inhabited buildings. There were 107 multi-family buildings (24.0%), along with 43 multi-purpose buildings that were mostly used for housing (9.7%) and 33 other use buildings (commercial or industrial) that also had some housing (7.4%). Of the single family homes 59 were built before 1919, while 24 were built between 1990 and 2000. The most multi-family homes (59) were built before 1919 and the next most (16) were built between 1961 and 1970. There was 1 multi-family house built between 1996 and 2000. there were 760 apartments in the municipality. The most common apartment size was 3 rooms of which there were 231. There were 32 single room apartments and 195 apartments with five or more rooms. Of these apartments, a total of 541 apartments (71.2% of the total) were permanently occupied, while 177 apartments (23.3%) were seasonally occupied and 42 apartments (5.5%) were empty. , the construction rate of new housing units was 1.6 new units per 1000 residents. The vacancy rate for the municipality, , was 0.63%. The historical population is given in the following chart: Heritage sites of national significance The Manoir De Haute Roche is listed as a Swiss heritage site of national significance. The entire village of Le Pont is part of the Inventory of Swiss Heritage Sites. Politics In the 2007 federal election the most popular party was the SP which received 21.98% of the vote. The next three most popular parties were the SVP (17.84%), the LPS Party (14.87%) and the FDP (13.81%). In the federal election, a total of 399 votes were cast, and the voter turnout was 45.7%. Economy , L'Abbaye had an unemployment rate of 3.5%. , there were 28 people employed in the primary economic sector and about 9 businesses involved in this sector. 926 people were employed in the secondary sector and there were 23 businesses in this sector. 182 people were employed in the tertiary sector, with 43 businesses in this sector. There were 627 residents of the municipality who were employed in some capacity, of which females made up 42.3% of the workforce. the total number of full-time equivalent jobs was 1,059. The number of jobs in the primary sector was 17, all of which were in agriculture. The number of jobs in the secondary sector was 888 of which 826 or (93.0%) were in manufacturing, 12 or (1.4%) were in mining and 49 (5.5%) were in construction. The number of jobs in the tertiary sector was 154. In the tertiary sector; 40 or 26.0% were in wholesale or retail sales or the repair of motor vehicles, 38 or 24.7% were in the movement and storage of goods, 37 or 24.0% were in a hotel or restaurant, 1 was in the information industry, 1 was the insurance or financial industry, 2 or 1.3% were technical professionals or scientists, 2 or 1.3% were in education and 11 or 7.1% were in health care. , there were 403 workers who commuted into the municipality and 384 workers who commuted away. The municipality is a net importer of workers, with about 1.0 workers entering the municipality for every one leaving. About 33.3% of the workforce coming into L'Abbaye are coming from outside Switzerland. Of the working population, 7% used public transportation to get to work, and 69.5% used a private car. Religion From the , 269 or 20.6% were Roman Catholic, while 618 or 47.4% belonged to the Swiss Reformed Church. Of the rest of the population, there was 1 member of an Orthodox church, and there were 222 individuals (or about 17.02% of the population) who belonged to another Christian church. There were 3 (or about 0.23% of the population) who were Islamic. There were 5 individuals who belonged to another church. 164 (or about 12.58% of the population) belonged to no church, are agnostic or atheist, and 132 individuals (or about 10.12% of the population) did not answer the question. Education In L'Abbaye about 429 or (32.9%) of the population have completed non-mandatory upper secondary education, and 142 or (10.9%) have completed additional higher education (either university or a Fachhochschule). Of the 142 who completed tertiary schooling, 68.3% were Swiss men, 19.7% were Swiss women, 7.7% were non-Swiss men and 4.2% were non-Swiss women. In the 2009/2010 school year there were a total of 146 students in the L'Abbaye school district. In the Vaud cantonal school system, two years of non-obligatory pre-school are provided by the political districts. During the school year, the political district provided pre-school care for a total of 578 children of which 359 children (62.1%) received subsidized pre-school care. The canton's primary school program requires students to attend for four years. There were 67 students in the municipal primary school program. The obligatory lower secondary school program lasts for six years and there were 78 students in those schools. There were also 1 students who were home schooled or attended another non-traditional school. , there were 3 students in L'Abbaye who came from another municipality, while 141 residents attended schools outside the municipality. References External links Municipalities of the canton of Vaud Cultural property of national significance in the canton of Vaud
Princess Nikki is a reality television series that stars former Big Brother 7 housemate Nikki Grahame. It ran on Wednesday nights between 10:00 - 10:30pm on E4 from 6 September 2006, for a total runtime of 30 minutes. The show was devised by Endemol, the company that also devised Big Brother. It was narrated by the presenter and comedian, Alex Zane. The format saw Grahame attempt several jobs, including various unpleasant tasks such as rubbish collecting, deep sea fishing, and waste management. The premise of the series was to see whether or not Grahame would perform the tasks given to her and keep her job for a day, or whether she would quit or be sacked due to her infamous tantrums. The concept of the series was taken from one of the tasks Grahame undertook while in the Big Brother House, in which she was assigned as Big Brother's personal assistant and had to carry out various duties, which often resulted in her throwing a tantrum and refusing to comply. Contrary to rumours after the airing of the first series, a second series was never planned; creative director Philip Edgar-Jones later confirmed that the series was finished. Episodes Episode 1 "Fisherwoman" (6 September 2006) The first episode involved Nikki entering the fishing industry. She spent a day on the English Channel catching and gutting fish, and then returned to land to work in a fish and chips shop in nearby Folkestone. At the end of the show, her employers commented on her performance, enthusiasm, etc. The person who worked on the fishing boat praised Nikki for not leaving, but complained that she didn't actually do any work. Her fish and chips shop employer seemed to show obvious dislike for Nikki by calling her a Diva, a child, and stroppy (and suggesting she not be given any jobs that require thinking). This episode was watched by 530,001 individuals on average. Episode 2 "Farmer" (13 September 2006) In the second episode, Nikki was sent to Andrew Fuller's farm in Gloucestershire to assist as a farm hand. Her duties included cleaning a pig pen, tending the farm animals, and performing a rectal examination on a pregnant cow, which she screamed at and refused to do after the animal farted in her face. She later went to assist a butcher where she made sausages, and visited the shop's abattoir. Once again, Nikki failed to make a good impression on her employers with Andrew Fuller commenting that the only way he would employ Nikki is if she paid him. This episode had an overnight rating of 308,700 viewers. Episode 3 "Waste Management Officer" (20 September 2006) The third episode of the series had a 'waste' theme. Nikki was initially sent to work as refuse operative (dustman), collecting people's rubbish from the streets of west London. After two hours of working the streets, Nikki managed to lift only five bags of garbage. Nikki was then sent to assist a colon hydro therapist, to perform a colonic irrigation on one of her customers. Nikki didn't act very professionally and burst into laughter several times during the therapy. She was eventually asked to leave. Nikki's final job of the day was to work at a sewage works in Chelmsford, where she was forced to scrape old tampons, human excrement and condoms off a huge sewage plant roller. Again, Nikki failed to impress her employers with one of the binmen exclaiming "She’s on Anne Robinson tonight! She’s the fucking weakest link." This episode was watched by 343,001 individuals on average. Episode 4 "Zoo Keeper" (27 September 2006) This episode had an animal theme. Nikki was originally sent to work as a kennel maid at a dog kennel. Here she was made to clean out dog faeces from each kennel, before churning up the excrement in a blender for disposal. That part went well. She also groomed the dogs, but threw a tantrum when dog hair went up her nose, and then refused to finish her tasks. She later went to work as a zoo keeper at Bristol Zoo. Here she cleaned an Okapi pen, handled rats, and dressed as a seal in order to coax visitors to attend the seal feeding. Nikki managed to infuriate her bosses at the zoo by screaming loudly on several occasions. She was eventually prohibited from working with the animals as her screaming was deemed to be too upsetting for the animals, and she was removed. This episode had an overnight rating of 179,001 viewers. Episode 5 "Mountain Rescuer" (4 October 2006) This episode had an outdoor theme. First, Nikki was sent to the Lake District to help a mountain rescue team "rescue" a woman who had broken her leg (it was an actress for training purposes). She threw a tantrum when climbing out of the boat to shore as the leader of the team shoved her for her petulance. Nikki was more concerned about getting a tissue to blow her nose than helping the woman in distress. She then abseiled down the side of a small cliff, which she said was the activity she had enjoyed most in the series to date. Nikki was then coached in surviving outdoors by survival expert, Chris Caine. He showed her how to build a simple outdoor home made of trees and branches, how to dig a hole in the ground for a toilet, and how to fish. The instructor was easily annoyed by Nikki's behaviour, leading to the usual tantrums and arguments from her. This episode had an overnight rating of 236,000 viewers. Episode 6 "Rugby Player" (11 October 2006) In the final episode, Nikki visited the Harlequin Ladies Rugby team. Here she was made to train and play rugby with the women. It started off well enough, but then the team was instructed to roll around on the cold damp grass; she didn't. She saw one player go into a large container of iced water, in order to cool her muscles after the strenuous exercise. Eventually, the others dunked her into the bath, which Nikki didn't appreciate (describing the rugby players as "butch"). Her final assignment was to assist some environmental health contractors in cleaning a filthy, vermin-ridden house. Here she was made to remove maggots and cockroaches from the house, before cleaning a bath full of festering sewage. Nikki spent most of her time screaming and crying, although she did eventually manage to complete the tasks given to her. At the end of the episode, Nikki was asked to summarise and reflect on her employment experiences, commenting: "I thought, when I got this series, that I would get nice jobs that would help me learn how to do a working day like you help me, learn about different trades and, give me, ideas what i can chose as a career, but it's been ghastly." This episode had an overnight rating of 167,100 viewers . References External links 2000s British reality television series 2006 British television series debuts 2006 British television series endings Channel 4 original programming
The Laureus Lifetime Achievement Award is an award honouring the achievements of those individuals who have made a significant contribution to the world of sports. It was first awarded in 2000 as one of the inaugural awards presented during the Laureus World Sports Awards. The awards are presented by the Laureus Sport for Good Foundation, a global organisation involved in more than 150 charity projects supporting 500,000 young people. The first ceremony was held on 25 May 2000 in Monte Carlo, at which Nelson Mandela gave the keynote speech. The recipient is presented with a Laureus statuette, created by Cartier, at an annual awards ceremony held in various locations around the world. Although the Laureus Awards ceremony is held annually, the Lifetime Achievement Award is not necessarily presented every time; it is one of a number of discretionary awards that can be given by the Laureus World Sports Academy. The awards are considered highly prestigious and are frequently referred to as the sporting equivalent of "Oscars". The inaugural Laureus Lifetime Achievement Award was presented to Brazilian footballer Pelé. Since then, thirteen further awards have been given to individuals, all men with the exception of Moroccan athlete Nawal El Moutawakel (2010). Footballers have received more awards than any other sports with five, and only Great Britain has multiple winners with three: Steve Redgrave (2001), Bobby Charlton (2012) and Sebastian Coe (2013). , two individuals have been honoured posthumously. The New Zealand yachtsman Peter Blake was shot dead by pirates on the Amazon River in December 2001. Arne Næss Jr., the Norwegian mountaineer, died in a climbing accident in South Africa four months before the 2004 ceremony. No award was presented at the 2005, 2009, or 2017 Laureus Awards ceremonies; American tennis player Billie Jean King won the award in the 2021 Laureus Awards ceremony in Seville. The most recent recipient of the award is quarterback Tom Brady. Recipients References Lifetime Achievement Award Awards established in 2000 Lifetime achievement awards
Ukrainskiy may refer to: Ukrainian people Ukrainian language Ukrainskiye Otruba (Əbil), Azerbaijan Ukrainskiy Retail, a retail chain in Ukraine See also Ukrainsky (disambiguation) Ukrainskoye
Charles Thornton may refer to: Tex Thornton (1913–1981), American businessman Charles Thornton (cricketer) (1850–1929), English cricketer Charles "Cookie" Thornton, resident of Kirkwood, Missouri involved, in Kirkwood City Council shooting Charles Irving Thornton (1841–1842), American infant from the state of Virginia Charles Jonas Thornton (1850–1932), political figure in Durham, Ontario Charles Wade Thornton (1764–1854), British military officer Charles E. Thornton (1930s–1985), medical reporter and the first American journalist killed in Afghanistan after the Soviet invasion of 1979
Dhaka-7 is a constituency represented in the Jatiya Sangsad (National Parliament) of Bangladesh since 2014 by Haji Mohammad Salim, of the Awami League since 2018. Boundaries The constituency encompasses Dhaka South City Corporation wards 23 through 33, 35, and 36. History The constituency was created for the first general elections in newly independent Bangladesh, held in 1973. Ahead of the 2008 general election, the Election Commission redrew constituency boundaries to reflect population changes revealed by the 2001 Bangladesh census. The 2008 redistricting altered the boundaries of the constituency. Members of Parliament Elections Elections in the 2010s Elections in the 2000s Elections in the 1990s References External links Parliamentary constituencies in Bangladesh Dhaka District
Tenaún is a Chilean village within the commune of Dalcahue, on Chiloé Island of Chiloé Archipelago. It is located about 36 kilometers from Dalcahue, 28 kilometers from Quemchi and 54 kilometers from Castro. The town of Tenaún is accessed from the north, by a road that begins on the route between Dalcahue and Quemchi. This land route, built in 1950, allowed the integration of the town to the rest of the island. The town of Tenaún was founded in the 18th century, being one of the oldest in Chiloé. It was part of the larch trade route and since its inception was an intermediate port between Chacao and Castro. In the 19th century, it experienced an urban boom as a result of logging that favored its development. Thanks to the historical relevance of the forest trade is that many of the houses of the town were built with larch coatings. The urban landscape is composed of the edge-sea, a longitudinal plane parallel to the coastline. The urban order of the town has as axes: the church, the square and the cemetery, in east-west direction. The church of Tenaún, built in the mid-nineteenth century, is located at the end of the main street and in front of the square, it is the most imposing construction of the town, it stands out for its three towers and because it protrudes from the axis, which allows its vision from afar, mainly from the sea. The year 1999 was declared a National Historic Monument and the year 2000 a World Heritage Site by UNESCO. The elongated square is another of the emblems of the city, made up of two facades that form a recognizable group with their own identity, marking a boundary between the high houses, which face the hill, and the low ones that face the sea. One of the most deeply rooted traditions in this town is the Minga, which consists in the transfer of houses through the sea or land. In the area, this tradition has a social event of great participation that favors interaction and community sense strongly rooted in Chiloe identity. History The word Tenaún means "three hills" in the Mapuche Huilliche language, the language of the ancient Huilliche inhabitants of the sector. It was founded in 1567, the year in which the Spanish conquistadors, led by Martín Ruiz de Gamboa, settled in Chiloé after founding Castro. The village emerged as a town of merchants who extracted larch from the Chauques Islands. The town maintains its original characteristics and is recognized as a focus of permanence of the Chilote traditions. By virtue of its cultural value, on November 5, 2004 it was declared a National Monument in the category of a Typical Zone. On September 4, 2015, Tenaún was declared an Urban Zone by the Municipality of Dalcahue. Attractions Tenaún is characterized by the style of its houses, some of them neo-colonial style with German influence, while others are lined with larch tiles. Several of the latter were taken to Tenaún by land and even by sea, through the traditional Chilote system known as the minga of house plowing, to such an extent that the place is known as "the town where the houses sail". Its church, called Nuestra Señora del Patrocinio, is a National Monument (1999) and was declared a World Heritage Site by UNESCO in 2000, along with the other churches of Chiloé. It was built in 1837 by Franciscan priest Roberto Fernández, and later was renovated in a neoclassical style, with a main tower and two smaller towers on each side, which could reflect the three hills of Tenaún or the mystery of the Holy Trinity. Every summer the Meeting of the Cords of the Accordion is celebrated, an activity of great importance because the place is known for the importance of the artists of the area that participate in this festival, as is the week of Tenaún, where for 7 days there are activities for neighbors, tourists and people interested in participating to commemorate a new anniversary of Tenaún. References Populated places in Chiloé Province Populated coastal places in Chile Populated places established in 1567 1567 establishments in the Captaincy General of Chile Fishing communities
Omiodes croceiceps is a moth in the family Crambidae. It was described by Francis Walker in 1866. It is found in Brazil (Para, Amazonas, Ega), Peru, Panama and Costa Rica. References Moths described in 1866 croceiceps
Tom McCormack may refer to: Tom McCormack (Erin's Own hurler) (1888–1959), Irish hurler for Kilkenny and Erin's Own Tom McCormack (James Stephens hurler) (born 1953), Irish hurler for Kilkenny and James Stephens Tom McCormack (footballer), New Zealand association footballer See also Tom McCormick (disambiguation)
Richard Oliver Postgate (12 April 1925 – 8 December 2008) was an English animator, puppeteer, and writer. He was the creator and writer of some of Britain's most popular children's television programmes. Bagpuss, Pingwings, Noggin the Nog, Ivor the Engine, Clangers and Pogles' Wood, were all made by Smallfilms, the company he set up with collaborator, artist and puppet maker Peter Firmin. The programmes were originally broadcast by the BBC from the 1950s to the 1980s. In a 1999 BBC poll Bagpuss was voted the most popular children's television programme of all time. Early life Postgate was born in Hendon, Middlesex, England, into the Postgate family, as the younger son of journalist and writer Raymond Postgate and his wife Daisy (née Lansbury), making him the cousin of actress Angela Lansbury and maternal grandson of Labour politician, and sometime leader, George Lansbury. His other grandfather was the Latin classicist John Percival Postgate. His brother was the microbiologist and writer John Postgate FRS. Education Postgate was educated at the private Woodstock School on Golders Green Road in Finchley in north-west London and Woodhouse Secondary School, formerly known from 1923 onwards as Woodhouse Grammar School, also in Finchley (and now renamed Woodhouse College), followed by Dartington Hall School, a progressive private boarding school in Devon. Life and career Postgate joined the Home Guard in 1942 while studying at the Kingston School of Art, but when he became liable for military service during the Second World War the following year, he declared himself a conscientious objector, as his father had done during the First World War. He was initially refused recognition; he accepted a medical examination as a first step to call up, and then reported for duty with the Army in Windsor, but refused to put on the uniform. He was court-martialled and sentenced to three months in Feltham Prison. This qualified him to return to the Appellate Tribunal, where he was granted exemption conditional upon working on the land or in social service, the unserved portion of his sentence being remitted. He worked on farms until the end of the war, when he went to occupied Germany, working for the Red Cross in social relief work. Career On return to the UK, from 1948 he attended the London Academy of Music and Dramatic Art, but drifted through a number of different jobs, never really finding his niche. In 1957 he was appointed a stage manager with Associated-Rediffusion, which then held the ITV franchise for London. Attached to the children's programming section, he thought he could do better with the relatively low budgets of the then black and white television productions. Postgate wrote Alexander the Mouse, a story about a mouse born to be king. Using an Irish-produced magnetic system – on which animated characters were attached to a painted background, and then photographed through a 45-degree mirror – he persuaded Peter Firmin, who was then teaching at the Central School of Art, to create the background scenes. Postgate later recalled they undertook around 26 of these programmes live-to-air, which were made harder by the production problems encountered by the use and restrictions of using magnets. After the success of Alexander the Mouse, Postgate agreed a deal to make the next series on film, for a budget of £175 per programme. Making a stop motion animation table in his bedroom, he wrote the Chinese story The Journey of Master Ho. This was intended for deaf children, a distinct advantage in that the production required no soundtrack which reduced the production costs. He engaged an honorary Chinese painter to produce the backgrounds, but as the painter was classical Chinese-trained he produced them in three-quarters view, rather than in the conventional Egyptian full-view manner used for flat animation under a camera. This resulted in the Firmin-produced characters looking as though they were short in one leg, but the success of the production provided the foundation for Postgate with Firmin to start up his own company solely producing animated children's programmes. Smallfilms Setting up their business in a disused cowshed at Firmin's home in Blean near Canterbury, Kent, Postgate and Firmin worked on children's animation programmes. Based on concepts which mostly originated with Postgate, Firmin did the artwork and built the models, while Postgate wrote the scripts, did the stop motion filming and many of the voices. Smallfilms was therefore able to produce two minutes of film per day, ten times as much as a conventional animation studio, with Postgate moving the cardboard pieces himself, and working his 16 mm camera frame-by-frame with a home-made clicker. As Postgate voiced many of the productions, and also narrated WereBear stories, his distinctive voice became familiar to generations of children. They started in 1959 with Ivor the Engine, a series for ITV about a Welsh steam locomotive who wanted to sing in a choir, based on Postgate's wartime encounter with Welshman Denzyl Ellis, who used to be the fireman on the Royal Scot. (It was remade in colour for the BBC in 1976 and 1977.) This was followed by Noggin the Nog for the BBC, which established Smallfilms as a reliable source to produce children's entertainment, when there were only two television channels in the UK. Postgate later described the "gentlemanly and rather innocent" business thus: Postgate had strict views on story-line development, which perhaps resultantly restricted the length of each particular series development. When asked if the Clangers adventures were quite surreal sometimes, Postgate replied: Other activities In the 1970s and 1980s Postgate was active in the anti-nuclear campaign, addressing meetings and writing several pamphlets including The Writing on the Sky. In 1986, in collaboration with the historian Naomi Linnell, Postgate painted a Illumination of the Life and Death of Thomas Becket for a book of the same name, which is now in the archive of the Royal Museum and Art Gallery, Canterbury. In 1990 he painted a similar work on Christopher Columbus for a book entitled The Triumphant Failure. A Canterbury Chronicle, a triptych by Postgate commissioned in 1990 hangs in the Great Hall of Eliot College on the University of Kent's Canterbury campus. Postgate narrated the six-part BBC Radio 4 comedy series Elastic Planet in 1995. In his later years, he blogged for the New Statesman. Postgate's voice was heard once more in 2003, as narrator for Alchemists of Sound, a television documentary about the BBC Radiophonic Workshop. On 15 July 2007, he was guest on BBC Radio 4's Desert Island Discs. He was also a guest on The Russell Brand Show on 19 January 2008 where he discussed the making of Bagpuss and his subsequent work in TV and Film. In 1987 the University of Kent at Canterbury awarded an honorary degree to Postgate, who stated that the degree was really intended for Bagpuss, who was subsequently displayed in academic dress. Personal life Postgate married Prudence "Prue" Myers in 1957, becoming stepfather to her three children. The couple had twins in 1959 (Stephen and Simon), and another son in 1964 (Daniel Postgate). Prue died of cancer in 1982. Naomi Linnell was his partner for the last twenty-three years of his life. Postgate's autobiography, Seeing Things, was published in 2000, and after Oliver died in 2008 his son Daniel wrote an afterword which was added at the end of the book. His grandfather was Labour Party leader (1932-1934) George Lansbury and cousin to English born American actress Angela Lansbury He is distantly related to the Australian-born writer and academic Coral Lansbury, whose son Malcolm Turnbull became the 29th Prime Minister of Australia. Death Postgate died at a nursing home in Broadstairs, near his home on the Kent coast, on 8 December 2008, aged 83. After his death there was huge recognition of his influence and effect on British culture, and affection for the role his work had played in many people's lives. His work was widely discussed in the UK media and many tributes were paid to him and his work across the internet. Charlie Brooker dedicated a portion of his Screenwipe show to Oliver Postgate, and the way he influenced Brooker's own childhood, in an episode that was broadcast the day after Postgate's death. Publications The Burglarproof Bath Plug- A Collection of Memories, Thoughts and Small Stories Including "The Trouble with Magic, Oliver Postgate 2008 foreword by Stephen Fry Seeing Things: An Autobiography, Oliver Postgate; illustrated by Peter Firmin, 2000 – ; republished in 2009 – The Writing on the Sky, Oliver Postgate 1982 – BECKET, Oliver Postgate & Naomi Linnell 1989 – Columbus, The Triumphant Failure, Oliver Postgate & Naomi Linnell 1991 The Sagas of Noggin the Nog Oliver Postgate and Peter Firmin; illustrated by Peter Firmin, 2001 – Thinking it through: the Plain Man's Guide to the Bomb, Oliver Postgate 1981 References External links Oliver Postgate The Smallfilms Treasury A Canterbury Chronicle The Dragons' Friendly Society BBC: Oliver Postgate on Radio 4's Desert Island Discs (15 July 2007) Oliver Postgate – Homespun Genius (The Guardian) – includes links to further resources People from Hendon English animators British animated film producers English puppeteers English socialists Stop motion animators English bloggers English children's writers Alumni of Kingston University Alumni of the London Academy of Music and Dramatic Art English conscientious objectors People associated with the University of Kent 1925 births 2008 deaths People educated at Dartington Hall School Oliver Lansbury family British male bloggers British Army personnel of World War II British Army personnel who were court-martialled Prisoners and detainees of the United Kingdom British Home Guard soldiers
```yaml build: template_file: test-linux-opt-base.tyml dependencies: - "linux-amd64-tflite-opt" - "test-training_16k-linux-amd64-py36m-opt" test_model_task: "test-training_16k-linux-amd64-py36m-opt" args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-cpp_tflite_basic-ds-tests.sh 16k" workerType: "${docker.dsTests}" metadata: name: "DeepSpeech Linux AMD64 TFLite C++ tests (16kHz)" description: "Testing DeepSpeech C++ for Linux/AMD64, TFLite, optimized version (16kHz)" ```
The following are characters who first appeared in the BBC soap opera EastEnders during 2012 listed by order of first appearance. New characters were introduced by Bryan Kirkwood, executive producer. He stepped down from the role in April. His last episode was on 13 July 2012. From 16 July, characters were introduced by his successor, Lorraine Newman. The first character to be introduced was the undertaker, Les Coker (Roger Sloman). The first regular character to be announced was Ray Dixon (Chucky Venn), the biological father of Morgan Butcher (Devon Higgs), followed by Alice Branning (Jasmyn Banks), the daughter of Derek Branning (Jamie Foreman) and, Alice's brother, Joey (David Witts). June 2012 also saw the first birth of the year: Janine Butcher (Charlie Brooks) and Michael Moon's (Steve John Shepherd) daughter, Scarlett. July saw the arrival of Masood Ahmed's (Nitin Ganatra) brother, AJ Ahmed (Phaldut Sharma). July also saw the second birth of the year: Lola Pearce's (Danielle Harold) daughter Lexi, Newman's first introduction. After the announcement that Sharon Rickman (Letitia Dean) was returning, her son Dennis Rickman Jnr (Harry Hickles), was introduced, along with guest character, Sharon's fiancé John Hewland (Jesse Birdsall). Danny Pennant (Gary Lucy) arrived in September, as part of a love triangle storyline involving Syed Masood (Marc Elliott) and Christian Clarke (John Partridge). Ava Hartman (Clare Perkins), the long-lost daughter of Cora Cross (Ann Mitchell) was introduced in November and Kirsty Branning (Kierston Wareing), Max's (Jake Wood) secret wife, made her first appearance on Christmas Day. December also saw the arrival of Zainab Khan's (Nina Wadia) family friend, Ayesha Rana (Shivani Ghai). Les Coker Les Coker, played by Roger Sloman, first appeared on 9 January 2012. He subsequently appeared in five episodes in 2012, before returning for an episode in 2014. Les was reintroduced as a regular character in April 2014 and continued to appear until 14 October 2016 when the character was axed from the show. Les first appears when he visits Carol Jackson (Lindsey Coulson) and David Wicks (Michael French) to arrange Pat Evans' (Pam St Clement) funeral. He tells them he used to know Pat when he was an apprentice, implying he was her client when she was a prostitute, and offers a discount on the funeral. He says that he arranged funerals for many of the other local residents, including David's father Pete Beale (Peter Dean), Pat's husband Roy Evans (Tony Caunter), Ethel Skinner (Gretchen Franklin), Pat's former sister-in-law Pauline Fowler (Wendy Richard) and Archie Mitchell (Larry Lamb). He returns to meet Jean Slater (Gillian Wright) to finalise arrangements for the funeral of her daughter Stacey Branning (Lacey Turner). Jean is distressed to hear that Stacey has died, but Mo Harris (Laila Morse) reveals she has just spoken to Stacey on the phone, meaning Stacey is alive. Les apologises profoundly before leaving. Les is seen by Sasha Dixon (Rebecca Sanneh) doing business with Anthony Moon (Matt Lapinskas) and it turns out that when someone dies, Les offers to empty their house and sells the goods to Anthony for his business. Sasha and her employer, Cora Cross (Ann Mitchell), then ask Les to offer every other house to them for the charity shop. He attends a wake for a former Walford resident at The Queen Victoria public house, where Kim Fox (Tameka Empson) pretends to know the deceased, and talks to Les, successfully gaining Sasha a work experience placement with Les's firm. He attends the wake of a man previously known by Patrick Trueman (Rudolph Walker) and is annoyed when Cora turns up, as he has agreements with her and Anthony. Les later appears when Sasha starts her first day of work experience. Les appears again to arrange Nick Cotton's (John Altman) funeral, although it is later revealed to be a scam in which Les is in on. Les moves his funeral business, Coker & Sons Funeral Parlour, to Turpin Road following the relocation of Pam's flower stall to Bridge Street Market. When walking home one night, Fatboy (Ricky Norwood) notices Les being handed money by Dot Branning's (June Brown) grandson, Charlie Cotton (Declan Bennett). Fatboy tries to tell Dot what Les and Charlie are up to, but is unsuccessful. In July, Les hires Billy Mitchell (Perry Fenwick) at the undertakers, however he is disappointed when Billy doesn't turn up for work on his first day. Pam is upset when Les insults Emma Summerhayes (Anna Acton) while drunk, fearful it will reveal a big secret they have been keeping; that she euthanised their dying son, Lawrie. Billy eventually establishes a good working relationship with Les and a friendship as they spend Christmas together. Billy discovers the business is deeply in debt and forces Les to tell Pam this. They vow no more secrets, but after Les meets with his "other woman", Claudette Hubbard (Ellen Thomas) and gives her an expensive necklace. Claudette and Pam are revealed to be old friends, as Claudette is a foster mother and Pam used to help children in care. Les holidays in Gran Canaria with Claudette, although Pam sees it as a coincidence when she learns from Claudette's foster daughter Donna Yates (Lisa Hammond) that they are both there at the same time. Les arranges a party for the centenary of Coker & Sons, and Pam gets upset at the thought that their grandson, Paul (Jonny Labey), will not attend. The same day, Paul returns but is cold towards Les. He reveals he is aware of his long running affair with Claudette and that was why he went to work abroad in the first place, not because of Pam's decision to euthanise his father as they previously believed. Paul threatens to expose the affair to Pam so Les tries to end things with Claudette, but Claudette tells Les that it will not be that easy. Claudette's son Vincent Hubbard (Richard Blackwood) then becomes aware of the relationship between her and Les, and Paul tells Pam about it. Pam then finds Les's tie at Claudette's house, and when Les and Claudette give conflicting explanations, Pam leaves to stay with her sister. Les becomes very distraught at her departure, and Claudette urges him to tell Pam the truth, just as Pam returns and walks in on them together. Shortly after Claudette leaves the house, Pam urges Les to end the affair or their marriage is over. Two months later, Les visits Claudette for comfort after Pam refuses to speak to him on Lawrie's birthday. He later calls Claudette, telling her he cannot stop thinking about her, and makes an excuse to Pam to go and be with Claudette again. He is then caught in his underwear in Claudette's house by Donna, who concludes they are having an affair, and despite Les and Claudette denying it, Donna tells Pam what she saw. Pam then goes to Claudette's house and sets about destroying gifts from Les until Claudette says the presents are not hers, and Pam should ask Les about Christine. When Pam asks Les, he reveals that Christine is his secret feminine alter ego, where he dresses up in women's clothes and has done so since he was seven years old, but after they married he did not need Christine until Lawrie died, when the alter-ego became a grief outlet for him, and Claudette has been supporting this secret. Pam is horrified at him having lied to, and tells Les he disgusts her. However, Pam agrees to "meet" Christine. Les, as Christine, explains that this is how he can cope with things, as Christine is more open than Les, and he is still the same person. Pam apparently begins to accept this, but when Paul interrupts, Pam says she cannot accept it, so packs a bag and leaves, while Paul comforts Les. Paul manages to convince Pam to return home to talk to Les, but when she gets hesitant again, Les moves out to give Pam some time to think, and he moves in with Billy. Pam and Les have dinner together but she still cannot get the image of him dressed as Christine out of her mind, soLes burns all of Christine's clothes and photos and Pam agrees to take things one day at a time, but Babe Smith (Annette Badland) is watching and finds and pockets a surviving photo of Les dressed as Christine. Shortly after, Paul encourages Les to remind Pam of the man she first fell in love with and she agrees to his moving back in as long as they sleep in separate beds. A few months later, Les spurns Babe, so she sends Les an anonymous email, blackmailing him over his crossdressing. When Pam notices money has been paid from their account, Les admits he has been blackmailed. The blackmailing continues regularly, and Pam starts to suspect Babe, and eventually they discover the truth. Les confides in Claudette and says he misses Christine, so she gives him some of her clothes and makeup that she still has. Stressed, Les dresses up again but is caught by Paul. Paul refuses to destroy Christine's things for Les, saying Les should not suffer for who he is. When Pam finds Les dressed as Christine, she chastises him and he suffers a heart attack. Billy sees him as he enters the ambulance. Billy calls Les a "pervert" to Pam, so she fires him from the funeral parlour. Pam then tells Les they should retire away from London and Les agrees; when Paul and his boyfriend Ben Mitchell (Harry Reid) find out, they decide they should take over the running of the funeral parlour. Paul's mother, Jenny Rawlinson (Amy Marston), arrives looking for him, but he only assumes she is the blackmailer and orders her away. Pam and Les vow to tell Paul who she is, but Paul is killed in a homophobic attack. Pam struggles to cope, refusing to talk to Les about Paul, so he considers dressing as Christine; he explains why he cross-dresses to Billy and gives him his job back. Les then decides to be strong for Pam so tells Claudette he will no longer be Christine, but the blackmailing continues, with Pam refusing to go to the police, but she tells Claudette that Babe is the blackmailer. After four months of blackmail, Claudette reveals this to Babe's family, and Babe, who has just been attacked by Abi Branning (Lorna Fitzgerald) and come close to death, tells Claudette that she now sees how bad she has been and regrets everything, so it will stop. Les and Pam later attend a court hearing for Paul's killers. Les calls one of them, Simon Atmore (Tom Palmer), a liar after he denies having anything to do with Paul's death. When they arrive home, Pam tells him he needs to be Christine again. Les later suffers a small heart attack after talking to Linda Carter (Kellie Bright) who tries to comfort him and he eventually dresses up as Christine. Les then asks Pam if she would consider leaving Walford together for a fresh start after the trial is over which she agrees. Les and Pam are delighted when Babe returns all of their money. However, they decide to leave and Les appoints Billy as the manager of Coker and Sons. Pam packs a box of Christine's wig and clothes suggesting she has accepted her. After saying an emotional farewell to his friends and after giving Billy his funeral hat, Les departs with Pam for a new life in Worthing. Development and reception Having been originally introduced as the funeral director who arranged Pat Evans' (Pam St Clement) funeral, Sloman appeared in one episode on 9 January 2012 as a guest character. He then appeared in five episodes between June and July 2012. Les was reintroduced for one episode on 25 March 2014 when he arranges Nick Cotton's (John Altman) funeral. Following this, Sloman was reintroduced as a regular cast member with Les' wife, Pam (Lin Blakley) being introduced also. Executive producer Dominic Treadwell-Collins said "Les and Pam are part of our plans to rejuvenate the show's older generation. It's already so exciting to watch the chemistry between Roger and Lin on set, playing characters who have been together for so long, they know each other inside out. Or so they think." Les and Pam arrived on 14 April 2014 when they relocated their funeral business to Turpin Road. Sloman and Blakley were axed by new executive producer Sean O'Connor in 2016, with a show insider commenting, "Pam and Les have been a big part of the show over the past few months and with their current storyline, bosses felt that it was the right time for their characters to leave the Square. There is still plenty more drama to come from the Cokers before they leave Walford." Of Pat and Les, Kate White of Inside Soap said "Pat had, erm, 'relations' with Mr Coker the undertaker. What a forward-thinking way to get a discount on your funeral." The Daily Mirror's Jane Simon commented on Les's scenes, saying "You don't often get laughs out of an undertaker, but the chap who turns up to arrange Pat's funeral has Carol Jackson spluttering into her tea." A reporter writing for the Inside Soap Yearbook described Pam and Les as a "soap favourite" and hoped they would "hurry home soon". Ray Dixon Ray Dixon, played by Chucky Venn, is an ex-partner of Bianca Butcher (Patsy Palmer) and the father of her son Morgan Butcher (Devon Higgs). He made his first on screen appearance on 10 January 2012. Venn was cast in the role after hearing that producers were interested in him for the part. The character and casting were then announced on 15 November 2011. > Ray is a former army soldier with "discipline and [the ability] to handle himself in certain situations." He is also described as "noble" and "a man of principles". He also has a daughter, Sasha Dixon (Rebecca Sanneh). His storylines include meeting Morgan for the first time and having a relationship with Kim Fox (Tameka Empson). Ray left the soap on 28 May 2013. Gethin Williams Gethin Williams, played by Bradley Freegard, appears on 17 and 27 January. He is Jane Beale's (Laurie Brett) former haute cuisine tutor, who attends a fundraising event organised by Jane after hearing about it on the radio. Impressed with her catering for the function, he asks her to interview for a job at his new restaurant. Jane does not want to take the job but, when Gethin rings the next day, her friend Tanya Jessop (Jo Joyner) arranges for them to meet up. Jane passes the interview, but reveals to Tanya that the restaurant is in Cardiff. Gethin returns to Walford to attend Jane's leaving party. Jane has doubts about leaving Walford but later assures Gethin she wants to take the job, with him revealing his plans to set up a restaurant in Paris, with Jane as sous chef. Freegard auditioned for the part of Gethin but thought his audition did not go well because he found it "difficult without any sense of context to get the full grasp of what your character's all about." He filmed his scenes over two days in November 2011. Gethin is the first Welsh character in EastEnders since Huw Edwards, played by Richard Elis from 1996 to 1999. Sasha Dixon Sasha Dixon, played by Rebecca Sanneh, is the daughter of Ray Dixon (Chucky Venn) and half-sister to Morgan Butcher (Devon Higgs). She appears on 26 January 2012, and more regularly from 14 May 2012 onwards. The EastEnders website says that Sasha's father Ray sees Sasha as "being the best thing in his life, but he wishes her mother didn't exist." Ray is very loyal to Sasha, and Chucky Venn, who plays him, said that when Kim and Sasha fall out, he can create harmony between them. Sasha first arrives in The Queen Victoria public house in search of her father. She reveals she has an interest in forensic pathology and is questioned by Kim Fox (Tameka Empson) about Ray's past relationships. Ray introduces her to Morgan, angering Morgan's mother, Bianca Butcher (Patsy Palmer). In May Sasha returns to stay with Ray, and his girlfriend Kim. Kim struggles to accept Sasha and worries that Sasha will make her look stupid. Kim then looks after Sasha, and after Sasha tells Kim about her interest in forensic science, Kim takes her to a murder scene. Kim exaggerates the details of the murder, which scares Sasha. Kim then hears from Ray that Sasha is a good dancer, but it emerges that she has no rhythm. Sasha then attends Kim's fitness class but does not enjoy it. When Kim opens her bed and breakfast, Sasha offers to help book theatre tickets for a customer. She is caught using Kim's credit card at school and gets a detention for it. However, she reveals she tried to get a detention on purpose, just to avoid working for Kim. When playing basketball with Kim and Morgan, the charity shop window is broken and Sasha takes the blame. Sasha then starts working at the shop to make up for it, and falls out with Kim. Kim treats her to dinner and sees that Sasha fancies Fatboy (Ricky Norwood). Kim then helps Sasha to find a work experience placement in a hospital, but is forced to reveal that she lied about knowing someone in forensics. However, she successfully gets Sasha a placement with Les Coker's (Roger Sloman) firm of funeral directors, and Sasha enjoys her first day there. Nico Papadopoulos Nico Papadopoulos, played by Aykut Hilmi, is a worker at McKlunky's fast food restaurant, who Fatboy (Ricky Norwood) irritates after a night out. When Fatboy gets a job at McKlunky's the next day, Nico gives him his uniform, revealing himself to be the manager. Nico later arrives in The Queen Victoria public house, revealing that he is a friend of Fatboy's friend Dot Branning (June Brown) and the nephew of her boss, Andonis Papadopolous. Later, while Fatboy is working a day shift, Nico tells him he has to work the late shift, meaning he will miss his DJ gig. During the Diamond Jubilee of Elizabeth II, Fatboy lies to Nico to get off work, only for Nico to see Fatboy enjoying the festivities on television. Later, Nico calls the police when Lola Pearce (Danielle Harold) becomes aggressive with him, after he discovers that Fatboy has given her free food. Nico is later present at the birth of Lola's baby Lexi Pearce, which happens in the restaurant. Nico and Fatboy decide to use this to gain publicity for the restaurant, having Lola, Lexi and Lola's grandfather, Olympic Torch bearer Billy Mitchell (Perry Fenwick), appear with them in a photo for the local newspaper. On 7 August, Nico asks Fatboy for Lauren Branning's (Jacqueline Jossa) number, to which Fatboy agrees, even though Lauren calls Nico a fascist. On 9 August, McKlunky's enters the local cook-off, competing against other local food establishments. Nico makes Fatboy dress as a chicken, and is annoyed when they do not win. On 21 August, Nico sacks Fatboy when he stands up to him about being mistreated at work. In Inside Soap magazine, Kate White said of Nico: "He may give Fat Boy a headache, but we have a crush on McKlunky's manager. He's not had the fanfare of Tyler (Tony Discipline) or Joey (David Witts), but he's the fittest fella on the Square right now!" Alice Branning Alice Branning, played by Jasmyn Banks, is the daughter of Derek Branning (Jamie Foreman). The character and casting were announced on 14 April 2012. Alice made her first appearance on 10 May 2012. On 22 September 2013, it was announced that Banks would be written out of the show and will leave following the conclusion of Michael Moon's (Steve John Shepherd) exit storyline. Her last episode was on 24 December 2013. Joey Branning Joey Branning, played by David Witts, is the estranged son and eldest child of Derek Branning (Jamie Foreman), and the brother of Alice Branning (Jasmyn Banks). He made his first appearance in the episode broadcast on 22 June. Witts quit his role in 2013 and left on 26 December 2013. Scarlett Butcher Scarlett Butcher (also Moon) is the daughter of Janine Butcher (Charlie Brooks) and Michael Moon (Steve John Shepherd). She was played by Amelie until 2013. She is born in the episode broadcast on 22 June 2012. Scarlett was written out of the series in late 2013, as part of Janine's upcoming exit storyline. On 14 June 2021, it was announced that Scarlett would be returning alongside Janine. On 16 August 2021, it was announced Tabitha Byron would be taking over the role of Scarlett. The character returned on 27 August 2021, and left on 26 January 2023, to tie in with Janine's fourth exit from the show. Scarlett is 11 weeks premature via Caesarean section on her parents' wedding day and has no heartbeat, so is placed on a ventilator. Her condition stabilises and she is baptised, with Janine naming her Patricia, after her late stepmother, Pat Evans (Pam St Clement), but she starts to regret using the name Patricia and Michael registers the name Scarlett Patricia Moon. Concerned with Scarlett's deteriorating health, her parents organise a christening for her at the hospital with her uncle, Ricky Butcher (Sid Owen) and his stepdaughter Whitney Dean (Shona McGarty), as godparents. Janine and Michael bring Scarlett home on 7 August 2012 and Janine worries as there are no nurses to help her. On 14 September, Janine leaves Walford temporarily, leaving Scarlett in Michael's care. Eight years later, Scarlett reappears in London when she contacts her half-brother, Tommy Moon (Sonny Kendal) online. It was reported in May 2012 that the character of Janine would go into labour on her wedding day to Michael, three months early. It was then reported in June 2012 that the baby would be named Scarlett Patricia Moon, after Janine initially decides to call her Patricia, after her former stepmother Pat Evans (Pam St Clement), who died earlier that year on 1 January. However, when she has second thoughts about the name, Michael registers the new name without telling her. A source from EastEnders said, "With a mother like Janine, this little girl is sure to be a fighter." Scarlett was portrayed by a prosthetic baby until the episode broadcast on 7 August 2012, when she was played by a real baby. AJ Ahmed AJ Ahmed, played by Phaldut Sharma, is the younger brother of established character Masood Ahmed (Nitin Ganatra). AJ made his first on-screen appearance on 9 July 2012. He left on 10 January 2014 to start a new job in Birmingham. Lexi Pearce Lexi Pearce (also Mitchell), played by Isabella Brown, is the daughter of Lola Pearce (Danielle Harold) and Ben Mitchell (Joshua Pascoe/Harry Reid/Max Bowden), who is born in the live segment of 23 July episode. From 2012 until July 2015, Lexi was portrayed by Dotti-Beau Cotterill. She was previously played by two babies. Her return in 2019, alongside Lola's, was announced on 20 December 2018. Isabella Brown's casting was announced on 19 March 2019. Lexi made her return alongside Lola and Ben on 1 April 2019. Lexi is conceived during a one-night stand and Lola discovers she is pregnant in November 2011. Lola denies that Ben is the father and Abi Branning (Lorna Fitzgerald) breaks up with Jay Brown (Jamie Borthwick) when she thinks he is the father of Lola's baby. In April 2012, Lola discovers her baby is a girl. During the live episode of 23 July 2012, Lola goes into labour whilst her grandfather Billy Mitchell (Perry Fenwick) is carrying the Olympic Flame through Walford. Aided by Cora Cross (Ann Mitchell), Jay, Ben, Patrick Trueman (Rudolph Walker), Fatboy (Ricky Norwood) and Nico Papadopalous (Aykut Hilmi), Lola gives birth to her daughter, with Billy making it just in time to witness the birth of his great-granddaughter. Lola brings the baby home and names her Lexi, after an old friend, which later transpires to be Alexa Smith (Saffron Coomber), with the middle name Billie, in honour of her grandfather. Lexi then wins a local "beautiful baby" competition. Lola gets a new social worker, Trish Barnes (Tessa Churchard), who visits regularly, one time seeing paint on Lexi's feet and becomes concerned that Lexi could have an allergic reaction, and later worrying when Lexi develops a cough, so Trish decides to visit daily. When Lola is arrested for assault, Trish takes Lexi into care. In a desperate plea to save Lexi, Lola tells Ben's father, Phil Mitchell (Steve McFadden), that Ben is Lexi's father, following their one-night stand a year previously. Phil agrees to help get Lexi back, on the condition that Lexi lives with him. Lola eventually agrees and Lexi visits her 3 times a week. Lola is angered when Phil decides to tell Ben he is a father. Phil later wins custody of Lexi and is allowed to be her kinship foster carer and Lola's access is not increased, leaving her devastated. Phil organises a christening for Lexi on 1 January 2013, but Lola is angry to discover that he plans to name her "Mitchell" instead of "Pearce", however after a talk with Phil – Lola later agrees that they are all part of the Mitchell family, and agrees to change Lexi's last name to Mitchell. Lexi is baptised with Jay and Cora as godparents. Phil starts controlling Lola and Lexi's relationship and is determined to stop Lola from being reunited with her daughter. At a hearing to determine Lexi's future, his solicitor tells the court that Lola is an unfit mother, so her access is unchanged. Lola overhears Phil saying she will never get custody of Lexi, so she snatches her from Phil's house. They are eventually found, and the next day when Trish visits, Phil says he intends to help reunite Lexi and Lola, and Lola is then given increased access to Lexi. Phil later takes Lola and Lexi to prison to see Ben, so Lexi can meet her father, although Ben tells Lola to keep Lexi away from Phil. Lexi is later taken to the hospital after Lola suspects Lexi has meningitis, although she is relieved to discover that Lexi is fine. At the final court hearing, Phil says that Lola deserves her daughter and Lexi is returned to Lola. In March 2014, Lexi is kidnapped by Adam White (Ben Wigzell), but her grandfather, Phil, and his cousin Ronnie Mitchell (Samantha Womack) get Lexi back to Lola, who is unaware that her daughter was the subject of a confrontation between Adam and Ronnie about the whereabouts of Carl White (Daniel Coonan), who was killed in the New Year by Ronnie. Lola worries that Ben might want involvement in Lexi's upbringing when she discovers that Ben will be returning to Walford for his father's wedding to Sharon Rickman (Letitia Dean). Ben informs Lola that she does not need to worry as he comments that she is a good mother to Lexi, who is in the right place to be brought up. In July 2015, Lola and Jay begin a relationship and plan to leave Walford when Jay is wanted by the police. When Lola, Lexi and Jay try to leave, Jay is arrested by the police and Lola discovers that Billy was the one who reported Jay to try and stop Lola and Lexi leaving. Lola eventually convinces Billy that she does not want to live in Walford, so she and Lexi can have a better life. Billy and Lola share an emotional farewell and Lola leaves for Newcastle, taking Lexi with her. In October, Jay receives a call from Lola on his 21st birthday, ending her relationship with him and revealing she is now with Dexter Hartman (Khali Best), who is determined to provide Lexi with a stable upbringing. On 20 December 2018, it was announced that Harold would reprise the role of Lola, set to return in April 2019 with her daughter, Lexi. John Hewland John Hewland, played by Jesse Birdsall, is the fiancé of Sharon Rickman (Letitia Dean). He first appears on 13 August 2012, cast as part of a storyline to bring Sharon back to the series. A show insider called the storyline "dramatic" and said: "The scriptwriters have come up with a dramatic storyline that sees Sharon contact Phil (Steve McFadden) after she realises she doesn't want to marry her fiancé." John first appears when Sharon returns to her wedding to collect her son Dennis Rickman (Harry Hickles) after walking out on John, but forgetting to collect Dennis. Dennis is with John and is fine, until John demands to know why Sharon is leaving him. She says she and Dennis are not happy, and he says she will regret going. Sharon realises Dennis is missing, and sees John driving off with him. She and Phil follow in their car, but lose them. They go to John's house where they force his sister Nina (Juliet Cowan) to reveal where she is meeting John with their passports. They get there but Nina warns him and he drives away. Another car chase ends when they get stuck in traffic and Dennis escapes from the car. John calls Sharon and Dennis scum, so Phil punches John. Dennis Rickman Jnr Dennis Rickman Jnr, portrayed by Harry Hickles from 2012 to 2015 and Bleu Landau from 2015 to 2020, is the son of Sharon Watts (Letitia Dean) and Dennis Rickman (Nigel Harman). Born off-screen in 2006, he made his first appearance on 13 August 2012. The role was recast from Hickles to Landau in 2015; no specific explanation was provided for the decision to recast the role. The character was killed-off during the soap's 35th anniversary celebrations, making his final appearance in the episode originally broadcast on 21 February 2020. The character's departure had not been publicised prior to broadcast. Having believed that she was infertile, Sharon discovers that she is pregnant on Christmas Day 2005. Dennis is stabbed and killed in the early hours of New Year's Day 2006 and Sharon moves to Florida, where she gives birth to Dennis Jr. In 2014, Sharon is attacked in her bar. In November 2021, a baby is left on Sharon's doorstep and after several weeks, the baby's mother Jada Lennox (Kelsey Calladine-Smith) reveals that she had a one-night stand with Dennis while he was associated with drug dealing prior to his death, and that he is baby Alyssa's father, becoming a father at 13. Reception Kate White of Inside Soap said that she thinks Dennis' nickname "Denny" is, "the single most annoying thing in soap. If we hear Sharon shout it once more, we'll go mad!" After Landau's first appearance as Dennis, viewers reacted on social media website Twitter, saying that the "new Denny" looked nothing like the "old Denny". In August 2017, Landau was longlisted for Best Young Actor at the Inside Soap Awards. He did not progress to the viewer-voted shortlist. Pete Pete, played by Jason Riddington, appears on 4 September. He is first seen in the local nightclub R&R, where he flirts with Tanya Cross (Jo Joyner), Shirley Carter (Linda Henry) and Sharon Rickman (Letitia Dean). Shirley calls him desperate, and he tells her he has just been released from prison. Shirley then gets drunk with him, but when he grabs club manager Sharon's buttock, she tells him to leave. Pete then meets Shirley's ex-partner Phil Mitchell (Steve McFadden), and leaves with Shirley. He buys chips for her but when she says goodbye, he grabs her, so she kicks him. He grabs her by the face, so Phil punches him. Inside Soap called Pete "a dodgy guy". All About Soap called him "a creepy man", a "slimy stranger" and a "sleazy stalker". Jimmy Jimmy is the son of Carly Wicks (Kellie Shirley), born off screen in July 2012. He is portrayed by a baby named Ryan. Jimmy is named after Carly's dead brother James "Jimbo" Wicks (Lloyd Richards). He appears in the episode broadcast on 7 September when his mother introduces him to his grandmother Shirley Carter (Linda Henry). Shirley is instantly smitten with Jimmy and cries as she holds him for the first time. Carly and Jimmy leave Walford, taking Shirley to stay with them. Kellie Shirley said that she was worried about dropping the baby while filming, but said it was "a really nice experience, especially as he was a really good baby." She confirmed that Ryan's mother was on set during filming so that he did not become frightened or confused, and the scenes were filmed quickly "because you can only film with a baby for a certain amount of time." Trish Barnes Trish Barnes, played by Tessa Churchard, is a social worker. In 2012, she visits Lola Pearce (Danielle Harold), but Lola is out buying nappies for her daughter Lexi Pearce, and her grandfather Billy Mitchell (Perry Fenwick) has the baby. Billy lies to Trish that he still has a job, even though he has recently lost it. Billy is also concerned when Lola returns with her friend Jay Brown (Jamie Borthwick), as he is on police bail for perverting the course of justice in relation to a murder. Trish comes back the next day with a list of concerns, and tells Lola she will be visiting more due to her bad attitude. Trish visits Lola again on several occasions, and sees paint on Lexi's feet, so tells Lola off as it could cause an allergic reaction, though it does not. Trish later worries when Lexi develops a cough. Trish finds out that Billy has lied about being employed, and then decides to visit daily as she feels he and Lola are not coping as she has used a tea towel as a nappy and the flat has not been cleaned. When Lola is arrested for assaulting Alexa Smith (Saffron Coomber), she is angry to see Trish arrive with the police. She bites Trish to stop her taking Lexi, but fails to stop her and is devastated when Trish takes Lexi from her. Lola decides to fight for Lexi and visits Trish at her office, apologising for biting her and asking when she can take Lexi home. Trish says she will have to attend parenting classes and have three access visits a week. Lola gets angry, so Trish says that her behaviour could cause her to lose Lexi for good. Trish brings Lexi to Lola again, but after Lexi leaves, Lola is devastated again, so Billy asks Lexi's grandfather Phil Mitchell (Steve McFadden) for help, and Phil decides to apply for a residency order for Lexi to live with him. Trish later arrives at Lola's, but without Lexi as she is ill. Trish is present when Phil decides to take Lexi to see his son, Lexi's father Ben Mitchell (Joshua Pascoe), who is in prison for murder, and Trish and Lola both refuse to let him. Phil asks Sharon Rickman (Letitia Dean) to pretend to be his fiancée to have a better chance of getting Lexi, and during a meeting between Trish, Phil and Lola, where Trish is assessing Phil, Sharon interrupts and introduces herself to Trish. When Alexa drops the assault charge, Lola thinks she will get Lexi back, but Trish informs her that the neglect case is still pending. Trish attends court where Phil is granted custody of Lexi, being her foster father, and Lola is allowed three access visits per week. When Lola learns that Phil wants to take Lexi on holiday for two weeks, Lola asks Trish's advice. Trish says that Lola is entitled to her access visits and can seek legal advice, however Lola agrees to let Phil go. When Phil returns, Trish informs him that she is pleased with Lola and she may get full custody of Lexi soon, leaving Phil unhappy. Trish attends a court hearing, stating Lola's positive progress and recommending that Lola has increased access to Lexi, but Phil has his solicitor tell the court that Lola turns up late and has a bad temper, so Lola's access does not change. Lola is angry and devastated, and Trish lends her support to Lola. After Phil and Lola sort their differences, Trish visits Phil and informs him that social services are preparing to increase Lola's visits to Lexi, with a view to returning Lexi to Lola in a couple of months. Checking on Lola's progress, Trish arrives unexpectedly and is invited to and attends a family dinner with Lola, Phil and Sharon. At the dinner, Sharon tells Trish that she and Phil are back together. At the court hearing, Trish is present when Lola is re-awarded custody of Lexi. She also visits Lola at home to see how she is coping. On another visit in August, Trish tells Lola she will cut back her visits to once a month as Lola is doing so well, and says soon she may not need to visit at all. In 2017, Trish visits Denise Fox (Diane Parish), who is planning to have her baby adopted when it is born. She tells Trish that she does not want to spend any time with the baby. Trish visits Denise to inform her about how her son is doing with his potential adoptive parents. Trish and Denise both sign the paperwork for the adoption and Trish gives Denise a letter from the adoptive family, who have named the child Raymond. Development Churchard's official credits list her as having filmed a 10-episode recurring role in EastEnders, the first episode being on 18 September 2012. Speaking of the storyline involving Trish, Harold told Inside Soap that when Trish arrives at Lola's house, "everything goes wrong at once", and explained that "Trish isn't given a good impression of Lola as a mother, and Lola isn't impressed when she sees her taking pages of notes". Lola is not happy about Trish getting involved in her life with daughter Lexi. All About Soap described Trish as the "bossy new social worker". Reception The scenes where Trish takes Lexi from Lola were criticised by the charity The Who Cares? Trust on Twitter, who called the storyline an "unhelpful portrayal" and said it had already received calls from members of the public who were "distressed about the EastEnders scene where a social worker snatches a baby from its mother's arms". The scenes were also condemned by the British Association of Social Workers (BASW), calling the BBC "too lazy and arrogant" to get correctly portray the child protection process, and saying that the baby was taken "without sufficient grounds to do so". Bridget Robb, acting chief of the BASW, said the storyline provoked "real anger among a profession well used to a less than accurate public and media perception of their jobs". She stated: Another social worker said "Accurate procedures were not followed [when a character's baby was taken away]. Was it police protection, section 20? Where was the immediate risk to the baby? As a social worker, I was in tears, as was a colleague of mine, watching how our profession was portrayed on television." The BBC responded to BASW by saying: A social worker who received the BBC's statement commented: In November 2012, Irish politician Robert Troy expressed concerns that the storyline could influence the result of an upcoming referendum on children's rights. Troy said, "Quite a few times I have been asked about a storyline on EastEnders where a young mother has had her child taken into care and has faced a very difficult battle to get access to the child. People have been emotionally affected by the story and have a real concern about the sort of heavy-handed state intervention that's portrayed." Danny Pennant Danny Pennant, played by Gary Lucy, made his first screen appearance on 27 September 2012, appearing until 2 November. On 6 March 2013, it was announced that Lucy was returning to the cast. Danny appeared on 7 June 2013 before becoming a regular character in July. On 19 January 2014, it was announced that Lucy would be leaving EastEnders. He left on 14 February 2014. Danny comes to the local Indian restaurant for a meal with two colleagues. He returns later to see if he left something behind and meets Syed Masood (Marc Elliott) and sees that he has money problems. He urges Syed to be honest with his family about them, though he is not. They continue to meet in secret when Syed invests money he borrowed from his mother, Zainab Khan (Nina Wadia) with Danny, and then borrows £500 back the next day. They become close and kiss twice, the second time witnessed by Syed's father, Masood Ahmed (Nitin Ganatra). Danny meets Syed's fiancé Christian Clarke (John Partridge), and when Syed leaves his stag party, Danny follows and tries to kiss Syed. Syed insists he loves Christian and asks for his money back, but Danny says the investment has fallen through. Masood arrives and tells Danny to back off and Syed punches Danny when he says Syed wanted to be caught. Christian and Syed marry and Danny continues to message Syed, demanding his £500 back. Christian sees the messages so arranges to meet Danny, pretending to be Syed. Danny tells Christian that he and Syed in fact have had sex so Christian punches him. Syed finds Christian badly beaten, implying he and Danny had a violent fight. Danny tells police that Christian assaulted him, and Christian is arrested. Danny tells Syed he will withdraw his statement if Syed returns his £500. However, Masood threatens to report Danny for fraud in regard to the failed investment and Christian is released without charge. In June 2013, Danny returns and attends the opening of Ian Beale's (Adam Woodyatt) restaurant. Ian expects Danny, a friend of Mr Lister (Nick Wilton) to invest, but Danny reveals that he only helps people to invest and refuses to help Ian as Lauren Branning (Jacqueline Jossa), spills a drink on him. Danny then starts working for Janine Butcher (Charlie Brooks). Later on, it is revealed that he is also attracted to women and kisses her. They have sex but Janine tells him that it is a one-off and she sees him as any other employee. Danny develops a rivalry with his co-worker, Lucy Beale (Hetti Bywater), and they compete and use dirty tactics against each other to gain commission on their pay. However, Lucy discovers that Danny is squatting in a vacant flat as he is homeless. Danny pleads with Lucy not to tell and she agrees, but warns him that she now has power over him. When Janine decides to buy The Queen Vic, she fires Danny and Lucy to free up some cash. But after Janine is arrested and imprisoned, they convince Billy Mitchell (Perry Fenwick) to give them their jobs back. Danny kisses Lucy and they become a couple but he also flirts with and kisses Johnny Carter (Sam Strike). Johnny later finds Danny is stalking him over an internet dating site for gay people, calling himself the "Walford Wonder". He initially decides not to tell Lucy but she discovers that Danny has been stealing from Janine and invites her to join him. Danny and Lucy lose their jobs when Janine sells the business so they plan to set up their own estate agents. They also plan to buy a flat together but Johnny tells Lucy about Danny's internet stalking and shows her Danny's profile on his mobile phone. Lucy is heartbroken by this revelation and confronts Danny with the information, asking him if he is only with her because she has Janine's money. Danny denies this and claims he loves her but Lucy does not believe him and throws the money out of her bedroom window into the street, where Johnny and other locals help themselves. Danny rushes outside and collects as much as he can and Lucy tells him to leave, threatening to call the police and report him for the embezzlement of Janine if he doesn't. Danny is last seen walking away with a handful of the money. After Lucy is found dead, Danny is ruled out as a suspect in her murder investigation as he had, according to the police, moved to Marbella. Development The character and Lucy's casting was announced on 3 August 2012. The actor has an initial contract of three months. Danny is a 28-year-old city banker, who has been described as being "mischievous", a "charmer" and someone who "oozes sex appeal". An EastEnders statement read "With his irresistible charm and luring persona, Danny is desired and envied by both men and women—girls want to be seen with him and boys want to be him. He will inevitably create controversial encounters and his provocative and lustful nature is bound to land him in trouble". On 22 August, it was announced that Lucy would be playing a gay character, set to become involved in a love triangle with Christian Clarke (John Partridge) and Syed Masood (Marc Elliott). A source said, "All the girls think he's a real ladies' man. But they're soon disappointed when it turns out he's not interested in women. He'll ruffle a few feathers and Christian and Syed's relationship will be tested". A EastEnders spokesperson refused to confirm this saying, "It's fair to say that Danny is going to cause a few problems for the residents of Walford but viewers will have to tune in and see for themselves as we don't want to spoil the surprise!". When it was announced that Lucy was returning to the cast in 2013, executive producer Lorraine Newman said, "We are absolutely delighted to reveal that Gary Lucy will be returning to EastEnders. Gary clearly felt at home on the show and his wonderful portrayal of Danny Pennant left us with an intriguing character to explore. It really was only a matter of time before he returned. Danny's stories will see him crossing paths with some of our best-loved characters and I am sure the audience will relish the fact that the complex nature of this character means that nothing is ever simple." Alexa Smith Alexa Smith, played by Saffron Coomber, is a former friend of Lola Pearce (Danielle Harold). She appears in four episodes from 1 to 5 October 2012, two episodes on 13 and 15 November 2012 and one on 7 March 2013. Alexa first appears when Lola sees her with a group of friends and recognises her from their time together in a care home. The next day, Lola meets Alexa and her friends, and Lola tries to impress them, keeping a look out while they shoplift. Later, they go to the local café where Alexa starts throwing things at people, including Lola's friend Abi Branning (Lorna Fitzgerald). Lola defends Abi, and Alexa says that she can only be friends with one of them, so Lola sides with Abi. Alexa is later shocked to discover Lola has a baby, and that Lola named her Lexi, after her. The next day, Lola sees Alexa and her gang, and Alexa insults Lexi, saying she should have had an abortion. When Abi arrives, Alexa mocks her for wearing makeup, wiping it from her face, and she and her friends start pushing and slapping Abi, filming everything on a mobile phone. They take Abi's phone, so Lola snatches it from Alexa. Alexa's friends grab Lola and when Alexa says that Lexi is dead, Lola breaks free and punches Alexa in the face, leaving her with a nosebleed. Alexa and her friends then show the police the part of their mobile phone video showing Lola attacking Alexa, and Lola is arrested, with Lexi being taken away by social services. About six weeks later, Alexa and her gang return and attempt to bully Alice Branning (Jasmyn Banks) until her friend Ray Dixon (Chucky Venn) chases the gang away. The next day, Alexa and her friends see Lola and her friend Jay Mitchell (Jamie Borthwick) and taunt them about Lexi being in care. Lola tries to attack Alexa, but she is stopped by Jay and her grandfather Billy Mitchell (Perry Fenwick). Later, Billy sees Alexa alone and tells her he knows what it is like to be in care, as she does, and asks Alexa to give Lexi a chance to come home. Alexa is affected by Billy's words but when Lola arrives, she accuses Billy of witness tampering. However, Lexi's grandfather Phil Mitchell (Steve McFadden) learns from his lawyer that Alexa has dropped the assault charges against Lola. Three months later, Phil has custody of Lexi, but Lola snatches her after hearing Phil say she will never get Lexi back. Lola calls Alexa, having nobody else to turn to. Phil, Billy and Sharon Rickman (Letitia Dean) find Lola's phone and call Alexa, offering her money for information. They meet Alexa, who says Lola is in Tottenham, as she could not help Lola. Phil searches the squat that Alexa is staying in, but does not find Lola, though she is hiding in the house. She and Alexa talk, and Alexa says she ran away from her foster home. Alexa says Lola can stay the night while she parties with her friends, but Lola leaves when the police arrive. Harold explained to Katy White from Inside Soap that Lola and Alexa were best friends when they were in a care home together, but when Alexa was fostered, Lola felt abandoned. She said that "in [a care home] environment, friends mean more than family", and is now happy to see Alexa. White said that Alexa and her friends are "very wild", meaning that "getting caught up with them is the last thing Lola needs." She explained that Lola's affection for her friend and her desire to fit in see her hanging out with them and putting up with their bad behaviour. Harold told All About Soap that while Lola has changed since they were in care, Alexa has not, and called the Alexa and her gang "scary", saying "They don't care about anyone but themselves […]. It's nasty." White described Alexa as "vicious" and "a very nasty piece of work." Digital Spy's Daniel Kilkelly called her "a boisterous girl". Lisa Lisa, played by Marianne Benedict, appears on 1 October when Jack Branning (Scott Maslen) sets his brother Derek Branning (Jamie Foreman) up on a date with her. She is much taller than Derek, which makes everybody else laugh. Inside Soap found the scenes funny, saying "Sometimes the simplest jokes are the best. We loved pint-sized Derek's supersize date! Tee-hee!" Heat called it the "Awkward date of the week", commenting that "[it] looks like Derek needs to take a leaf out of Tom Cruise's book and get himself some man-heels, what with his date towering over him like that. He looks pretty smug, she looks pretty miserable. Should have stuck with the other brother, love." Jackie Bosch Jackie Bosch, played by Frances Lima, is a former girlfriend of Derek Branning (Jamie Foreman). She appears on 13 November 2012, when Derek's brother Max Branning (Jake Wood) decides to take Derek to visit the love of his life to cheer him up. Derek knew Jackie when she was 16 and is the only woman he has ever loved but she broke his heart. However, Jackie remembers Derek as a bully who beat up David Wicks (Michael French), and says their few dates were not a big love affair as Derek calls it. Derek leaves after Jackie says she was not surprised when she heard Derek had been in prison. News of Jackie's appearance was first reported in October 2012, when photographs emerged from on-location filming, featuring actors Foreman and Jake Wood, who plays Derek's brother Max Branning, and two women, one of whom was Lima. At the time, no details of the characters were known. All About Soap and Inside Soap both speculated that they may have something to do with a secret Max is keeping from his fiancée Tanya Cross (Jo Joyner), but All About Soap noted that the house where filming took place was different from one seen in a previous episode where Max dropped off an envelope of cash, while Inside Soap said it was the same one. They also said that the women did not appear to be Max's usual type, but said Jackie (the older of the two women) did not seem happy to see them. When it emerged that Jackie was Derek's ex-girlfriend, and that Derek would be angry about the meeting and threaten to reveal Max's secret, Soaplife stated: "So [East]Enders specially casts Jackie, spends a packet on a location shoot so that Derek can get angry and mention the Max secret again? Hope the secret's better than this plot..." Ava Hartman Ava Hartman, played by Clare Perkins, is the daughter of Cora Cross (Ann Mitchell) and half-sister of Tanya Cross (Jo Joyner) and Rainie Cross (Tanya Franks). Ava first appears on 20 November 2012. It was announced in September 2013 that Ava would be leaving the series at the end of her storylines with Sam James (Cornell S John), as was originally planned. She left on 17 December 2013. In July 2012, Cora tells Tanya that her daughter, Ava Anderton, was born in 1964 but was taken away by the staff while Cora was sleeping and they told her that Ava had died. In fact, Cora was forced to put Ava up for adoption. In November, Cora tells her partner Patrick Trueman (Rudolph Walker) that Ava is alive and Patrick tells Tanya. Tanya tracks Ava down, and discovers she in the deputy headmistress of a local school. Tanya and Patrick visit the school, where Tanya is shocked to see Ava is mixed-race and tells her she is moving to the area. Ava gives them a tour of the school but Tanya runs out, leaving her purse behind. Tanya agrees to say nothing to Cora and not see Ava again and she and Patrick drive away before Ava can return the purse. Ava returns the purse the next day and Cora invites Ava in. Cora is shocked when Ava reveals her name. Ava learns the truth, and has a long talk with Cora, telling her she had thought about finding her before but decided the past was best left in the past, and nothing has changed, so leaves. A few weeks later, Cora visits Ava and gives her a bracelet that was given to Cora by Ava's father, along with a Christmas card. Ava later brings Cora a card in return, and wears the bracelet. Later, Tanya's daughter Abi Branning (Lorna Fitzgerald) befriends Dexter Hartman (Khali Best), and invites him to dinner with her family. Ava gatecrashes and berates Tanya for meddling. Tanya is clueless, and it is then revealed that Dexter is Ava's son. Ava is angry with Dexter for not speaking to her about what he was doing. Ava then gets a job at a school in Walford. Ava helps out when Bianca Butcher's (Patsy Palmer) son, Liam Butcher (James Forde), is involved with a gang that Dexter used to be a member of. They gang trash Ava and Dexter's home, and they move to Albert Square. Ava does not want to have anything to do with Cora, but Dexter urges her to, and she starts a friendship with Billy Mitchell (Perry Fenwick), who has a romantic interest in her. Their date is interrupted by Ava's ex-husband and Dexter's father, Sam James (Cornell S John). Ava resents him because he claimed to have gone out to buy milk but did not return for 20 years, and both Ava and Dexter want Sam to leave. However, Ava slowly realises she still has romantic feelings for Sam and they have sex. The pair reunite and Dexter slowly warms to his father. It emerges that Sam requires a kidney transplant. Ava hopes to donate one of hers but is not a match. Dexter decides to take a test to see if he is a match, but Ava refuses to let him. He does so anyway, and he is a match, and Dexter and Sam go through the transplant operation. Ava fusses over both of them while they are recovering, and while Dexter is used to Ava's overprotective nature, Sam feels smothered. On Dexter's birthday, Ava discovers that Sam only came to Walford to get Dexter's kidney, leaving her furious. She throws him out, but keeps the reason for his departure secret from a devastated Dexter. Blaming her for Sam's sudden disappearance, Dexter moves in with Cora. Ava is offered a job in Newcastle, and Cora urges her to take it, but she turns it down. Dexter then discovers the truth about why Sam left. He emails the company offering the job, pretending to be Ava, and accepts the job on her behalf. She then agrees to go, but decides Dexter should stay in Walford because he has his own life now. Ava then thanks Cora, calling her "mum", and leaves. Development Since viewers discovered that Cora had a baby in the 1960s who she claimed was dead, speculation started about the fact that Ava could still be alive. Initial rumours suggested that Ava was actually Sharon Rickman (Letitia Dean), who had recently returned to the series, despite Sharon's birth mother, Carol Hanley (Sheila White), having already appeared on screen in 1990. Perkins' casting as Ava was officially confirmed on 4 September 2012, when it was announced that viewers would discover that Ava was still alive. Perkins said of her casting, "I am delighted to be joining the show but to be working alongside Ann Mitchell makes it a dream come true. I have admired Ann's work for many years, and both she and Jo (Joyner) have been a real pleasure to work with. I'm now looking forward to see what the writers have in store for Ava". An insider from EastEnders told Inside Soap that finding out that Ava is alive would "be the most explosive moment of Cora's whole life", adding that it would be both "the most wonderful and yet the most terrible thing that could happen" because although Cora has her daughter back, she has not been able to get to know her until now. The insider said that Cora and Ava must both come to terms with this fact, and speculated that Ava may have been taken away from Cora by the nurses because her father was black and "racial prejudice [was] prevalent in the 1960s", calling it "an unimaginable cruelty to inflict on them both." Mitchell revealed the reasons for Ava being taken away: "The baby's father was black and he left Cora before he knew she was pregnant. She was 18 and unmarried, and at that time, having a baby in her situation was a social stigma. She was made to feel enormous shame by her parents, who forced her to give the baby up for adoption." She said Cora did not tell anyone, "partly through an enormous sense of guilt, and to keep things as safe and uncomplicated as they could be." Of Ava's arrival, Mitchell said "It's going to be mayhem. The implications will be huge. The family will want answers, and I'm sure we won't be seeing the back of Ava." Perkins' official credits list her as currently (September 2012) filming a regular role in EastEnders. Tansy Meadow Tansy Meadow, played by Daisy Wood-Davis, is the sister of Poppy Meadow (Rachel Bright). She appeared on 22 November 2012. Poppy receives a phone call from Tansy to say she is visiting the next day, and Poppy is unhappy about it. Poppy tells her friends that Tansy is successful and has a fiancé, and Poppy has lied to Tansy about her life. Poppy's friends Lucy Beale (Hetti Bywater) and Whitney Dean (Shona McGarty) refuse to pretend to be her employees at the salon, calling Poppy their boss, when in fact Poppy is employed there. Poppy calls Tansy to try to put her off, but Tansy arrives while Poppy is on the phone to her. Tansy shows off her engagement ring, so Fatboy (Ricky Norwood) pretends to be Poppy's successful banker boyfriend until Mo Harris (Laila Morse) reveals that Fatboy is a barman. Poppy apologises to Tansy for lying, and then Lucy and Whitney turn up pretending to be Poppy's employees, with an emergency at the salon. Later, Tansy cries as Poppy has everything perfect, and reveals she split from her fiancé three weeks ago because he cheated on her, and although she has worked out that Poppy does not own the salon, she thinks Poppy and Fatboy are good together. Poppy says they are just friends, but Tansy says that he clearly likes her a lot. Tansy's arrival for a single episode was announced when it was revealed that Poppy was to become a regular character. Wood-Davis filmed her scenes in late August and early September. Inside Soap said of Tansy: "Super-successful Tansy is always bragging about her wonderful life and fiancé, so Poppy feels a bit of a failure in comparison." Tansy also appears in a 15-minute spin-off episode, called "All I Want for Christmas". Ayesha Rana Ayesha Rana, played by Shivani Ghai, is a family friend of Zainab Khan (Nina Wadia). She makes her first appearance in the episode broadcast on 17 December 2012. She was written out in early 2013 and left on 1 March 2013, after the departure of Zainab. Ayesha is first seen in the café, where Zainab does not recognise her, and accuses her of pushing in the queue ahead of her. Later, Ayesha arrives at Zainab's home while Zainab is wearing a face mask. Zainab is annoyed that she was not ready for Ayesha's visit as she is three weeks early. Ayesha then overhears Zainab telling her son Tamwar Masood (Himesh Patel) that he would be better for her than her suitor, Rashid Kayani (Gurpreet Singh). Zainab tries to get Ayesha and Tamwar together, and she thinks it has worked at her New Year's Eve party, but Tamwar is just looking after Ayesha because she is sick after AJ Ahmed (Phaldut Sharma) spiked the punch. Ayesha then meets Rashid, and thinks he is "alright". However, she soon develops a crush on Masood, which he discovers and does not tell Zainab. He urges her to try with Rashid and she does meet him again. She thinks Rashid is not right for her and it is clear she still wants Masood. She lies to Zainab that she is still seeing Rashid, while telling Masood she loves him. He rejects her advances, and she later confesses her love of Masood to Zainab, saying he feels the same, and then leaves Walford. After Masood and Zainab break up and Zainab moves to Pakistan, Ayesha returns for Masood. She ruins his date with Carol and the next day they kiss. Masood attempts to move away with Ayesha but in the end he rejects her and she leaves alone. Tamwar sees she is back and thinks she is the reason Zainab left. Development Ayesha's arrival was teased by executive producer Lorraine Newman in an interview with Digital Spy when she said, "The Masoods are rightfully incredibly popular and we've got big plans for them. […] We also have a new female character joining the household in December. Let's just say that she's bound to cause a bit of mischief!" The character and casting were announced on 16 November, when Ayesha was described as "Sweet and studious, but rather shy", having lived a sheltered life. She is also described as a "naïve introvert". A BBC statement said of her storyline: "Since the tragic death of her beloved father, she has been left alone with a distant mother and uncaring brothers. Ayesha has agreed to fulfil her father's dying wish, going through with an arranged marriage. Can the Masoods help her? And will her time on [Albert] Square encourage this naive young woman to find her voice?" It was said that Ayesha would find living in Walford "a shock to the system, as she is used to grander surroundings." Shivani said of her casting: "I've been watching EastEnders for years and am excited to be joining such an iconic show." Details of Ayesha's arrival emerged on the day of her first episode, when it was revealed that Ayesha would be moving to Walford to get to know her suitor who lives in London, and that Ayesha would have a "shaky start" with Zainab, as she initially does not realise who Ayesha is. Adam White Adam White, played by Ben Wigzell, is Kirsty Branning's (Kierston Wareing) ex-boyfriend Carl White's (Daniel Coonan) brother. Adam first appears when he is in a group of men who give Carl's former prison cellmate Derek Branning (Jamie Foreman) a beating after running his car off the road and chasing him. In February 2013, Kirsty's husband Max Branning (Jake Wood) goes to Adam's house to find Kirsty. Kirsty has a bruise on her neck, and realising Adam caused the injury, Max punches him. Adam and another man then beat Max after locking him inside the house. In May, Adam starts calling Kirsty, as Carl is due to be released from prison. Kirsty worries that they will track her down so Max returns with his brother Jack Branning (Scott Maslen) to confront Adam again. Adam punches Max so Jack throws him to the ground and the brothers order him to stop contacting Kirsty. In August 2013, Adam attacks Kirsty, asking her for money. Carl stops Adam, who did not know Carl would be there. Carl blames Adam for Kirsty marrying Max and their mother Nora White (Lynn Farleigh) being in a care home, and Adam explains he owes money to somebody. Carl and Adam go to nightclub R&R, where Carl plans to sell drugs but they are confronted by Max and club owner Phil Mitchell (Steve McFadden). Carl then disowns Adam and he leaves. Adam returns in March 2014, in search for Carl, who has since been murdered by Ronnie Mitchell (Samantha Womack), alongside his mother, Nora (Lynn Farleigh). Ronnie lies to both of them about her identity, claiming to be her sister Roxy (Rita Simons), who had been Carl's girlfriend, and says she does not know where he went. However, Adam knows she is lying as Carl had sent Adam a photo of himself and Roxy together. Adam later kidnaps Lexi Pearce, which displeases his mother. Phil and Ronnie track them down, demanding Lexi back. The Whites demand to know what happened to Carl in return for the baby. When the Mitchells are hesitant to provide an explanation, Adam loses his patience but Phil warns him off harming Lexi and takes Lexi off Adam. Nora begs them for answers and Ronnie breaks down and admits that she killed Carl, leaving a distraught Nora and Adam shocked. Ronnie and Phil return with Lexi, and give her back to her mother Lola (Danielle Harold) who is unaware of what has happened. Phil tells Ronnie she has to deal with Adam and Nora or he will. Ronnie then gets market inspector Aleks Shirovs (Kristian Kiehling) to attack Adam and beat him up. Ronnie takes Phil to visit Adam in hospital after Aleks's assault on him whilst Nora sits beside his bedside. Ronnie warns both Nora and Adam off hassling the Mitchells further, threatening them with more violence. Ronnie and a disturbed Phil then leave. Adam and Nora have not been seen since. In Adam's first appearance, he is credited as "Thug", but his name was revealed in his second appearance. In August 2013, Heat said of Adam: "As if having bad boy Carl on the Square wasn't bad enough, now his brother Adam has popped up as well. And he's even more of a villain than Carl." Adam returned on 10 March 2014 and left on 17 March 2014. Kirsty Branning Kirsty Branning, played by Kierston Wareing, is the third wife of Max Branning (Jake Wood) and the secret that Max has withheld from his former wife and current fiancée Tanya Cross (Jo Joyner) for several months. Kirsty's storylines include faking a pregnancy to stop Max leaving her, suffering a panic attack when Max nearly discovers her deceit, and her ex-fiancé Carl White (Daniel Coonan) trying to end her relationship with Max. In September 2013, it was announced that the character had been axed by new executive producer Dominic Treadwell-Collins, and Kirsty left on 9 January 2014. Storylines Kirsty unexpectedly arrives at Max's home on Christmas Day after his brother Derek Branning (Jamie Foreman) informs her of where he lives. Tanya answers the door and Kirsty introduces herself as Max's wife, moments before Max and Tanya are going to remarry. It is revealed that Max met Kirsty in 2011 after his split from Tanya, when he was living with Derek. Kirsty was working as an erotic dancer and was introduced to Max through Derek. They were both at a low ebb and Kirsty fell in love with Max, and they married. They planned to move to Manchester together but Max returned to Walford after hearing there was trouble there. Max learnt of Tanya's cervical cancer and stood by her, and left Kirsty behind. Unknown to Max, Kirsty was pregnant with his child. Derek stayed in contact with Kirsty, and Max sent money so she could divorce him. Derek did not give Kirsty the last payment, but lied to Max that Kirsty had signed divorce papers. Derek told Kirsty that Max did not want the child and she terminated the pregnancy. After this is revealed, a huge argument ensues after which Derek suffers a massive heart attack and dies. Kirsty stays in Walford and gets a job at the local public house, The Queen Victoria. On the day of Derek's funeral, Max and Derek's sister Carol Jackson (Lindsey Coulson) tells Kirsty that if she cannot find proof that Max loves her, then she must leave. When Kirsty meets Max, they argue but end up kissing passionately. Kirsty then attends the funeral, upsetting Tanya as Max has told her that Kirsty has left Walford. Tanya pays Kirsty to leave, but she does not go, so Tanya allows Kirsty to come to a family dinner to see what Max has with her. Kirsty revels in the fact that there are family problems. When Max's daughter Lauren Branning (Jacqueline Jossa) is upset, Kirsty takes the opportunity to bond with her, upsetting Tanya. Kirsty gives Lauren the keys to her room at the B&B. Max finds the keys and pockets them. Tanya finds them and assumes Max is still involved with Kirsty, so she goes to Kirsty's room and starts packing her belongings. Kirsty catches her, so Tanya tells Kirsty to leave, giving her the divorce papers to sign but Kirsty writes "never" on them. Lauren visits Kirsty and tells her to leave as Max will always want Tanya. Later, Kat Moon (Jessie Wallace) urges Kirsty to move on from Max, and as she realises how much she is hurting Max by staying, she signs the divorce papers. She tells Max she is leaving Walford. Tanya realises that Max still has feelings for Kirsty and ejects him from their home as Kirsty leaves Walford. Kirsty returns her wedding ring through the post. Max finds her staying with her ex-boyfriend Carl White's (Daniel Coonan) brother, Adam White (Ben Wigzell), who is abusive towards her. After Adam beats Max up, Kirsty and Max reconcile with a passionate kiss in Max's car. She returns to Walford and lives with Max in the B&B. Kirsty is angry when Max continues to say he has a special connection with Tanya because they have children. Kirsty tells Max she is pregnant, and Max says he is not ready to have a child with her. They agree that she will have an abortion, but she confides in Kat that she is not really pregnant, and Max then asks Kirsty to not abort the pregnancy. Kirsty then hopes she will get pregnant, and announces to her neighbours in the pub that she is pregnant. Max then finds himself and Kirsty their own home. Kirsty worries when people ask questions about her pregnancy, and Kat urges her to tell Max the truth. Adam starts calling Kirsty, as Carl is due to be released from prison. She also starts worrying when they will track her down. Kirsty cancels an ultrasound scan appointment but lies to Max that the hospital cancelled it. Max takes her anyway and Kirsty suffers a panic attack, so she does not have a scan. Kirsty is stunned to see that Carl has arrived in Walford. She tells him she is married and pregnant, and that he should leave. However, Carl insists he will win Kirsty back. Eventually Kirsty thinks she may be pregnant, so takes a pregnancy test but bins it when Max arrives. They argue about Carl and the bin is knocked over, so Max finds the test. She admits that she was never pregnant, so Max returns to Tanya, as he was only with Kirsty because of the pregnancy. Tanya, however, refuses to take him back, and leaves Walford. Max moves into his old house. While Max is away from Walford, Kirsty and Carl visit Carl's mother, Nora White (Lynn Farleigh), because she does not know they have split up. On Max's return, Carl lets Max think he is now with Kirsty. Max tells Kirsty he could not stop thinking about her while he was away, so she suggests that they meet later, and if Max does not arrive then their relationship is over for good. Carl discovers this, so makes sure Max is busy at work and visits Kirsty at the time Max was meant to be there. The next day, Carl implies to Max that he and Kirsty had sex. Max tells people about this. She is angered by what both Max and Carl have done and rejects them both. When she confronts Max again, they passionately kiss, but are interrupted by Lauren, who has been in a rehabilitation clinic. Kirsty then puts the relationship on hold for Lauren's sake. However, Lauren convinces them to reunite, as Max is lovesick. Carl continues to interfere in Kirsty and Max's marriage, and when Max is arrested for cutting the brakes of Carl's car, he ends his relationship with Kirsty and says he is guilty. Kirsty does not believe him, and suspects Carl forced Max into this position. In desperation for money, Kirsty has sex with Carl, and then steals £1000 from him. Max is then acquitted of the crime and reunites with Kirsty. However, Carl then tells Max that he had sex with Kirsty while he was in prison, and this leads to Max ending his relationship with her. In early 2014, Kirsty becomes concerned when Carl is nowhere to be seen, unaware that he has actually been murdered by Ronnie Mitchell (Samantha Womack). She asks Phil Mitchell (Steve McFadden), Shirley Carter (Linda Henry) and Terry Spraggan (Terry Alderton) about Carl's whereabouts, but nobody knows where he is. When Jane Beale (Laurie Brett) reveals to Max that Tanya is in a new relationship, he takes Kirsty back. The reunion is short, however, when Kirsty makes the mistake of cooking the meal with wine, knowing that Max's daughter Lauren is an alcoholic. Max throws the meal at the wall and Kirsty is thrown out of the house. The next day, Kirsty is homeless and Max gives her £20 to live on, so she seeks advice from Shirley. At Denise Fox (Diane Parish) and Ian Beale's (Adam Woodyatt) engagement party, Kirsty acts drunk and tries to hug Max, stealing his car keys. Max, Lauren and many other locals step outside to find Kirsty in Max's car. She insults Max and throws away her wedding ring before leaving Walford. Development Wareing knew about the part of Kirsty in April 2012, and discovered she had the part in August at a meeting with executive producer Lorraine Newman and series consultant Simon Ashdown, who offered her the role. She started filming at the end of October, knowing her first episode would be on Christmas Day. She described her first scene as "really weird", "surreal" and "bizarre" because she had grown up watching EastEnders. The character was kept a secret, with no announcement being made, and the only people Wareing told she had the part were her father and brother. She found it more difficult over time to keep the secret, as for her, it was "exciting and nerve-wracking" and she wanted to share her news. She had to tell people who saw her arriving at BBC Elstree Centre that she was temping in the office or playing a background role. Wareing said in an interview released after her first episode was broadcast, that she loves playing Kirsty, saying "there are a lot of places she can go, I feel." She said that Kirsty has "a lot of sides to her", meaning there are a lot of directions in which the character could be taken. She said that as not much is known about the character, "there is potential for a lot to come out about her." At first she thought Kirsty was "a bitch", but felt that eventually people may need another side to her and sympathise with her. She added that Kirsty is "far from boring". An official statement said "Kirsty is set to cause trouble for Max and Tanya. Will Max and Tanya's relationship survive, and will Kirsty want to give up her husband? One thing's for sure, Kirsty is fiery, flirty and does what she wants." Others References External links 2012 , EastEnders 2012 in British television
Attack Squadron 75 (VA-75) or ATKRON 75 was an attack squadron of the United States Navy that was active from World War II through the 1990s. Nicknamed the "Sunday Punchers," they were based out of Naval Air Station Oceana, Virginia. Originally established as Bombing Squadron EIGHTEEN (VB-18) on July 20, 1943, it was redesignated Attack Squadron VA-7A on 15 November 1946, redesignated Attack Squadron VA-74 on 27 July 1948, redesignated Attack Squadron VA-75 on 15 February 1950 and disestablished on February 28, 1997. They were the second squadron to be designated VA-75, the first VA-75 was disestablished on 30 November 1949. They were the first fleet squadron to operate the A-6 Intruder and the last unit to fly it in operational service. History World War II 5 February 1944: Lieutenant Commander Dickson, the squadron's commanding officer, was killed in a training exercise 12 October 1944: Squadron commanding officer, Commander Mark Eslick, was lost in combat during an attack on Kiirun Harbor, Formosa. 24–26 October 1944: The squadron participated in the Battle for Leyte Gulf, part of the operations surrounding the invasion of Leyte. On 24 October VB-18's SB2Cs flew sorties against a powerful Japanese surface force in the Sibuyan Sea. These attacks contributed to the sinking of the , one of the two largest battleships in the world. Lieutenant Donald L. Wilson was awarded the Navy Cross for scoring a direct hit on a Japanese battleship during the battle. On 25 October the squadron's planes were part of a Fast Carrier Task Force that attacked the Japanese carrier force in the Battle off Cape Engaño. Four Japanese carriers were sunk during this engagement, the squadron's commanding officer, Lieutenant Commander George D. Ghesquiere was awarded the Navy Cross for leading his squadron in this battle and Lieutenant Benjamin G. Preston was awarded a Gold Star in lieu of his third Navy Cross for leading a division of dive bombers in this battle. On the 26th, squadron planes participated in attacks on the Japanese surface force which was retiring from the Battle off Samar. Postwar September–December 1946: The squadron participated in 's shake-down cruise in the Caribbean and a goodwill cruise to South America for the inauguration of Chile's President. 25 January 1949: the squadron conducted cross-deck operations with the British carrier in the Mediterranean. Korean War 23 June 1952: The squadron's first combat action in the Korean War was a joint operation with Air Group 7 and the U.S. Air Force in an attack against hydro-electric complexes in North Korea that had previously been restricted from attack. 11 July 1952: The squadron participated in a combined attack against Pyongyang, North Korea, with aircraft from CVG-7, , the U.S. Air Force, Marine Corps, Australian Air Force and British Royal Navy. 5 December 1952: On a strike against enemy troop concentrations the squadron's commanding officer, Commander H. K. Evans, was lost when his aircraft was hit by antiaircraft fire and crashed. 1960s April 1961: The squadron operated from in an area south of Guantanamo Bay, Cuba, during the Bay of Pigs Invasion 22 October–22 November 1962: Participated in the Cuban Quarantine while embarked on Independence. 14 November 1963: The first operational fleet squadron to be assigned the A-6A Intruder. Vietnam War May–December 1965: Operating from Independence, VA-75 was the first squadron to deploy with the A-6A Intruder and operate the aircraft in a combat environment. 18 July 1965: The squadron commanding officer, Commander Jeremiah Denton, and bombardier-navigator LtJG Bill Tshudy, were captured after a combat mission over North Vietnam. 18 September 1965: The squadron's next commanding officer, Commander Leonard Vogt, and Lt. R.F. Barber, were killed while engaged in a night bombing attack Theon enemy patrol boats. 24 February 1968: Commander Jerrold M. Zacharias and Lieutenant Commander Michael L. Hall were awarded the Navy Cross for their action with VA-35 in planning and executing a coordinated A-6A strike on Hanoi. 1970s September and October 1970: VA-75 operated from while on station in the eastern Mediterranean during the Black September in Jordan 7 October 1971: VA-75 became the first A-6 squadron to drop sonobuoys. The integrated A-6A radar system and the A-6B antiradiation system were utilized for exact positioning and release of the sonobuoys. This event was part of an overall evaluation of the CV Concept being conducted by the Saratoga to determine the carrier's capability to operate effectively in both the attack and ASW roles. June–October 1972: Participated in Operation Linebacker, heavy air strikes against targets in North Vietnam and mining operations along coastal waters. 6 August 1972: Commander Charles Earnest and Lieutenant Commander Grady L. Jackson were awarded the Silver Star for directing a successful night inland rescue of a downed pilot in a heavily defended area of North Vietnam. 10 October 1972: Lieutenant Commander John A. Pieno and Lieutenant Junior Grade John R. Fuller were awarded the Silver Star for their actions as bombardier/navigators of a two plane attack, at dusk, on the North Vietnamese airfield of Bai Thong. 28 November 1972: The squadron's commanding officer, Commander Charles Earnest, was lost in an aircraft accident following a catapult launch from Saratoga while operating on Yankee Station. 19–29 December 1972: Participated in Operation Linebacker II 18 January 1975: Following violent demonstrations against the American Embassy in Nicosia, Cyprus, VA-75 operated from Saratoga off the coast of Cyprus. April 1976: As tensions increased in Lebanon, Saratoga and her air wing operated south of Crete, prepared to provide support for the evacuation of Americans from that country if it became necessary. 1980s-1990s 8 January 1980: The squadron's commanding officer, Commander A. J. Lynch, and Lieutenant Charles J. Morrow were lost when their aircraft struck several parked planes during a night landing and careened into the sea. June 1982: Israel invaded Lebanon and was ordered to operate off the coast of Lebanon. VA-75 operated from the carrier, preparing for possible air support if it became necessary to evacuate Americans from Beirut, Lebanon. 4 December 1983: During Kennedy’s operations off the coast of Lebanon in support of the Multinational Peacekeeping Force, several of the carrier's F-14 reconnaissance aircraft received hostile fire from Syrian surface-to-air missile and anti-aircraft positions on 3 December. A retaliatory strike was flown by elements from CVW-3 and aircraft from Independence against the Syrian antiaircraft positions near Hammana, Lebanon. Three of VA-75's A-6Es participated in the strike and it also provided two KA-6D tanker aircraft for the operation. 6 February 1984: VA-75 dropped laser guided bombs in response to a request from U.S. Marines (part of the Multinational Peacekeeping Force) at the Beirut International Airport to suppress attacks against their positions. February 1987: With the increased tensions in Lebanon surrounding the American hostages, Kennedy was ordered to operate off the coast of Lebanon. VA-75 flew operations from the carrier in preparation for possible evacuation. January 1989: During routine training exercises off the northeastern tip of Libya, two F-14 Tomcats were approached by two Libyan Air Force MiG-23 jets, and after repeated attempts for a peaceful intercept, the F-14s shot down the Libyan aircraft. VA-75's KA-6D tankers provided refueling support for the two F-14s August 1989: During a training exercise, a squadron A-6E SWIP aircraft was the first to fire an AIM-9H Sidewinder air-to-air missile, scoring a direct hit with the missile. September–October 1990 and December 1990–January 1991: The squadron participated in Operation Desert Shield, the buildup of American and Allied forces to counter a threatened invasion of Saudi Arabia by Iraq and as part of an economic blockade of Iraq to force its withdrawal from Kuwait. See also History of the United States Navy List of inactive United States Navy aircraft squadrons List of United States Navy aircraft squadrons References Bibliography VA-75 Flies A-6 into Retirement External links VA-75 Sunday Punchers dedication and reunion site VA-75 Sunday Punchers CVW-7, CVA-62 VA-75 Sunday Punchers @ the Intruder Association The Sunday Punchers Attack squadrons of the United States Navy
Sleights of Mind: What the Neuroscience of Magic Reveals about Our Everyday Deceptions is a 2010 popular science book, written by neuroscientists Stephen Macknik and Susana Martinez-Conde, with science writer Sandra Blakeslee. Working alongside some of the world’s greatest magicians, Macknik and Martinez-Conde studied how conjuring techniques trick the brain. Sleights of Mind considers the greater implications of magic and misdirection for clinical conditions such as autism, and for everyday life situations, including choice and trust in personal and business relationships. Sleights of Mind is the result of Macknik and Martinez-Conde’s yearlong, world-wide exploration of magic and how its principles apply to human behavior. Sleights of Mind introduces Neuromagic as a new area of scientific endeavor, a discipline aimed to uncover the interaction between brain science and the art of magic. Macknik and Martinez-Conde propose that understanding how the mind perceives magic and illusion will provide a greater understanding of perception and cognition at large. Synopsis Macknik and Martinez-Conde say that magic tricks fool us because humans have hardwired processes of attention and awareness that are hackable. Good magicians use our inherent mental and neural limitations against us by leading us to perceive and feel what we are neurologically inclined to. Working with renowned magicians like Apollo Robbins, Teller, Mac King, and James Randi, Macknik and Martinez-Conde research the ways in which the perceptual and cognitive elements of magic relate to more than simple deceits. The authors reveal the neural underpinnings of the magical methods that explain how our brains perceive magic. Through their exploration, Macknik and Martinez-Conde uncover how our brains work in everyday situations. They describe how if you have ever bought an expensive item you had sworn you would never buy, the salesperson was creating the “illusion of choice,” a core technique of magic. They also relate the use of magic to Bernie Madoff’s “illusion of trust”. Through these examples, Macknik’s and Martinez-Conde’s Sleights of Mind illuminates the reasons for studying magic, and its implications for research on, and renewed understanding of, perceptual and cognitive processes. Awards Evening Standard Best Book of the Year List Prisma Prize Critical reception The book has been reviewed by authors of other science-related books, including Neil deGrasse Tyson, Dan Ariely and J. J. Abrams. It has also been reviewed in the New York Times and The Wall Street Journal. The book has a 4.3 out of 5 star rating on both Amazon and Barnes & Nobles, and a 3.9 star rating on Goodreads. References External links 2010 non-fiction books Picador (imprint) books Popular science books Neuroscience books
Bogolyubovo () is a rural locality (a village) in Kochyovskoye Rural Settlement, Kochyovsky District, Perm Krai, Russia. The population was 1 as of 2010. There is 1 street. Geography Bogolyubovo is located 30 km southeast of Kochyovo (the district's administrative centre) by road. Salnikovo is the nearest rural locality. References Rural localities in Kochyovsky District
Rajpur is a village in the Sonipat district of Haryana state, India. Notes and references Villages in Sonipat district
```python # coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator path_to_url # noqa: E501 The version of the OpenAPI document: release-1.30 Generated by: path_to_url """ import pprint import re # noqa: F401 import six from kubernetes.client.configuration import Configuration class V1ExpressionWarning(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: path_to_url Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'field_ref': 'str', 'warning': 'str' } attribute_map = { 'field_ref': 'fieldRef', 'warning': 'warning' } def __init__(self, field_ref=None, warning=None, local_vars_configuration=None): # noqa: E501 """V1ExpressionWarning - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._field_ref = None self._warning = None self.discriminator = None self.field_ref = field_ref self.warning = warning @property def field_ref(self): """Gets the field_ref of this V1ExpressionWarning. # noqa: E501 The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" # noqa: E501 :return: The field_ref of this V1ExpressionWarning. # noqa: E501 :rtype: str """ return self._field_ref @field_ref.setter def field_ref(self, field_ref): """Sets the field_ref of this V1ExpressionWarning. The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" # noqa: E501 :param field_ref: The field_ref of this V1ExpressionWarning. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and field_ref is None: # noqa: E501 raise ValueError("Invalid value for `field_ref`, must not be `None`") # noqa: E501 self._field_ref = field_ref @property def warning(self): """Gets the warning of this V1ExpressionWarning. # noqa: E501 The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. # noqa: E501 :return: The warning of this V1ExpressionWarning. # noqa: E501 :rtype: str """ return self._warning @warning.setter def warning(self, warning): """Sets the warning of this V1ExpressionWarning. The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. # noqa: E501 :param warning: The warning of this V1ExpressionWarning. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and warning is None: # noqa: E501 raise ValueError("Invalid value for `warning`, must not be `None`") # noqa: E501 self._warning = warning def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, V1ExpressionWarning): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, V1ExpressionWarning): return True return self.to_dict() != other.to_dict() ```
```c #define _GNU_SOURCE #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> int main(int argc, char **argv) { int err = acct("/tmp/t"); if (err == -1) { fprintf(stderr, "acct failed: %s\n", strerror(errno)); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } ```
```c /** * @file lv_calendar_header_arrow.c * */ /********************* * INCLUDES *********************/ #include "../../core/lv_obj_class_private.h" #include "lv_calendar_header_arrow.h" #if LV_USE_CALENDAR && LV_USE_CALENDAR_HEADER_ARROW #include "lv_calendar.h" #include "../button/lv_button.h" #include "../label/lv_label.h" #include "../../layouts/flex/lv_flex.h" #include "../../misc/lv_assert.h" /********************* * DEFINES *********************/ /********************** * TYPEDEFS **********************/ /********************** * STATIC PROTOTYPES **********************/ static void my_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void month_event_cb(lv_event_t * e); static void value_changed_event_cb(lv_event_t * e); /********************** * STATIC VARIABLES **********************/ const lv_obj_class_t lv_calendar_header_arrow_class = { .base_class = &lv_obj_class, .constructor_cb = my_constructor, .width_def = LV_PCT(100), .height_def = LV_DPI_DEF / 3, .name = "calendar-header-arrow", }; static const char * month_names_def[12] = LV_CALENDAR_DEFAULT_MONTH_NAMES; /********************** * MACROS **********************/ /********************** * GLOBAL FUNCTIONS **********************/ lv_obj_t * lv_calendar_header_arrow_create(lv_obj_t * parent) { lv_obj_t * obj = lv_obj_class_create_obj(&lv_calendar_header_arrow_class, parent); lv_obj_class_init_obj(obj); return obj; } /********************** * STATIC FUNCTIONS **********************/ static void my_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) { LV_TRACE_OBJ_CREATE("begin"); LV_UNUSED(class_p); lv_obj_move_to_index(obj, 0); lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW); lv_obj_set_flex_align(obj, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START); lv_obj_t * mo_prev = lv_button_create(obj); lv_obj_set_style_bg_image_src(mo_prev, LV_SYMBOL_LEFT, 0); lv_obj_set_height(mo_prev, lv_pct(100)); lv_obj_update_layout(mo_prev); int32_t btn_size = lv_obj_get_height(mo_prev); lv_obj_set_width(mo_prev, btn_size); lv_obj_add_event_cb(mo_prev, month_event_cb, LV_EVENT_CLICKED, NULL); lv_obj_remove_flag(mo_prev, LV_OBJ_FLAG_CLICK_FOCUSABLE); lv_obj_t * label = lv_label_create(obj); lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR); lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0); lv_obj_set_flex_grow(label, 1); lv_obj_t * mo_next = lv_button_create(obj); lv_obj_set_style_bg_image_src(mo_next, LV_SYMBOL_RIGHT, 0); lv_obj_set_size(mo_next, btn_size, btn_size); lv_obj_add_event_cb(mo_next, month_event_cb, LV_EVENT_CLICKED, NULL); lv_obj_remove_flag(mo_next, LV_OBJ_FLAG_CLICK_FOCUSABLE); lv_obj_add_event_cb(obj, value_changed_event_cb, LV_EVENT_VALUE_CHANGED, NULL); /*Refresh the drop downs*/ lv_obj_send_event(obj, LV_EVENT_VALUE_CHANGED, NULL); } static void month_event_cb(lv_event_t * e) { lv_obj_t * btn = lv_event_get_current_target(e); lv_obj_t * header = lv_obj_get_parent(btn); lv_obj_t * calendar = lv_obj_get_parent(header); const lv_calendar_date_t * d; d = lv_calendar_get_showed_date(calendar); lv_calendar_date_t newd = *d; LV_ASSERT_FORMAT_MSG(newd.year >= 0 && newd.month >= 1 && newd.month <= 12, "Invalid date: %d-%d", newd.year, newd.month); /*The last child is the right button*/ if(lv_obj_get_child(header, 0) == btn) { if(newd.month == 1) { newd.month = 12; newd.year --; } else { newd.month --; } } else { if(newd.month == 12) { newd.month = 1; newd.year ++; } else { newd.month ++; } } lv_calendar_set_showed_date(calendar, newd.year, newd.month); lv_obj_t * label = lv_obj_get_child(header, 1); lv_label_set_text_fmt(label, "%d %s", newd.year, month_names_def[newd.month - 1]); } static void value_changed_event_cb(lv_event_t * e) { lv_obj_t * header = lv_event_get_current_target(e); lv_obj_t * calendar = lv_obj_get_parent(header); const lv_calendar_date_t * date = lv_calendar_get_showed_date(calendar); LV_ASSERT_FORMAT_MSG(date->year >= 0 && date->month >= 1 && date->month <= 12, "Invalid date: %d-%d", date->year, date->month); lv_obj_t * label = lv_obj_get_child(header, 1); lv_label_set_text_fmt(label, "%d %s", date->year, month_names_def[date->month - 1]); } #endif /*LV_USE_CALENDAR_HEADER_ARROW*/ ```
```javascript !function(t,i,r,n){"use strict";function o(e,t){for(var i=0,r=e.length;i<r;i++)v(e[i],t)}function a(e){for(var t,i=0,r=e.length;i<r;i++)t=e[i],b(t,P[c(t)])}function s(e){return function(t){ne(t)&&(v(t,e),o(t.querySelectorAll(F),e))}}function c(e){var t=se.call(e,"is"),i=e.nodeName.toUpperCase(),r=V.call(U,t?k+t.toUpperCase():z+i);return t&&-1<r&&!u(i,t)?-1:r}function u(e,t){return-1<F.indexOf(e+'[is="'+t+'"]')}function l(e){var t=e.currentTarget,i=e.attrChange,r=e.attrName,n=e.target;ve&&(!n||n===t)&&t.attributeChangedCallback&&"style"!==r&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,i===e[S]?null:e.prevValue,i===e[I]?null:e.newValue)}function h(e){var t=s(e);return function(e){y.push(t,e.target)}}function d(e){ge&&(ge=!1,e.currentTarget.removeEventListener(_,d)),o((e.target||i).querySelectorAll(F),e.detail===D?D:L),re&&m()}function p(e,t){var i=this;ce.call(i,e,t),M.call(i,{target:i})}function f(e,t){ee(e,t),w?w.observe(e,he):(me&&(e.setAttribute=p,e[T]=x(e),e.addEventListener(O,M)),e.addEventListener(j,l)),e.createdCallback&&ve&&(e.created=!0,e.createdCallback(),e.created=!1)}function m(){for(var e,t=0,i=oe.length;t<i;t++)e=oe[t],G.contains(e)||(i--,oe.splice(t--,1),v(e,D))}function g(e){throw new Error("A "+e+" type is already registered")}function v(e,t){var i,r=c(e);-1<r&&(E(e,P[r]),r=0,t!==L||e[L]?t===D&&!e[D]&&(e[L]=!1,e[D]=!0,r=1):(e[D]=!1,e[L]=!0,r=1,re&&V.call(oe,e)<0&&oe.push(e)),r&&(i=e[t+"Callback"])&&i.call(e))}if(!(n in i)){var y,M,A,x,w,E,b,T="__"+n+(1e5*Math.random()>>0),L="attached",D="detached",N="extends",S="ADDITION",C="MODIFICATION",I="REMOVAL",j="DOMAttrModified",_="DOMContentLoaded",O="DOMSubtreeModified",z="<",k="=",R=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,B=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],U=[],P=[],F="",G=i.documentElement,V=U.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},Q=r.prototype,Y=Q.hasOwnProperty,H=Q.isPrototypeOf,W=r.defineProperty,X=r.getOwnPropertyDescriptor,q=r.getOwnPropertyNames,Z=r.getPrototypeOf,K=r.setPrototypeOf,J=!!r.__proto__,$=r.create||function ye(e){return e?(ye.prototype=e,new ye):this},ee=K||(J?function(e,t){return e.__proto__=t,e}:q&&X?function(){function e(e,t){for(var i,r=q(t),n=0,o=r.length;n<o;n++)i=r[n],Y.call(e,i)||W(e,i,X(t,i))}return function(t,i){do e(t,i);while((i=Z(i))&&!H.call(i,t));return t}}():function(e,t){for(var i in t)e[i]=t[i];return e}),te=t.MutationObserver||t.WebKitMutationObserver,ie=(t.HTMLElement||t.Element||t.Node).prototype,re=!H.call(ie,G),ne=re?function(e){return 1===e.nodeType}:function(e){return H.call(ie,e)},oe=re&&[],ae=ie.cloneNode,se=ie.getAttribute,ce=ie.setAttribute,ue=ie.removeAttribute,le=i.createElement,he=te&&{attributes:!0,characterData:!0,attributeOldValue:!0},de=te||function(e){me=!1,G.removeEventListener(j,de)},pe=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},fe=!1,me=!0,ge=!0,ve=!0;K||J?(E=function(e,t){H.call(t,e)||f(e,t)},b=f):(E=function(e,t){e[T]||(e[T]=r(!0),f(e,t))},b=E),re?(me=!1,function(){var t=X(ie,"addEventListener"),i=t.value,r=function(e){var t=new CustomEvent(j,{bubbles:!0});t.attrName=e,t.prevValue=se.call(this,e),t.newValue=null,t[I]=t.attrChange=2,ue.call(this,e),this.dispatchEvent(t)},n=function(t,i){var r=this.hasAttribute(t),n=r&&se.call(this,t);e=new CustomEvent(j,{bubbles:!0}),ce.call(this,t,i),e.attrName=t,e.prevValue=r?n:null,e.newValue=i,r?e[C]=e.attrChange=1:e[S]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t,i=e.currentTarget,r=i[T],n=e.propertyName;r.hasOwnProperty(n)&&(r=r[n],t=new CustomEvent(j,{bubbles:!0}),t.attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=i[n]||null,null==t.prevValue?t[S]=t.attrChange=0:t[C]=t.attrChange=1,i.dispatchEvent(t))};t.value=function(e,t,a){e===j&&this.attributeChangedCallback&&this.setAttribute!==n&&(this[T]={className:{name:"class",value:this.className}},this.setAttribute=n,this.removeAttribute=r,i.call(this,"propertychange",o)),i.call(this,e,t,a)},W(ie,"addEventListener",t)}()):te||(G.addEventListener(j,de),G.setAttribute(T,1),G.removeAttribute(T),me&&(M=function(e){var t,i,r,n=this;if(n===e.target){t=n[T],n[T]=i=x(n);for(r in i){if(!(r in t))return A(0,n,r,t[r],i[r],S);if(i[r]!==t[r])return A(1,n,r,t[r],i[r],C)}for(r in t)if(!(r in i))return A(2,n,r,t[r],i[r],I)}},A=function(e,t,i,r,n,o){var a={attrChange:e,currentTarget:t,attrName:i,prevValue:r,newValue:n};a[o]=e,l(a)},x=function(e){for(var t,i,r={},n=e.attributes,o=0,a=n.length;o<a;o++)t=n[o],i=t.name,"setAttribute"!==i&&(r[i]=t.value);return r})),i[n]=function(e,t){if(r=e.toUpperCase(),fe||(fe=!0,te?(w=function(e,t){function i(e,t){for(var i=0,r=e.length;i<r;t(e[i++]));}return new te(function(r){for(var n,o,a,s=0,c=r.length;s<c;s++)n=r[s],"childList"===n.type?(i(n.addedNodes,e),i(n.removedNodes,t)):(o=n.target,ve&&o.attributeChangedCallback&&"style"!==n.attributeName&&(a=se.call(o,n.attributeName),a!==n.oldValue&&o.attributeChangedCallback(n.attributeName,n.oldValue,a)))})}(s(L),s(D)),w.observe(i,{childList:!0,subtree:!0})):(y=[],pe(function v(){for(;y.length;)y.shift().call(null,y.shift());pe(v)}),i.addEventListener("DOMNodeInserted",h(L)),i.addEventListener("DOMNodeRemoved",h(D))),i.addEventListener(_,d),i.addEventListener("readystatechange",d),i.createElement=function(e,t){var r=le.apply(i,arguments),n=""+e,o=V.call(U,(t?k:z)+(t||n).toUpperCase()),a=-1<o;return t&&(r.setAttribute("is",t=t.toLowerCase()),a&&(a=u(n.toUpperCase(),t))),ve=!i.createElement.innerHTMLHelper,a&&b(r,P[o]),r},ie.cloneNode=function(e){var t=ae.call(this,!!e),i=c(t);return-1<i&&b(t,P[i]),e&&a(t.querySelectorAll(F)),t}),-2<V.call(U,k+r)+V.call(U,z+r)&&g(e),!R.test(r)||-1<V.call(B,r))throw new Error("The type "+e+" is invalid");var r,n,l=function(){return f?i.createElement(m,r):i.createElement(m)},p=t||Q,f=Y.call(p,N),m=f?t[N].toUpperCase():r;return f&&-1<V.call(U,z+m)&&g(m),n=U.push((f?k:z)+r)-1,F=F.concat(F.length?",":"",f?m+'[is="'+e.toLowerCase()+'"]':m),l.prototype=P[n]=Y.call(p,"prototype")?p.prototype:$(ie),o(i.querySelectorAll(F),L),l}}}(window,document,Object,"registerElement")},{}],9:[function(e,t,i){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(e,t){for(var i,a,s=r(e),c=1;c<arguments.length;c++){i=Object(arguments[c]);for(var u in i)n.call(i,u)&&(s[u]=i[u]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(i);for(var l=0;l<a.length;l++)o.call(i,a[l])&&(s[a[l]]=i[a[l]])}}return s}},{}],10:[function(e,t,r){(function(e){var i=e.performance||{},r=function(){for(var e=["now","webkitNow","msNow","mozNow","oNow"];e.length;){var t=e.shift();if(t in i)return i[t].bind(i)}var r=Date.now||function(){return(new Date).getTime()},n=(i.timing||{}).navigationStart||r();return function(){return r()-n}}();r.performanceNow=i.now,r.noConflict=function(){i.now=r.performanceNow},r.conflict=function(){i.now=r},r.conflict(),t.exports=r}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,i){!function(e){function i(e,t){return function(){e.apply(t,arguments)}}function n(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,i(a,this),i(s,this))}function o(e){var t=this;return null===this._state?void this._deferreds.push(e):void d(function(){var i=t._state?e.onFulfilled:e.onRejected;if(null===i)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=i(t._value)}catch(n){return void e.reject(n)}e.resolve(r)})}function a(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(i(t,e),i(a,this),i(s,this))}this._state=!0,this._value=e,c.call(this)}catch(r){s.call(this,r)}}function s(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds.length;e<t;e++)o.call(this,this._deferreds[e]);this._deferreds=null}function u(e,t,i,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=i,this.reject=r}function l(e,t,i){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,i(e))})}catch(n){if(r)return;r=!0,i(n)}}var h=setTimeout,d="function"==typeof r&&r||function(e){h(e,1)},p=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};n.prototype["catch"]=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var i=this;return new n(function(r,n){o.call(i,new u(e,t,r,n))})},n.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&p(arguments[0])?arguments[0]:arguments);return new n(function(t,i){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},i)}e[o]=a,0===--n&&t(e)}catch(c){i(c)}}if(0===e.length)return t([]);for(var n=e.length,o=0;o<e.length;o++)r(o,e[o])})},n.resolve=function(e){return e&&"object"==typeof e&&e.constructor===n?e:new n(function(t){t(e)})},n.reject=function(e){return new n(function(t,i){i(e)})},n.race=function(e){return new n(function(t,i){for(var r=0,n=e.length;r<n;r++)e[r].then(t,i)})},n._setImmediateFn=function(e){d=e},"undefined"!=typeof t&&t.exports?t.exports=n:e.Promise||(e.Promise=n)}(this)},{}],12:[function(e,t,i){function r(e){var t=function(e){return e.trim()},i={};return n(e).map(t).filter(Boolean).forEach(function(e){var t=e.indexOf(":"),r=e.substr(0,t).trim(),n=e.substr(t+1).trim();i[r]=n}),i}function n(e){for(var t,i=[],r=0,n=";",o=/url\([^\)]+$/,a="";r<e.length;)t=e.indexOf(n,r),t===-1&&(t=e.length),a+=e.substring(r,t),o.test(a)?(a+=";",r=t+1):(i.push(a),a="",r=t+1);return i}function o(e){return Object.keys(e).map(function(t){return t+":"+e[t]}).join(";")}function a(e){return o(r(e))}t.exports.parse=r,t.exports.stringify=o,t.exports.normalize=a},{}],13:[function(e,t,i){THREE.BlendCharacter=function(){this.weightSchedule=[],this.warpSchedule=[],this.load=function(e,t){var i=this,r=new THREE.ObjectLoader;r.load(e,function(r){if(r.traverse(function(e){e instanceof THREE.SkinnedMesh&&(i.skinnedMesh=e)}),THREE.SkinnedMesh.call(i,i.skinnedMesh.geometry,i.skinnedMesh.material),void 0==i.skinnedMesh)return void console.log("unable to find skinned mesh in "+e);i.material.skinning=!0,i.mixer=new THREE.AnimationMixer(i),i.mixer=i.mixer;for(var n=0;n<i.geometry.animations.length;++n)i.mixer.clipAction(i.geometry.animations[n]);void 0!==t&&t()})},this.update=function(e){this.mixer.update(e)},this.play=function(e,t){return this.mixer.clipAction(e).setEffectiveWeight(t).play()},this.crossfade=function(e,t,i){this.mixer.stopAllAction();var r=this.play(e,1),n=this.play(t,1);r.crossFadeTo(n,i,!1)},this.warp=function(e,t,i){this.mixer.stopAllAction();var r=this.play(e,1),n=this.play(t,1);r.crossFadeTo(n,i,!0)},this.applyWeight=function(e,t){this.mixer.clipAction(e).setEffectiveWeight(t)},this.getWeight=function(e){return this.mixer.clipAction(e).getEffectiveWeight()},this.pauseAll=function(){this.mixer.timeScale=0},this.unPauseAll=function(){this.mixer.timeScale=1},this.stopAll=function(){this.mixer.stopAllAction()},this.showModel=function(e){this.visible=e}},THREE.BlendCharacter.prototype=Object.create(THREE.SkinnedMesh.prototype),THREE.BlendCharacter.prototype.constructor=THREE.BlendCharacter,THREE.BlendCharacter.prototype.getForward=function(){var e=new THREE.Vector3;return function(){return e.set(-this.matrix.elements[8],-this.matrix.elements[9],-this.matrix.elements[10]),e}}},{}],14:[function(e,t,i){THREE.ColladaLoader=function(){function e(e,i,r,n){var o=0;if(document.implementation&&document.implementation.createDocument){var a=new XMLHttpRequest;a.onreadystatechange=function(){4===a.readyState?0===a.status||200===a.status?a.response?(Be=i,t(a.response,void 0,e)):n?n({type:"error",url:e}):console.error("ColladaLoader: Empty or non-existing file ("+e+")"):n?n({type:"error",url:e}):console.error("ColladaLoader: Couldn't load \""+e+'" ('+a.status+")"):3===a.readyState&&r&&(0===o&&(o=a.getResponseHeader("Content-Length")),r({total:o,loaded:a.responseText.length}))},a.open("GET",e,!0),a.send(null)}else alert("Don't know how to parse XML!")}function t(e,t,i){if(ke=(new DOMParser).parseFromString(e,"text/xml"),t=t||Be,void 0!==i){var c=i.split("/");c.pop(),_e=(c.length<1?".":c.join("/"))+"/"}r(),Ae(),Pe=n("library_images image",L,"image"),Qe=n("library_materials material",H,"material"),Ye=n("library_effects effect",K,"effect"),Ve=n("library_geometries geometry",k,"geometry"),He=n("library_cameras camera",re,"camera"),We=n("library_lights light",oe,"light"),Ge=n("library_controllers controller",D,"controller"),Fe=n("library_animations animation",$,"animation"),Ie=n("library_visual_scenes visual_scene",C,"visual_scene"),je=n("library_kinematics_models kinematics_model",se,"kinematics_model"),Oe=[],ze=[],De=o(),Re=new THREE.Group;for(var u=0;u<De.nodes.length;u++)Re.add(v(De.nodes[u]));Re.scale.multiplyScalar(Ze),s(),Ne=a(),g();var l={scene:Re,morphs:Oe,skins:ze,animations:Se,kinematics:Ce,dae:{images:Pe,materials:Qe,cameras:He,lights:We,effects:Ye,geometries:Ve,controllers:Ge,animations:Fe,visualScenes:Ie,visualScene:De,scene:De,kinematicsModels:je,kinematicsModel:Ne}};return t&&t(l),l}function i(e){Xe=e}function r(){var e=ke.querySelectorAll("asset"),t=e[0];if(t&&t.childNodes)for(var i=0;i<t.childNodes.length;i++){var r=t.childNodes[i];switch(r.nodeName){case"unit":var n=r.getAttribute("meter");n&&(Ze=parseFloat(n));break;case"up_axis":Ke=r.textContent.charAt(0)}}}function n(e,t,i){for(var r=ke.querySelectorAll(e),n={},o=0,a=r.length,s=0;s<a;s++){var c=r[s],u=(new t).parse(c);u.id&&0!==u.id.length||(u.id=i+o++),n[u.id]=u}return n}function o(){var e=ke.querySelectorAll("scene instance_visual_scene")[0];if(e){var t=e.getAttribute("url").replace(/^#/,"");return Ie[t.length>0?t:"visual_scene0"]}return null}function a(){var e=ke.querySelectorAll("instance_kinematics_model")[0];if(e){var t=e.getAttribute("url").replace(/^#/,"");return je[t.length>0?t:"kinematics_model0"]}return null}function s(){Se=[],c(Re)}function c(e){var t=De.getChildById(e.colladaId,!0),i=null;if(t&&t.keys){i={fps:60,hierarchy:[{node:t,keys:t.keys,sids:t.sids}],node:e,name:"animation_"+e.name,length:0},Se.push(i);for(var r=0,n=t.keys.length;r<n;r++)i.length=Math.max(i.length,t.keys[r].time)}else i={hierarchy:[{keys:[],sids:[]}]};for(var r=0,n=e.children.length;r<n;r++)for(var o=c(e.children[r]),a=0,s=o.hierarchy.length;a<s;a++)i.hierarchy.push({keys:[],sids:[]});return i}function u(){var e,t=1e6,i=-t,r=0;for(var n in Fe){var o=Fe[n];e=e||o.id;for(var a=0;a<o.sampler.length;a++){var s=o.sampler[a];s.create(),t=Math.min(t,s.startTime),i=Math.max(i,s.endTime),r=Math.max(r,s.input.length)}}return{start:t,end:i,frames:r,ID:e}}function l(e,t){var i=t instanceof _?Ge[t.url]:t;if(!i||!i.morph)return void console.log("could not find morph controller!");for(var r=i.morph,n=0;n<r.targets.length;n++){var o=r.targets[n],a=Ve[o];if(a.mesh&&a.mesh.primitives&&a.mesh.primitives.length){var s=a.mesh.primitives[0].geometry;s.vertices.length===e.vertices.length&&e.morphTargets.push({name:"target_1",vertices:s.vertices})}}e.morphTargets.push({name:"target_Z",vertices:e.vertices})}function h(e,t,i,r){if(e.world=e.world||new THREE.Matrix4,e.localworld=e.localworld||new THREE.Matrix4,e.world.copy(e.matrix),e.localworld.copy(e.matrix),e.channels&&e.channels.length){var n=e.channels[0],o=n.sampler.output[i];o instanceof THREE.Matrix4&&(e.world.copy(o),e.localworld.copy(o),0===i&&e.matrix.copy(o))}r&&e.world.multiplyMatrices(r,e.world),t.push(e);for(var a=0;a<e.nodes.length;a++)h(e.nodes[a],t,i,e.world)}function d(e,t){for(var i=0;i<e.length;i++){var r=e[i],n=-1;if("JOINT"==r.type){for(var o=0;o<t.joints.length;o++)if(r.sid===t.joints[o]){n=o;break}if(n>=0){var a=t.invBindMatrices[n];r.invBindMatrix=a,r.skinningMatrix=new THREE.Matrix4,r.skinningMatrix.multiplyMatrices(r.world,a),r.animatrix=new THREE.Matrix4,r.animatrix.copy(r.localworld),r.weights=[];for(var o=0;o<t.weights.length;o++)for(var s=0;s<t.weights[o].length;s++){var c=t.weights[o][s];c.joint===n&&r.weights.push(c)}}else console.warn("ColladaLoader: Could not find joint '"+r.sid+"'."),r.skinningMatrix=new THREE.Matrix4,r.weights=[]}}}function p(e){var t=[],i=function(e,t,r){var n={};n.name=t.sid,n.parent=e,n.matrix=t.matrix;var o=[new THREE.Vector3,new THREE.Quaternion,new THREE.Vector3];n.matrix.decompose(o[0],o[1],o[2]),n.pos=[o[0].x,o[0].y,o[0].z],n.scl=[o[2].x,o[2].y,o[2].z],n.rotq=[o[1].x,o[1].y,o[1].z,o[1].w],r.push(n);for(var a in t.nodes)i(t.sid,t.nodes[a],r)};return i(-1,e,t),t}function f(e,t,i){var r=[];h(t,r,-1),d(r,i.skin);for(var n=new THREE.Vector3,o=[],a=0;a<e.vertices.length;a++)o.push(new THREE.Vector3);for(a=0;a<r.length;a++)if("JOINT"==r[a].type)for(var s=0;s<r[a].weights.length;s++){var c=r[a].weights[s],u=c.index,l=c.weight,p=e.vertices[u],f=o[u];n.x=p.x,n.y=p.y,n.z=p.z,n.applyMatrix4(r[a].skinningMatrix),f.x+=n.x*l,f.y+=n.y*l,f.z+=n.z*l}for(var a=0;a<e.vertices.length;a++)e.vertices[a]=o[a]}function m(e,t,i){var r=Ge[t.url];if(i=void 0!==i?i:40,!r||!r.skin)return void console.log("ColladaLoader: Could not find skin controller.");if(!t.skeleton||!t.skeleton.length)return void console.log("ColladaLoader: Could not find the skeleton for the skin. ");for(var n=u(),o=De.getChildById(t.skeleton[0],!0)||De.getChildBySid(t.skeleton[0],!0),a=p(o),s=r.skin.joints,c=[],l=0;l<s.length;l++)for(var m=0;m<a.length;m++)a[m].name===s[l]&&(c[l]=a[m]);for(var l=0;l<c.length;l++)for(var m=0;m<c.length;m++)c[l].parent===c[m].name&&(c[l].parent=m);var l,m,g;new THREE.Vector3;for(l=0;l<e.vertices.length;l++)e.vertices[l].applyMatrix4(r.skin.bindShapeMatrix);for(var v=[],y=[],M=r.skin.weights,l=0;l<M.length;l++){var A=new THREE.Vector4(M[l][0]?M[l][0].joint:0,M[l][1]?M[l][1].joint:0,M[l][2]?M[l][2].joint:0,M[l][3]?M[l][3].joint:0),g=new THREE.Vector4(M[l][0]?M[l][0].weight:0,M[l][1]?M[l][1].weight:0,M[l][2]?M[l][2].weight:0,M[l][3]?M[l][3].weight:0);v.push(A),y.push(g)}e.skinIndices=v,e.skinWeights=y,e.bones=c;for(var x={name:n.ID,fps:30,length:n.frames/30,hierarchy:[]},m=0;m<c.length;m++)x.hierarchy.push({parent:c[m].parent,name:c[m].name,keys:[]});for(console.log("ColladaLoader:",n.ID+" has "+c.length+" bones."),f(e,o,r),i=0;i<n.frames;i++){var w=[];h(o,w,i),d(w,r.skin);for(var l=0;l<w.length;l++)for(var m=0;m<x.hierarchy.length;m++)if(x.hierarchy[m].name===w[l].sid){var E={};E.time=i/30,E.matrix=w[l].animatrix,0===i&&(w[l].matrix=E.matrix);var b=[new THREE.Vector3,new THREE.Quaternion,new THREE.Vector3];E.matrix.decompose(b[0],b[1],b[2]),E.pos=[b[0].x,b[0].y,b[0].z],E.scl=[b[2].x,b[2].y,b[2].z],E.rot=b[1],x.hierarchy[m].keys.push(E)}e.animation=x}}function g(){if(Ne&&0===Ne.joints.length)return void(Ce=void 0);var e={},t=function(t,i){var r=i.getAttribute("id"),n=De.getChildById(r,!0),o=Ne.joints[t];Re.traverse(function(i){i.colladaId==r&&(e[t]={node:i,transforms:n.transforms,joint:o,position:o.zeroPosition})})};Ce={joints:Ne&&Ne.joints,getJointValue:function(t){var i=e[t];return i?i.position:void console.log("getJointValue: joint "+t+" doesn't exist")},setJointValue:function(t,i){var n=e[t];if(n){var o=n.joint;if(i>o.limits.max||i<o.limits.min)console.log("setJointValue: joint "+t+" value "+i+" outside of limits (min: "+o.limits.min+", max: "+o.limits.max+")");else if(o["static"])console.log("setJointValue: joint "+t+" is static");else{var a=n.node,s=o.axis,c=n.transforms,u=new THREE.Matrix4;for(r=0;r<c.length;r++){var l=c[r];if(l.sid&&l.sid.indexOf("joint"+t)!==-1)switch(o.type){case"revolute":u.multiply(h.makeRotationAxis(s,THREE.Math.degToRad(i)));break;case"prismatic":u.multiply(h.makeTranslation(s.x*i,s.y*i,s.z*i));break;default:console.warn("setJointValue: unknown joint type: "+o.type)}else{var h=new THREE.Matrix4;switch(l.type){case"matrix":u.multiply(l.obj);break;case"translate":u.multiply(h.makeTranslation(l.obj.x,l.obj.y,l.obj.z));break;case"rotate":u.multiply(h.makeRotationAxis(l.obj,l.angle))}}}var d=u.elements,p=Array.prototype.slice.call(d),f=[p[0],p[4],p[8],p[12],p[1],p[5],p[9],p[13],p[2],p[6],p[10],p[14],p[3],p[7],p[11],p[15]];a.matrix.set.apply(a.matrix,f),a.matrix.decompose(a.position,a.quaternion,a.scale)}}else console.log("setJointValue: joint "+t+" doesn't exist")}};var i=ke.querySelector("scene instance_kinematics_scene");if(i)for(var r=0;r<i.childNodes.length;r++){var n=i.childNodes[r];if(1==n.nodeType)switch(n.nodeName){case"bind_joint_axis":var o=n.getAttribute("target").split("/").pop(),a=n.querySelector("axis param").textContent,s=parseInt(a.split("joint").pop().split(".")[0]),c=ke.querySelector('[sid="'+o+'"]');if(c){var u=c.parentElement;t(s,u)}}}}function v(e,t){var i,r,n,o,a=new THREE.Object3D,s=!1;for(n=0;n<e.controllers.length;n++){var c=Ge[e.controllers[n].url];switch(c.type){case"skin":if(Ve[c.skin.source]){var u=new z;u.url=c.skin.source,u.instance_material=e.controllers[n].instance_material,e.geometries.push(u),s=!0,i=e.controllers[n]}else if(Ge[c.skin.source]){var h=Ge[c.skin.source];if(r=h,h.morph&&Ve[h.morph.source]){var u=new z;u.url=h.morph.source,u.instance_material=e.controllers[n].instance_material,e.geometries.push(u)}}break;case"morph":if(Ve[c.morph.source]){var u=new z;u.url=c.morph.source,u.instance_material=e.controllers[n].instance_material,e.geometries.push(u),r=e.controllers[n]}console.log("ColladaLoader: Morph-controller partially supported.")}}var d={};for(n=0;n<e.geometries.length;n++){var p,f=e.geometries[n],g=f.instance_material,y=Ve[f.url],M={},A=[],x=0;if(y){if(!y.mesh||!y.mesh.primitives)continue;if(0===a.name.length&&(a.name=y.id),g)for(o=0;o<g.length;o++){var w=g[o],E=Qe[w.target],b=E.instance_effect.url,T=Ye[b].shader,L=T.material;if(y.doubleSided){if(!(w.symbol in d)){var D=L.clone();D.side=THREE.DoubleSide,d[w.symbol]=D}L=d[w.symbol]}L.opacity=L.opacity?L.opacity:1,M[w.symbol]=x,A.push(L),p=L,p.name=null===E.name||""===E.name?E.id:E.name,x++}var N,S=p||new THREE.MeshLambertMaterial({color:14540253,side:y.doubleSided?THREE.DoubleSide:THREE.FrontSide}),C=y.mesh.geometry3js;if(x>1)for(S=new THREE.MultiMaterial(A),o=0;o<C.faces.length;o++){var I=C.faces[o];I.materialIndex=M[I.daeMaterial]}void 0!==i?(m(C,i),C.morphTargets.length>0?(S.morphTargets=!0,S.skinning=!1):(S.morphTargets=!1,S.skinning=!0),N=new THREE.SkinnedMesh(C,S,(!1)),N.name="skin_"+ze.length,ze.push(N)):void 0!==r?(l(C,r),S.morphTargets=!0,N=new THREE.Mesh(C,S),N.name="morph_"+Oe.length,Oe.push(N)):N=C.isLineStrip===!0?new THREE.Line(C):new THREE.Mesh(C,S),a.add(N)}}for(n=0;n<e.cameras.length;n++){var j=e.cameras[n],_=He[j.url],O=new THREE.PerspectiveCamera(_.yfov,parseFloat(_.aspect_ratio),parseFloat(_.znear),parseFloat(_.zfar));a.add(O)}for(n=0;n<e.lights.length;n++){var k=null,R=e.lights[n],B=We[R.url];if(B&&B.technique){var U=B.color.getHex(),P=B.intensity,F=B.distance,G=B.falloff_angle;switch(B.technique){case"directional":k=new THREE.DirectionalLight(U,P,F),k.position.set(0,0,1);break;case"point":k=new THREE.PointLight(U,P,F);break;case"spot":k=new THREE.SpotLight(U,P,F,G),k.position.set(0,0,1);break;case"ambient":k=new THREE.AmbientLight(U)}}k&&a.add(k)}if(a.name=e.name||e.id||"",a.colladaId=e.id||"",a.layer=e.layer||"",a.matrix=e.matrix,a.matrix.decompose(a.position,a.quaternion,a.scale),qe.centerGeometry&&a.geometry){var V=a.geometry.center();V.multiply(a.scale),V.applyQuaternion(a.quaternion),a.position.sub(V)}for(n=0;n<e.nodes.length;n++)a.add(v(e.nodes[n],e));return a}function y(e){for(var t=ke.querySelectorAll("library_nodes node"),i=0;i<t.length;i++){var r=t[i].attributes.getNamedItem("id");if(r&&r.value===e)return t[i]}}function M(e){var t=[],i=1e6,r=-1e6;for(var n in Fe)for(var o=Fe[n],a=0;a<o.channel.length;a++){var s=o.channel[a],c=o.sampler[a],n=s.target.split("/")[0];n==e.id&&(c.create(),s.sampler=c,i=Math.min(i,c.startTime),r=Math.max(r,c.endTime),t.push(s))}return t.length&&(e.startTime=i,e.endTime=r),t}function A(e){if(e.channels&&e.channels.length){for(var t=[],i=[],r=0,n=e.channels.length;r<n;r++){var o,a=e.channels[r],s=a.fullSid,c=a.sampler,u=c.input,l=e.getTransformBySid(a.sid);if(a.arrIndices){o=[];for(var h=0,d=a.arrIndices.length;h<d;h++)o[h]=Te(a.arrIndices[h])}else o=Le(a.member);if(l){i.indexOf(s)===-1&&i.push(s);for(var h=0,d=u.length;h<d;h++){var p=u[h],f=c.getData(l.type,h,o),m=x(t,p);if(!m){m=new ie(p);var g=w(t,p);t.splice(g===-1?t.length:g,0,m)}m.addTarget(s,l,o,f)}}else console.log('Could not find transform "'+a.sid+'" in node '+e.id)}for(var r=0;r<i.length;r++)for(var v=i[r],h=0;h<t.length;h++){var m=t[h];m.hasTarget(v)||E(t,m,h,v)}e.keys=t,e.sids=i}}function x(e,t){for(var i=null,r=0,n=e.length;r<n&&null===i;r++){var o=e[r];if(o.time===t)i=o;else if(o.time>t)break}return i}function w(e,t){for(var i=-1,r=0,n=e.length;r<n&&i===-1;r++){var o=e[r];o.time>=t&&(i=r)}return i}function E(e,t,i,r){var n=T(e,r,i?i-1:0),o=b(e,r,i+1);if(n&&o){var a,s=(t.time-n.time)/(o.time-n.time),c=n.getTarget(r),u=o.getTarget(r).data,l=c.data;if("matrix"===c.type)a=l;else if(l.length){a=[];for(var h=0;h<l.length;++h)a[h]=l[h]+(u[h]-l[h])*s}else a=l+(u-l)*s;t.addTarget(r,c.transform,c.member,a)}}function b(e,t,i){for(;i<e.length;i++){var r=e[i];if(r.hasTarget(t))return r}return null}function T(e,t,i){for(i=i>=0?i:i+e.length;i>=0;i--){var r=e[i];if(r.hasTarget(t))return r}return null}function L(){this.id="",this.init_from=""}function D(){this.id="",this.name="",this.type="",this.skin=null,this.morph=null}function N(){this.method=null,this.source=null,this.targets=null,this.weights=null}function S(){this.source="",this.bindShapeMatrix=null,this.invBindMatrices=[],this.joints=[],this.weights=[]}function C(){this.id="",this.name="",this.nodes=[],this.scene=new THREE.Group}function I(){this.id="",this.name="",this.sid="",this.nodes=[],this.controllers=[],this.transforms=[],this.geometries=[],this.channels=[],this.matrix=new THREE.Matrix4}function j(){this.sid="",this.type="",this.data=[],this.obj=null}function _(){this.url="",this.skeleton=[],this.instance_material=[]}function O(){this.symbol="",this.target=""}function z(){this.url="",this.instance_material=[]}function k(){this.id="",this.mesh=null}function R(e){this.geometry=e.id,this.primitives=[],this.vertices=null,this.geometry3js=null}function B(){this.material="",this.count=0,this.inputs=[],this.vcount=null,this.p=[],this.geometry=new THREE.Geometry}function U(){B.call(this),this.vcount=[]}function P(){B.call(this),this.vcount=1}function F(){B.call(this),this.vcount=3}function G(){this.source="",this.count=0,this.stride=0,this.params=[]}function V(){this.input={}}function Q(){this.semantic="",this.offset=0,this.source="",this.set=0}function Y(e){this.id=e,this.type=null}function H(){this.id="",this.name="",this.instance_effect=null}function W(){this.color=new THREE.Color,this.color.setRGB(Math.random(),Math.random(),Math.random()),this.color.a=1,this.texture=null,this.texcoord=null,this.texOpts=null}function X(e,t){this.type=e,this.effect=t,this.material=null}function q(e){this.effect=e,this.init_from=null,this.format=null}function Z(e){this.effect=e,this.source=null,this.wrap_s=null,this.wrap_t=null,this.minfilter=null,this.magfilter=null,this.mipfilter=null}function K(){this.id="",this.name="",this.shader=null,this.surface={},this.sampler={}}function J(){this.url=""}function $(){this.id="",this.name="",this.source={},this.sampler=[],this.channel=[]}function ee(e){this.animation=e,this.source="",this.target="",this.fullSid=null,this.sid=null,this.dotSyntax=null,this.arrSyntax=null,this.arrIndices=null,this.member=null}function te(e){this.id="",this.animation=e,this.inputs=[],this.input=null,this.output=null,this.strideOut=null,this.interpolation=null,this.startTime=null,this.endTime=null,this.duration=0}function ie(e){this.targets=[],this.time=e}function re(){this.id="",this.name="",this.technique=""}function ne(){this.url=""}function oe(){this.id="",this.name="",this.technique=""}function ae(){this.url=""}function se(){this.id="",this.name="",this.joints=[],this.links=[]}function ce(){this.sid="",this.name="",this.axis=new THREE.Vector3,this.limits={min:0,max:0},this.type="",this["static"]=!1,this.zeroPosition=0,this.middlePosition=0}function ue(){this.sid="",this.name="",this.transforms=[],this.attachments=[]}function le(){this.joint="",this.transforms=[],this.links=[]}function he(e){var t=e.getAttribute("id");return void 0!=Ue[t]?Ue[t]:(Ue[t]=new Y(t).parse(e),Ue[t])}function de(e){for(var t=me(e),i=[],r=0,n=t.length;r<n;r++)i.push("true"===t[r]||"1"===t[r]);return i}function pe(e){for(var t=me(e),i=[],r=0,n=t.length;r<n;r++)i.push(parseFloat(t[r]));return i}function fe(e){for(var t=me(e),i=[],r=0,n=t.length;r<n;r++)i.push(parseInt(t[r],10));return i}function me(e){return e.length>0?ge(e).split(/\s+/):[]}function ge(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function ve(e,t,i){return e.hasAttribute(t)?parseInt(e.getAttribute(t),10):i}function ye(e,t){var i=new THREE.ImageLoader;i.load(t,function(t){e.image=t,e.needsUpdate=!0})}function Me(e,t){e.doubleSided=!1;var i=t.querySelectorAll("extra double_sided")[0];i&&i&&1===parseInt(i.textContent,10)&&(e.doubleSided=!0)}function Ae(){if(qe.convertUpAxis!==!0||Ke===qe.upAxis)Je=null;else switch(Ke){case"X":Je="Y"===qe.upAxis?"XtoY":"XtoZ";break;case"Y":Je="X"===qe.upAxis?"YtoX":"YtoZ";break;case"Z":Je="X"===qe.upAxis?"ZtoX":"ZtoY"}}function xe(e,t){if(qe.convertUpAxis===!0&&Ke!==qe.upAxis)switch(Je){case"XtoY":var i=e[0];e[0]=t*e[1],e[1]=i;break;case"XtoZ":var i=e[2];e[2]=e[1],e[1]=e[0],e[0]=i;break;case"YtoX":var i=e[0];e[0]=e[1],e[1]=t*i;break;case"YtoZ":var i=e[1];e[1]=t*e[2],e[2]=i;break;case"ZtoX":var i=e[0];e[0]=e[1],e[1]=e[2],e[2]=i;break;case"ZtoY":var i=e[1];e[1]=e[2],e[2]=t*i}}function we(e,t){if(qe.convertUpAxis!==!0||Ke===qe.upAxis)return t;switch(e){case"X":t="XtoY"===Je?t*-1:t;break;case"Y":t="YtoZ"===Je||"YtoX"===Je?t*-1:t;break;case"Z":t="ZtoY"===Je?t*-1:t}return t}function Ee(e,t){var i=[e[t],e[t+1],e[t+2]];return xe(i,-1),new THREE.Vector3(i[0],i[1],i[2])}function be(e){if(qe.convertUpAxis){var t=[e[0],e[4],e[8]];xe(t,-1),e[0]=t[0],e[4]=t[1],e[8]=t[2],t=[e[1],e[5],e[9]],xe(t,-1),e[1]=t[0],e[5]=t[1],e[9]=t[2],t=[e[2],e[6],e[10]],xe(t,-1),e[2]=t[0],e[6]=t[1],e[10]=t[2],t=[e[0],e[1],e[2]],xe(t,-1),e[0]=t[0],e[1]=t[1],e[2]=t[2],t=[e[4],e[5],e[6]],xe(t,-1),e[4]=t[0],e[5]=t[1],e[6]=t[2],t=[e[8],e[9],e[10]],xe(t,-1),e[8]=t[0],e[9]=t[1],e[10]=t[2],t=[e[3],e[7],e[11]],xe(t,-1),e[3]=t[0],e[7]=t[1],e[11]=t[2]}return(new THREE.Matrix4).set(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Te(e){if(e>-1&&e<3){var t=["X","Y","Z"],i={X:0,Y:1,Z:2};e=Le(t[e]),e=i[e]}return e}function Le(e){if(qe.convertUpAxis)switch(e){case"X":switch(Je){case"XtoY":case"XtoZ":case"YtoX":e="Y";break;case"ZtoX":e="Z"}break;case"Y":switch(Je){case"XtoY":case"YtoX":case"ZtoX":e="X";break;case"XtoZ":case"YtoZ":case"ZtoY":e="Z"}break;case"Z":switch(Je){case"XtoZ":e="X";break;case"YtoZ":case"ZtoX":case"ZtoY":e="Y"}}return e}var De,Ne,Se,Ce,Ie,je,_e,Oe,ze,ke=null,Re=null,Be=null,Ue={},Pe={},Fe={},Ge={},Ve={},Qe={},Ye={},He={},We={},Xe=THREE.SmoothShading,qe={centerGeometry:!1,convertUpAxis:!1,subdivideFaces:!0,upAxis:"Y",defaultEnvMap:null},Ze=1,Ke="Y",Je=null;return L.prototype.parse=function(e){this.id=e.getAttribute("id");for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];"init_from"===i.nodeName&&(this.init_from=i.textContent)}return this},D.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name"),this.type="none";for(var t=0;t<e.childNodes.length;t++){ var i=e.childNodes[t];switch(i.nodeName){case"skin":this.skin=(new S).parse(i),this.type=i.nodeName;break;case"morph":this.morph=(new N).parse(i),this.type=i.nodeName}}return this},N.prototype.parse=function(e){var t,i={},r=[];for(this.method=e.getAttribute("method"),this.source=e.getAttribute("source").replace(/^#/,""),t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if(1==n.nodeType)switch(n.nodeName){case"source":var o=(new Y).parse(n);i[o.id]=o;break;case"targets":r=this.parseInputs(n);break;default:console.log(n.nodeName)}}for(t=0;t<r.length;t++){var a=r[t],o=i[a.source];switch(a.semantic){case"MORPH_TARGET":this.targets=o.read();break;case"MORPH_WEIGHT":this.weights=o.read()}}return this},N.prototype.parseInputs=function(e){for(var t=[],i=0;i<e.childNodes.length;i++){var r=e.childNodes[i];if(1==r.nodeType)switch(r.nodeName){case"input":t.push((new Q).parse(r))}}return t},S.prototype.parse=function(e){var t,i,r={};this.source=e.getAttribute("source").replace(/^#/,""),this.invBindMatrices=[],this.joints=[],this.weights=[];for(var n=0;n<e.childNodes.length;n++){var o=e.childNodes[n];if(1==o.nodeType)switch(o.nodeName){case"bind_shape_matrix":var a=pe(o.textContent);this.bindShapeMatrix=be(a);break;case"source":var s=(new Y).parse(o);r[s.id]=s;break;case"joints":t=o;break;case"vertex_weights":i=o;break;default:console.log(o.nodeName)}}return this.parseJoints(t,r),this.parseWeights(i,r),this},S.prototype.parseJoints=function(e,t){for(var i=0;i<e.childNodes.length;i++){var r=e.childNodes[i];if(1==r.nodeType)switch(r.nodeName){case"input":var n=(new Q).parse(r),o=t[n.source];"JOINT"===n.semantic?this.joints=o.read():"INV_BIND_MATRIX"===n.semantic&&(this.invBindMatrices=o.read())}}},S.prototype.parseWeights=function(e,t){for(var i,r,n=[],o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(1==a.nodeType)switch(a.nodeName){case"input":n.push((new Q).parse(a));break;case"v":i=fe(a.textContent);break;case"vcount":r=fe(a.textContent)}}for(var s=0,o=0;o<r.length;o++){for(var c=r[o],u=[],l=0;l<c;l++){for(var h={},d=0;d<n.length;d++){var p=n[d],f=i[s+p.offset];switch(p.semantic){case"JOINT":h.joint=f;break;case"WEIGHT":h.weight=t[p.source].data[f]}}u.push(h),s+=n.length}for(var l=0;l<u.length;l++)u[l].index=o;this.weights.push(u)}},C.prototype.getChildById=function(e,t){for(var i=0;i<this.nodes.length;i++){var r=this.nodes[i].getChildById(e,t);if(r)return r}return null},C.prototype.getChildBySid=function(e,t){for(var i=0;i<this.nodes.length;i++){var r=this.nodes[i].getChildBySid(e,t);if(r)return r}return null},C.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name"),this.nodes=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"node":this.nodes.push((new I).parse(i))}}return this},I.prototype.getChannelForTransform=function(e){for(var t=0;t<this.channels.length;t++){var i,r,n=this.channels[t],o=n.target.split("/"),a=(o.shift(),o.shift()),s=a.indexOf(".")>=0,c=a.indexOf("(")>=0;if(s)o=a.split("."),a=o.shift(),r=o.shift();else if(c){i=a.split("("),a=i.shift();for(var u=0;u<i.length;u++)i[u]=parseInt(i[u].replace(/\)/,""))}if(a===e)return n.info={sid:a,dotSyntax:s,arrSyntax:c,arrIndices:i},n}return null},I.prototype.getChildById=function(e,t){if(this.id===e)return this;if(t)for(var i=0;i<this.nodes.length;i++){var r=this.nodes[i].getChildById(e,t);if(r)return r}return null},I.prototype.getChildBySid=function(e,t){if(this.sid===e)return this;if(t)for(var i=0;i<this.nodes.length;i++){var r=this.nodes[i].getChildBySid(e,t);if(r)return r}return null},I.prototype.getTransformBySid=function(e){for(var t=0;t<this.transforms.length;t++)if(this.transforms[t].sid===e)return this.transforms[t];return null},I.prototype.parse=function(e){var t;this.id=e.getAttribute("id"),this.sid=e.getAttribute("sid"),this.name=e.getAttribute("name"),this.type=e.getAttribute("type"),this.layer=e.getAttribute("layer"),this.type="JOINT"===this.type?this.type:"NODE",this.nodes=[],this.transforms=[],this.geometries=[],this.cameras=[],this.lights=[],this.controllers=[],this.matrix=new THREE.Matrix4;for(var i=0;i<e.childNodes.length;i++){var r=e.childNodes[i];if(1==r.nodeType)switch(r.nodeName){case"node":this.nodes.push((new I).parse(r));break;case"instance_camera":this.cameras.push((new ne).parse(r));break;case"instance_controller":this.controllers.push((new _).parse(r));break;case"instance_geometry":this.geometries.push((new z).parse(r));break;case"instance_light":this.lights.push((new ae).parse(r));break;case"instance_node":t=r.getAttribute("url").replace(/^#/,"");var n=y(t);n&&this.nodes.push((new I).parse(n));break;case"rotate":case"translate":case"scale":case"matrix":case"lookat":case"skew":this.transforms.push((new j).parse(r));break;case"extra":break;default:console.log(r.nodeName)}}return this.channels=M(this),A(this),this.updateMatrix(),this},I.prototype.updateMatrix=function(){this.matrix.identity();for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(this.matrix)},j.prototype.parse=function(e){return this.sid=e.getAttribute("sid"),this.type=e.nodeName,this.data=pe(e.textContent),this.convert(),this},j.prototype.convert=function(){switch(this.type){case"matrix":this.obj=be(this.data);break;case"rotate":this.angle=THREE.Math.degToRad(this.data[3]);case"translate":xe(this.data,-1),this.obj=new THREE.Vector3(this.data[0],this.data[1],this.data[2]);break;case"scale":xe(this.data,1),this.obj=new THREE.Vector3(this.data[0],this.data[1],this.data[2]);break;default:console.log("Can not convert Transform of type "+this.type)}},j.prototype.apply=function(){var e=new THREE.Matrix4;return function(t){switch(this.type){case"matrix":t.multiply(this.obj);break;case"translate":t.multiply(e.makeTranslation(this.obj.x,this.obj.y,this.obj.z));break;case"rotate":t.multiply(e.makeRotationAxis(this.obj,this.angle));break;case"scale":t.scale(this.obj)}}}(),j.prototype.update=function(e,t){var i=["X","Y","Z","ANGLE"];switch(this.type){case"matrix":if(t)if(1===t.length)switch(t[0]){case 0:this.obj.n11=e[0],this.obj.n21=e[1],this.obj.n31=e[2],this.obj.n41=e[3];break;case 1:this.obj.n12=e[0],this.obj.n22=e[1],this.obj.n32=e[2],this.obj.n42=e[3];break;case 2:this.obj.n13=e[0],this.obj.n23=e[1],this.obj.n33=e[2],this.obj.n43=e[3];break;case 3:this.obj.n14=e[0],this.obj.n24=e[1],this.obj.n34=e[2],this.obj.n44=e[3]}else if(2===t.length){var r="n"+(t[0]+1)+(t[1]+1);this.obj[r]=e}else console.log("Incorrect addressing of matrix in transform.");else this.obj.copy(e);break;case"translate":case"scale":switch("[object Array]"===Object.prototype.toString.call(t)&&(t=i[t[0]]),t){case"X":this.obj.x=e;break;case"Y":this.obj.y=e;break;case"Z":this.obj.z=e;break;default:this.obj.x=e[0],this.obj.y=e[1],this.obj.z=e[2]}break;case"rotate":switch("[object Array]"===Object.prototype.toString.call(t)&&(t=i[t[0]]),t){case"X":this.obj.x=e;break;case"Y":this.obj.y=e;break;case"Z":this.obj.z=e;break;case"ANGLE":this.angle=THREE.Math.degToRad(e);break;default:this.obj.x=e[0],this.obj.y=e[1],this.obj.z=e[2],this.angle=THREE.Math.degToRad(e[3])}}},_.prototype.parse=function(e){this.url=e.getAttribute("url").replace(/^#/,""),this.skeleton=[],this.instance_material=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1===i.nodeType)switch(i.nodeName){case"skeleton":this.skeleton.push(i.textContent.replace(/^#/,""));break;case"bind_material":for(var r=i.querySelectorAll("instance_material"),n=0;n<r.length;n++){var o=r[n];this.instance_material.push((new O).parse(o))}break;case"extra":}}return this},O.prototype.parse=function(e){return this.symbol=e.getAttribute("symbol"),this.target=e.getAttribute("target").replace(/^#/,""),this},z.prototype.parse=function(e){this.url=e.getAttribute("url").replace(/^#/,""),this.instance_material=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType&&"bind_material"===i.nodeName){for(var r=i.querySelectorAll("instance_material"),n=0;n<r.length;n++){var o=r[n];this.instance_material.push((new O).parse(o))}break}}return this},k.prototype.parse=function(e){this.id=e.getAttribute("id"),Me(this,e);for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"mesh":this.mesh=new R(this).parse(i);break;case"extra":}}return this},R.prototype.parse=function(e){this.primitives=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"source":he(i);break;case"vertices":this.vertices=(new V).parse(i);break;case"linestrips":this.primitives.push((new P).parse(i));break;case"triangles":this.primitives.push((new F).parse(i));break;case"polygons":this.primitives.push((new B).parse(i));break;case"polylist":this.primitives.push((new U).parse(i))}}if(this.geometry3js=new THREE.Geometry,null===this.vertices)return this;for(var r=Ue[this.vertices.input.POSITION.source].data,t=0;t<r.length;t+=3)this.geometry3js.vertices.push(Ee(r,t).clone());for(var t=0;t<this.primitives.length;t++){var n=this.primitives[t];n.setVertices(this.vertices),this.handlePrimitive(n,this.geometry3js)}return this.geometry3js.calcNormals&&(this.geometry3js.computeVertexNormals(),delete this.geometry3js.calcNormals),this},R.prototype.handlePrimitive=function(e,t){if(e instanceof P)return void(t.isLineStrip=!0);var i,r,n,o,a,s,c,u=e.p,l=e.inputs,h=0,d=3,p=0,f=[];for(i=0;i<l.length;i++){n=l[i];var m=n.offset+1;switch(p=p<m?m:p,n.semantic){case"TEXCOORD":f.push(n.set)}}for(var g=0;g<u.length;++g)for(var v=u[g],y=0;y<v.length;){var M=[],A=[],x=null,w=[];for(d=e.vcount?e.vcount.length?e.vcount[h++]:e.vcount:v.length/p,i=0;i<d;i++)for(r=0;r<l.length;r++)switch(n=l[r],s=Ue[n.source],o=v[y+i*p+n.offset],c=s.accessor.params.length,a=o*c,n.semantic){case"VERTEX":M.push(o);break;case"NORMAL":A.push(Ee(s.data,a));break;case"TEXCOORD":x=x||{},void 0===x[n.set]&&(x[n.set]=[]),x[n.set].push(new THREE.Vector2(s.data[a],s.data[a+1]));break;case"COLOR":w.push((new THREE.Color).setRGB(s.data[a],s.data[a+1],s.data[a+2]))}if(0===A.length)if(n=this.vertices.input.NORMAL){s=Ue[n.source],c=s.accessor.params.length;for(var E=0,b=M.length;E<b;E++)A.push(Ee(s.data,M[E]*c))}else t.calcNormals=!0;if(!x&&(x={},n=this.vertices.input.TEXCOORD)){f.push(n.set),s=Ue[n.source],c=s.accessor.params.length;for(var E=0,b=M.length;E<b;E++)a=M[E]*c,void 0===x[n.set]&&(x[n.set]=[]),x[n.set].push(new THREE.Vector2(s.data[a],1-s.data[a+1]))}if(0===w.length&&(n=this.vertices.input.COLOR)){s=Ue[n.source],c=s.accessor.params.length;for(var E=0,b=M.length;E<b;E++)a=M[E]*c,w.push((new THREE.Color).setRGB(s.data[a],s.data[a+1],s.data[a+2]))}var T,L,D=null,N=[];if(3===d)N.push(new THREE.Face3(M[0],M[1],M[2],A,w.length?w:new THREE.Color));else if(4===d)N.push(new THREE.Face3(M[0],M[1],M[3],A.length?[A[0].clone(),A[1].clone(),A[3].clone()]:[],w.length?[w[0],w[1],w[3]]:new THREE.Color)),N.push(new THREE.Face3(M[1],M[2],M[3],A.length?[A[1].clone(),A[2].clone(),A[3].clone()]:[],w.length?[w[1],w[2],w[3]]:new THREE.Color));else if(d>4&&qe.subdivideFaces){var S=w.length?w:new THREE.Color;for(r=1;r<d-1;)N.push(new THREE.Face3(M[0],M[r],M[r+1],A.length?[A[0].clone(),A[r++].clone(),A[r].clone()]:[],S))}if(N.length)for(var E=0,b=N.length;E<b;E++)for(D=N[E],D.daeMaterial=e.material,t.faces.push(D),r=0;r<f.length;r++)T=x[f[r]],L=d>4?[T[0],T[E+1],T[E+2]]:4===d?0===E?[T[0],T[1],T[3]]:[T[1].clone(),T[2],T[3].clone()]:[T[0],T[1],T[2]],void 0===t.faceVertexUvs[r]&&(t.faceVertexUvs[r]=[]),t.faceVertexUvs[r].push(L);else console.log("dropped face with vcount "+d+" for geometry with id: "+t.id);y+=p*d}},B.prototype.setVertices=function(e){for(var t=0;t<this.inputs.length;t++)this.inputs[t].source===e.id&&(this.inputs[t].source=e.input.POSITION.source)},B.prototype.parse=function(e){this.material=e.getAttribute("material"),this.count=ve(e,"count",0);for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"input":this.inputs.push((new Q).parse(e.childNodes[t]));break;case"vcount":this.vcount=fe(i.textContent);break;case"p":this.p.push(fe(i.textContent));break;case"ph":console.warn("polygon holes not yet supported!")}}return this},U.prototype=Object.create(B.prototype),U.prototype.constructor=U,P.prototype=Object.create(B.prototype),P.prototype.constructor=P,F.prototype=Object.create(B.prototype),F.prototype.constructor=F,G.prototype.parse=function(e){this.params=[],this.source=e.getAttribute("source"),this.count=ve(e,"count",0),this.stride=ve(e,"stride",0);for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if("param"===i.nodeName){var r={};r.name=i.getAttribute("name"),r.type=i.getAttribute("type"),this.params.push(r)}}return this},V.prototype.parse=function(e){this.id=e.getAttribute("id");for(var t=0;t<e.childNodes.length;t++)if("input"===e.childNodes[t].nodeName){var i=(new Q).parse(e.childNodes[t]);this.input[i.semantic]=i}return this},Q.prototype.parse=function(e){return this.semantic=e.getAttribute("semantic"),this.source=e.getAttribute("source").replace(/^#/,""),this.set=ve(e,"set",-1),this.offset=ve(e,"offset",0),"TEXCOORD"===this.semantic&&this.set<0&&(this.set=0),this},Y.prototype.parse=function(e){this.id=e.getAttribute("id");for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"bool_array":this.data=de(i.textContent),this.type=i.nodeName;break;case"float_array":this.data=pe(i.textContent),this.type=i.nodeName;break;case"int_array":this.data=fe(i.textContent),this.type=i.nodeName;break;case"IDREF_array":case"Name_array":this.data=me(i.textContent),this.type=i.nodeName;break;case"technique_common":for(var r=0;r<i.childNodes.length;r++)if("accessor"===i.childNodes[r].nodeName){this.accessor=(new G).parse(i.childNodes[r]);break}}}return this},Y.prototype.read=function(){var e=[],t=this.accessor.params[0];switch(t.type){case"IDREF":case"Name":case"name":case"float":return this.data;case"float4x4":for(var i=0;i<this.data.length;i+=16){var r=this.data.slice(i,i+16),n=be(r);e.push(n)}break;default:console.log("ColladaLoader: Source: Read dont know how to read "+t.type+".")}return e},H.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name");for(var t=0;t<e.childNodes.length;t++)if("instance_effect"===e.childNodes[t].nodeName){this.instance_effect=(new J).parse(e.childNodes[t]);break}return this},W.prototype.isColor=function(){return null===this.texture},W.prototype.isTexture=function(){return null!=this.texture},W.prototype.parse=function(e){"transparent"===e.nodeName&&(this.opaque=e.getAttribute("opaque"));for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"color":var r=pe(i.textContent);this.color=new THREE.Color,this.color.setRGB(r[0],r[1],r[2]),this.color.a=r[3];break;case"texture":this.texture=i.getAttribute("texture"),this.texcoord=i.getAttribute("texcoord"),this.texOpts={offsetU:0,offsetV:0,repeatU:1,repeatV:1,wrapU:1,wrapV:1},this.parseTexture(i)}}return this},W.prototype.parseTexture=function(e){if(!e.childNodes)return this;e.childNodes[1]&&"extra"===e.childNodes[1].nodeName&&(e=e.childNodes[1],e.childNodes[1]&&"technique"===e.childNodes[1].nodeName&&(e=e.childNodes[1]));for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"offsetU":case"offsetV":case"repeatU":case"repeatV":this.texOpts[i.nodeName]=parseFloat(i.textContent);break;case"wrapU":case"wrapV":"TRUE"===i.textContent.toUpperCase()?this.texOpts[i.nodeName]=1:this.texOpts[i.nodeName]=parseInt(i.textContent);break;default:this.texOpts[i.nodeName]=i.textContent}}return this},X.prototype.parse=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"emission":case"diffuse":case"specular":case"transparent":this[i.nodeName]=(new W).parse(i);break;case"bump":var r=i.getAttribute("bumptype");r?"heightfield"===r.toLowerCase()?this.bump=(new W).parse(i):"normalmap"===r.toLowerCase()?this.normal=(new W).parse(i):(console.error("Shader.prototype.parse: Invalid value for attribute 'bumptype' ("+r+") - valid bumptypes are 'HEIGHTFIELD' and 'NORMALMAP' - defaulting to 'HEIGHTFIELD'"),this.bump=(new W).parse(i)):(console.warn("Shader.prototype.parse: Attribute 'bumptype' missing from bump node - defaulting to 'HEIGHTFIELD'"),this.bump=(new W).parse(i));break;case"shininess":case"reflectivity":case"index_of_refraction":case"transparency":var n=i.querySelectorAll("float");n.length>0&&(this[i.nodeName]=parseFloat(n[0].textContent))}}return this.create(),this},X.prototype.create=function(){var e={},t=!1;if(void 0!==this.transparency&&void 0!==this.transparent){var i=(this.transparent,(this.transparent.color.r+this.transparent.color.g+this.transparent.color.b)/3*this.transparency);i>0&&(t=!0,e.transparent=!0,e.opacity=1-i)}var r={diffuse:"map",ambient:"lightMap",specular:"specularMap",emission:"emissionMap",bump:"bumpMap",normal:"normalMap"};for(var n in this)switch(n){case"ambient":case"emission":case"diffuse":case"specular":case"bump":case"normal":var o=this[n];if(o instanceof W)if(o.isTexture()){var a=o.texture,s=this.effect.sampler[a];if(void 0!==s&&void 0!==s.source){var c=this.effect.surface[s.source];if(void 0!==c){var u=Pe[c.init_from];if(u){var l,h=_e+u.init_from,d=THREE.Loader.Handlers.get(h);null!==d?l=d.load(h):(l=new THREE.Texture,ye(l,h)),l.wrapS=o.texOpts.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,l.wrapT=o.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,l.offset.x=o.texOpts.offsetU,l.offset.y=o.texOpts.offsetV,l.repeat.x=o.texOpts.repeatU,l.repeat.y=o.texOpts.repeatV,e[r[n]]=l,"emission"===n&&(e.emissive=16777215)}}}}else"diffuse"!==n&&t||("emission"===n?e.emissive=o.color.getHex():e[n]=o.color.getHex());break;case"shininess":e[n]=this[n];break;case"reflectivity":e[n]=this[n],e[n]>0&&(e.envMap=qe.defaultEnvMap),e.combine=THREE.MixOperation;break;case"index_of_refraction":e.refractionRatio=this[n],1!==this[n]&&(e.envMap=qe.defaultEnvMap);break;case"transparency":}switch(e.shading=Xe,e.side=this.effect.doubleSided?THREE.DoubleSide:THREE.FrontSide,void 0!==e.diffuse&&(e.color=e.diffuse,delete e.diffuse),this.type){case"constant":void 0!=e.emissive&&(e.color=e.emissive),this.material=new THREE.MeshBasicMaterial(e);break;case"phong":case"blinn":this.material=new THREE.MeshPhongMaterial(e);break;case"lambert":default:this.material=new THREE.MeshLambertMaterial(e)}return this.material},q.prototype.parse=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"init_from":this.init_from=i.textContent;break;case"format":this.format=i.textContent;break;default:console.log("unhandled Surface prop: "+i.nodeName)}}return this},Z.prototype.parse=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"source":this.source=i.textContent;break;case"minfilter":this.minfilter=i.textContent;break;case"magfilter":this.magfilter=i.textContent;break;case"mipfilter":this.mipfilter=i.textContent;break;case"wrap_s":this.wrap_s=i.textContent;break;case"wrap_t":this.wrap_t=i.textContent;break;default:console.log("unhandled Sampler2D prop: "+i.nodeName)}}return this},K.prototype.create=function(){if(null===this.shader)return null},K.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name"),Me(this,e),this.shader=null;for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"profile_COMMON":this.parseTechnique(this.parseProfileCOMMON(i))}}return this},K.prototype.parseNewparam=function(e){for(var t=e.getAttribute("sid"),i=0;i<e.childNodes.length;i++){var r=e.childNodes[i];if(1==r.nodeType)switch(r.nodeName){case"surface":this.surface[t]=new q(this).parse(r);break;case"sampler2D":this.sampler[t]=new Z(this).parse(r);break;case"extra":break;default:console.log(r.nodeName)}}},K.prototype.parseProfileCOMMON=function(e){for(var t,i=0;i<e.childNodes.length;i++){var r=e.childNodes[i];if(1==r.nodeType)switch(r.nodeName){case"profile_COMMON":this.parseProfileCOMMON(r);break;case"technique":t=r;break;case"newparam":this.parseNewparam(r);break;case"image":var n=(new L).parse(r);Pe[n.id]=n;break;case"extra":break;default:console.log(r.nodeName)}}return t},K.prototype.parseTechnique=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"constant":case"lambert":case"blinn":case"phong":this.shader=new X(i.nodeName,this).parse(i);break;case"extra":this.parseExtra(i)}}},K.prototype.parseExtra=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"technique":this.parseExtraTechnique(i)}}},K.prototype.parseExtraTechnique=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"bump":this.shader.parse(e)}}},J.prototype.parse=function(e){return this.url=e.getAttribute("url").replace(/^#/,""),this},$.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name"),this.source={};for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"animation":var r=(new $).parse(i);for(var n in r.source)this.source[n]=r.source[n];for(var o=0;o<r.channel.length;o++)this.channel.push(r.channel[o]),this.sampler.push(r.sampler[o]);break;case"source":var n=(new Y).parse(i);this.source[n.id]=n;break;case"sampler":this.sampler.push(new te(this).parse(i));break;case"channel":this.channel.push(new ee(this).parse(i))}}return this},ee.prototype.parse=function(e){this.source=e.getAttribute("source").replace(/^#/,""),this.target=e.getAttribute("target");var t=this.target.split("/"),i=(t.shift(),t.shift()),r=i.indexOf(".")>=0,n=i.indexOf("(")>=0;if(r)t=i.split("."),this.sid=t.shift(),this.member=t.shift();else if(n){var o=i.split("(");this.sid=o.shift();for(var a=0;a<o.length;a++)o[a]=parseInt(o[a].replace(/\)/,""));this.arrIndices=o}else this.sid=i;return this.fullSid=i,this.dotSyntax=r,this.arrSyntax=n,this},te.prototype.parse=function(e){this.id=e.getAttribute("id"),this.inputs=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"input":this.inputs.push((new Q).parse(i))}}return this},te.prototype.create=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e],i=this.animation.source[t.source];switch(t.semantic){case"INPUT":this.input=i.read();break;case"OUTPUT":this.output=i.read(),this.strideOut=i.accessor.stride;break;case"INTERPOLATION":this.interpolation=i.read();break;case"IN_TANGENT":break;case"OUT_TANGENT":break;default:console.log(t.semantic)}}if(this.startTime=0,this.endTime=0,this.duration=0,this.input.length){this.startTime=1e8,this.endTime=-1e8;for(var e=0;e<this.input.length;e++)this.startTime=Math.min(this.startTime,this.input[e]),this.endTime=Math.max(this.endTime,this.input[e]);this.duration=this.endTime-this.startTime}},te.prototype.getData=function(e,t,i){var r;if("matrix"===e&&16===this.strideOut)r=this.output[t];else if(this.strideOut>1){r=[],t*=this.strideOut;for(var n=0;n<this.strideOut;++n)r[n]=this.output[t+n];if(3===this.strideOut)switch(e){case"rotate":case"translate":xe(r,-1);break;case"scale":xe(r,1)}else 4===this.strideOut&&"matrix"===e&&xe(r,-1)}else r=this.output[t],i&&"translate"===e&&(r=we(i,r));return r},ie.prototype.addTarget=function(e,t,i,r){this.targets.push({sid:e,member:i,transform:t,data:r})},ie.prototype.apply=function(e){for(var t=0;t<this.targets.length;++t){var i=this.targets[t];e&&i.sid!==e||i.transform.update(i.data,i.member)}},ie.prototype.getTarget=function(e){for(var t=0;t<this.targets.length;++t)if(this.targets[t].sid===e)return this.targets[t];return null},ie.prototype.hasTarget=function(e){for(var t=0;t<this.targets.length;++t)if(this.targets[t].sid===e)return!0;return!1},ie.prototype.interpolate=function(e,t){for(var i=0,r=this.targets.length;i<r;i++){var n,o=this.targets[i],a=e.getTarget(o.sid);if("matrix"!==o.transform.type&&a){var s=(t-this.time)/(e.time-this.time),c=a.data,u=o.data;if(s<0&&(s=0),s>1&&(s=1),u.length){n=[];for(var l=0;l<u.length;++l)n[l]=u[l]+(c[l]-u[l])*s}else n=u+(c-u)*s}else n=o.data;o.transform.update(n,o.member)}},re.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name");for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"optics":this.parseOptics(i)}}return this},re.prototype.parseOptics=function(e){for(var t=0;t<e.childNodes.length;t++)if("technique_common"===e.childNodes[t].nodeName)for(var i=e.childNodes[t],r=0;r<i.childNodes.length;r++)if(this.technique=i.childNodes[r].nodeName,"perspective"===this.technique)for(var n=i.childNodes[r],o=0;o<n.childNodes.length;o++){var a=n.childNodes[o];switch(a.nodeName){case"yfov":this.yfov=a.textContent;break;case"xfov":this.xfov=a.textContent;break;case"znear":this.znear=a.textContent;break;case"zfar":this.zfar=a.textContent;break;case"aspect_ratio":this.aspect_ratio=a.textContent}}else if("orthographic"===this.technique)for(var s=i.childNodes[r],o=0;o<s.childNodes.length;o++){var a=s.childNodes[o];switch(a.nodeName){case"xmag":this.xmag=a.textContent;break;case"ymag":this.ymag=a.textContent;break;case"znear":this.znear=a.textContent;break;case"zfar":this.zfar=a.textContent;break;case"aspect_ratio":this.aspect_ratio=a.textContent}}return this},ne.prototype.parse=function(e){return this.url=e.getAttribute("url").replace(/^#/,""),this},oe.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name");for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"technique_common":this.parseCommon(i);break;case"technique":this.parseTechnique(i)}}return this},oe.prototype.parseCommon=function(e){for(var t=0;t<e.childNodes.length;t++)switch(e.childNodes[t].nodeName){case"directional":case"point":case"spot":case"ambient":this.technique=e.childNodes[t].nodeName;for(var i=e.childNodes[t],r=0;r<i.childNodes.length;r++){var n=i.childNodes[r];switch(n.nodeName){case"color":var o=pe(n.textContent);this.color=new THREE.Color(0),this.color.setRGB(o[0],o[1],o[2]),this.color.a=o[3];break;case"falloff_angle":this.falloff_angle=parseFloat(n.textContent);break;case"quadratic_attenuation":var a=parseFloat(n.textContent);this.distance=a?Math.sqrt(1/a):0}}}return this},oe.prototype.parseTechnique=function(e){this.profile=e.getAttribute("profile");for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];switch(i.nodeName){case"intensity":this.intensity=parseFloat(i.textContent)}}return this},ae.prototype.parse=function(e){return this.url=e.getAttribute("url").replace(/^#/,""),this},se.prototype.parse=function(e){this.id=e.getAttribute("id"),this.name=e.getAttribute("name"),this.joints=[],this.links=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"technique_common":this.parseCommon(i)}}return this},se.prototype.parseCommon=function(e){for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(e.childNodes[t].nodeName){case"joint":this.joints.push((new ce).parse(i));break;case"link":this.links.push((new ue).parse(i))}}return this},ce.prototype.parse=function(e){this.sid=e.getAttribute("sid"),this.name=e.getAttribute("name"),this.axis=new THREE.Vector3,this.limits={min:0,max:0},this.type="",this["static"]=!1,this.zeroPosition=0,this.middlePosition=0;var t=e.querySelector("axis"),i=pe(t.textContent);this.axis=Ee(i,0);var r=e.querySelector("limits min")?parseFloat(e.querySelector("limits min").textContent):-360,n=e.querySelector("limits max")?parseFloat(e.querySelector("limits max").textContent):360;this.limits={min:r,max:n};for(var o=["prismatic","revolute"],a=0;a<o.length;a++){var s=o[a],c=e.querySelector(s);c&&(this.type=s)}return this.limits.min>=this.limits.max&&(this["static"]=!0),this.middlePosition=(this.limits.min+this.limits.max)/2,this},ue.prototype.parse=function(e){this.sid=e.getAttribute("sid"),this.name=e.getAttribute("name"),this.transforms=[],this.attachments=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"attachment_full":this.attachments.push((new le).parse(i));break;case"rotate":case"translate":case"matrix":this.transforms.push((new j).parse(i))}}return this},le.prototype.parse=function(e){this.joint=e.getAttribute("joint").split("/").pop(),this.links=[];for(var t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(1==i.nodeType)switch(i.nodeName){case"link":this.links.push((new ue).parse(i));break;case"rotate":case"translate":case"matrix":this.transforms.push((new j).parse(i))}}return this},{load:e,parse:t,setPreferredShading:i,applySkin:m,geometries:Ve,options:qe}}},{}],15:[function(e,t,i){THREE.MTLLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(e,t,i,r){var n=this,o=new THREE.XHRLoader(this.manager);o.setPath(this.path),o.load(e,function(e){t(n.parse(e))},i,r)},setPath:function(e){this.path=e},setBaseUrl:function(e){this.baseUrl=e},setCrossOrigin:function(e){this.crossOrigin=e},setMaterialOptions:function(e){this.materialOptions=e},parse:function(e){for(var t=e.split("\n"),i={},r=/\s+/,n={},o=0;o<t.length;o++){var a=t[o];if(a=a.trim(),0!==a.length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)i={name:u},n[u]=i;else if(i)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);i[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else i[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.baseUrl,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(n),h}},THREE.MTLLoader.MaterialCreator=function(e,t){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,setCrossOrigin:function(e){this.crossOrigin=e},setManager:function(e){this.manager=e},setMaterials:function(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(e){if(!this.options)return e;var t={};for(var i in e){var r=e[i],n={};t[i]=n;for(var o in r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[1]&&(a=!1)}a&&(n[c]=s)}}return t},preload:function(){for(var e in this.materialsInfo)this.create(e)},getIndex:function(e){return this.nameLookup[e]},getAsArray:function(){var e=0;for(var t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray},create:function(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]},createMaterial_:function(e){var t=this.materialsInfo[e],i={name:e,side:this.side};for(var r in t){var n=t[r];if(""!==n)switch(r.toLowerCase()){case"kd":i.color=(new THREE.Color).fromArray(n);break;case"ks":i.specular=(new THREE.Color).fromArray(n);break;case"map_kd":i.map=this.loadTexture(this.baseUrl+n),i.map.wrapS=this.wrap,i.map.wrapT=this.wrap;break;case"ns":i.shininess=parseFloat(n);break;case"d":n<1&&(i.opacity=n,i.transparent=!0);break;case"Tr":n>0&&(i.opacity=1-n,i.transparent=!0);break;case"map_bump":case"bump":if(i.bumpMap)break;i.bumpMap=this.loadTexture(this.baseUrl+n),i.bumpMap.wrapS=this.wrap,i.bumpMap.wrapT=this.wrap}}return this.materials[e]=new THREE.MeshPhongMaterial(i),this.materials[e]},loadTexture:function(e,t,i,r,n){var o,a=THREE.Loader.Handlers.get(e),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager; return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(e,i,r,n),void 0!==t&&(o.mapping=t),o}},THREE.EventDispatcher.prototype.apply(THREE.MTLLoader.prototype)},{}],16:[function(e,t,i){THREE.OBJLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager,this.materials=null,this.regexp={vertex_pattern:/^v\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,normal_pattern:/^vn\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,uv_pattern:/^vt\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,face_vertex:/^f\s+(-?\d+)\s+(-?\d+)\s+(-?\d+)(?:\s+(-?\d+))?/,face_vertex_uv:/^f\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+))?/,face_vertex_uv_normal:/^f\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+)\/(-?\d+))?/,face_vertex_normal:/^f\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)(?:\s+(-?\d+)\/\/(-?\d+))?/,object_pattern:/^[og]\s*(.+)?/,smoothing_pattern:/^s\s+(\d+|on|off)/,material_library_pattern:/^mtllib /,material_use_pattern:/^usemtl /}},THREE.OBJLoader.prototype={constructor:THREE.OBJLoader,load:function(e,t,i,r){var n=this,o=new THREE.XHRLoader(n.manager);o.setPath(this.path),o.load(e,function(e){t(n.parse(e))},i,r)},setPath:function(e){this.path=e},setMaterials:function(e){this.materials=e},_createParserState:function(){var e={objects:[],object:{},vertices:[],normals:[],uvs:[],materialLibraries:[],startObject:function(e,t){return this.object&&this.object.fromDeclaration===!1?(this.object.name=e,void(this.object.fromDeclaration=t!==!1)):(this.object={name:e||"",geometry:{vertices:[],normals:[],uvs:[]},material:{name:"",smooth:!0},fromDeclaration:t!==!1},void this.objects.push(this.object))},parseVertexIndex:function(e,t){var i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseNormalIndex:function(e,t){var i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseUVIndex:function(e,t){var i=parseInt(e,10);return 2*(i>=0?i-1:i+t/2)},addVertex:function(e,t,i){var r=this.vertices,n=this.object.geometry.vertices;n.push(r[e+0]),n.push(r[e+1]),n.push(r[e+2]),n.push(r[t+0]),n.push(r[t+1]),n.push(r[t+2]),n.push(r[i+0]),n.push(r[i+1]),n.push(r[i+2])},addVertexLine:function(e){var t=this.vertices,i=this.object.geometry.vertices;i.push(t[e+0]),i.push(t[e+1]),i.push(t[e+2])},addNormal:function(e,t,i){var r=this.normals,n=this.object.geometry.normals;n.push(r[e+0]),n.push(r[e+1]),n.push(r[e+2]),n.push(r[t+0]),n.push(r[t+1]),n.push(r[t+2]),n.push(r[i+0]),n.push(r[i+1]),n.push(r[i+2])},addUV:function(e,t,i){var r=this.uvs,n=this.object.geometry.uvs;n.push(r[e+0]),n.push(r[e+1]),n.push(r[t+0]),n.push(r[t+1]),n.push(r[i+0]),n.push(r[i+1])},addUVLine:function(e){var t=this.uvs,i=this.object.geometry.uvs;i.push(t[e+0]),i.push(t[e+1])},addFace:function(e,t,i,r,n,o,a,s,c,u,l,h){var d,p=this.vertices.length,f=this.parseVertexIndex(e,p),m=this.parseVertexIndex(t,p),g=this.parseVertexIndex(i,p);if(void 0===r?this.addVertex(f,m,g):(d=this.parseVertexIndex(r,p),this.addVertex(f,m,d),this.addVertex(m,g,d)),void 0!==n){var v=this.uvs.length;f=this.parseUVIndex(n,v),m=this.parseUVIndex(o,v),g=this.parseUVIndex(a,v),void 0===r?this.addUV(f,m,g):(d=this.parseUVIndex(s,v),this.addUV(f,m,d),this.addUV(m,g,d))}if(void 0!==c){var y=this.normals.length;f=this.parseNormalIndex(c,y),m=c===u?f:this.parseNormalIndex(u,y),g=c===l?f:this.parseNormalIndex(l,y),void 0===r?this.addNormal(f,m,g):(d=this.parseNormalIndex(h,y),this.addNormal(f,m,d),this.addNormal(m,g,d))}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var i=this.vertices.length,r=this.uvs.length,n=0,o=e.length;n<o;n++)this.addVertexLine(this.parseVertexIndex(e[n],i));for(var a=0,o=t.length;a<o;a++)this.addUVLine(this.parseUVIndex(t[a],r))}};return e.startObject("",!1),e},parse:function(e){console.time("OBJLoader");var t=this._createParserState();e.indexOf("\r\n")!==-1&&(e=e.replace("\r\n","\n"));for(var i=e.split("\n"),r="",n="",o="",a=0,s=[],c="function"==typeof"".trimLeft,u=0,l=i.length;u<l;u++)if(r=i[u],r=c?r.trimLeft():r.trim(),a=r.length,0!==a&&(n=r.charAt(0),"#"!==n))if("v"===n)if(o=r.charAt(1)," "===o&&null!==(s=this.regexp.vertex_pattern.exec(r)))t.vertices.push(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3]));else if("n"===o&&null!==(s=this.regexp.normal_pattern.exec(r)))t.normals.push(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3]));else{if("t"!==o||null===(s=this.regexp.uv_pattern.exec(r)))throw new Error("Unexpected vertex/normal/uv line: '"+r+"'");t.uvs.push(parseFloat(s[1]),parseFloat(s[2]))}else if("f"===n)if(null!==(s=this.regexp.face_vertex_uv_normal.exec(r)))t.addFace(s[1],s[4],s[7],s[10],s[2],s[5],s[8],s[11],s[3],s[6],s[9],s[12]);else if(null!==(s=this.regexp.face_vertex_uv.exec(r)))t.addFace(s[1],s[3],s[5],s[7],s[2],s[4],s[6],s[8]);else if(null!==(s=this.regexp.face_vertex_normal.exec(r)))t.addFace(s[1],s[3],s[5],s[7],void 0,void 0,void 0,void 0,s[2],s[4],s[6],s[8]);else{if(null===(s=this.regexp.face_vertex.exec(r)))throw new Error("Unexpected face line: '"+r+"'");t.addFace(s[1],s[2],s[3],s[4])}else if("l"===n){var h=r.substring(1).trim().split(" "),d=[],p=[];if(r.indexOf("/")===-1)d=h;else for(var f=0,m=h.length;f<m;f++){var g=h[f].split("/");""!==g[0]&&d.push(g[0]),""!==g[1]&&p.push(g[1])}t.addLineGeometry(d,p)}else if(null!==(s=this.regexp.object_pattern.exec(r))){var v=s[0].substr(1).trim();t.startObject(v)}else if(this.regexp.material_use_pattern.test(r))t.object.material.name=r.substring(7).trim();else if(this.regexp.material_library_pattern.test(r))t.materialLibraries.push(r.substring(7).trim());else{if(null===(s=this.regexp.smoothing_pattern.exec(r))){if("\0"===r)continue;throw new Error("Unexpected line: '"+r+"'")}var y=s[1].trim().toLowerCase();t.object.material.smooth="1"===y||"on"===y}var M=new THREE.Group;M.materialLibraries=[].concat(t.materialLibraries);for(var u=0,l=t.objects.length;u<l;u++){var A=t.objects[u],x=A.geometry,w="Line"===x.type;if(0!==x.vertices.length){var E=new THREE.BufferGeometry;E.addAttribute("position",new THREE.BufferAttribute(new Float32Array(x.vertices),3)),x.normals.length>0?E.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(x.normals),3)):E.computeVertexNormals(),x.uvs.length>0&&E.addAttribute("uv",new THREE.BufferAttribute(new Float32Array(x.uvs),2));var b;if(null!==this.materials&&(b=this.materials.create(A.material.name),w&&b&&!(b instanceof THREE.LineBasicMaterial))){var T=new THREE.LineBasicMaterial;T.copy(b),b=T}b||(b=w?new THREE.LineBasicMaterial:new THREE.MeshPhongMaterial,b.name=A.material.name),b.shading=A.material.smooth?THREE.SmoothShading:THREE.FlatShading;var L=w?new THREE.Line(E,b):new THREE.Mesh(E,b);L.name=A.name,M.add(L)}}return console.timeEnd("OBJLoader"),M}}},{}],17:[function(e,i,r){var n={REVISION:"76"};"function"==typeof t&&t.amd?t("three",n):"undefined"!=typeof r&&"undefined"!=typeof i&&(i.exports=n),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),void 0===Function.prototype.name&&void 0!==Object.defineProperty&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}}),void 0===Object.assign&&Object.defineProperty(Object,"assign",{writable:!0,configurable:!0,value:function(e){"use strict";if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),i=1,r=arguments.length;i!==r;++i){var n=arguments[i];if(void 0!==n&&null!==n){n=Object(n);for(var o=Object.keys(n),a=0,s=o.length;a!==s;++a){var c=o[a],u=Object.getOwnPropertyDescriptor(n,c);void 0!==u&&u.enumerable&&(t[c]=n[c])}}}return t}}),n.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},n.CullFaceNone=0,n.CullFaceBack=1,n.CullFaceFront=2,n.CullFaceFrontBack=3,n.FrontFaceDirectionCW=0,n.FrontFaceDirectionCCW=1,n.BasicShadowMap=0,n.PCFShadowMap=1,n.PCFSoftShadowMap=2,n.FrontSide=0,n.BackSide=1,n.DoubleSide=2,n.FlatShading=1,n.SmoothShading=2,n.NoColors=0,n.FaceColors=1,n.VertexColors=2,n.NoBlending=0,n.NormalBlending=1,n.AdditiveBlending=2,n.SubtractiveBlending=3,n.MultiplyBlending=4,n.CustomBlending=5,n.AddEquation=100,n.SubtractEquation=101,n.ReverseSubtractEquation=102,n.MinEquation=103,n.MaxEquation=104,n.ZeroFactor=200,n.OneFactor=201,n.SrcColorFactor=202,n.OneMinusSrcColorFactor=203,n.SrcAlphaFactor=204,n.OneMinusSrcAlphaFactor=205,n.DstAlphaFactor=206,n.OneMinusDstAlphaFactor=207,n.DstColorFactor=208,n.OneMinusDstColorFactor=209,n.SrcAlphaSaturateFactor=210,n.NeverDepth=0,n.AlwaysDepth=1,n.LessDepth=2,n.LessEqualDepth=3,n.EqualDepth=4,n.GreaterEqualDepth=5,n.GreaterDepth=6,n.NotEqualDepth=7,n.MultiplyOperation=0,n.MixOperation=1,n.AddOperation=2,n.NoToneMapping=0,n.LinearToneMapping=1,n.ReinhardToneMapping=2,n.Uncharted2ToneMapping=3,n.CineonToneMapping=4,n.UVMapping=300,n.CubeReflectionMapping=301,n.CubeRefractionMapping=302,n.EquirectangularReflectionMapping=303,n.EquirectangularRefractionMapping=304,n.SphericalReflectionMapping=305,n.CubeUVReflectionMapping=306,n.CubeUVRefractionMapping=307,n.RepeatWrapping=1e3,n.ClampToEdgeWrapping=1001,n.MirroredRepeatWrapping=1002,n.NearestFilter=1003,n.NearestMipMapNearestFilter=1004,n.NearestMipMapLinearFilter=1005,n.LinearFilter=1006,n.LinearMipMapNearestFilter=1007,n.LinearMipMapLinearFilter=1008,n.UnsignedByteType=1009,n.ByteType=1010,n.ShortType=1011,n.UnsignedShortType=1012,n.IntType=1013,n.UnsignedIntType=1014,n.FloatType=1015,n.HalfFloatType=1025,n.UnsignedShort4444Type=1016,n.UnsignedShort5551Type=1017,n.UnsignedShort565Type=1018,n.AlphaFormat=1019,n.RGBFormat=1020,n.RGBAFormat=1021,n.LuminanceFormat=1022,n.LuminanceAlphaFormat=1023,n.RGBEFormat=n.RGBAFormat,n.DepthFormat=1026,n.RGB_S3TC_DXT1_Format=2001,n.RGBA_S3TC_DXT1_Format=2002,n.RGBA_S3TC_DXT3_Format=2003,n.RGBA_S3TC_DXT5_Format=2004,n.RGB_PVRTC_4BPPV1_Format=2100,n.RGB_PVRTC_2BPPV1_Format=2101,n.RGBA_PVRTC_4BPPV1_Format=2102,n.RGBA_PVRTC_2BPPV1_Format=2103,n.RGB_ETC1_Format=2151,n.LoopOnce=2200,n.LoopRepeat=2201,n.LoopPingPong=2202,n.InterpolateDiscrete=2300,n.InterpolateLinear=2301,n.InterpolateSmooth=2302,n.ZeroCurvatureEnding=2400,n.ZeroSlopeEnding=2401,n.WrapAroundEnding=2402,n.TrianglesDrawMode=0,n.TriangleStripDrawMode=1,n.TriangleFanDrawMode=2,n.LinearEncoding=3e3,n.sRGBEncoding=3001,n.GammaEncoding=3007,n.RGBEEncoding=3002,n.LogLuvEncoding=3003,n.RGBM7Encoding=3004,n.RGBM16Encoding=3005,n.RGBDEncoding=3006,n.BasicDepthPacking=3200,n.RGBADepthPacking=3201,n.Color=function(e){return 3===arguments.length?this.fromArray(arguments):this.set(e)},n.Color.prototype={constructor:n.Color,r:1,g:1,b:1,set:function(e){return e instanceof n.Color?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){this.r=e,this.g=e,this.b=e},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,i){return this.r=e,this.g=t,this.b=i,this},setHSL:function(){function e(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}return function(t,i,r){if(t=n.Math.euclideanModulo(t,1),i=n.Math.clamp(i,0,1),r=n.Math.clamp(r,0,1),0===i)this.r=this.g=this.b=r;else{var o=r<=.5?r*(1+i):r+i-r*i,a=2*r-o;this.r=e(a,o,t+1/3),this.g=e(a,o,t),this.b=e(a,o,t-1/3)}return this}}(),setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var s=parseFloat(r[1])/360,c=parseInt(r[2],10)/100,u=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(s,c,u)}}}else if(i=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=i[1],h=l.length;if(3===h)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}if(e&&e.length>0){var l=n.ColorKeywords[e];void 0!==l?this.setHex(l):console.warn("THREE.Color: Unknown color "+e)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var i=t>0?1/t:1;return this.r=Math.pow(e.r,i),this.g=Math.pow(e.g,i),this.b=Math.pow(e.b,i),this},convertGammaToLinear:function(){var e=this.r,t=this.g,i=this.b;return this.r=e*e,this.g=t*t,this.b=i*i,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){var t,i,r=e||{h:0,s:0,l:0},n=this.r,o=this.g,a=this.b,s=Math.max(n,o,a),c=Math.min(n,o,a),u=(c+s)/2;if(c===s)t=0,i=0;else{var l=s-c;switch(i=u<=.5?l/(s+c):l/(2-s-c),s){case n:t=(o-a)/l+(o<a?6:0);break;case o:t=(a-n)/l+2;break;case a:t=(n-o)/l+4}t/=6}return r.h=t,r.s=i,r.l=u,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,i){var r=this.getHSL();return r.h+=e,r.s+=t,r.l+=i,this.setHSL(r.h,r.s,r.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}},n.ColorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},n.Quaternion=function(e,t,i,r){this._x=e||0,this._y=t||0,this._z=i||0,this._w=void 0!==r?r:1},n.Quaternion.prototype={constructor:n.Quaternion,get x(){return this._x},set x(e){this._x=e,this.onChangeCallback()},get y(){return this._y},set y(e){this._y=e,this.onChangeCallback()},get z(){return this._z},set z(e){this._z=e,this.onChangeCallback()},get w(){return this._w},set w(e){this._w=e,this.onChangeCallback()},set:function(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(e instanceof n.Euler==!1)throw new Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var i=Math.cos(e._x/2),r=Math.cos(e._y/2),o=Math.cos(e._z/2),a=Math.sin(e._x/2),s=Math.sin(e._y/2),c=Math.sin(e._z/2),u=e.order;return"XYZ"===u?(this._x=a*r*o+i*s*c,this._y=i*s*o-a*r*c,this._z=i*r*c+a*s*o,this._w=i*r*o-a*s*c):"YXZ"===u?(this._x=a*r*o+i*s*c,this._y=i*s*o-a*r*c,this._z=i*r*c-a*s*o,this._w=i*r*o+a*s*c):"ZXY"===u?(this._x=a*r*o-i*s*c,this._y=i*s*o+a*r*c,this._z=i*r*c+a*s*o,this._w=i*r*o-a*s*c):"ZYX"===u?(this._x=a*r*o-i*s*c,this._y=i*s*o+a*r*c,this._z=i*r*c-a*s*o,this._w=i*r*o+a*s*c):"YZX"===u?(this._x=a*r*o+i*s*c,this._y=i*s*o+a*r*c,this._z=i*r*c-a*s*o,this._w=i*r*o-a*s*c):"XZY"===u&&(this._x=a*r*o-i*s*c,this._y=i*s*o-a*r*c,this._z=i*r*c+a*s*o,this._w=i*r*o+a*s*c),t!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,i=e.elements,r=i[0],n=i[4],o=i[8],a=i[1],s=i[5],c=i[9],u=i[2],l=i[6],h=i[10],d=r+s+h;return d>0?(t=.5/Math.sqrt(d+1),this._w=.25/t,this._x=(l-c)*t,this._y=(o-u)*t,this._z=(a-n)*t):r>s&&r>h?(t=2*Math.sqrt(1+r-s-h),this._w=(l-c)/t,this._x=.25*t,this._y=(n+a)/t,this._z=(o+u)/t):s>h?(t=2*Math.sqrt(1+s-r-h),this._w=(o-u)/t,this._x=(n+a)/t,this._y=.25*t,this._z=(c+l)/t):(t=2*Math.sqrt(1+h-r-s),this._w=(a-n)/t,this._x=(o+u)/t,this._y=(c+l)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(){var e,t,i=1e-6;return function(r,o){return void 0===e&&(e=new n.Vector3),t=r.dot(o)+1,t<i?(t=0,Math.abs(r.x)>Math.abs(r.z)?e.set(-r.y,r.x,0):e.set(0,-r.z,r.y)):e.crossVectors(r,o),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize(),this}}(),inverse:function(){return this.conjugate().normalize(),this},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var i=e._x,r=e._y,n=e._z,o=e._w,a=t._x,s=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-n*s,this._y=r*u+o*s+n*a-i*c,this._z=n*u+o*c+i*s-r*a,this._w=o*u-i*a-r*s-n*c,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this._x,r=this._y,n=this._z,o=this._w,a=o*e._w+i*e._x+r*e._y+n*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=n,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(i+this._x),this._y=.5*(r+this._y),this._z=.5*(n+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-t)*c)/s,l=Math.sin(t*c)/s;return this._w=o*u+this._w*l,this._x=i*u+this._x*l,this._y=r*u+this._y*l,this._z=n*u+this._z*l,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}},Object.assign(n.Quaternion,{slerp:function(e,t,i,r){return i.copy(e).slerp(t,r)},slerpFlat:function(e,t,i,r,n,o,a){var s=i[r+0],c=i[r+1],u=i[r+2],l=i[r+3],h=n[o+0],d=n[o+1],p=n[o+2],f=n[o+3];if(l!==f||s!==h||c!==d||u!==p){var m=1-a,g=s*h+c*d+u*p+l*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var M=Math.sqrt(y),A=Math.atan2(M,g*v);m=Math.sin(m*A)/M,a=Math.sin(a*A)/M}var x=a*v;if(s=s*m+h*x,c=c*m+d*x,u=u*m+p*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}e[t]=s,e[t+1]=c,e[t+2]=u,e[t+3]=l}}),n.Vector2=function(e,t){this.x=e||0,this.y=t||0},n.Vector2.prototype={constructor:n.Vector2,get width(){return this.x},set width(e){this.x=e},get height(){return this.y},set height(e){this.y=e},set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e):(this.x=0,this.y=0),this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(){var e,t;return function(i,r){return void 0===e&&(e=new n.Vector2,t=new n.Vector2),e.set(i,i),t.set(r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var i=this.length();return this.multiplyScalar(Math.max(e,Math.min(t,i))/i),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},setLength:function(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e),this},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromAttribute:function(e,t,i){return void 0===i&&(i=0),t=t*e.itemSize+i,this.x=e.array[t],this.y=e.array[t+1],this},rotateAround:function(e,t){var i=Math.cos(t),r=Math.sin(t),n=this.x-e.x,o=this.y-e.y;return this.x=n*i-o*r+e.x,this.y=n*r+o*i+e.y,this}},n.Vector3=function(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0},n.Vector3.prototype={constructor:n.Vector3,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e,this.z*=e):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(){var e;return function(t){return t instanceof n.Euler==!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),void 0===e&&(e=new n.Quaternion),this.applyQuaternion(e.setFromEuler(t)),this}}(),applyAxisAngle:function(){var e;return function(t,i){return void 0===e&&(e=new n.Quaternion),this.applyQuaternion(e.setFromAxisAngle(t,i)),this}}(),applyMatrix3:function(e){var t=this.x,i=this.y,r=this.z,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6]*r,this.y=n[1]*t+n[4]*i+n[7]*r,this.z=n[2]*t+n[5]*i+n[8]*r,this},applyMatrix4:function(e){var t=this.x,i=this.y,r=this.z,n=e.elements;return this.x=n[0]*t+n[4]*i+n[8]*r+n[12],this.y=n[1]*t+n[5]*i+n[9]*r+n[13],this.z=n[2]*t+n[6]*i+n[10]*r+n[14],this},applyProjection:function(e){var t=this.x,i=this.y,r=this.z,n=e.elements,o=1/(n[3]*t+n[7]*i+n[11]*r+n[15]);return this.x=(n[0]*t+n[4]*i+n[8]*r+n[12])*o,this.y=(n[1]*t+n[5]*i+n[9]*r+n[13])*o,this.z=(n[2]*t+n[6]*i+n[10]*r+n[14])*o,this},applyQuaternion:function(e){var t=this.x,i=this.y,r=this.z,n=e.x,o=e.y,a=e.z,s=e.w,c=s*t+o*r-a*i,u=s*i+a*t-n*r,l=s*r+n*i-o*t,h=-n*t-o*i-a*r;return this.x=c*s+h*-n+u*-a-l*-o,this.y=u*s+h*-o+l*-n-c*-a,this.z=l*s+h*-a+c*-o-u*-n,this},project:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyProjection(e)}}(),unproject:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyProjection(e)}}(),transformDirection:function(e){var t=this.x,i=this.y,r=this.z,n=e.elements;return this.x=n[0]*t+n[4]*i+n[8]*r,this.y=n[1]*t+n[5]*i+n[9]*r,this.z=n[2]*t+n[6]*i+n[10]*r,this.normalize(),this},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(){var e,t;return function(i,r){return void 0===e&&(e=new n.Vector3,t=new n.Vector3),e.set(i,i,i),t.set(r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var i=this.length();return this.multiplyScalar(Math.max(e,Math.min(t,i))/i),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z); },lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e),this},cross:function(e,t){if(void 0!==t)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t);var i=this.x,r=this.y,n=this.z;return this.x=r*e.z-n*e.y,this.y=n*e.x-i*e.z,this.z=i*e.y-r*e.x,this},crossVectors:function(e,t){var i=e.x,r=e.y,n=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-n*a,this.y=n*o-i*s,this.z=i*a-r*o,this},projectOnVector:function(){var e,t;return function(i){return void 0===e&&(e=new n.Vector3),e.copy(i).normalize(),t=this.dot(e),this.copy(e).multiplyScalar(t)}}(),projectOnPlane:function(){var e;return function(t){return void 0===e&&(e=new n.Vector3),e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e;return function(t){return void 0===e&&(e=new n.Vector3),this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(n.Math.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromMatrixPosition:function(e){return this.setFromMatrixColumn(e,3)},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this},setFromMatrixColumn:function(e,t){return"number"==typeof e&&(console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index )."),e=arguments[1],t=arguments[0]),this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromAttribute:function(e,t,i){return void 0===i&&(i=0),t=t*e.itemSize+i,this.x=e.array[t],this.y=e.array[t+1],this.z=e.array[t+2],this}},n.Vector4=function(e,t,i,r){this.x=e||0,this.y=t||0,this.z=i||0,this.w=void 0!==r?r:1},n.Vector4.prototype={constructor:n.Vector4,set:function(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return isFinite(e)?(this.x*=e,this.y*=e,this.z*=e,this.w*=e):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(e){var t=this.x,i=this.y,r=this.z,n=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*n,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*n,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*n,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*n,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,i,r,n,o=.01,a=.1,s=e.elements,c=s[0],u=s[4],l=s[8],h=s[1],d=s[5],p=s[9],f=s[2],m=s[6],g=s[10];if(Math.abs(u-h)<o&&Math.abs(l-f)<o&&Math.abs(p-m)<o){if(Math.abs(u+h)<a&&Math.abs(l+f)<a&&Math.abs(p+m)<a&&Math.abs(c+d+g-3)<a)return this.set(1,0,0,0),this;t=Math.PI;var v=(c+1)/2,y=(d+1)/2,M=(g+1)/2,A=(u+h)/4,x=(l+f)/4,w=(p+m)/4;return v>y&&v>M?v<o?(i=0,r=.707106781,n=.707106781):(i=Math.sqrt(v),r=A/i,n=x/i):y>M?y<o?(i=.707106781,r=0,n=.707106781):(r=Math.sqrt(y),i=A/r,n=w/r):M<o?(i=.707106781,r=.707106781,n=0):(n=Math.sqrt(M),i=x/n,r=w/n),this.set(i,r,n,t),this}var E=Math.sqrt((m-p)*(m-p)+(l-f)*(l-f)+(h-u)*(h-u));return Math.abs(E)<.001&&(E=1),this.x=(m-p)/E,this.y=(l-f)/E,this.z=(h-u)/E,this.w=Math.acos((c+d+g-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(i,r){return void 0===e&&(e=new n.Vector4,t=new n.Vector4),e.set(i,i,i,i),t.set(r,r,r,r),this.clamp(e,t)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(e){return this.multiplyScalar(e/this.length())},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e),this},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromAttribute:function(e,t,i){return void 0===i&&(i=0),t=t*e.itemSize+i,this.x=e.array[t],this.y=e.array[t+1],this.z=e.array[t+2],this.w=e.array[t+3],this}},n.Euler=function(e,t,i,r){this._x=e||0,this._y=t||0,this._z=i||0,this._order=r||n.Euler.DefaultOrder},n.Euler.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],n.Euler.DefaultOrder="XYZ",n.Euler.prototype={constructor:n.Euler,get x(){return this._x},set x(e){this._x=e,this.onChangeCallback()},get y(){return this._y},set y(e){this._y=e,this.onChangeCallback()},get z(){return this._z},set z(e){this._z=e,this.onChangeCallback()},get order(){return this._order},set order(e){this._order=e,this.onChangeCallback()},set:function(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,i){var r=n.Math.clamp,o=e.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],d=o[2],p=o[6],f=o[10];return t=t||this._order,"XYZ"===t?(this._y=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(c,f),this._z=Math.atan2(u,l)):(this._y=Math.atan2(-d,a),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(u,a))):"ZYX"===t?(this._y=Math.asin(-r(d,-1,1)),Math.abs(d)<.99999?(this._x=Math.atan2(p,f),this._z=Math.atan2(u,a)):(this._x=0,this._z=Math.atan2(-s,l))):"YZX"===t?(this._z=Math.asin(r(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-d,a)):(this._x=0,this._y=Math.atan2(c,f))):"XZY"===t?(this._z=Math.asin(-r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(p,l),this._y=Math.atan2(c,a)):(this._x=Math.atan2(-h,f),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var e;return function(t,i,r){return void 0===e&&(e=new n.Matrix4),e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,i,r),this}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(){var e=new n.Quaternion;return function(t){e.setFromEuler(this),this.setFromQuaternion(e,t)}}(),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new n.Vector3(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}},n.Line3=function(e,t){this.start=void 0!==e?e:new n.Vector3,this.end=void 0!==t?t:new n.Vector3},n.Line3.prototype={constructor:n.Line3,set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},center:function(e){var t=e||new n.Vector3;return t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){var t=e||new n.Vector3;return t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){var i=t||new n.Vector3;return this.delta(i).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(){var e=new n.Vector3,t=new n.Vector3;return function(i,r){e.subVectors(i,this.start),t.subVectors(this.end,this.start);var o=t.dot(t),a=t.dot(e),s=a/o;return r&&(s=n.Math.clamp(s,0,1)),s}}(),closestPointToPoint:function(e,t,i){var r=this.closestPointToPointParameter(e,t),o=i||new n.Vector3;return this.delta(o).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}},n.Box2=function(e,t){this.min=void 0!==e?e:new n.Vector2((+(1/0)),(+(1/0))),this.max=void 0!==t?t:new n.Vector2((-(1/0)),(-(1/0)))},n.Box2.prototype={constructor:n.Box2,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new n.Vector2;return function(t,i){var r=e.copy(i).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=+(1/0),this.max.x=this.max.y=-(1/0),this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},center:function(e){var t=e||new n.Vector2;return t.addVectors(this.min,this.max).multiplyScalar(.5)},size:function(e){var t=e||new n.Vector2;return t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){var i=t||new n.Vector2;return i.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){var i=t||new n.Vector2;return i.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new n.Vector2;return function(t){var i=e.copy(t).clamp(this.min,this.max);return i.sub(t).length()}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},n.Box3=function(e,t){this.min=void 0!==e?e:new n.Vector3((+(1/0)),(+(1/0)),(+(1/0))),this.max=void 0!==t?t:new n.Vector3((-(1/0)),(-(1/0)),(-(1/0)))},n.Box3.prototype={constructor:n.Box3,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=+(1/0),i=+(1/0),r=+(1/0),n=-(1/0),o=-(1/0),a=-(1/0),s=0,c=e.length;s<c;s+=3){var u=e[s],l=e[s+1],h=e[s+2];u<t&&(t=u),l<i&&(i=l),h<r&&(r=h),u>n&&(n=u),l>o&&(o=l),h>a&&(a=h)}this.min.set(t,i,r),this.max.set(n,o,a)},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new n.Vector3;return function(t,i){var r=e.copy(i).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),setFromObject:function(){var e=new n.Vector3;return function(t){var i=this;return t.updateMatrixWorld(!0),this.makeEmpty(),t.traverse(function(t){var r=t.geometry;if(void 0!==r)if(r instanceof n.Geometry)for(var o=r.vertices,a=0,s=o.length;a<s;a++)e.copy(o[a]),e.applyMatrix4(t.matrixWorld),i.expandByPoint(e);else if(r instanceof n.BufferGeometry&&void 0!==r.attributes.position)for(var c=r.attributes.position.array,a=0,s=c.length;a<s;a+=3)e.fromArray(c,a),e.applyMatrix4(t.matrixWorld),i.expandByPoint(e)}),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=+(1/0),this.max.x=this.max.y=this.max.z=-(1/0),this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},center:function(e){var t=e||new n.Vector3;return t.addVectors(this.min,this.max).multiplyScalar(.5)},size:function(e){var t=e||new n.Vector3;return t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){var i=t||new n.Vector3;return i.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:function(){var e;return function(t){return void 0===e&&(e=new n.Vector3),this.clampPoint(t.center,e),e.distanceToSquared(t.center)<=t.radius*t.radius}}(),intersectsPlane:function(e){var t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=e.constant&&i>=e.constant},clampPoint:function(e,t){var i=t||new n.Vector3;return i.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new n.Vector3;return function(t){var i=e.copy(t).clamp(this.min,this.max);return i.sub(t).length()}}(),getBoundingSphere:function(){var e=new n.Vector3;return function(t){var i=t||new n.Sphere;return i.center=this.center(),i.radius=.5*this.size(e).length(),i}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(){var e=[new n.Vector3,new n.Vector3,new n.Vector3,new n.Vector3,new n.Vector3,new n.Vector3,new n.Vector3,new n.Vector3];return function(t){return this.isEmpty()?this:(e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(e),this)}}(),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},n.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")},n.Matrix3.prototype={constructor:n.Matrix3,set:function(e,t,i,r,n,o,a,s,c){var u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=n,u[5]=s,u[6]=i,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=e.elements;return this.set(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8]),this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToVector3Array:function(){var e;return function(t,i,r){void 0===e&&(e=new n.Vector3),void 0===i&&(i=0),void 0===r&&(r=t.length);for(var o=0,a=i;o<r;o+=3,a+=3)e.fromArray(t,a),e.applyMatrix3(this),e.toArray(t,a);return t}}(),applyToBuffer:function(){var e;return function(t,i,r){void 0===e&&(e=new n.Vector3),void 0===i&&(i=0),void 0===r&&(r=t.length/t.itemSize);for(var o=0,a=i;o<r;o++,a++)e.x=t.getX(a),e.y=t.getY(a),e.z=t.getZ(a),e.applyMatrix3(this),t.setXYZ(e.x,e.y,e.z);return t}}(),multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],i=e[1],r=e[2],n=e[3],o=e[4],a=e[5],s=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*n*u+i*a*s+r*n*c-r*o*s},getInverse:function(e,t){e instanceof n.Matrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var i=e.elements,r=this.elements,o=i[0],a=i[1],s=i[2],c=i[3],u=i[4],l=i[5],h=i[6],d=i[7],p=i[8],f=p*u-l*d,m=l*h-p*c,g=d*c-u*h,v=o*f+a*m+s*g;if(0===v){var y="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(y);return console.warn(y),this.identity()}return r[0]=f,r[1]=s*d-p*a,r[2]=l*a-s*u,r[3]=m,r[4]=p*o-s*h,r[5]=s*c-l*o,r[6]=g,r[7]=a*h-d*o,r[8]=u*o-a*c,this.multiplyScalar(1/v)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(e,t)},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},fromArray:function(e){return this.elements.set(e),this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}},n.Matrix4=function(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")},n.Matrix4.prototype={constructor:n.Matrix4,set:function(e,t,i,r,n,o,a,s,c,u,l,h,d,p,f,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=n,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=u,g[10]=l,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new n.Matrix4).fromArray(this.elements)},copy:function(e){return this.elements.set(e.elements),this},copyPosition:function(e){var t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this},extractBasis:function(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this},extractRotation:function(){var e;return function(t){void 0===e&&(e=new n.Vector3);var i=this.elements,r=t.elements,o=1/e.setFromMatrixColumn(t,0).length(),a=1/e.setFromMatrixColumn(t,1).length(),s=1/e.setFromMatrixColumn(t,2).length();return i[0]=r[0]*o,i[1]=r[1]*o,i[2]=r[2]*o,i[4]=r[4]*a,i[5]=r[5]*a,i[6]=r[6]*a,i[8]=r[8]*s,i[9]=r[9]*s,i[10]=r[10]*s,this}}(),makeRotationFromEuler:function(e){e instanceof n.Euler==!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,i=e.x,r=e.y,o=e.z,a=Math.cos(i),s=Math.sin(i),c=Math.cos(r),u=Math.sin(r),l=Math.cos(o),h=Math.sin(o);if("XYZ"===e.order){var d=a*l,p=a*h,f=s*l,m=s*h;t[0]=c*l,t[4]=-c*h,t[8]=u,t[1]=p+f*u,t[5]=d-m*u,t[9]=-s*c,t[2]=m-d*u,t[6]=f+p*u,t[10]=a*c}else if("YXZ"===e.order){var g=c*l,v=c*h,y=u*l,M=u*h;t[0]=g+M*s,t[4]=y*s-v,t[8]=a*u,t[1]=a*h,t[5]=a*l,t[9]=-s,t[2]=v*s-y,t[6]=M+g*s,t[10]=a*c}else if("ZXY"===e.order){var g=c*l,v=c*h,y=u*l,M=u*h;t[0]=g-M*s,t[4]=-a*h,t[8]=y+v*s,t[1]=v+y*s,t[5]=a*l,t[9]=M-g*s,t[2]=-a*u,t[6]=s,t[10]=a*c}else if("ZYX"===e.order){var d=a*l,p=a*h,f=s*l,m=s*h;t[0]=c*l,t[4]=f*u-p,t[8]=d*u+m,t[1]=c*h,t[5]=m*u+d,t[9]=p*u-f,t[2]=-u,t[6]=s*c,t[10]=a*c}else if("YZX"===e.order){var A=a*c,x=a*u,w=s*c,E=s*u;t[0]=c*l,t[4]=E-A*h,t[8]=w*h+x,t[1]=h,t[5]=a*l,t[9]=-s*l,t[2]=-u*l,t[6]=x*h+w,t[10]=A-E*h}else if("XZY"===e.order){var A=a*c,x=a*u,w=s*c,E=s*u;t[0]=c*l,t[4]=-h,t[8]=u*l,t[1]=A*h+E,t[5]=a*l,t[9]=x*h-w,t[2]=w*h-x,t[6]=s*l,t[10]=E*h+A}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,i=e.x,r=e.y,n=e.z,o=e.w,a=i+i,s=r+r,c=n+n,u=i*a,l=i*s,h=i*c,d=r*s,p=r*c,f=n*c,m=o*a,g=o*s,v=o*c;return t[0]=1-(d+f),t[4]=l-v,t[8]=h+g,t[1]=l+v,t[5]=1-(u+f),t[9]=p-m,t[2]=h-g,t[6]=p+m,t[10]=1-(u+d),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:function(){var e,t,i;return function(r,o,a){void 0===e&&(e=new n.Vector3),void 0===t&&(t=new n.Vector3),void 0===i&&(i=new n.Vector3);var s=this.elements;return i.subVectors(r,o).normalize(),0===i.lengthSq()&&(i.z=1),e.crossVectors(a,i).normalize(),0===e.lengthSq()&&(i.x+=1e-4,e.crossVectors(a,i).normalize()),t.crossVectors(i,e),s[0]=e.x,s[4]=t.x,s[8]=i.x,s[1]=e.y,s[5]=t.y,s[9]=i.y,s[2]=e.z,s[6]=t.z,s[10]=i.z,this}}(),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var i=e.elements,r=t.elements,n=this.elements,o=i[0],a=i[4],s=i[8],c=i[12],u=i[1],l=i[5],h=i[9],d=i[13],p=i[2],f=i[6],m=i[10],g=i[14],v=i[3],y=i[7],M=i[11],A=i[15],x=r[0],w=r[4],E=r[8],b=r[12],T=r[1],L=r[5],D=r[9],N=r[13],S=r[2],C=r[6],I=r[10],j=r[14],_=r[3],O=r[7],z=r[11],k=r[15];return n[0]=o*x+a*T+s*S+c*_,n[4]=o*w+a*L+s*C+c*O,n[8]=o*E+a*D+s*I+c*z,n[12]=o*b+a*N+s*j+c*k,n[1]=u*x+l*T+h*S+d*_,n[5]=u*w+l*L+h*C+d*O,n[9]=u*E+l*D+h*I+d*z,n[13]=u*b+l*N+h*j+d*k,n[2]=p*x+f*T+m*S+g*_,n[6]=p*w+f*L+m*C+g*O,n[10]=p*E+f*D+m*I+g*z,n[14]=p*b+f*N+m*j+g*k,n[3]=v*x+y*T+M*S+A*_,n[7]=v*w+y*L+M*C+A*O,n[11]=v*E+y*D+M*I+A*z,n[15]=v*b+y*N+M*j+A*k,this},multiplyToArray:function(e,t,i){var r=this.elements;return this.multiplyMatrices(e,t),i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],i[4]=r[4],i[5]=r[5],i[6]=r[6],i[7]=r[7],i[8]=r[8],i[9]=r[9],i[10]=r[10],i[11]=r[11],i[12]=r[12],i[13]=r[13],i[14]=r[14],i[15]=r[15],this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToVector3Array:function(){var e;return function(t,i,r){void 0===e&&(e=new n.Vector3),void 0===i&&(i=0),void 0===r&&(r=t.length);for(var o=0,a=i;o<r;o+=3,a+=3)e.fromArray(t,a),e.applyMatrix4(this),e.toArray(t,a);return t}}(),applyToBuffer:function(){var e;return function(t,i,r){void 0===e&&(e=new n.Vector3),void 0===i&&(i=0),void 0===r&&(r=t.length/t.itemSize);for(var o=0,a=i;o<r;o++,a++)e.x=t.getX(a),e.y=t.getY(a),e.z=t.getZ(a),e.applyMatrix4(this),t.setXYZ(e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],i=e[4],r=e[8],n=e[12],o=e[1],a=e[5],s=e[9],c=e[13],u=e[2],l=e[6],h=e[10],d=e[14],p=e[3],f=e[7],m=e[11],g=e[15];return p*(+n*s*l-r*c*l-n*a*h+i*c*h+r*a*d-i*s*d)+f*(+t*s*d-t*c*h+n*o*h-r*o*d+r*c*u-n*s*u)+m*(+t*c*l-t*a*d-n*o*l+i*o*d+n*a*u-i*c*u)+g*(-r*a*u-t*s*l+t*a*h+r*o*l-i*o*h+i*s*u)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."),this.toArray(e,t)},getPosition:function(){var e;return function(){return void 0===e&&(e=new n.Vector3),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),e.setFromMatrixColumn(this,3)}}(),setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var i=this.elements,r=e.elements,n=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],v=r[13],y=r[14],M=r[15],A=p*y*h-v*f*h+v*l*m-u*y*m-p*l*M+u*f*M,x=g*f*h-d*y*h-g*l*m+c*y*m+d*l*M-c*f*M,w=d*v*h-g*p*h+g*u*m-c*v*m-d*u*M+c*p*M,E=g*p*l-d*v*l-g*u*f+c*v*f+d*u*y-c*p*y,b=n*A+o*x+a*w+s*E;if(0===b){var T="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(T);return console.warn(T),this.identity()}return i[0]=A,i[1]=v*f*s-p*y*s-v*a*m+o*y*m+p*a*M-o*f*M,i[2]=u*y*s-v*l*s+v*a*h-o*y*h-u*a*M+o*l*M,i[3]=p*l*s-u*f*s-p*a*h+o*f*h+u*a*m-o*l*m,i[4]=x,i[5]=d*y*s-g*f*s+g*a*m-n*y*m-d*a*M+n*f*M,i[6]=g*l*s-c*y*s-g*a*h+n*y*h+c*a*M-n*l*M,i[7]=c*f*s-d*l*s+d*a*h-n*f*h-c*a*m+n*l*m,i[8]=w,i[9]=g*p*s-d*v*s-g*o*m+n*v*m+d*o*M-n*p*M,i[10]=c*v*s-g*u*s+g*o*h-n*v*h-c*o*M+n*u*M,i[11]=d*u*s-c*p*s-d*o*h+n*p*h+c*o*m-n*u*m,i[12]=E,i[13]=d*v*a-g*p*a+g*o*f-n*v*f-d*o*y+n*p*y,i[14]=g*u*a-c*v*a-g*o*l+n*v*l+c*o*y-n*u*y,i[15]=c*p*a-d*u*a+d*o*l-n*p*l-c*o*f+n*u*f,this.multiplyScalar(1/b)},scale:function(e){var t=this.elements,i=e.x,r=e.y,n=e.z;return t[0]*=i,t[4]*=r,t[8]*=n,t[1]*=i,t[5]*=r,t[9]*=n,t[2]*=i,t[6]*=r,t[10]*=n,t[3]*=i,t[7]*=r,t[11]*=n,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))},makeTranslation:function(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var i=Math.cos(t),r=Math.sin(t),n=1-i,o=e.x,a=e.y,s=e.z,c=n*o,u=n*a;return this.set(c*o+i,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+i,u*s-r*o,0,c*s-r*a,u*s+r*o,n*s*s+i,0,0,0,0,1),this},makeScale:function(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this},compose:function(e,t,i){return this.makeRotationFromQuaternion(t),this.scale(i),this.setPosition(e),this},decompose:function(){var e,t;return function(i,r,o){void 0===e&&(e=new n.Vector3),void 0===t&&(t=new n.Matrix4);var a=this.elements,s=e.set(a[0],a[1],a[2]).length(),c=e.set(a[4],a[5],a[6]).length(),u=e.set(a[8],a[9],a[10]).length(),l=this.determinant();l<0&&(s=-s),i.x=a[12],i.y=a[13],i.z=a[14],t.elements.set(this.elements);var h=1/s,d=1/c,p=1/u;return t.elements[0]*=h,t.elements[1]*=h,t.elements[2]*=h,t.elements[4]*=d,t.elements[5]*=d,t.elements[6]*=d,t.elements[8]*=p,t.elements[9]*=p,t.elements[10]*=p,r.setFromRotationMatrix(t),o.x=s,o.y=c,o.z=u,this}}(),makeFrustum:function(e,t,i,r,n,o){var a=this.elements,s=2*n/(t-e),c=2*n/(r-i),u=(t+e)/(t-e),l=(r+i)/(r-i),h=-(o+n)/(o-n),d=-2*o*n/(o-n);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makePerspective:function(e,t,i,r){var o=i*Math.tan(n.Math.DEG2RAD*e*.5),a=-o,s=a*t,c=o*t;return this.makeFrustum(s,c,a,o,i,r)},makeOrthographic:function(e,t,i,r,n,o){var a=this.elements,s=1/(t-e),c=1/(i-r),u=1/(o-n),l=(t+e)*s,h=(i+r)*c,d=(o+n)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){for(var t=this.elements,i=e.elements,r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0},fromArray:function(e){ return this.elements.set(e),this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},n.Ray=function(e,t){this.origin=void 0!==e?e:new n.Vector3,this.direction=void 0!==t?t:new n.Vector3},n.Ray.prototype={constructor:n.Ray,set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){var i=t||new n.Vector3;return i.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){this.direction.copy(e).sub(this.origin).normalize()},recast:function(){var e=new n.Vector3;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){var i=t||new n.Vector3;i.subVectors(e,this.origin);var r=i.dot(this.direction);return r<0?i.copy(this.origin):i.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new n.Vector3;return function(t){var i=e.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(i).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Vector3;return function(r,n,o,a){e.copy(r).add(n).multiplyScalar(.5),t.copy(n).sub(r).normalize(),i.copy(this.origin).sub(e);var s,c,u,l,h=.5*r.distanceTo(n),d=-this.direction.dot(t),p=i.dot(this.direction),f=-i.dot(t),m=i.lengthSq(),g=Math.abs(1-d*d);if(g>0)if(s=d*f-p,c=d*p-f,l=h*g,s>=0)if(c>=-l)if(c<=l){var v=1/g;s*=v,c*=v,u=s*(s+d*c+2*p)+c*(d*s+c+2*f)+m}else c=h,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;else c=-h,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;else c<=-l?(s=Math.max(0,-(-d*h+p)),c=s>0?-h:Math.min(Math.max(-h,-f),h),u=-s*s+c*(c+2*f)+m):c<=l?(s=0,c=Math.min(Math.max(-h,-f),h),u=c*(c+2*f)+m):(s=Math.max(0,-(d*h+p)),c=s>0?h:Math.min(Math.max(-h,-f),h),u=-s*s+c*(c+2*f)+m);else c=d>0?-h:h,s=Math.max(0,-(d*c+p)),u=-s*s+c*(c+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(t).multiplyScalar(c).add(e),u}}(),intersectSphere:function(){var e=new n.Vector3;return function(t,i){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),n=e.dot(e)-r*r,o=t.radius*t.radius;if(n>o)return null;var a=Math.sqrt(o-n),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,i):this.at(s,i)}}(),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null},intersectPlane:function(e,t){var i=this.distanceToPlane(e);return null===i?null:this.at(i,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);if(0===t)return!0;var i=e.normal.dot(this.direction);return i*t<0},intersectBox:function(e,t){var i,r,n,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(n=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(n=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||n>r?null:((n>i||i!==i)&&(i=n),(o<r||r!==r)&&(r=o),l>=0?(a=(e.min.z-h.z)*l,s=(e.max.z-h.z)*l):(a=(e.max.z-h.z)*l,s=(e.min.z-h.z)*l),i>s||a>r?null:((a>i||i!==i)&&(i=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(i>=0?i:r,t)))},intersectsBox:function(){var e=new n.Vector3;return function(t){return null!==this.intersectBox(t,e)}}(),intersectTriangle:function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Vector3,r=new n.Vector3;return function(n,o,a,s,c){t.subVectors(o,n),i.subVectors(a,n),r.crossVectors(t,i);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}e.subVectors(this.origin,n);var h=u*this.direction.dot(i.crossVectors(e,i));if(h<0)return null;var d=u*this.direction.dot(t.cross(e));if(d<0)return null;if(h+d>l)return null;var p=-u*e.dot(r);return p<0?null:this.at(p/l,c)}}(),applyMatrix4:function(e){return this.direction.add(this.origin).applyMatrix4(e),this.origin.applyMatrix4(e),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}},n.Sphere=function(e,t){this.center=void 0!==e?e:new n.Vector3,this.radius=void 0!==t?t:0},n.Sphere.prototype={constructor:n.Sphere,set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(){var e=new n.Box3;return function(t,i){var r=this.center;void 0!==i?r.copy(i):e.setFromPoints(t).center(r);for(var n=0,o=0,a=t.length;o<a;o++)n=Math.max(n,r.distanceToSquared(t[o]));return this.radius=Math.sqrt(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(this.center.dot(e.normal)-e.constant)<=this.radius},clampPoint:function(e,t){var i=this.center.distanceToSquared(e),r=t||new n.Vector3;return r.copy(e),i>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(e){var t=e||new n.Box3;return t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}},n.Frustum=function(e,t,i,r,o,a){this.planes=[void 0!==e?e:new n.Plane,void 0!==t?t:new n.Plane,void 0!==i?i:new n.Plane,void 0!==r?r:new n.Plane,void 0!==o?o:new n.Plane,void 0!==a?a:new n.Plane]},n.Frustum.prototype={constructor:n.Frustum,set:function(e,t,i,r,n,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(n),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,i=0;i<6;i++)t[i].copy(e.planes[i]);return this},setFromMatrix:function(e){var t=this.planes,i=e.elements,r=i[0],n=i[1],o=i[2],a=i[3],s=i[4],c=i[5],u=i[6],l=i[7],h=i[8],d=i[9],p=i[10],f=i[11],m=i[12],g=i[13],v=i[14],y=i[15];return t[0].setComponents(a-r,l-s,f-h,y-m).normalize(),t[1].setComponents(a+r,l+s,f+h,y+m).normalize(),t[2].setComponents(a+n,l+c,f+d,y+g).normalize(),t[3].setComponents(a-n,l-c,f-d,y-g).normalize(),t[4].setComponents(a-o,l-u,f-p,y-v).normalize(),t[5].setComponents(a+o,l+u,f+p,y+v).normalize(),this},intersectsObject:function(){var e=new n.Sphere;return function(t){var i=t.geometry;return null===i.boundingSphere&&i.computeBoundingSphere(),e.copy(i.boundingSphere),e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,i=e.center,r=-e.radius,n=0;n<6;n++){var o=t[n].distanceToPoint(i);if(o<r)return!1}return!0},intersectsBox:function(){var e=new n.Vector3,t=new n.Vector3;return function(i){for(var r=this.planes,n=0;n<6;n++){var o=r[n];e.x=o.normal.x>0?i.min.x:i.max.x,t.x=o.normal.x>0?i.max.x:i.min.x,e.y=o.normal.y>0?i.min.y:i.max.y,t.y=o.normal.y>0?i.max.y:i.min.y,e.z=o.normal.z>0?i.min.z:i.max.z,t.z=o.normal.z>0?i.max.z:i.min.z;var a=o.distanceToPoint(e),s=o.distanceToPoint(t);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(e){for(var t=this.planes,i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}},n.Plane=function(e,t){this.normal=void 0!==e?e:new n.Vector3(1,0,0),this.constant=void 0!==t?t:0},n.Plane.prototype={constructor:n.Plane,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new n.Vector3,t=new n.Vector3;return function(i,r,n){var o=e.subVectors(n,r).cross(t.subVectors(i,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return this.orthoPoint(e,t).sub(e).negate()},orthoPoint:function(e,t){var i=this.distanceToPoint(e),r=t||new n.Vector3;return r.copy(this.normal).multiplyScalar(i)},intersectLine:function(){var e=new n.Vector3;return function(t,i){var r=i||new n.Vector3,o=t.delta(e),a=this.normal.dot(o);if(0!==a){var s=-(t.start.dot(this.normal)+this.constant)/a;if(!(s<0||s>1))return r.copy(o).multiplyScalar(s).add(t.start)}else if(0===this.distanceToPoint(t.start))return r.copy(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){var t=e||new n.Vector3;return t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new n.Vector3,t=new n.Matrix3;return function(i,r){var n=this.coplanarPoint(e).applyMatrix4(i),o=r||t.getNormalMatrix(i),a=this.normal.applyMatrix3(o).normalize();return this.constant=-n.dot(a),this}}(),translate:function(e){return this.constant=this.constant-e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}},n.Spherical=function(e,t,i){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==i?i:0,this},n.Spherical.prototype={constructor:n.Spherical,set:function(e,t,i){this.radius=e,this.phi=t,this.theta=i},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius.copy(e.radius),this.phi.copy(e.phi),this.theta.copy(e.theta),this},makeSafe:function(){var e=1e-6;this.phi=Math.max(e,Math.min(Math.PI-e,this.phi))},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(n.Math.clamp(e.y/this.radius,-1,1))),this}},n.Math={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e,t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=new Array(36),r=0;return function(){for(var n=0;n<36;n++)8===n||13===n||18===n||23===n?i[n]="-":14===n?i[n]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),e=15&r,r>>=4,i[n]=t[19===n?3&e|8:e]);return i.join("")}}(),clamp:function(e,t,i){return Math.max(t,Math.min(i,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,i,r,n){return r+(e-t)*(n-r)/(i-t)},smoothstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t),e*e*(3-2*e))},smootherstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t),e*e*e*(e*(6*e-15)+10))},random16:function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*n.Math.DEG2RAD},radToDeg:function(e){return e*n.Math.RAD2DEG},isPowerOfTwo:function(e){return 0===(e&e-1)&&0!==e},nearestPowerOfTwo:function(e){return Math.pow(2,Math.round(Math.log(e)/Math.LN2))},nextPowerOfTwo:function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}},n.Spline=function(e){function t(e,t,i,r,n,o,a){var s=.5*(i-e),c=.5*(r-t);return(2*(t-i)+s+c)*a+(-3*(t-i)-2*s-c)*o+s*n+t}this.points=e;var i,r,o,a,s,c,u,l,h,d=[],p={x:0,y:0,z:0};this.initFromArray=function(e){this.points=[];for(var t=0;t<e.length;t++)this.points[t]={x:e[t][0],y:e[t][1],z:e[t][2]}},this.getPoint=function(e){return i=(this.points.length-1)*e,r=Math.floor(i),o=i-r,d[0]=0===r?r:r-1,d[1]=r,d[2]=r>this.points.length-2?this.points.length-1:r+1,d[3]=r>this.points.length-3?this.points.length-1:r+2,c=this.points[d[0]],u=this.points[d[1]],l=this.points[d[2]],h=this.points[d[3]],a=o*o,s=o*a,p.x=t(c.x,u.x,l.x,h.x,o,a,s),p.y=t(c.y,u.y,l.y,h.y,o,a,s),p.z=t(c.z,u.z,l.z,h.z,o,a,s),p},this.getControlPointsArray=function(){var e,t,i=this.points.length,r=[];for(e=0;e<i;e++)t=this.points[e],r[e]=[t.x,t.y,t.z];return r},this.getLength=function(e){var t,i,r,o,a=0,s=0,c=0,u=new n.Vector3,l=new n.Vector3,h=[],d=0;for(h[0]=0,e||(e=100),r=this.points.length*e,u.copy(this.points[0]),t=1;t<r;t++)i=t/r,o=this.getPoint(i),l.copy(o),d+=l.distanceTo(u),u.copy(o),a=(this.points.length-1)*i,s=Math.floor(a),s!==c&&(h[s]=d,c=s);return h[h.length]=d,{chunks:h,total:d}},this.reparametrizeByArcLength=function(e){var t,i,r,o,a,s,c,u,l=[],h=new n.Vector3,d=this.getLength();for(l.push(h.copy(this.points[0]).clone()),t=1;t<this.points.length;t++){for(s=d.chunks[t]-d.chunks[t-1],c=Math.ceil(e*s/d.total),o=(t-1)/(this.points.length-1),a=t/(this.points.length-1),i=1;i<c-1;i++)r=o+i*(1/c)*(a-o),u=this.getPoint(r),l.push(h.copy(u).clone());l.push(h.copy(this.points[t]).clone())}this.points=l}},n.Triangle=function(e,t,i){this.a=void 0!==e?e:new n.Vector3,this.b=void 0!==t?t:new n.Vector3,this.c=void 0!==i?i:new n.Vector3},n.Triangle.normal=function(){var e=new n.Vector3;return function(t,i,r,o){var a=o||new n.Vector3;a.subVectors(r,i),e.subVectors(t,i),a.cross(e);var s=a.lengthSq();return s>0?a.multiplyScalar(1/Math.sqrt(s)):a.set(0,0,0)}}(),n.Triangle.barycoordFromPoint=function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Vector3;return function(r,o,a,s,c){e.subVectors(s,o),t.subVectors(a,o),i.subVectors(r,o);var u=e.dot(e),l=e.dot(t),h=e.dot(i),d=t.dot(t),p=t.dot(i),f=u*d-l*l,m=c||new n.Vector3;if(0===f)return m.set(-2,-1,-1);var g=1/f,v=(d*h-l*p)*g,y=(u*p-l*h)*g;return m.set(1-v-y,y,v)}}(),n.Triangle.containsPoint=function(){var e=new n.Vector3;return function(t,i,r,o){var a=n.Triangle.barycoordFromPoint(t,i,r,o,e);return a.x>=0&&a.y>=0&&a.x+a.y<=1}}(),n.Triangle.prototype={constructor:n.Triangle,set:function(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this},setFromPointsAndIndices:function(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},area:function(){var e=new n.Vector3,t=new n.Vector3;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),midpoint:function(e){var t=e||new n.Vector3;return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(e){return n.Triangle.normal(this.a,this.b,this.c,e)},plane:function(e){var t=e||new n.Plane;return t.setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(e,t){return n.Triangle.barycoordFromPoint(e,this.a,this.b,this.c,t)},containsPoint:function(e){return n.Triangle.containsPoint(e,this.a,this.b,this.c)},closestPointToPoint:function(){var e,t,i,r;return function(o,a){void 0===e&&(e=new n.Plane,t=[new n.Line3,new n.Line3,new n.Line3],i=new n.Vector3,r=new n.Vector3);var s=a||new n.Vector3,c=1/0;if(e.setFromCoplanarPoints(this.a,this.b,this.c),e.projectPoint(o,i),this.containsPoint(i)===!0)s.copy(i);else{t[0].set(this.a,this.b),t[1].set(this.b,this.c),t[2].set(this.c,this.a);for(var u=0;u<t.length;u++){t[u].closestPointToPoint(i,!0,r);var l=i.distanceToSquared(r);l<c&&(c=l,s.copy(r))}}return s}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},n.Interpolant=function(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i},n.Interpolant.prototype={constructor:n.Interpolant,evaluate:function(e){var t=this.parameterPositions,i=this._cachedIndex,r=t[i],n=t[i-1];e:{t:{var o;i:{r:if(!(e<r)){for(var a=i+2;;){if(void 0===r){if(e<n)break r;return i=t.length,this._cachedIndex=i,this.afterEnd_(i-1,e,n)}if(i===a)break;if(n=r,r=t[++i],e<r)break t}o=t.length;break i}{if(e>=n)break e;var s=t[1];e<s&&(i=2,n=s);for(var a=i-2;;){if(void 0===n)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(i===a)break;if(r=n,n=t[--i-1],e>=n)break t}o=i,i=0}}for(;i<o;){var c=i+o>>>1;e<t[c]?o=c:i=c+1}if(r=t[i],n=t[i-1],void 0===n)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return i=t.length,this._cachedIndex=i,this.afterEnd_(i-1,n,e)}this._cachedIndex=i,this.intervalChanged_(i,n,r)}return this.interpolate_(i,n,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,n=e*r,o=0;o!==r;++o)t[o]=i[n+o];return t},interpolate_:function(e,t,i,r){throw new Error("call to abstract method")},intervalChanged_:function(e,t,i){}},Object.assign(n.Interpolant.prototype,{beforeStart_:n.Interpolant.prototype.copySampleValue_,afterEnd_:n.Interpolant.prototype.copySampleValue_}),n.CubicInterpolant=function(e,t,i,r){n.Interpolant.call(this,e,t,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0},n.CubicInterpolant.prototype=Object.assign(Object.create(n.Interpolant.prototype),{constructor:n.CubicInterpolant,DefaultSettings_:{endingStart:n.ZeroCurvatureEnding,endingEnd:n.ZeroCurvatureEnding},intervalChanged_:function(e,t,i){var r=this.parameterPositions,o=e-2,a=e+1,s=r[o],c=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case n.ZeroSlopeEnding:o=e,s=2*t-i;break;case n.WrapAroundEnding:o=r.length-2,s=t+r[o]-r[o+1];break;default:o=e,s=i}if(void 0===c)switch(this.getSettings_().endingEnd){case n.ZeroSlopeEnding:a=e,c=2*i-t;break;case n.WrapAroundEnding:a=1,c=i+r[1]-r[0];break;default:a=e-1,c=t}var u=.5*(i-t),l=this.valueSize;this._weightPrev=u/(t-s),this._weightNext=u/(c-i),this._offsetPrev=o*l,this._offsetNext=a*l},interpolate_:function(e,t,i,r){for(var n=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(i-t)/(r-t),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,v=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,M=d*m-d*f,A=0;A!==a;++A)n[A]=g*o[u+A]+v*o[c+A]+y*o[s+A]+M*o[l+A];return n}}),n.DiscreteInterpolant=function(e,t,i,r){n.Interpolant.call(this,e,t,i,r)},n.DiscreteInterpolant.prototype=Object.assign(Object.create(n.Interpolant.prototype),{constructor:n.DiscreteInterpolant,interpolate_:function(e,t,i,r){return this.copySampleValue_(e-1)}}),n.LinearInterpolant=function(e,t,i,r){n.Interpolant.call(this,e,t,i,r)},n.LinearInterpolant.prototype=Object.assign(Object.create(n.Interpolant.prototype),{constructor:n.LinearInterpolant,interpolate_:function(e,t,i,r){for(var n=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,u=(i-t)/(r-t),l=1-u,h=0;h!==a;++h)n[h]=o[c+h]*l+o[s+h]*u;return n}}),n.QuaternionLinearInterpolant=function(e,t,i,r){n.Interpolant.call(this,e,t,i,r)},n.QuaternionLinearInterpolant.prototype=Object.assign(Object.create(n.Interpolant.prototype),{constructor:n.QuaternionLinearInterpolant,interpolate_:function(e,t,i,r){for(var o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,c=e*s,u=(i-t)/(r-t),l=c+s;c!==l;c+=4)n.Quaternion.slerpFlat(o,0,a,c-s,a,c,u);return o}}),n.Clock=function(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1},n.Clock.prototype={constructor:n.Clock,start:function(){this.startTime=(performance||Date).now(),this.oldTime=this.startTime,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running&&this.start(),this.running){var t=(performance||Date).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}},n.EventDispatcher=function(){},n.EventDispatcher.prototype={constructor:n.EventDispatcher,apply:function(e){e.addEventListener=n.EventDispatcher.prototype.addEventListener,e.hasEventListener=n.EventDispatcher.prototype.hasEventListener,e.removeEventListener=n.EventDispatcher.prototype.removeEventListener,e.dispatchEvent=n.EventDispatcher.prototype.dispatchEvent},addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[e]&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[e]&&i[e].indexOf(t)!==-1},removeEventListener:function(e,t){if(void 0!==this._listeners){var i=this._listeners,r=i[e];if(void 0!==r){var n=r.indexOf(t);n!==-1&&r.splice(n,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,i=t[e.type];if(void 0!==i){e.target=this;for(var r=[],n=i.length,o=0;o<n;o++)r[o]=i[o];for(var o=0;o<n;o++)r[o].call(this,e)}}}},n.Layers=function(){this.mask=1},n.Layers.prototype={constructor:n.Layers,set:function(e){this.mask=1<<e},enable:function(e){this.mask|=1<<e},toggle:function(e){this.mask^=1<<e},disable:function(e){this.mask&=~(1<<e)},test:function(e){return 0!==(this.mask&e.mask)}},function(e){function t(e,t){return e.distance-t.distance}function i(e,t,r,n){if(e.visible!==!1&&(e.raycast(t,r),n===!0))for(var o=e.children,a=0,s=o.length;a<s;a++)i(o[a],t,r,!0)}e.Raycaster=function(t,i,r,n){this.ray=new e.Ray(t,i),this.near=r||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})},e.Raycaster.prototype={constructor:e.Raycaster,linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(t,i){i instanceof e.PerspectiveCamera?(this.ray.origin.setFromMatrixPosition(i.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(i).sub(this.ray.origin).normalize()):i instanceof e.OrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(i),this.ray.direction.set(0,0,-1).transformDirection(i.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,r){var n=[];return i(e,this,n,r),n.sort(t),n},intersectObjects:function(e,r){var n=[];if(Array.isArray(e)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var o=0,a=e.length;o<a;o++)i(e[o],this,n,r);return n.sort(t),n}}}(n),n.Object3D=function(){function e(){o.setFromEuler(r,!1)}function t(){r.setFromQuaternion(o,void 0,!1)}Object.defineProperty(this,"id",{value:n.Object3DIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.Object3D.DefaultUp.clone();var i=new n.Vector3,r=new n.Euler,o=new n.Quaternion,a=new n.Vector3(1,1,1);r.onChange(e),o.onChange(t),Object.defineProperties(this,{position:{enumerable:!0,value:i},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:o},scale:{enumerable:!0,value:a},modelViewMatrix:{value:new n.Matrix4},normalMatrix:{value:new n.Matrix3}}),this.rotationAutoUpdate=!0,this.matrix=new n.Matrix4,this.matrixWorld=new n.Matrix4,this.matrixAutoUpdate=n.Object3D.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new n.Layers,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}},n.Object3D.DefaultUp=new n.Vector3(0,1,0),n.Object3D.DefaultMatrixAutoUpdate=!0,n.Object3D.prototype={constructor:n.Object3D,applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(){var e=new n.Quaternion;return function(t,i){return e.setFromAxisAngle(t,i),this.quaternion.multiply(e),this}}(),rotateX:function(){var e=new n.Vector3(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new n.Vector3(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new n.Vector3(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new n.Vector3;return function(t,i){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(i)),this}}(),translateX:function(){var e=new n.Vector3(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new n.Vector3(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new n.Vector3(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var e=new n.Matrix4;return function(t){return t.applyMatrix4(e.getInverse(this.matrixWorld))}}(),lookAt:function(){var e=new n.Matrix4;return function(t){e.lookAt(t,this.position,this.up),this.quaternion.setFromRotationMatrix(e)}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e instanceof n.Object3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1)for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);var i=this.children.indexOf(e);i!==-1&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(i,1))},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var i=0,r=this.children.length;i<r;i++){var n=this.children[i],o=n.getObjectByProperty(e,t);if(void 0!==o)return o}},getWorldPosition:function(e){var t=e||new n.Vector3;return this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var e=new n.Vector3,t=new n.Vector3;return function(i){var r=i||new n.Quaternion;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,r,t),r}}(),getWorldRotation:function(){var e=new n.Quaternion;return function(t){var i=t||new n.Euler;return this.getWorldQuaternion(e),i.setFromQuaternion(e,this.rotation.order,!1)}}(),getWorldScale:function(){var e=new n.Vector3,t=new n.Quaternion;return function(i){var r=i||new n.Vector3;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,r),r}}(),getWorldDirection:function(){var e=new n.Quaternion;return function(t){var i=t||new n.Vector3;return this.getWorldQuaternion(e),i.set(0,0,1).applyQuaternion(e)}}(),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,i=0,r=t.length;i<r;i++)t[i].traverse(e)},traverseVisible:function(e){if(this.visible!==!1){e(this);for(var t=this.children,i=0,r=t.length;i<r;i++)t[i].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate===!0&&this.updateMatrix(),this.matrixWorldNeedsUpdate!==!0&&e!==!0||(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=0,i=this.children.length;t<i;t++)this.children[t].updateMatrixWorld(e)},toJSON:function(e){function t(e){var t=[];for(var i in e){var r=e[i];delete r.metadata,t.push(r)}return t}var i=void 0===e||""===e,r={};i&&(e={geometries:{},materials:{},textures:{},images:{}},r.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var n={};if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),n.matrix=this.matrix.toArray(),void 0!==this.geometry&&(void 0===e.geometries[this.geometry.uuid]&&(e.geometries[this.geometry.uuid]=this.geometry.toJSON(e)),n.geometry=this.geometry.uuid),void 0!==this.material&&(void 0===e.materials[this.material.uuid]&&(e.materials[this.material.uuid]=this.material.toJSON(e)),n.material=this.material.uuid),this.children.length>0){n.children=[];for(var o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(i){var a=t(e.geometries),s=t(e.materials),c=t(e.textures),u=t(e.images);a.length>0&&(r.geometries=a),s.length>0&&(r.materials=s),c.length>0&&(r.textures=c),u.length>0&&(r.images=u)}return r.object=n,r},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.rotationAutoUpdate=e.rotationAutoUpdate,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(var i=0;i<e.children.length;i++){var r=e.children[i];this.add(r.clone())}return this}},n.EventDispatcher.prototype.apply(n.Object3D.prototype),n.Object3DIdCount=0,n.Face3=function(e,t,i,r,o,a){this.a=e,this.b=t,this.c=i,this.normal=r instanceof n.Vector3?r:new n.Vector3,this.vertexNormals=Array.isArray(r)?r:[],this.color=o instanceof n.Color?o:new n.Color,this.vertexColors=Array.isArray(o)?o:[],this.materialIndex=void 0!==a?a:0},n.Face3.prototype={constructor:n.Face3,clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,i=e.vertexNormals.length;t<i;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var t=0,i=e.vertexColors.length;t<i;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}},n.BufferAttribute=function(e,t,i){this.uuid=n.Math.generateUUID(),this.array=e,this.itemSize=t,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0,this.normalized=i===!0},n.BufferAttribute.prototype={constructor:n.BufferAttribute,get count(){return this.array.length/this.itemSize},set needsUpdate(e){e===!0&&this.version++},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.dynamic=e.dynamic,this},copyAt:function(e,t,i){e*=this.itemSize,i*=t.itemSize;for(var r=0,n=this.itemSize;r<n;r++)this.array[e+r]=t.array[i+r]; return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,i=0,r=0,o=e.length;r<o;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),a=new n.Color),t[i++]=a.r,t[i++]=a.g,t[i++]=a.b}return this},copyIndicesArray:function(e){for(var t=this.array,i=0,r=0,n=e.length;r<n;r++){var o=e[r];t[i++]=o.a,t[i++]=o.b,t[i++]=o.c}return this},copyVector2sArray:function(e){for(var t=this.array,i=0,r=0,o=e.length;r<o;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new n.Vector2),t[i++]=a.x,t[i++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,i=0,r=0,o=e.length;r<o;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),a=new n.Vector3),t[i++]=a.x,t[i++]=a.y,t[i++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,i=0,r=0,o=e.length;r<o;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),a=new n.Vector4),t[i++]=a.x,t[i++]=a.y,t[i++]=a.z,t[i++]=a.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this},setXYZ:function(e,t,i,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this},setXYZW:function(e,t,i,r,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=n,this},clone:function(){return(new this.constructor).copy(this)}},n.Int8Attribute=function(e,t){return new n.BufferAttribute(new Int8Array(e),t)},n.Uint8Attribute=function(e,t){return new n.BufferAttribute(new Uint8Array(e),t)},n.Uint8ClampedAttribute=function(e,t){return new n.BufferAttribute(new Uint8ClampedArray(e),t)},n.Int16Attribute=function(e,t){return new n.BufferAttribute(new Int16Array(e),t)},n.Uint16Attribute=function(e,t){return new n.BufferAttribute(new Uint16Array(e),t)},n.Int32Attribute=function(e,t){return new n.BufferAttribute(new Int32Array(e),t)},n.Uint32Attribute=function(e,t){return new n.BufferAttribute(new Uint32Array(e),t)},n.Float32Attribute=function(e,t){return new n.BufferAttribute(new Float32Array(e),t)},n.Float64Attribute=function(e,t){return new n.BufferAttribute(new Float64Array(e),t)},n.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new n.BufferAttribute(e,t).setDynamic(!0)},n.InstancedBufferAttribute=function(e,t,i){n.BufferAttribute.call(this,e,t),this.meshPerAttribute=i||1},n.InstancedBufferAttribute.prototype=Object.create(n.BufferAttribute.prototype),n.InstancedBufferAttribute.prototype.constructor=n.InstancedBufferAttribute,n.InstancedBufferAttribute.prototype.copy=function(e){return n.BufferAttribute.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},n.InterleavedBuffer=function(e,t){this.uuid=n.Math.generateUUID(),this.array=e,this.stride=t,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0},n.InterleavedBuffer.prototype={constructor:n.InterleavedBuffer,get length(){return this.array.length},get count(){return this.array.length/this.stride},set needsUpdate(e){e===!0&&this.version++},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,i){e*=this.stride,i*=t.stride;for(var r=0,n=this.stride;r<n;r++)this.array[e+r]=t.array[i+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)}},n.InstancedInterleavedBuffer=function(e,t,i){n.InterleavedBuffer.call(this,e,t),this.meshPerAttribute=i||1},n.InstancedInterleavedBuffer.prototype=Object.create(n.InterleavedBuffer.prototype),n.InstancedInterleavedBuffer.prototype.constructor=n.InstancedInterleavedBuffer,n.InstancedInterleavedBuffer.prototype.copy=function(e){return n.InterleavedBuffer.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},n.InterleavedBufferAttribute=function(e,t,i){this.uuid=n.Math.generateUUID(),this.data=e,this.itemSize=t,this.offset=i},n.InterleavedBufferAttribute.prototype={constructor:n.InterleavedBufferAttribute,get length(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length},get count(){return this.data.count},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this},setXYZ:function(e,t,i,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this},setXYZW:function(e,t,i,r,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=n,this}},n.Geometry=function(){Object.defineProperty(this,"id",{value:n.GeometryIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.elementsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1},n.Geometry.prototype={constructor:n.Geometry,applyMatrix:function(e){for(var t=(new n.Matrix3).getNormalMatrix(e),i=0,r=this.vertices.length;i<r;i++){var o=this.vertices[i];o.applyMatrix4(e)}for(var i=0,r=this.faces.length;i<r;i++){var a=this.faces[i];a.normal.applyMatrix3(t).normalize();for(var s=0,c=a.vertexNormals.length;s<c;s++)a.vertexNormals[s].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e;return function(t,i,r){return void 0===e&&(e=new n.Matrix4),e.makeTranslation(t,i,r),this.applyMatrix(e),this}}(),scale:function(){var e;return function(t,i,r){return void 0===e&&(e=new n.Matrix4),e.makeScale(t,i,r),this.applyMatrix(e),this}}(),lookAt:function(){var e;return function(t){void 0===e&&(e=new n.Object3D),e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),fromBufferGeometry:function(e){function t(e,t,r,o){var a=void 0!==s?[h[e].clone(),h[t].clone(),h[r].clone()]:[],f=void 0!==c?[i.colors[e].clone(),i.colors[t].clone(),i.colors[r].clone()]:[],m=new n.Face3(e,t,r,a,f,o);i.faces.push(m),void 0!==u&&i.faceVertexUvs[0].push([d[e].clone(),d[t].clone(),d[r].clone()]),void 0!==l&&i.faceVertexUvs[1].push([p[e].clone(),p[t].clone(),p[r].clone()])}var i=this,r=null!==e.index?e.index.array:void 0,o=e.attributes,a=o.position.array,s=void 0!==o.normal?o.normal.array:void 0,c=void 0!==o.color?o.color.array:void 0,u=void 0!==o.uv?o.uv.array:void 0,l=void 0!==o.uv2?o.uv2.array:void 0;void 0!==l&&(this.faceVertexUvs[1]=[]);for(var h=[],d=[],p=[],f=0,m=0;f<a.length;f+=3,m+=2)i.vertices.push(new n.Vector3(a[f],a[f+1],a[f+2])),void 0!==s&&h.push(new n.Vector3(s[f],s[f+1],s[f+2])),void 0!==c&&i.colors.push(new n.Color(c[f],c[f+1],c[f+2])),void 0!==u&&d.push(new n.Vector2(u[m],u[m+1])),void 0!==l&&p.push(new n.Vector2(l[m],l[m+1]));if(void 0!==r){var g=e.groups;if(g.length>0)for(var f=0;f<g.length;f++)for(var v=g[f],y=v.start,M=v.count,m=y,A=y+M;m<A;m+=3)t(r[m],r[m+1],r[m+2],v.materialIndex);else for(var f=0;f<r.length;f+=3)t(r[f],r[f+1],r[f+2])}else for(var f=0;f<a.length/3;f+=3)t(f,f+1,f+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var e=this.boundingBox.center().negate();return this.translate(e.x,e.y,e.z),e},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,i=0===t?1:1/t,r=new n.Matrix4;return r.set(i,0,0,-i*e.x,0,i,0,-i*e.y,0,0,i,-i*e.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var e=new n.Vector3,t=new n.Vector3,i=0,r=this.faces.length;i<r;i++){var o=this.faces[i],a=this.vertices[o.a],s=this.vertices[o.b],c=this.vertices[o.c];e.subVectors(c,s),t.subVectors(a,s),e.cross(t),e.normalize(),o.normal.copy(e)}},computeVertexNormals:function(e){void 0===e&&(e=!0);var t,i,r,o,a,s;for(s=new Array(this.vertices.length),t=0,i=this.vertices.length;t<i;t++)s[t]=new n.Vector3;if(e){var c,u,l,h=new n.Vector3,d=new n.Vector3;for(r=0,o=this.faces.length;r<o;r++)a=this.faces[r],c=this.vertices[a.a],u=this.vertices[a.b],l=this.vertices[a.c],h.subVectors(l,u),d.subVectors(c,u),h.cross(d),s[a.a].add(h),s[a.b].add(h),s[a.c].add(h)}else for(r=0,o=this.faces.length;r<o;r++)a=this.faces[r],s[a.a].add(a.normal),s[a.b].add(a.normal),s[a.c].add(a.normal);for(t=0,i=this.vertices.length;t<i;t++)s[t].normalize();for(r=0,o=this.faces.length;r<o;r++){a=this.faces[r];var p=a.vertexNormals;3===p.length?(p[0].copy(s[a.a]),p[1].copy(s[a.b]),p[2].copy(s[a.c])):(p[0]=s[a.a].clone(),p[1]=s[a.b].clone(),p[2]=s[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,i,r,o;for(i=0,r=this.faces.length;i<r;i++)for(o=this.faces[i],o.__originalFaceNormal?o.__originalFaceNormal.copy(o.normal):o.__originalFaceNormal=o.normal.clone(),o.__originalVertexNormals||(o.__originalVertexNormals=[]),e=0,t=o.vertexNormals.length;e<t;e++)o.__originalVertexNormals[e]?o.__originalVertexNormals[e].copy(o.vertexNormals[e]):o.__originalVertexNormals[e]=o.vertexNormals[e].clone();var a=new n.Geometry;for(a.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var s,c,u=this.morphNormals[e].faceNormals,l=this.morphNormals[e].vertexNormals;for(i=0,r=this.faces.length;i<r;i++)s=new n.Vector3,c={a:new n.Vector3,b:new n.Vector3,c:new n.Vector3},u.push(s),l.push(c)}var h=this.morphNormals[e];a.vertices=this.morphTargets[e].vertices,a.computeFaceNormals(),a.computeVertexNormals();var s,c;for(i=0,r=this.faces.length;i<r;i++)o=this.faces[i],s=h.faceNormals[i],c=h.vertexNormals[i],s.copy(o.normal),c.a.copy(o.vertexNormals[0]),c.b.copy(o.vertexNormals[1]),c.c.copy(o.vertexNormals[2])}for(i=0,r=this.faces.length;i<r;i++)o=this.faces[i],o.normal=o.__originalFaceNormal,o.vertexNormals=o.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){for(var e=0,t=this.vertices,i=0,r=t.length;i<r;i++)i>0&&(e+=t[i].distanceTo(t[i-1])),this.lineDistances[i]=e},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new n.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new n.Sphere),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,i){if(e instanceof n.Geometry==!1)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e);var r,o=this.vertices.length,a=this.vertices,s=e.vertices,c=this.faces,u=e.faces,l=this.faceVertexUvs[0],h=e.faceVertexUvs[0];void 0===i&&(i=0),void 0!==t&&(r=(new n.Matrix3).getNormalMatrix(t));for(var d=0,p=s.length;d<p;d++){var f=s[d],m=f.clone();void 0!==t&&m.applyMatrix4(t),a.push(m)}for(d=0,p=u.length;d<p;d++){var g,v,y,M=u[d],A=M.vertexNormals,x=M.vertexColors;g=new n.Face3(M.a+o,M.b+o,M.c+o),g.normal.copy(M.normal),void 0!==r&&g.normal.applyMatrix3(r).normalize();for(var w=0,E=A.length;w<E;w++)v=A[w].clone(),void 0!==r&&v.applyMatrix3(r).normalize(),g.vertexNormals.push(v);g.color.copy(M.color);for(var w=0,E=x.length;w<E;w++)y=x[w],g.vertexColors.push(y.clone());g.materialIndex=M.materialIndex+i,c.push(g)}for(d=0,p=h.length;d<p;d++){var b=h[d],T=[];if(void 0!==b){for(var w=0,E=b.length;w<E;w++)T.push(b[w].clone());l.push(T)}}},mergeMesh:function(e){return e instanceof n.Mesh==!1?void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e):(e.matrixAutoUpdate&&e.updateMatrix(),void this.merge(e.geometry,e.matrix))},mergeVertices:function(){var e,t,i,r,n,o,a,s,c={},u=[],l=[],h=4,d=Math.pow(10,h);for(i=0,r=this.vertices.length;i<r;i++)e=this.vertices[i],t=Math.round(e.x*d)+"_"+Math.round(e.y*d)+"_"+Math.round(e.z*d),void 0===c[t]?(c[t]=i,u.push(this.vertices[i]),l[i]=u.length-1):l[i]=l[c[t]];var p=[];for(i=0,r=this.faces.length;i<r;i++){n=this.faces[i],n.a=l[n.a],n.b=l[n.b],n.c=l[n.c],o=[n.a,n.b,n.c];for(var f=-1,m=0;m<3;m++)if(o[m]===o[(m+1)%3]){f=m,p.push(i);break}}for(i=p.length-1;i>=0;i--){var g=p[i];for(this.faces.splice(g,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(g,1)}var v=this.vertices.length-u.length;return this.vertices=u,v},sortFacesByMaterialIndex:function(){function e(e,t){return e.materialIndex-t.materialIndex}for(var t=this.faces,i=t.length,r=0;r<i;r++)t[r]._id=r;t.sort(e);var n,o,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===i&&(n=[]),s&&s.length===i&&(o=[]);for(var r=0;r<i;r++){var c=t[r]._id;n&&n.push(a[c]),o&&o.push(s[c])}n&&(this.faceVertexUvs[0]=n),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function e(e,t,i){return i?e|1<<t:e&~(1<<t)}function t(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==d[t]?d[t]:(d[t]=h.length/3,h.push(e.x,e.y,e.z),d[t])}function i(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==f[t]?f[t]:(f[t]=p.length,p.push(e.getHex()),f[t])}function r(e){var t=e.x.toString()+e.y.toString();return void 0!==g[t]?g[t]:(g[t]=m.length/2,m.push(e.x,e.y),g[t])}var n={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(n[a]=o[a]);return n}for(var s=[],c=0;c<this.vertices.length;c++){var u=this.vertices[c];s.push(u.x,u.y,u.z)}for(var l=[],h=[],d={},p=[],f={},m=[],g={},c=0;c<this.faces.length;c++){var v=this.faces[c],y=!0,M=!1,A=void 0!==this.faceVertexUvs[0][c],x=v.normal.length()>0,w=v.vertexNormals.length>0,E=1!==v.color.r||1!==v.color.g||1!==v.color.b,b=v.vertexColors.length>0,T=0;if(T=e(T,0,0),T=e(T,1,y),T=e(T,2,M),T=e(T,3,A),T=e(T,4,x),T=e(T,5,w),T=e(T,6,E),T=e(T,7,b),l.push(T),l.push(v.a,v.b,v.c),l.push(v.materialIndex),A){var L=this.faceVertexUvs[0][c];l.push(r(L[0]),r(L[1]),r(L[2]))}if(x&&l.push(t(v.normal)),w){var D=v.vertexNormals;l.push(t(D[0]),t(D[1]),t(D[2]))}if(E&&l.push(i(v.color)),b){var N=v.vertexColors;l.push(i(N[0]),i(N[1]),i(N[2]))}}return n.data={},n.data.vertices=s,n.data.normals=h,p.length>0&&(n.data.colors=p),m.length>0&&(n.data.uvs=[m]),n.data.faces=l,n},clone:function(){return(new n.Geometry).copy(this)},copy:function(e){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]];for(var t=e.vertices,i=0,r=t.length;i<r;i++)this.vertices.push(t[i].clone());for(var n=e.faces,i=0,r=n.length;i<r;i++)this.faces.push(n[i].clone());for(var i=0,r=e.faceVertexUvs.length;i<r;i++){var o=e.faceVertexUvs[i];void 0===this.faceVertexUvs[i]&&(this.faceVertexUvs[i]=[]);for(var a=0,s=o.length;a<s;a++){for(var c=o[a],u=[],l=0,h=c.length;l<h;l++){var d=c[l];u.push(d.clone())}this.faceVertexUvs[i].push(u)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}},n.EventDispatcher.prototype.apply(n.Geometry.prototype),n.GeometryIdCount=0,n.DirectGeometry=function(){Object.defineProperty(this,"id",{value:n.GeometryIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.type="DirectGeometry",this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1},n.DirectGeometry.prototype={constructor:n.DirectGeometry,computeBoundingBox:n.Geometry.prototype.computeBoundingBox,computeBoundingSphere:n.Geometry.prototype.computeBoundingSphere,computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(e){for(var t,i,r=[],n=e.faces,o=0;o<n.length;o++){var a=n[o];a.materialIndex!==i&&(i=a.materialIndex,void 0!==t&&(t.count=3*o-t.start,r.push(t)),t={start:3*o,materialIndex:i})}void 0!==t&&(t.count=3*o-t.start,r.push(t)),this.groups=r},fromGeometry:function(e){var t,i=e.faces,r=e.vertices,o=e.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,c=e.morphTargets,u=c.length;if(u>0){t=[];for(var l=0;l<u;l++)t[l]=[];this.morphTargets.position=t}var h,d=e.morphNormals,p=d.length;if(p>0){h=[];for(var l=0;l<p;l++)h[l]=[];this.morphTargets.normal=h}for(var f=e.skinIndices,m=e.skinWeights,g=f.length===r.length,v=m.length===r.length,l=0;l<i.length;l++){var y=i[l];this.vertices.push(r[y.a],r[y.b],r[y.c]);var M=y.vertexNormals;if(3===M.length)this.normals.push(M[0],M[1],M[2]);else{var A=y.normal;this.normals.push(A,A,A)}var x=y.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=y.color;this.colors.push(w,w,w)}if(a===!0){var E=o[0][l];void 0!==E?this.uvs.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new n.Vector2,new n.Vector2,new n.Vector2))}if(s===!0){var E=o[1][l];void 0!==E?this.uvs2.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new n.Vector2,new n.Vector2,new n.Vector2))}for(var b=0;b<u;b++){var T=c[b].vertices;t[b].push(T[y.a],T[y.b],T[y.c])}for(var b=0;b<p;b++){var L=d[b].vertexNormals[l];h[b].push(L.a,L.b,L.c)}g&&this.skinIndices.push(f[y.a],f[y.b],f[y.c]),v&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}},n.EventDispatcher.prototype.apply(n.DirectGeometry.prototype),n.BufferGeometry=function(){Object.defineProperty(this,"id",{value:n.GeometryIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}},n.BufferGeometry.prototype={constructor:n.BufferGeometry,getIndex:function(){return this.index},setIndex:function(e){this.index=e},addAttribute:function(e,t){return t instanceof n.BufferAttribute==!1&&t instanceof n.InterleavedBufferAttribute==!1?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(e,new n.BufferAttribute(arguments[1],arguments[2]))):"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(t)):(this.attributes[e]=t,this)},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,i){this.groups.push({start:e,count:t,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToVector3Array(t.array),t.needsUpdate=!0);var i=this.attributes.normal;if(void 0!==i){var r=(new n.Matrix3).getNormalMatrix(e);r.applyToVector3Array(i.array),i.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e;return function(t){return void 0===e&&(e=new n.Matrix4),e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e;return function(t,i,r){return void 0===e&&(e=new n.Matrix4),e.makeTranslation(t,i,r),this.applyMatrix(e),this}}(),scale:function(){var e;return function(t,i,r){return void 0===e&&(e=new n.Matrix4),e.makeScale(t,i,r),this.applyMatrix(e),this}}(),lookAt:function(){var e;return function(t){void 0===e&&(e=new n.Object3D),e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){this.computeBoundingBox();var e=this.boundingBox.center().negate();return this.translate(e.x,e.y,e.z),e},setFromObject:function(e){var t=e.geometry;if(e instanceof n.Points||e instanceof n.Line){var i=new n.Float32Attribute(3*t.vertices.length,3),r=new n.Float32Attribute(3*t.colors.length,3);if(this.addAttribute("position",i.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var o=new n.Float32Attribute(t.lineDistances.length,1);this.addAttribute("lineDistance",o.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e instanceof n.Mesh&&t instanceof n.Geometry&&this.fromGeometry(t);return this},updateFromObject:function(e){var t=e.geometry;if(e instanceof n.Mesh){var i=t.__directGeometry;if(void 0===i)return this.fromGeometry(t);i.verticesNeedUpdate=t.verticesNeedUpdate,i.normalsNeedUpdate=t.normalsNeedUpdate,i.colorsNeedUpdate=t.colorsNeedUpdate,i.uvsNeedUpdate=t.uvsNeedUpdate,i.groupsNeedUpdate=t.groupsNeedUpdate,t.verticesNeedUpdate=!1,t.normalsNeedUpdate=!1,t.colorsNeedUpdate=!1,t.uvsNeedUpdate=!1,t.groupsNeedUpdate=!1,t=i}if(t.verticesNeedUpdate===!0){var r=this.attributes.position;void 0!==r&&(r.copyVector3sArray(t.vertices),r.needsUpdate=!0),t.verticesNeedUpdate=!1}if(t.normalsNeedUpdate===!0){var r=this.attributes.normal;void 0!==r&&(r.copyVector3sArray(t.normals),r.needsUpdate=!0),t.normalsNeedUpdate=!1}if(t.colorsNeedUpdate===!0){var r=this.attributes.color;void 0!==r&&(r.copyColorsArray(t.colors),r.needsUpdate=!0),t.colorsNeedUpdate=!1}if(t.uvsNeedUpdate){var r=this.attributes.uv;void 0!==r&&(r.copyVector2sArray(t.uvs),r.needsUpdate=!0),t.uvsNeedUpdate=!1}if(t.lineDistancesNeedUpdate){var r=this.attributes.lineDistance;void 0!==r&&(r.copyArray(t.lineDistances),r.needsUpdate=!0),t.lineDistancesNeedUpdate=!1}return t.groupsNeedUpdate&&(t.computeGroups(e.geometry),this.groups=t.groups,t.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new n.DirectGeometry).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new n.BufferAttribute(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var i=new Float32Array(3*e.normals.length);this.addAttribute("normal",new n.BufferAttribute(i,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new n.BufferAttribute(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var o=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new n.BufferAttribute(o,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new n.BufferAttribute(a,2).copyVector2sArray(e.uvs2))}if(e.indices.length>0){var s=e.vertices.length>65535?Uint32Array:Uint16Array,c=new s(3*e.indices.length);this.setIndex(new n.BufferAttribute(c,1).copyIndicesArray(e.indices))}this.groups=e.groups;for(var u in e.morphTargets){for(var l=[],h=e.morphTargets[u],d=0,p=h.length;d<p;d++){var f=h[d],m=new n.Float32Attribute(3*f.length,3);l.push(m.copyVector3sArray(f))}this.morphAttributes[u]=l}if(e.skinIndices.length>0){var g=new n.Float32Attribute(4*e.skinIndices.length,4);this.addAttribute("skinIndex",g.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var v=new n.Float32Attribute(4*e.skinWeights.length,4);this.addAttribute("skinWeight",v.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new n.Box3);var e=this.attributes.position.array;void 0!==e?this.boundingBox.setFromArray(e):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var e=new n.Box3,t=new n.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new n.Sphere);var i=this.attributes.position.array;if(i){var r=this.boundingSphere.center;e.setFromArray(i),e.center(r);for(var o=0,a=0,s=i.length;a<s;a+=3)t.fromArray(i,a),o=Math.max(o,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,i=this.groups;if(t.position){var r=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new n.BufferAttribute(new Float32Array(r.length),3));else for(var o=t.normal.array,a=0,s=o.length;a<s;a++)o[a]=0;var c,u,l,h=t.normal.array,d=new n.Vector3,p=new n.Vector3,f=new n.Vector3,m=new n.Vector3,g=new n.Vector3;if(e){var v=e.array;0===i.length&&this.addGroup(0,v.length);for(var y=0,M=i.length;y<M;++y)for(var A=i[y],x=A.start,w=A.count,a=x,s=x+w;a<s;a+=3)c=3*v[a+0],u=3*v[a+1],l=3*v[a+2],d.fromArray(r,c),p.fromArray(r,u),f.fromArray(r,l),m.subVectors(f,p),g.subVectors(d,p),m.cross(g),h[c]+=m.x,h[c+1]+=m.y,h[c+2]+=m.z,h[u]+=m.x,h[u+1]+=m.y,h[u+2]+=m.z,h[l]+=m.x,h[l+1]+=m.y,h[l+2]+=m.z}else for(var a=0,s=r.length;a<s;a+=9)d.fromArray(r,a),p.fromArray(r,a+3),f.fromArray(r,a+6),m.subVectors(f,p),g.subVectors(d,p),m.cross(g),h[a]=m.x,h[a+1]=m.y,h[a+2]=m.z,h[a+3]=m.x,h[a+4]=m.y,h[a+5]=m.z,h[a+6]=m.x,h[a+7]=m.y,h[a+8]=m.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e instanceof n.BufferGeometry==!1)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0);var i=this.attributes;for(var r in i)if(void 0!==e.attributes[r])for(var o=i[r],a=o.array,s=e.attributes[r],c=s.array,u=s.itemSize,l=0,h=u*t;l<c.length;l++,h++)a[h]=c[l];return this},normalizeNormals:function(){for(var e,t,i,r,n=this.attributes.normal.array,o=0,a=n.length;o<a;o+=3)e=n[o],t=n[o+1],i=n[o+2],r=1/Math.sqrt(e*e+t*t+i*i),n[o]*=r,n[o+1]*=r,n[o+2]*=r},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new n.BufferGeometry,t=this.index.array,i=this.attributes;for(var r in i){for(var o=i[r],a=o.array,s=o.itemSize,c=new a.constructor(t.length*s),u=0,l=0,h=0,d=t.length;h<d;h++){u=t[h]*s;for(var p=0;p<s;p++)c[l++]=a[u++]}e.addAttribute(r,new n.BufferAttribute(c,s))}return e},toJSON:function(){var e={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};var r=this.index;if(null!==r){var n=Array.prototype.slice.call(r.array);e.data.index={type:r.array.constructor.name,array:n}}var o=this.attributes;for(var i in o){var a=o[i],n=Array.prototype.slice.call(a.array);e.data.attributes[i]={itemSize:a.itemSize,type:a.array.constructor.name,array:n,normalized:a.normalized}}var s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(e.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),e},clone:function(){return(new n.BufferGeometry).copy(this)},copy:function(e){var t=e.index;null!==t&&this.setIndex(t.clone());var i=e.attributes;for(var r in i){var n=i[r];this.addAttribute(r,n.clone())}for(var o=e.groups,a=0,s=o.length;a<s;a++){var c=o[a];this.addGroup(c.start,c.count,c.materialIndex)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}},n.EventDispatcher.prototype.apply(n.BufferGeometry.prototype),n.BufferGeometry.MaxIndex=65535,n.InstancedBufferGeometry=function(){n.BufferGeometry.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0},n.InstancedBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.InstancedBufferGeometry.prototype.constructor=n.InstancedBufferGeometry,n.InstancedBufferGeometry.prototype.addGroup=function(e,t,i){this.groups.push({start:e,count:t,instances:i})},n.InstancedBufferGeometry.prototype.copy=function(e){var t=e.index;null!==t&&this.setIndex(t.clone());var i=e.attributes;for(var r in i){var n=i[r];this.addAttribute(r,n.clone())}for(var o=e.groups,a=0,s=o.length;a<s;a++){var c=o[a];this.addGroup(c.start,c.count,c.instances)}return this},n.EventDispatcher.prototype.apply(n.InstancedBufferGeometry.prototype),n.Uniform=function(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e,this.dynamic=!1},n.Uniform.prototype={constructor:n.Uniform,onUpdate:function(e){return this.dynamic=!0,this.onUpdateCallback=e,this}},n.AnimationClip=function(e,t,i){this.name=e||n.Math.generateUUID(),this.tracks=i,this.duration=void 0!==t?t:-1,this.duration<0&&this.resetDuration(),this.trim(),this.optimize()},n.AnimationClip.prototype={constructor:n.AnimationClip,resetDuration:function(){for(var e=this.tracks,t=0,i=0,r=e.length;i!==r;++i){var n=this.tracks[i];t=Math.max(t,n.times[n.times.length-1]); }this.duration=t},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}},Object.assign(n.AnimationClip,{parse:function(e){for(var t=[],i=e.tracks,r=1/(e.fps||1),o=0,a=i.length;o!==a;++o)t.push(n.KeyframeTrack.parse(i[o]).scale(r));return new n.AnimationClip(e.name,e.duration,t)},toJSON:function(e){for(var t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t},o=0,a=i.length;o!==a;++o)t.push(n.KeyframeTrack.toJSON(i[o]));return r},CreateFromMorphTargetSequence:function(e,t,i,r){for(var o=t.length,a=[],s=0;s<o;s++){var c=[],u=[];c.push((s+o-1)%o,s,(s+1)%o),u.push(0,1,0);var l=n.AnimationUtils.getKeyframeOrder(c);c=n.AnimationUtils.sortedArray(c,1,l),u=n.AnimationUtils.sortedArray(u,1,l),r||0!==c[0]||(c.push(o),u.push(u[0])),a.push(new n.NumberKeyframeTrack(".morphTargetInfluences["+t[s].name+"]",c,u).scale(1/i))}return new n.AnimationClip(e,(-1),a)},findByName:function(e,t){for(var i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,i){for(var r={},o=/^([\w-]*?)([\d]+)$/,a=0,s=e.length;a<s;a++){var c=e[a],u=c.name.match(o);if(u&&u.length>1){var l=u[1],h=r[l];h||(r[l]=h=[]),h.push(c)}}var d=[];for(var l in r)d.push(n.AnimationClip.CreateFromMorphTargetSequence(l,r[l],t,i));return d},parseAnimation:function(e,t,i){if(!e)return console.error(" no animation in JSONLoader data"),null;for(var r=function(e,t,i,r,o){if(0!==i.length){var a=[],s=[];n.AnimationUtils.flattenJSON(i,a,s,r),0!==a.length&&o.push(new e(t,a,s))}},o=[],a=e.name||"default",s=e.length||-1,c=e.fps||30,u=e.hierarchy||[],l=0;l<u.length;l++){var h=u[l].keys;if(h&&0!=h.length)if(h[0].morphTargets){for(var d={},p=0;p<h.length;p++)if(h[p].morphTargets)for(var f=0;f<h[p].morphTargets.length;f++)d[h[p].morphTargets[f]]=-1;for(var m in d){for(var g=[],v=[],f=0;f!==h[p].morphTargets.length;++f){var y=h[p];g.push(y.time),v.push(y.morphTarget===m?1:0)}o.push(new n.NumberKeyframeTrack(".morphTargetInfluence["+m+"]",g,v))}s=d.length*(c||1)}else{var M=".bones["+t[l].name+"]";r(n.VectorKeyframeTrack,M+".position",h,"pos",o),r(n.QuaternionKeyframeTrack,M+".quaternion",h,"rot",o),r(n.VectorKeyframeTrack,M+".scale",h,"scl",o)}}if(0===o.length)return null;var A=new n.AnimationClip(a,s,o);return A}}),n.AnimationMixer=function(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1},n.AnimationMixer.prototype={constructor:n.AnimationMixer,clipAction:function(e,t){var i,r=t||this._root,o=r.uuid,a="string"==typeof e?e:e.name,s=e!==a?e:null,c=this._actionsByClip[a];if(void 0!==c){var u=c.actionByRoot[o];if(void 0!==u)return u;if(i=c.knownActions[0],s=i._clip,e!==a&&e!==s)throw new Error("Different clips with the same name detected!")}if(null===s)return null;var l=new n.AnimationMixer._Action(this,s,t);return this._bindAction(l,i),this._addInactiveAction(l,a,o),l},existingAction:function(e,t){var i=t||this._root,r=i.uuid,n="string"==typeof e?e:e.name,o=this._actionsByClip[n];return void 0!==o?o.actionByRoot[r]||null:null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,i=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var n=0;n!==t;++n)e[n].reset();for(var n=0;n!==r;++n)i[n].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,i=this._nActiveActions,r=this.time+=e,n=Math.sign(e),o=this._accuIndex^=1,a=0;a!==i;++a){var s=t[a];s.enabled&&s._update(r,e,n,o)}for(var c=this._bindings,u=this._nActiveBindings,a=0;a!==u;++a)c[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,i=e.name,r=this._actionsByClip,n=r[i];if(void 0!==n){for(var o=n.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=t[t.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,t[u]=l,t.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}},uncacheRoot:function(e){var t=e.uuid,i=this._actionsByClip;for(var r in i){var n=i[r].actionByRoot,o=n[t];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[t];if(void 0!==s)for(var c in s){var u=s[c];u.restoreOriginalState(),this._removeInactiveBinding(u)}},uncacheAction:function(e,t){var i=this.existingAction(e,t);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}},n.EventDispatcher.prototype.apply(n.AnimationMixer.prototype),n.AnimationMixer._Action=function(e,t,i){this._mixer=e,this._clip=t,this._localRoot=i||null;for(var r=t.tracks,o=r.length,a=new Array(o),s={endingStart:n.ZeroCurvatureEnding,endingEnd:n.ZeroCurvatureEnding},c=0;c!==o;++c){var u=r[c].createInterpolant(null);a[c]=u,u.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=n.LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0},n.AnimationMixer._Action.prototype={constructor:n.AnimationMixer._Action,play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){this._startTime;return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,i){this._mixer;if(e.fadeOut(t),this.fadeIn(t),i){var r=this._clip.duration,n=e._clip.duration,o=n/r,a=r/n;e.warp(1,o,t),this.warp(a,1,t)}return this},crossFadeTo:function(e,t,i){return e.crossFadeFrom(this,t,i)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._currentTimeScale,0,e)},warp:function(e,t,i){var r=this._mixer,n=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=n,s[1]=n+i,c[0]=e/a,c[1]=t/a,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,i,r){var n=this._startTime;if(null!==n){var o=(e-n)*i;if(o<0||0===i)return;this._startTime=null,t=i*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var i=this._weightInterpolant;if(null!==i){var r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i){var r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.pause=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e;if(0===e)return t;var i=this._clip.duration,r=this.loop,o=this._loopCount,a=!1;switch(r){case n.LoopOnce:if(o===-1&&(this.loopCount=0,this._setEndings(!0,!0,!1)),t>=i)t=i;else{if(!(t<0))break;t=0}this.clampWhenFinished?this.pause=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1});break;case n.LoopPingPong:a=!0;case n.LoopRepeat:if(o===-1&&(e>0?(o=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=i||t<0){var s=Math.floor(t/i);t-=i*s,o+=Math.abs(s);var c=this.repetitions-o;if(c<0){this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});break}if(0===c){var u=e<0;this._setEndings(u,!u,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}if(r===n.LoopPingPong&&1===(1&o))return this.time=t,i-t}return this.time=t,t},_setEndings:function(e,t,i){var r=this._interpolantSettings;i?(r.endingStart=n.ZeroSlopeEnding,r.endingEnd=n.ZeroSlopeEnding):(e?r.endingStart=this.zeroSlopeAtStart?n.ZeroSlopeEnding:n.ZeroCurvatureEnding:r.endingStart=n.WrapAroundEnding,t?r.endingEnd=this.zeroSlopeAtEnd?n.ZeroSlopeEnding:n.ZeroCurvatureEnding:r.endingEnd=n.WrapAroundEnding)},_scheduleFading:function(e,t,i){var r=this._mixer,n=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=n,s[0]=t,a[1]=n+e,s[1]=i,this}},Object.assign(n.AnimationMixer.prototype,{_bindAction:function(e,t){var i=e._localRoot||this._root,r=e._clip.tracks,o=r.length,a=e._propertyBindings,s=e._interpolants,c=i.uuid,u=this._bindingsByRootAndName,l=u[c];void 0===l&&(l={},u[c]=l);for(var h=0;h!==o;++h){var d=r[h],p=d.name,f=l[p];if(void 0!==f)a[h]=f;else{if(f=a[h],void 0!==f){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,c,p));continue}var m=t&&t._propertyBindings[h].binding.parsedPath;f=new n.PropertyMixer(n.PropertyBinding.create(i,p,m),d.ValueTypeName,d.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,c,p),a[h]=f}s[h].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,i=e._clip.name,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,t)}for(var n=e._propertyBindings,o=0,a=n.length;o!==a;++o){var s=n[o];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,i=0,r=t.length;i!==r;++i){var n=t[i];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,i){var r=this._actions,n=this._actionsByClip,o=n[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,n[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[i]=e},_removeInactiveAction:function(e){var t=this._actions,i=t[t.length-1],r=e._cacheIndex;i._cacheIndex=r,t[r]=i,t.pop(),e._cacheIndex=null;var n=e._clip.name,o=this._actionsByClip,a=o[n],s=a.knownActions,c=s[s.length-1],u=e._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),e._byClipCacheIndex=null;var l=a.actionByRoot,h=(t._localRoot||this._root).uuid;delete l[h],0===s.length&&delete o[n],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,i=0,r=t.length;i!==r;++i){var n=t[i];0===--n.referenceCount&&this._removeInactiveBinding(n)}},_lendAction:function(e){var t=this._actions,i=e._cacheIndex,r=this._nActiveActions++,n=t[r];e._cacheIndex=r,t[r]=e,n._cacheIndex=i,t[i]=n},_takeBackAction:function(e){var t=this._actions,i=e._cacheIndex,r=--this._nActiveActions,n=t[r];e._cacheIndex=r,t[r]=e,n._cacheIndex=i,t[i]=n},_addInactiveBinding:function(e,t,i){var r=this._bindingsByRootAndName,n=r[t],o=this._bindings;void 0===n&&(n={},r[t]=n),n[i]=e,e._cacheIndex=o.length,o.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,i=e.binding,r=i.rootNode.uuid,n=i.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],c=e._cacheIndex;s._cacheIndex=c,t[c]=s,t.pop(),delete a[n];e:{for(var u in a)break e;delete o[r]}},_lendBinding:function(e){var t=this._bindings,i=e._cacheIndex,r=this._nActiveBindings++,n=t[r];e._cacheIndex=r,t[r]=e,n._cacheIndex=i,t[i]=n},_takeBackBinding:function(e){var t=this._bindings,i=e._cacheIndex,r=--this._nActiveBindings,n=t[r];e._cacheIndex=r,t[r]=e,n._cacheIndex=i,t[i]=n},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,i=e[t];return void 0===i&&(i=new n.LinearInterpolant(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=t,e[t]=i),i},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,i=e.__cacheIndex,r=--this._nActiveControlInterpolants,n=t[r];e.__cacheIndex=r,t[r]=e,n.__cacheIndex=i,t[i]=n},_controlInterpolantsResultBuffer:new Float32Array(1)}),n.AnimationObjectGroup=function(e){this.uuid=n.Math.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var i=0,r=arguments.length;i!==r;++i)t[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var o=this;this.stats={objects:{get total(){return o._objects.length},get inUse(){return this.total-o.nCachedObjects_}},get bindingsPerObject(){return o._bindings.length}}},n.AnimationObjectGroup.prototype={constructor:n.AnimationObjectGroup,add:function(e){for(var t=this._objects,i=t.length,r=this.nCachedObjects_,o=this._indicesByUUID,a=this._paths,s=this._parsedPaths,c=this._bindings,u=c.length,l=0,h=arguments.length;l!==h;++l){var d=arguments[l],p=d.uuid,f=o[p];if(void 0===f){f=i++,o[p]=f,t.push(d);for(var m=0,g=u;m!==g;++m)c[m].push(new n.PropertyBinding(d,a[m],s[m]))}else if(f<r){var v=t[f],y=--r,M=t[y];o[M.uuid]=f,t[f]=M,o[p]=y,t[y]=d;for(var m=0,g=u;m!==g;++m){var A=c[m],x=A[y],w=A[f];A[f]=x,void 0===w&&(w=new n.PropertyBinding(d,a[m],s[m])),A[y]=w}}else t[f]!==v&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=r},remove:function(e){for(var t=this._objects,i=(t.length,this.nCachedObjects_),r=this._indicesByUUID,n=this._bindings,o=n.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a],u=c.uuid,l=r[u];if(void 0!==l&&l>=i){var h=i++,d=t[h];r[d.uuid]=l,t[l]=d,r[u]=h,t[h]=c;for(var p=0,f=o;p!==f;++p){var m=n[p],g=m[h],v=m[l];m[l]=g,m[h]=v}}}this.nCachedObjects_=i},uncache:function(e){for(var t=this._objects,i=t.length,r=this.nCachedObjects_,n=this._indicesByUUID,o=this._bindings,a=o.length,s=0,c=arguments.length;s!==c;++s){var u=arguments[s],l=u.uuid,h=n[l];if(void 0!==h)if(delete n[l],h<r){var d=--r,p=t[d],f=--i,m=t[f];n[p.uuid]=h,t[h]=p,n[m.uuid]=d,t[d]=m,t.pop();for(var g=0,v=a;g!==v;++g){var y=o[g],M=y[d],A=y[f];y[h]=M,y[d]=A,y.pop()}}else{var f=--i,m=t[f];n[m.uuid]=h,t[h]=m,t.pop();for(var g=0,v=a;g!==v;++g){var y=o[g];y[h]=y[f],y.pop()}}}this.nCachedObjects_=r},subscribe_:function(e,t){var i=this._bindingsIndicesByPath,r=i[e],o=this._bindings;if(void 0!==r)return o[r];var a=this._paths,s=this._parsedPaths,c=this._objects,u=c.length,l=this.nCachedObjects_,h=new Array(u);r=o.length,i[e]=r,a.push(e),s.push(t),o.push(h);for(var d=l,p=c.length;d!==p;++d){var f=c[d];h[d]=new n.PropertyBinding(f,e,t)}return h},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){var r=this._paths,n=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a],c=e[a];t[c]=i,o[i]=s,o.pop(),n[i]=n[a],n.pop(),r[i]=r[a],r.pop()}}},n.AnimationUtils={arraySlice:function(e,t,i){return n.AnimationUtils.isTypedArray(e)?new e.constructor(e.subarray(t,i)):e.slice(t,i)},convertArray:function(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){function t(t,i){return e[t]-e[i]}for(var i=e.length,r=new Array(i),n=0;n!==i;++n)r[n]=n;return r.sort(t),r},sortedArray:function(e,t,i){for(var r=e.length,n=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=i[o]*t,c=0;c!==t;++c)n[a++]=e[s+c];return n},flattenJSON:function(e,t,i,r){for(var n=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[n++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a)){do a=o[r],void 0!==a&&(t.push(o.time),i.push.apply(i,a)),o=e[n++];while(void 0!==o)}else if(void 0!==a.toArray){do a=o[r],void 0!==a&&(t.push(o.time),a.toArray(i,i.length)),o=e[n++];while(void 0!==o)}else do a=o[r],void 0!==a&&(t.push(o.time),i.push(a)),o=e[n++];while(void 0!==o)}}},n.KeyframeTrack=function(e,t,i,r){if(void 0===e)throw new Error("track name is undefined");if(void 0===t||0===t.length)throw new Error("no keyframes in track named "+e);this.name=e,this.times=n.AnimationUtils.convertArray(t,this.TimeBufferType),this.values=n.AnimationUtils.convertArray(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()},n.KeyframeTrack.prototype={constructor:n.KeyframeTrack,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:n.InterpolateLinear,InterpolantFactoryMethodDiscrete:function(e){return new n.DiscreteInterpolant(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new n.LinearInterpolant(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new n.CubicInterpolant(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t=void 0;switch(e){case n.InterpolateDiscrete:t=this.InterpolantFactoryMethodDiscrete;break;case n.InterpolateLinear:t=this.InterpolantFactoryMethodLinear;break;case n.InterpolateSmooth:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return void console.warn(i)}this.createInterpolant=t},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return n.InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return n.InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return n.InterpolateSmooth}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,i=0,r=t.length;i!==r;++i)t[i]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,i=0,r=t.length;i!==r;++i)t[i]*=e;return this},trim:function(e,t){for(var i=this.times,r=i.length,o=0,a=r-1;o!==r&&i[o]<e;)++o;for(;a!==-1&&i[a]>t;)--a;if(++a,0!==o||a!==r){o>=a&&(a=Math.max(a,1),o=a-1);var s=this.getValueSize();this.times=n.AnimationUtils.arraySlice(i,o,a),this.values=n.AnimationUtils.arraySlice(this.values,o*s,a*s)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("invalid value size in track",this),e=!1);var i=this.times,r=this.values,o=i.length;0===o&&(console.error("track is empty",this),e=!1);for(var a=null,s=0;s!==o;s++){var c=i[s];if("number"==typeof c&&isNaN(c)){console.error("time is not a valid number",this,s,c),e=!1;break}if(null!==a&&a>c){console.error("out of order keys",this,s,c,a),e=!1;break}a=c}if(void 0!==r&&n.AnimationUtils.isTypedArray(r))for(var s=0,u=r.length;s!==u;++s){var l=r[s];if(isNaN(l)){console.error("value is not a valid number",this,s,l),e=!1;break}}return e},optimize:function(){for(var e=this.times,t=this.values,i=this.getValueSize(),r=1,o=1,a=e.length-1;o<=a;++o){var s=!1,c=e[o],u=e[o+1];if(c!==u&&(1!==o||c!==c[0]))for(var l=o*i,h=l-i,d=l+i,p=0;p!==i;++p){var f=t[l+p];if(f!==t[h+p]||f!==t[d+p]){s=!0;break}}if(s){if(o!==r){e[r]=e[o];for(var m=o*i,g=r*i,p=0;p!==i;++p)t[g+p]=t[m+p]}++r}}return r!==e.length&&(this.times=n.AnimationUtils.arraySlice(e,0,r),this.values=n.AnimationUtils.arraySlice(t,0,r*i)),this}},Object.assign(n.KeyframeTrack,{parse:function(e){if(void 0===e.type)throw new Error("track type undefined, can not parse");var t=n.KeyframeTrack._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){console.warn("legacy JSON format detected, converting");var i=[],r=[];n.AnimationUtils.flattenJSON(e.keys,i,r,"value"),e.times=i,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t,i=e.constructor;if(void 0!==i.toJSON)t=i.toJSON(e);else{t={name:e.name,times:n.AnimationUtils.convertArray(e.times,Array),values:n.AnimationUtils.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return n.NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return n.VectorKeyframeTrack;case"color":return n.ColorKeyframeTrack;case"quaternion":return n.QuaternionKeyframeTrack;case"bool":case"boolean":return n.BooleanKeyframeTrack;case"string":return n.StringKeyframeTrack}throw new Error("Unsupported typeName: "+e)}}),n.PropertyBinding=function(e,t,i){this.path=t,this.parsedPath=i||n.PropertyBinding.parseTrackName(t),this.node=n.PropertyBinding.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e},n.PropertyBinding.prototype={constructor:n.PropertyBinding,getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,i=t.objectName,r=t.propertyName,o=t.propertyIndex;if(e||(e=n.PropertyBinding.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error(" trying to update node for track: "+this.path+" but it wasn't found.");if(i){var a=t.objectIndex;switch(i){case"materials":if(!e.material)return void console.error(" can not bind to material as node does not have a material",this);if(!e.material.materials)return void console.error(" can not bind to material.materials as node.material does not have a materials array",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error(" can not bind to bones as node does not have a skeleton",this);e=e.skeleton.bones;for(var s=0;s<e.length;s++)if(e[s].name===a){a=s;break}break;default:if(void 0===e[i])return void console.error(" can not bind to objectName of node, undefined",this);e=e[i]}if(void 0!==a){if(void 0===e[a])return void console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,e);e=e[a]}}var c=e[r];if(!c){var u=t.nodeName;return void console.error(" trying to update property for track: "+u+"."+r+" but it wasn't found.",e)}var l=this.Versioning.None;void 0!==e.needsUpdate?(l=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e);var h=this.BindingType.Direct;if(void 0!==o){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",this);if(!e.geometry.morphTargets)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);for(var s=0;s<this.node.geometry.morphTargets.length;s++)if(e.geometry.morphTargets[s].name===o){o=s;break}}h=this.BindingType.ArrayElement,this.resolvedProperty=c,this.propertyIndex=o}else void 0!==c.fromArray&&void 0!==c.toArray?(h=this.BindingType.HasFromToArray,this.resolvedProperty=c):void 0!==c.length?(h=this.BindingType.EntireArray,this.resolvedProperty=c):this.propertyName=r;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][l]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}},Object.assign(n.PropertyBinding.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:n.PropertyBinding.prototype.getValue,_setValue_unbound:n.PropertyBinding.prototype.setValue,BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var i=this.resolvedProperty,r=0,n=i.length;r!==n;++r)e[t++]=i[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.node[this.propertyName]=e[t]},function(e,t){this.node[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.node[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var i=this.resolvedProperty,r=0,n=i.length;r!==n;++r)i[r]=e[t++]},function(e,t){for(var i=this.resolvedProperty,r=0,n=i.length;r!==n;++r)i[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var i=this.resolvedProperty,r=0,n=i.length;r!==n;++r)i[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]]}),n.PropertyBinding.Composite=function(e,t,i){var r=i||n.PropertyBinding.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)},n.PropertyBinding.Composite.prototype={constructor:n.PropertyBinding.Composite,getValue:function(e,t){this.bind();var i=this._targetGroup.nCachedObjects_,r=this._bindings[i];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var i=this._bindings,r=this._targetGroup.nCachedObjects_,n=i.length;r!==n;++r)i[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}},n.PropertyBinding.create=function(e,t,i){return e instanceof n.AnimationObjectGroup?new n.PropertyBinding.Composite(e,t,i):new n.PropertyBinding(e,t,i)},n.PropertyBinding.parseTrackName=function(e){var t=/^(([\w]+\/)*)([\w-\d]+)?(\.([\w]+)(\[([\w\d\[\]\_.:\- ]+)\])?)?(\.([\w.]+)(\[([\w\d\[\]\_. ]+)\])?)$/,i=t.exec(e);if(!i)throw new Error("cannot parse trackName at all: "+e);i.index===t.lastIndex&&t.lastIndex++;var r={nodeName:i[3],objectName:i[5],objectIndex:i[7],propertyName:i[9],propertyIndex:i[11]};if(null===r.propertyName||0===r.propertyName.length)throw new Error("can not parse propertyName from trackName: "+e);return r},n.PropertyBinding.findNode=function(e,t){if(!t||""===t||"root"===t||"."===t||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){var i=function(e){for(var i=0;i<e.bones.length;i++){var r=e.bones[i];if(r.name===t)return r}return null},r=i(e.skeleton);if(r)return r}if(e.children){var n=function(e){for(var i=0;i<e.length;i++){var r=e[i];if(r.name===t||r.uuid===t)return r;var o=n(r.children);if(o)return o}return null},o=n(e.children);if(o)return o}return null},n.PropertyMixer=function(e,t,i){this.binding=e,this.valueSize=i;var r,n=Float64Array;switch(t){case"quaternion":r=this._slerp;break;case"string":case"bool":n=Array,r=this._select;break;default:r=this._lerp}this.buffer=new n(4*i),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0},n.PropertyMixer.prototype={constructor:n.PropertyMixer,accumulate:function(e,t){var i=this.buffer,r=this.valueSize,n=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)i[n+a]=i[a];o=t}else{o+=t;var s=t/o;this._mixBufferRegion(i,n,0,s,r)}this.cumulativeWeight=o},apply:function(e){var t=this.valueSize,i=this.buffer,r=e*t+t,n=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,n<1){var a=3*t;this._mixBufferRegion(i,r,a,1-n,t)}for(var s=t,c=t+t;s!==c;++s)if(i[s]!==i[s+t]){o.setValue(i,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,i=this.valueSize,r=3*i;e.getValue(t,r);for(var n=i,o=r;n!==o;++n)t[n]=t[r+n%i];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,i,r,n){if(r>=.5)for(var o=0;o!==n;++o)e[t+o]=e[i+o]},_slerp:function(e,t,i,r,o){n.Quaternion.slerpFlat(e,t,e,t,e,i,r)},_lerp:function(e,t,i,r,n){for(var o=1-r,a=0;a!==n;++a){var s=t+a;e[s]=e[s]*o+e[i+a]*r}}},n.BooleanKeyframeTrack=function(e,t,i){n.KeyframeTrack.call(this,e,t,i)},n.BooleanKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.BooleanKeyframeTrack,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:n.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),n.ColorKeyframeTrack=function(e,t,i,r){n.KeyframeTrack.call(this,e,t,i,r)},n.ColorKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.ColorKeyframeTrack,ValueTypeName:"color"}),n.NumberKeyframeTrack=function(e,t,i,r){n.KeyframeTrack.call(this,e,t,i,r)},n.NumberKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.NumberKeyframeTrack,ValueTypeName:"number"}),n.QuaternionKeyframeTrack=function(e,t,i,r){n.KeyframeTrack.call(this,e,t,i,r)},n.QuaternionKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.QuaternionKeyframeTrack,ValueTypeName:"quaternion",DefaultInterpolation:n.InterpolateLinear,InterpolantFactoryMethodLinear:function(e){return new n.QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),n.StringKeyframeTrack=function(e,t,i,r){n.KeyframeTrack.call(this,e,t,i,r)},n.StringKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.StringKeyframeTrack,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:n.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),n.VectorKeyframeTrack=function(e,t,i,r){ n.KeyframeTrack.call(this,e,t,i,r)},n.VectorKeyframeTrack.prototype=Object.assign(Object.create(n.KeyframeTrack.prototype),{constructor:n.VectorKeyframeTrack,ValueTypeName:"vector"}),n.Audio=function(e){n.Object3D.call(this),this.type="Audio",this.context=e.context,this.source=this.context.createBufferSource(),this.source.onended=this.onEnded.bind(this),this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filter=null},n.Audio.prototype=Object.create(n.Object3D.prototype),n.Audio.prototype.constructor=n.Audio,n.Audio.prototype.getOutput=function(){return this.gain},n.Audio.prototype.setNodeSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},n.Audio.prototype.setBuffer=function(e){var t=this;return t.source.buffer=e,t.sourceType="buffer",t.autoplay&&t.play(),this},n.Audio.prototype.play=function(){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");var e=this.context.createBufferSource();e.buffer=this.source.buffer,e.loop=this.source.loop,e.onended=this.source.onended,e.start(0,this.startTime),e.playbackRate.value=this.playbackRate,this.isPlaying=!0,this.source=e,this.connect()},n.Audio.prototype.pause=function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),void(this.startTime=this.context.currentTime))},n.Audio.prototype.stop=function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),void(this.startTime=0))},n.Audio.prototype.connect=function(){null!==this.filter?(this.source.connect(this.filter),this.filter.connect(this.getOutput())):this.source.connect(this.getOutput())},n.Audio.prototype.disconnect=function(){null!==this.filter?(this.source.disconnect(this.filter),this.filter.disconnect(this.getOutput())):this.source.disconnect(this.getOutput())},n.Audio.prototype.getFilter=function(){return this.filter},n.Audio.prototype.setFilter=function(e){void 0===e&&(e=null),this.isPlaying===!0?(this.disconnect(),this.filter=e,this.connect()):this.filter=e},n.Audio.prototype.setPlaybackRate=function(e){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=e,void(this.isPlaying===!0&&(this.source.playbackRate.value=this.playbackRate)))},n.Audio.prototype.getPlaybackRate=function(){return this.playbackRate},n.Audio.prototype.onEnded=function(){this.isPlaying=!1},n.Audio.prototype.setLoop=function(e){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):void(this.source.loop=e)},n.Audio.prototype.getLoop=function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop},n.Audio.prototype.setVolume=function(e){this.gain.gain.value=e},n.Audio.prototype.getVolume=function(){return this.gain.gain.value},n.AudioAnalyser=function(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)},n.AudioAnalyser.prototype={constructor:n.AudioAnalyser,getData:function(){return this.analyser.getByteFrequencyData(this.data),this.data}},Object.defineProperty(n,"AudioContext",{get:function(){var e;return function(){return void 0===e&&(e=new(window.AudioContext||window.webkitAudioContext)),e}}()}),n.PositionalAudio=function(e){n.Audio.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)},n.PositionalAudio.prototype=Object.create(n.Audio.prototype),n.PositionalAudio.prototype.constructor=n.PositionalAudio,n.PositionalAudio.prototype.getOutput=function(){return this.panner},n.PositionalAudio.prototype.setRefDistance=function(e){this.panner.refDistance=e},n.PositionalAudio.prototype.getRefDistance=function(){return this.panner.refDistance},n.PositionalAudio.prototype.setRolloffFactor=function(e){this.panner.rolloffFactor=e},n.PositionalAudio.prototype.getRolloffFactor=function(){return this.panner.rolloffFactor},n.PositionalAudio.prototype.setDistanceModel=function(e){this.panner.distanceModel=e},n.PositionalAudio.prototype.getDistanceModel=function(){return this.panner.distanceModel},n.PositionalAudio.prototype.setMaxDistance=function(e){this.panner.maxDistance=e},n.PositionalAudio.prototype.getMaxDistance=function(){return this.panner.maxDistance},n.PositionalAudio.prototype.updateMatrixWorld=function(){var e=new n.Vector3;return function(t){n.Object3D.prototype.updateMatrixWorld.call(this,t),e.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(e.x,e.y,e.z)}}(),n.AudioListener=function(){n.Object3D.call(this),this.type="AudioListener",this.context=n.AudioContext,this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null},n.AudioListener.prototype=Object.create(n.Object3D.prototype),n.AudioListener.prototype.constructor=n.AudioListener,n.AudioListener.prototype.getInput=function(){return this.gain},n.AudioListener.prototype.removeFilter=function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},n.AudioListener.prototype.setFilter=function(e){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},n.AudioListener.prototype.getFilter=function(){return this.filter},n.AudioListener.prototype.setMasterVolume=function(e){this.gain.gain.value=e},n.AudioListener.prototype.getMasterVolume=function(){return this.gain.gain.value},n.AudioListener.prototype.updateMatrixWorld=function(){var e=new n.Vector3,t=new n.Quaternion,i=new n.Vector3,r=new n.Vector3;return function(o){n.Object3D.prototype.updateMatrixWorld.call(this,o);var a=this.context.listener,s=this.up;this.matrixWorld.decompose(e,t,i),r.set(0,0,-1).applyQuaternion(t),a.setPosition(e.x,e.y,e.z),a.setOrientation(r.x,r.y,r.z,s.x,s.y,s.z)}}(),n.Camera=function(){n.Object3D.call(this),this.type="Camera",this.matrixWorldInverse=new n.Matrix4,this.projectionMatrix=new n.Matrix4},n.Camera.prototype=Object.create(n.Object3D.prototype),n.Camera.prototype.constructor=n.Camera,n.Camera.prototype.getWorldDirection=function(){var e=new n.Quaternion;return function(t){var i=t||new n.Vector3;return this.getWorldQuaternion(e),i.set(0,0,-1).applyQuaternion(e)}}(),n.Camera.prototype.lookAt=function(){var e=new n.Matrix4;return function(t){e.lookAt(this.position,t,this.up),this.quaternion.setFromRotationMatrix(e)}}(),n.Camera.prototype.clone=function(){return(new this.constructor).copy(this)},n.Camera.prototype.copy=function(e){return n.Object3D.prototype.copy.call(this,e),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},n.CubeCamera=function(e,t,i){n.Object3D.call(this),this.type="CubeCamera";var r=90,o=1,a=new n.PerspectiveCamera(r,o,e,t);a.up.set(0,-1,0),a.lookAt(new n.Vector3(1,0,0)),this.add(a);var s=new n.PerspectiveCamera(r,o,e,t);s.up.set(0,-1,0),s.lookAt(new n.Vector3((-1),0,0)),this.add(s);var c=new n.PerspectiveCamera(r,o,e,t);c.up.set(0,0,1),c.lookAt(new n.Vector3(0,1,0)),this.add(c);var u=new n.PerspectiveCamera(r,o,e,t);u.up.set(0,0,-1),u.lookAt(new n.Vector3(0,(-1),0)),this.add(u);var l=new n.PerspectiveCamera(r,o,e,t);l.up.set(0,-1,0),l.lookAt(new n.Vector3(0,0,1)),this.add(l);var h=new n.PerspectiveCamera(r,o,e,t);h.up.set(0,-1,0),h.lookAt(new n.Vector3(0,0,(-1))),this.add(h);var d={format:n.RGBFormat,magFilter:n.LinearFilter,minFilter:n.LinearFilter};this.renderTarget=new n.WebGLRenderTargetCube(i,i,d),this.updateCubeMap=function(e,t){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,r=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,i.activeCubeFace=0,e.render(t,a,i),i.activeCubeFace=1,e.render(t,s,i),i.activeCubeFace=2,e.render(t,c,i),i.activeCubeFace=3,e.render(t,u,i),i.activeCubeFace=4,e.render(t,l,i),i.texture.generateMipmaps=r,i.activeCubeFace=5,e.render(t,h,i),e.setRenderTarget(null)}},n.CubeCamera.prototype=Object.create(n.Object3D.prototype),n.CubeCamera.prototype.constructor=n.CubeCamera,n.OrthographicCamera=function(e,t,i,r,o,a){n.Camera.call(this),this.type="OrthographicCamera",this.zoom=1,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=void 0!==o?o:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()},n.OrthographicCamera.prototype=Object.create(n.Camera.prototype),n.OrthographicCamera.prototype.constructor=n.OrthographicCamera,n.OrthographicCamera.prototype.updateProjectionMatrix=function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;this.projectionMatrix.makeOrthographic(i-e,i+e,r+t,r-t,this.near,this.far)},n.OrthographicCamera.prototype.copy=function(e){return n.Camera.prototype.copy.call(this,e),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this},n.OrthographicCamera.prototype.toJSON=function(e){var t=n.Object3D.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,t},n.PerspectiveCamera=function(e,t,i,r){n.Camera.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==i?i:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()},n.PerspectiveCamera.prototype=Object.create(n.Camera.prototype),n.PerspectiveCamera.prototype.constructor=n.PerspectiveCamera,n.PerspectiveCamera.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},n.PerspectiveCamera.prototype.setFocalLength=function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*n.Math.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},n.PerspectiveCamera.prototype.getFocalLength=function(){var e=Math.tan(.5*n.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},n.PerspectiveCamera.prototype.getEffectiveFOV=function(){return 2*n.Math.RAD2DEG*Math.atan(Math.tan(.5*n.Math.DEG2RAD*this.fov)/this.zoom)},n.PerspectiveCamera.prototype.getFilmWidth=function(){return this.filmGauge*Math.min(this.aspect,1)},n.PerspectiveCamera.prototype.getFilmHeight=function(){return this.filmGauge/Math.max(this.aspect,1)},n.PerspectiveCamera.prototype.setViewOffset=function(e,t,i,r,n,o){this.aspect=e/t,this.view={fullWidth:e,fullHeight:t,offsetX:i,offsetY:r,width:n,height:o},this.updateProjectionMatrix()},n.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var e=this.near,t=e*Math.tan(.5*n.Math.DEG2RAD*this.fov)/this.zoom,i=2*t,r=this.aspect*i,o=-.5*r,a=this.view;if(null!==a){var s=a.fullWidth,c=a.fullHeight;o+=a.offsetX*r/s,t-=a.offsetY*i/c,r*=a.width/s,i*=a.height/c}var u=this.filmOffset;0!==u&&(o+=e*u/this.getFilmWidth()),this.projectionMatrix.makeFrustum(o,o+r,t-i,t,e,this.far)},n.PerspectiveCamera.prototype.copy=function(e){return n.Camera.prototype.copy.call(this,e),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},n.PerspectiveCamera.prototype.toJSON=function(e){var t=n.Object3D.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t},n.StereoCamera=function(){this.type="StereoCamera",this.aspect=1,this.cameraL=new n.PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new n.PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1},n.StereoCamera.prototype={constructor:n.StereoCamera,update:function(){var e,t,i,r,o,a=new n.Matrix4,s=new n.Matrix4;return function(c){var u=e!==c.focus||t!==c.fov||i!==c.aspect*this.aspect||r!==c.near||o!==c.far;if(u){e=c.focus,t=c.fov,i=c.aspect*this.aspect,r=c.near,o=c.far;var l,h,d=c.projectionMatrix.clone(),p=.032,f=p*r/e,m=r*Math.tan(n.Math.DEG2RAD*t*.5);s.elements[12]=-p,a.elements[12]=p,l=-m*i+f,h=m*i+f,d.elements[0]=2*r/(h-l),d.elements[8]=(h+l)/(h-l),this.cameraL.projectionMatrix.copy(d),l=-m*i-f,h=m*i-f,d.elements[0]=2*r/(h-l),d.elements[8]=(h+l)/(h-l),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(s),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(a)}}()},n.Light=function(e,t){n.Object3D.call(this),this.type="Light",this.color=new n.Color(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0},n.Light.prototype=Object.create(n.Object3D.prototype),n.Light.prototype.constructor=n.Light,n.Light.prototype.copy=function(e){return n.Object3D.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},n.Light.prototype.toJSON=function(e){var t=n.Object3D.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),t},n.LightShadow=function(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new n.Vector2(512,512),this.map=null,this.matrix=new n.Matrix4},n.LightShadow.prototype={constructor:n.LightShadow,copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)}},n.AmbientLight=function(e,t){n.Light.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0},n.AmbientLight.prototype=Object.create(n.Light.prototype),n.AmbientLight.prototype.constructor=n.AmbientLight,n.DirectionalLight=function(e,t){n.Light.call(this,e,t),this.type="DirectionalLight",this.position.set(0,1,0),this.updateMatrix(),this.target=new n.Object3D,this.shadow=new n.DirectionalLightShadow},n.DirectionalLight.prototype=Object.create(n.Light.prototype),n.DirectionalLight.prototype.constructor=n.DirectionalLight,n.DirectionalLight.prototype.copy=function(e){return n.Light.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this},n.DirectionalLightShadow=function(e){n.LightShadow.call(this,new n.OrthographicCamera((-5),5,5,(-5),.5,500))},n.DirectionalLightShadow.prototype=Object.create(n.LightShadow.prototype),n.DirectionalLightShadow.prototype.constructor=n.DirectionalLightShadow,n.HemisphereLight=function(e,t,i){n.Light.call(this,e,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.set(0,1,0),this.updateMatrix(),this.groundColor=new n.Color(t)},n.HemisphereLight.prototype=Object.create(n.Light.prototype),n.HemisphereLight.prototype.constructor=n.HemisphereLight,n.HemisphereLight.prototype.copy=function(e){return n.Light.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this},n.PointLight=function(e,t,i,r){n.Light.call(this,e,t),this.type="PointLight",this.distance=void 0!==i?i:0,this.decay=void 0!==r?r:1,this.shadow=new n.LightShadow(new n.PerspectiveCamera(90,1,.5,500))},n.PointLight.prototype=Object.create(n.Light.prototype),n.PointLight.prototype.constructor=n.PointLight,Object.defineProperty(n.PointLight.prototype,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),n.PointLight.prototype.copy=function(e){return n.Light.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this},n.SpotLight=function(e,t,i,r,o,a){n.Light.call(this,e,t),this.type="SpotLight",this.position.set(0,1,0),this.updateMatrix(),this.target=new n.Object3D,this.distance=void 0!==i?i:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==o?o:0,this.decay=void 0!==a?a:1,this.shadow=new n.SpotLightShadow},n.SpotLight.prototype=Object.create(n.Light.prototype),n.SpotLight.prototype.constructor=n.SpotLight,Object.defineProperty(n.SpotLight.prototype,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),n.SpotLight.prototype.copy=function(e){return n.Light.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this},n.SpotLightShadow=function(){n.LightShadow.call(this,new n.PerspectiveCamera(50,1,.5,500))},n.SpotLightShadow.prototype=Object.create(n.LightShadow.prototype),n.SpotLightShadow.prototype.constructor=n.SpotLightShadow,n.SpotLightShadow.prototype.update=function(e){var t=2*n.Math.RAD2DEG*e.angle,i=this.mapSize.width/this.mapSize.height,r=e.distance||500,o=this.camera;t===o.fov&&i===o.aspect&&r===o.far||(o.fov=t,o.aspect=i,o.far=r,o.updateProjectionMatrix())},n.AudioLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.AudioLoader.prototype={constructor:n.AudioLoader,load:function(e,t,i,r){var o=new n.XHRLoader(this.manager);o.setResponseType("arraybuffer"),o.load(e,function(e){var i=n.AudioContext;i.decodeAudioData(e,function(e){t(e)})},i,r)}},n.Cache={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(this.files[e]=t)},get:function(e){if(this.enabled!==!1)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},n.Loader=function(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}},n.Loader.prototype={constructor:n.Loader,crossOrigin:void 0,extractUrlBase:function(e){var t=e.split("/");return 1===t.length?"./":(t.pop(),t.join("/")+"/")},initMaterials:function(e,t,i){for(var r=[],n=0;n<e.length;++n)r[n]=this.createMaterial(e[n],t,i);return r},createMaterial:function(){var e,t,i;return function(r,o,a){function s(e,i,r,s,u){var l,h=o+e,d=n.Loader.Handlers.get(h);null!==d?l=d.load(h):(t.setCrossOrigin(a),l=t.load(h)),void 0!==i&&(l.repeat.fromArray(i),1!==i[0]&&(l.wrapS=n.RepeatWrapping),1!==i[1]&&(l.wrapT=n.RepeatWrapping)),void 0!==r&&l.offset.fromArray(r),void 0!==s&&("repeat"===s[0]&&(l.wrapS=n.RepeatWrapping),"mirror"===s[0]&&(l.wrapS=n.MirroredRepeatWrapping),"repeat"===s[1]&&(l.wrapT=n.RepeatWrapping),"mirror"===s[1]&&(l.wrapT=n.MirroredRepeatWrapping)),void 0!==u&&(l.anisotropy=u);var p=n.Math.generateUUID();return c[p]=l,p}void 0===e&&(e=new n.Color),void 0===t&&(t=new n.TextureLoader),void 0===i&&(i=new n.MaterialLoader);var c={},u={uuid:n.Math.generateUUID(),type:"MeshLambertMaterial"};for(var l in r){var h=r[l];switch(l){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=h;break;case"blending":u.blending=n[h];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case"colorDiffuse":u.color=e.fromArray(h).getHex();break;case"colorSpecular":u.specular=e.fromArray(h).getHex();break;case"colorEmissive":u.emissive=e.fromArray(h).getHex();break;case"specularCoef":u.shininess=h;break;case"shading":"basic"===h.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===h.toLowerCase()&&(u.type="MeshPhongMaterial");break;case"mapDiffuse":u.map=s(h,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapLight":u.lightMap=s(h,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=s(h,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=s(h,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=h;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=s(h,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=[h,h];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=s(h,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapAlpha":u.alphaMap=s(h,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=n.BackSide;break;case"doubleSided":u.side=n.DoubleSide;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=h;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[l]=h;break;case"vertexColors":h===!0&&(u.vertexColors=n.VertexColors),"face"===h&&(u.vertexColors=n.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,h)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),i.setTextures(c),i.parse(u)}}()},n.Loader.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,i=0,r=t.length;i<r;i+=2){var n=t[i],o=t[i+1];if(n.test(e))return o}return null}},n.XHRLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.XHRLoader.prototype={constructor:n.XHRLoader,load:function(e,t,i,r){void 0!==this.path&&(e=this.path+e);var o=this,a=n.Cache.get(e);if(void 0!==a)return t&&setTimeout(function(){t(a)},0),a;var s=new XMLHttpRequest;return s.overrideMimeType("text/plain"),s.open("GET",e,!0),s.addEventListener("load",function(i){var a=i.target.response;n.Cache.add(e,a),200===this.status?(t&&t(a),o.manager.itemEnd(e)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),t&&t(a),o.manager.itemEnd(e)):(r&&r(i),o.manager.itemError(e))},!1),void 0!==i&&s.addEventListener("progress",function(e){i(e)},!1),s.addEventListener("error",function(t){r&&r(t),o.manager.itemError(e)},!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.send(null),o.manager.itemStart(e),s},setPath:function(e){this.path=e},setResponseType:function(e){this.responseType=e},setWithCredentials:function(e){this.withCredentials=e}},n.FontLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.FontLoader.prototype={constructor:n.FontLoader,load:function(e,t,i,r){var o=new n.XHRLoader(this.manager);o.load(e,function(e){t(new n.Font(JSON.parse(e.substring(65,e.length-2))))},i,r)}},n.ImageLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.ImageLoader.prototype={constructor:n.ImageLoader,load:function(e,t,i,r){void 0!==this.path&&(e=this.path+e);var o=this,a=n.Cache.get(e);if(void 0!==a)return o.manager.itemStart(e),t?setTimeout(function(){t(a),o.manager.itemEnd(e)},0):o.manager.itemEnd(e),a;var s=document.createElement("img");return s.addEventListener("load",function(i){n.Cache.add(e,this),t&&t(this),o.manager.itemEnd(e)},!1),void 0!==i&&s.addEventListener("progress",function(e){i(e)},!1),s.addEventListener("error",function(t){r&&r(t),o.manager.itemError(e)},!1),void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),o.manager.itemStart(e),s.src=e,s},setCrossOrigin:function(e){this.crossOrigin=e},setPath:function(e){this.path=e}},n.JSONLoader=function(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:n.DefaultLoadingManager,this.withCredentials=!1},n.JSONLoader.prototype={constructor:n.JSONLoader,get statusDomElement(){return void 0===this._statusDomElement&&(this._statusDomElement=document.createElement("div")),console.warn("THREE.JSONLoader: .statusDomElement has been removed."),this._statusDomElement},load:function(e,t,i,r){var o=this,a=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:n.Loader.prototype.extractUrlBase(e),s=new n.XHRLoader(this.manager);s.setWithCredentials(this.withCredentials),s.load(e,function(i){var r=JSON.parse(i),n=r.metadata;if(void 0!==n){var s=n.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.SceneLoader instead.")}}var c=o.parse(r,a);t(c.geometry,c.materials)},i,r)},setTexturePath:function(e){this.texturePath=e},parse:function(e,t){function i(t){function i(e,t){return e&1<<t}var r,o,a,c,u,l,h,d,p,f,m,g,v,y,M,A,x,w,E,b,T,L,D,N,S,C,I,j=e.faces,_=e.vertices,O=e.normals,z=e.colors,k=0;if(void 0!==e.uvs){for(r=0;r<e.uvs.length;r++)e.uvs[r].length&&k++;for(r=0;r<k;r++)s.faceVertexUvs[r]=[]}for(c=0,u=_.length;c<u;)w=new n.Vector3,w.x=_[c++]*t,w.y=_[c++]*t,w.z=_[c++]*t,s.vertices.push(w);for(c=0,u=j.length;c<u;)if(f=j[c++],m=i(f,0),g=i(f,1),v=i(f,3),y=i(f,4),M=i(f,5),A=i(f,6),x=i(f,7),m){if(b=new n.Face3,b.a=j[c],b.b=j[c+1],b.c=j[c+3],T=new n.Face3,T.a=j[c+1],T.b=j[c+2],T.c=j[c+3],c+=4,g&&(p=j[c++],b.materialIndex=p,T.materialIndex=p),a=s.faces.length,v)for(r=0;r<k;r++)for(N=e.uvs[r],s.faceVertexUvs[r][a]=[],s.faceVertexUvs[r][a+1]=[],o=0;o<4;o++)d=j[c++],C=N[2*d],I=N[2*d+1],S=new n.Vector2(C,I),2!==o&&s.faceVertexUvs[r][a].push(S),0!==o&&s.faceVertexUvs[r][a+1].push(S);if(y&&(h=3*j[c++],b.normal.set(O[h++],O[h++],O[h]),T.normal.copy(b.normal)),M)for(r=0;r<4;r++)h=3*j[c++],D=new n.Vector3(O[h++],O[h++],O[h]),2!==r&&b.vertexNormals.push(D),0!==r&&T.vertexNormals.push(D);if(A&&(l=j[c++],L=z[l],b.color.setHex(L),T.color.setHex(L)),x)for(r=0;r<4;r++)l=j[c++],L=z[l],2!==r&&b.vertexColors.push(new n.Color(L)),0!==r&&T.vertexColors.push(new n.Color(L));s.faces.push(b),s.faces.push(T)}else{if(E=new n.Face3,E.a=j[c++],E.b=j[c++],E.c=j[c++],g&&(p=j[c++],E.materialIndex=p),a=s.faces.length,v)for(r=0;r<k;r++)for(N=e.uvs[r],s.faceVertexUvs[r][a]=[],o=0;o<3;o++)d=j[c++],C=N[2*d],I=N[2*d+1],S=new n.Vector2(C,I),s.faceVertexUvs[r][a].push(S);if(y&&(h=3*j[c++],E.normal.set(O[h++],O[h++],O[h])),M)for(r=0;r<3;r++)h=3*j[c++],D=new n.Vector3(O[h++],O[h++],O[h]),E.vertexNormals.push(D);if(A&&(l=j[c++],E.color.setHex(z[l])),x)for(r=0;r<3;r++)l=j[c++],E.vertexColors.push(new n.Color(z[l]));s.faces.push(E)}}function r(){var t=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var i=0,r=e.skinWeights.length;i<r;i+=t){var o=e.skinWeights[i],a=t>1?e.skinWeights[i+1]:0,c=t>2?e.skinWeights[i+2]:0,u=t>3?e.skinWeights[i+3]:0;s.skinWeights.push(new n.Vector4(o,a,c,u))}if(e.skinIndices)for(var i=0,r=e.skinIndices.length;i<r;i+=t){var l=e.skinIndices[i],h=t>1?e.skinIndices[i+1]:0,d=t>2?e.skinIndices[i+2]:0,p=t>3?e.skinIndices[i+3]:0;s.skinIndices.push(new n.Vector4(l,h,d,p))}s.bones=e.bones,s.bones&&s.bones.length>0&&(s.skinWeights.length!==s.skinIndices.length||s.skinIndices.length!==s.vertices.length)&&console.warn("When skinning, number of vertices ("+s.vertices.length+"), skinIndices ("+s.skinIndices.length+"), and skinWeights ("+s.skinWeights.length+") should match.")}function o(t){if(void 0!==e.morphTargets)for(var i=0,r=e.morphTargets.length;i<r;i++){s.morphTargets[i]={},s.morphTargets[i].name=e.morphTargets[i].name,s.morphTargets[i].vertices=[];for(var o=s.morphTargets[i].vertices,a=e.morphTargets[i].vertices,c=0,u=a.length;c<u;c+=3){var l=new n.Vector3;l.x=a[c]*t,l.y=a[c+1]*t,l.z=a[c+2]*t,o.push(l)}}if(void 0!==e.morphColors&&e.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=s.faces,d=e.morphColors[0].colors,i=0,r=h.length;i<r;i++)h[i].color.fromArray(d,3*i)}}function a(){var t=[],i=[];void 0!==e.animation&&i.push(e.animation),void 0!==e.animations&&(e.animations.length?i=i.concat(e.animations):i.push(e.animations));for(var r=0;r<i.length;r++){var o=n.AnimationClip.parseAnimation(i[r],s.bones);o&&t.push(o)}if(s.morphTargets){var a=n.AnimationClip.CreateClipsFromMorphTargetSequences(s.morphTargets,10);t=t.concat(a)}t.length>0&&(s.animations=t)}var s=new n.Geometry,c=void 0!==e.scale?1/e.scale:1;if(i(c),r(),o(c),a(),s.computeFaceNormals(),s.computeBoundingSphere(),void 0===e.materials||0===e.materials.length)return{geometry:s};var u=n.Loader.prototype.initMaterials(e.materials,t,this.crossOrigin);return{geometry:s,materials:u}}},n.LoadingManager=function(e,t,i){var r=this,n=!1,o=0,a=0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(e){a++,n===!1&&void 0!==r.onStart&&r.onStart(e,o,a),n=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(n=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)}},n.DefaultLoadingManager=new n.LoadingManager,n.BufferGeometryLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.BufferGeometryLoader.prototype={constructor:n.BufferGeometryLoader,load:function(e,t,i,r){var o=this,a=new n.XHRLoader(o.manager);a.load(e,function(e){t(o.parse(JSON.parse(e)))},i,r)},parse:function(e){var t=new n.BufferGeometry,i=e.data.index,r={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};if(void 0!==i){var o=new r[i.type](i.array);t.setIndex(new n.BufferAttribute(o,1))}var a=e.data.attributes;for(var s in a){var c=a[s],o=new r[c.type](c.array);t.addAttribute(s,new n.BufferAttribute(o,c.itemSize,c.normalized))}var u=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==u)for(var l=0,h=u.length;l!==h;++l){var d=u[l];t.addGroup(d.start,d.count,d.materialIndex)}var p=e.data.boundingSphere;if(void 0!==p){var f=new n.Vector3;void 0!==p.center&&f.fromArray(p.center),t.boundingSphere=new n.Sphere(f,p.radius)}return t}},n.MaterialLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager,this.textures={}},n.MaterialLoader.prototype={constructor:n.MaterialLoader,load:function(e,t,i,r){var o=this,a=new n.XHRLoader(o.manager);a.load(e,function(e){t(o.parse(JSON.parse(e)))},i,r)},setTextures:function(e){this.textures=e},getTexture:function(e){var t=this.textures;return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]},parse:function(e){var t=new n[e.type];if(void 0!==e.uuid&&(t.uuid=e.uuid),void 0!==e.name&&(t.name=e.name),void 0!==e.color&&t.color.setHex(e.color),void 0!==e.roughness&&(t.roughness=e.roughness),void 0!==e.metalness&&(t.metalness=e.metalness),void 0!==e.emissive&&t.emissive.setHex(e.emissive),void 0!==e.specular&&t.specular.setHex(e.specular),void 0!==e.shininess&&(t.shininess=e.shininess), void 0!==e.uniforms&&(t.uniforms=e.uniforms),void 0!==e.vertexShader&&(t.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(t.fragmentShader=e.fragmentShader),void 0!==e.vertexColors&&(t.vertexColors=e.vertexColors),void 0!==e.shading&&(t.shading=e.shading),void 0!==e.blending&&(t.blending=e.blending),void 0!==e.side&&(t.side=e.side),void 0!==e.opacity&&(t.opacity=e.opacity),void 0!==e.transparent&&(t.transparent=e.transparent),void 0!==e.alphaTest&&(t.alphaTest=e.alphaTest),void 0!==e.depthTest&&(t.depthTest=e.depthTest),void 0!==e.depthWrite&&(t.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(t.colorWrite=e.colorWrite),void 0!==e.wireframe&&(t.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(t.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.size&&(t.size=e.size),void 0!==e.sizeAttenuation&&(t.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(t.map=this.getTexture(e.map)),void 0!==e.alphaMap&&(t.alphaMap=this.getTexture(e.alphaMap),t.transparent=!0),void 0!==e.bumpMap&&(t.bumpMap=this.getTexture(e.bumpMap)),void 0!==e.bumpScale&&(t.bumpScale=e.bumpScale),void 0!==e.normalMap&&(t.normalMap=this.getTexture(e.normalMap)),void 0!==e.normalScale){var i=e.normalScale;Array.isArray(i)===!1&&(i=[i,i]),t.normalScale=(new n.Vector2).fromArray(i)}if(void 0!==e.displacementMap&&(t.displacementMap=this.getTexture(e.displacementMap)),void 0!==e.displacementScale&&(t.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(t.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(t.roughnessMap=this.getTexture(e.roughnessMap)),void 0!==e.metalnessMap&&(t.metalnessMap=this.getTexture(e.metalnessMap)),void 0!==e.emissiveMap&&(t.emissiveMap=this.getTexture(e.emissiveMap)),void 0!==e.emissiveIntensity&&(t.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(t.specularMap=this.getTexture(e.specularMap)),void 0!==e.envMap&&(t.envMap=this.getTexture(e.envMap),t.combine=n.MultiplyOperation),e.reflectivity&&(t.reflectivity=e.reflectivity),void 0!==e.lightMap&&(t.lightMap=this.getTexture(e.lightMap)),void 0!==e.lightMapIntensity&&(t.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(t.aoMap=this.getTexture(e.aoMap)),void 0!==e.aoMapIntensity&&(t.aoMapIntensity=e.aoMapIntensity),void 0!==e.materials)for(var r=0,o=e.materials.length;r<o;r++)t.materials.push(this.parse(e.materials[r]));return t}},n.ObjectLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager,this.texturePath=""},n.ObjectLoader.prototype={constructor:n.ObjectLoader,load:function(e,t,i,r){""===this.texturePath&&(this.texturePath=e.substring(0,e.lastIndexOf("/")+1));var o=this,a=new n.XHRLoader(o.manager);a.load(e,function(e){o.parse(JSON.parse(e),t)},i,r)},setTexturePath:function(e){this.texturePath=e},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var i=this.parseGeometries(e.geometries),r=this.parseImages(e.images,function(){void 0!==t&&t(a)}),n=this.parseTextures(e.textures,r),o=this.parseMaterials(e.materials,n),a=this.parseObject(e.object,i,o);return e.animations&&(a.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(a),a},parseGeometries:function(e){var t={};if(void 0!==e)for(var i=new n.JSONLoader,r=new n.BufferGeometryLoader,o=0,a=e.length;o<a;o++){var s,c=e[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new n[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new n[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new n[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new n[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new n[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":s=new n.DodecahedronGeometry(c.radius,c.detail);break;case"IcosahedronGeometry":s=new n.IcosahedronGeometry(c.radius,c.detail);break;case"OctahedronGeometry":s=new n.OctahedronGeometry(c.radius,c.detail);break;case"TetrahedronGeometry":s=new n.TetrahedronGeometry(c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new n[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new n[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new n[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new n[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"BufferGeometry":s=r.parse(c);break;case"Geometry":s=i.parse(c.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),t[c.uuid]=s}return t},parseMaterials:function(e,t){var i={};if(void 0!==e){var r=new n.MaterialLoader;r.setTextures(t);for(var o=0,a=e.length;o<a;o++){var s=r.parse(e[o]);i[s.uuid]=s}}return i},parseAnimations:function(e){for(var t=[],i=0;i<e.length;i++){var r=n.AnimationClip.parse(e[i]);t.push(r)}return t},parseImages:function(e,t){function i(e){return r.manager.itemStart(e),s.load(e,function(){r.manager.itemEnd(e)})}var r=this,o={};if(void 0!==e&&e.length>0){var a=new n.LoadingManager(t),s=new n.ImageLoader(a);s.setCrossOrigin(this.crossOrigin);for(var c=0,u=e.length;c<u;c++){var l=e[c],h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:r.texturePath+l.url;o[l.uuid]=i(h)}}return o},parseTextures:function(e,t){function i(e){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),n[e])}var r={};if(void 0!==e)for(var o=0,a=e.length;o<a;o++){var s=e[o];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var c=new n.Texture(t[s.image]);c.needsUpdate=!0,c.uuid=s.uuid,void 0!==s.name&&(c.name=s.name),void 0!==s.mapping&&(c.mapping=i(s.mapping)),void 0!==s.offset&&(c.offset=new n.Vector2(s.offset[0],s.offset[1])),void 0!==s.repeat&&(c.repeat=new n.Vector2(s.repeat[0],s.repeat[1])),void 0!==s.minFilter&&(c.minFilter=i(s.minFilter)),void 0!==s.magFilter&&(c.magFilter=i(s.magFilter)),void 0!==s.anisotropy&&(c.anisotropy=s.anisotropy),Array.isArray(s.wrap)&&(c.wrapS=i(s.wrap[0]),c.wrapT=i(s.wrap[1])),r[s.uuid]=c}return r},parseObject:function(){var e=new n.Matrix4;return function(t,i,r){function o(e){return void 0===i[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),i[e]}function a(e){if(void 0!==e)return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),r[e]}var s;switch(t.type){case"Scene":s=new n.Scene;break;case"PerspectiveCamera":s=new n.PerspectiveCamera(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(s.focus=t.focus),void 0!==t.zoom&&(s.zoom=t.zoom),void 0!==t.filmGauge&&(s.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(s.filmOffset=t.filmOffset),void 0!==t.view&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new n.OrthographicCamera(t.left,t.right,t.top,t.bottom,t.near,t.far);break;case"AmbientLight":s=new n.AmbientLight(t.color,t.intensity);break;case"DirectionalLight":s=new n.DirectionalLight(t.color,t.intensity);break;case"PointLight":s=new n.PointLight(t.color,t.intensity,t.distance,t.decay);break;case"SpotLight":s=new n.SpotLight(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new n.HemisphereLight(t.color,t.groundColor,t.intensity);break;case"Mesh":var c=o(t.geometry),u=a(t.material);s=c.bones&&c.bones.length>0?new n.SkinnedMesh(c,u):new n.Mesh(c,u);break;case"LOD":s=new n.LOD;break;case"Line":s=new n.Line(o(t.geometry),a(t.material),t.mode);break;case"PointCloud":case"Points":s=new n.Points(o(t.geometry),a(t.material));break;case"Sprite":s=new n.Sprite(a(t.material));break;case"Group":s=new n.Group;break;default:s=new n.Object3D}if(s.uuid=t.uuid,void 0!==t.name&&(s.name=t.name),void 0!==t.matrix?(e.fromArray(t.matrix),e.decompose(s.position,s.quaternion,s.scale)):(void 0!==t.position&&s.position.fromArray(t.position),void 0!==t.rotation&&s.rotation.fromArray(t.rotation),void 0!==t.scale&&s.scale.fromArray(t.scale)),void 0!==t.castShadow&&(s.castShadow=t.castShadow),void 0!==t.receiveShadow&&(s.receiveShadow=t.receiveShadow),void 0!==t.visible&&(s.visible=t.visible),void 0!==t.userData&&(s.userData=t.userData),void 0!==t.children)for(var l in t.children)s.add(this.parseObject(t.children[l],i,r));if("LOD"===t.type)for(var h=t.levels,d=0;d<h.length;d++){var p=h[d],l=s.getObjectByProperty("uuid",p.object);void 0!==l&&s.addLevel(l,p.distance)}return s}}()},n.TextureLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.TextureLoader.prototype={constructor:n.TextureLoader,load:function(e,t,i,r){var o=new n.Texture,a=new n.ImageLoader(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){o.image=e,o.needsUpdate=!0,void 0!==t&&t(o)},i,r),o},setCrossOrigin:function(e){this.crossOrigin=e},setPath:function(e){this.path=e}},n.CubeTextureLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager},n.CubeTextureLoader.prototype={constructor:n.CubeTextureLoader,load:function(e,t,i,r){function o(i){s.load(e[i],function(e){a.images[i]=e,c++,6===c&&(a.needsUpdate=!0,t&&t(a))},void 0,r)}var a=new n.CubeTexture,s=new n.ImageLoader(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);for(var c=0,u=0;u<e.length;++u)o(u);return a},setCrossOrigin:function(e){this.crossOrigin=e},setPath:function(e){this.path=e}},n.DataTextureLoader=n.BinaryTextureLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager,this._parser=null},n.BinaryTextureLoader.prototype={constructor:n.BinaryTextureLoader,load:function(e,t,i,r){var o=this,a=new n.DataTexture,s=new n.XHRLoader(this.manager);return s.setResponseType("arraybuffer"),s.load(e,function(e){var i=o._parser(e);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:n.ClampToEdgeWrapping,a.wrapT=void 0!==i.wrapT?i.wrapT:n.ClampToEdgeWrapping,a.magFilter=void 0!==i.magFilter?i.magFilter:n.LinearFilter,a.minFilter=void 0!==i.minFilter?i.minFilter:n.LinearMipMapLinearFilter,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps),1===i.mipmapCount&&(a.minFilter=n.LinearFilter),a.needsUpdate=!0,t&&t(a,i))},i,r),a}},n.CompressedTextureLoader=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager,this._parser=null},n.CompressedTextureLoader.prototype={constructor:n.CompressedTextureLoader,load:function(e,t,i,r){function o(o){u.load(e[o],function(e){var i=a._parser(e,!0);s[o]={width:i.width,height:i.height,format:i.format,mipmaps:i.mipmaps},l+=1,6===l&&(1===i.mipmapCount&&(c.minFilter=n.LinearFilter),c.format=i.format,c.needsUpdate=!0,t&&t(c))},i,r)}var a=this,s=[],c=new n.CompressedTexture;c.image=s;var u=new n.XHRLoader(this.manager);if(u.setPath(this.path),u.setResponseType("arraybuffer"),Array.isArray(e))for(var l=0,h=0,d=e.length;h<d;++h)o(h);else u.load(e,function(e){var i=a._parser(e,!0);if(i.isCubemap)for(var r=i.mipmaps.length/i.mipmapCount,o=0;o<r;o++){s[o]={mipmaps:[]};for(var u=0;u<i.mipmapCount;u++)s[o].mipmaps.push(i.mipmaps[o*i.mipmapCount+u]),s[o].format=i.format,s[o].width=i.width,s[o].height=i.height}else c.image.width=i.width,c.image.height=i.height,c.mipmaps=i.mipmaps;1===i.mipmapCount&&(c.minFilter=n.LinearFilter),c.format=i.format,c.needsUpdate=!0,t&&t(c)},i,r);return c},setPath:function(e){this.path=e}},n.Material=function(){Object.defineProperty(this,"id",{value:n.MaterialIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.type="Material",this.side=n.FrontSide,this.opacity=1,this.transparent=!1,this.blending=n.NormalBlending,this.blendSrc=n.SrcAlphaFactor,this.blendDst=n.OneMinusSrcAlphaFactor,this.blendEquation=n.AddEquation,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=n.LessEqualDepth,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0},n.Material.prototype={constructor:n.Material,get needsUpdate(){return this._needsUpdate},set needsUpdate(e){e===!0&&this.update(),this._needsUpdate=e},setValues:function(e){if(void 0!==e)for(var t in e){var i=e[t];if(void 0!==i){var r=this[t];void 0!==r?r instanceof n.Color?r.set(i):r instanceof n.Vector3&&i instanceof n.Vector3?r.copy(i):"overdraw"===t?this[t]=Number(i):this[t]=i:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){function t(e){var t=[];for(var i in e){var r=e[i];delete r.metadata,t.push(r)}return t}var i=void 0===e;i&&(e={textures:{},images:{}});var r={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color instanceof n.Color&&(r.color=this.color.getHex()),.5!==this.roughness&&(r.roughness=this.roughness),.5!==this.metalness&&(r.metalness=this.metalness),this.emissive instanceof n.Color&&(r.emissive=this.emissive.getHex()),this.specular instanceof n.Color&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),this.map instanceof n.Texture&&(r.map=this.map.toJSON(e).uuid),this.alphaMap instanceof n.Texture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap instanceof n.Texture&&(r.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap instanceof n.Texture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap instanceof n.Texture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap instanceof n.Texture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap instanceof n.Texture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap instanceof n.Texture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap instanceof n.Texture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap instanceof n.Texture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.envMap instanceof n.Texture&&(r.envMap=this.envMap.toJSON(e).uuid,r.reflectivity=this.reflectivity),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),void 0!==this.vertexColors&&this.vertexColors!==n.NoColors&&(r.vertexColors=this.vertexColors),void 0!==this.shading&&this.shading!==n.SmoothShading&&(r.shading=this.shading),void 0!==this.blending&&this.blending!==n.NormalBlending&&(r.blending=this.blending),void 0!==this.side&&this.side!==n.FrontSide&&(r.side=this.side),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),i){var o=t(e.textures),a=t(e.images);o.length>0&&(r.textures=o),a.length>0&&(r.images=a)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.side=e.side,this.opacity=e.opacity,this.transparent=e.transparent,this.blending=e.blending,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.clipShadows=e.clipShadows;var t=e.clippingPlanes,i=null;if(null!==t){var r=t.length;i=new Array(r);for(var n=0;n!==r;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},n.EventDispatcher.prototype.apply(n.Material.prototype),n.MaterialIdCount=0,n.LineBasicMaterial=function(e){n.Material.call(this),this.type="LineBasicMaterial",this.color=new n.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.blending=n.NormalBlending,this.vertexColors=n.NoColors,this.fog=!0,this.setValues(e)},n.LineBasicMaterial.prototype=Object.create(n.Material.prototype),n.LineBasicMaterial.prototype.constructor=n.LineBasicMaterial,n.LineBasicMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.vertexColors=e.vertexColors,this.fog=e.fog,this},n.LineDashedMaterial=function(e){n.Material.call(this),this.type="LineDashedMaterial",this.color=new n.Color(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.blending=n.NormalBlending,this.vertexColors=n.NoColors,this.fog=!0,this.setValues(e)},n.LineDashedMaterial.prototype=Object.create(n.Material.prototype),n.LineDashedMaterial.prototype.constructor=n.LineDashedMaterial,n.LineDashedMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this.vertexColors=e.vertexColors,this.fog=e.fog,this},n.MeshBasicMaterial=function(e){n.Material.call(this),this.type="MeshBasicMaterial",this.color=new n.Color(16777215),this.map=null,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=n.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=n.SmoothShading,this.blending=n.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=n.NoColors,this.skinning=!1,this.morphTargets=!1,this.setValues(e)},n.MeshBasicMaterial.prototype=Object.create(n.Material.prototype),n.MeshBasicMaterial.prototype.constructor=n.MeshBasicMaterial,n.MeshBasicMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.fog=e.fog,this.shading=e.shading,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.vertexColors=e.vertexColors,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},n.MeshDepthMaterial=function(e){n.Material.call(this),this.type="MeshDepthMaterial",this.depthPacking=n.BasicDepthPacking,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)},n.MeshDepthMaterial.prototype=Object.create(n.Material.prototype),n.MeshDepthMaterial.prototype.constructor=n.MeshDepthMaterial,n.MeshDepthMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},n.MeshLambertMaterial=function(e){n.Material.call(this),this.type="MeshLambertMaterial",this.color=new n.Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new n.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=n.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.blending=n.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=n.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)},n.MeshLambertMaterial.prototype=Object.create(n.Material.prototype),n.MeshLambertMaterial.prototype.constructor=n.MeshLambertMaterial,n.MeshLambertMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.fog=e.fog,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.vertexColors=e.vertexColors,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},n.MeshNormalMaterial=function(e){n.Material.call(this,e),this.type="MeshNormalMaterial",this.wireframe=!1,this.wireframeLinewidth=1,this.morphTargets=!1,this.setValues(e)},n.MeshNormalMaterial.prototype=Object.create(n.Material.prototype),n.MeshNormalMaterial.prototype.constructor=n.MeshNormalMaterial,n.MeshNormalMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},n.MeshPhongMaterial=function(e){n.Material.call(this),this.type="MeshPhongMaterial",this.color=new n.Color(16777215),this.specular=new n.Color(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new n.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n.Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=n.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=n.SmoothShading,this.blending=n.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=n.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)},n.MeshPhongMaterial.prototype=Object.create(n.Material.prototype),n.MeshPhongMaterial.prototype.constructor=n.MeshPhongMaterial,n.MeshPhongMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.fog=e.fog,this.shading=e.shading,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.vertexColors=e.vertexColors,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},n.MeshStandardMaterial=function(e){n.Material.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new n.Color(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new n.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new n.Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.fog=!0,this.shading=n.SmoothShading,this.blending=n.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=n.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)},n.MeshStandardMaterial.prototype=Object.create(n.Material.prototype),n.MeshStandardMaterial.prototype.constructor=n.MeshStandardMaterial,n.MeshStandardMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.fog=e.fog,this.shading=e.shading,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.vertexColors=e.vertexColors,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},n.MeshPhysicalMaterial=function(e){n.MeshStandardMaterial.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.setValues(e)},n.MeshPhysicalMaterial.prototype=Object.create(n.MeshStandardMaterial.prototype),n.MeshPhysicalMaterial.prototype.constructor=n.MeshPhysicalMaterial,n.MeshPhysicalMaterial.prototype.copy=function(e){return n.MeshStandardMaterial.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this},n.MultiMaterial=function(e){this.uuid=n.Math.generateUUID(),this.type="MultiMaterial",this.materials=e instanceof Array?e:[],this.visible=!0},n.MultiMaterial.prototype={constructor:n.MultiMaterial,toJSON:function(e){for(var t={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},i=this.materials,r=0,n=i.length;r<n;r++){var o=i[r].toJSON(e);delete o.metadata,t.materials.push(o)}return t.visible=this.visible,t},clone:function(){for(var e=new this.constructor,t=0;t<this.materials.length;t++)e.materials.push(this.materials[t].clone());return e.visible=this.visible,e}},n.PointsMaterial=function(e){n.Material.call(this),this.type="PointsMaterial",this.color=new n.Color(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.blending=n.NormalBlending,this.vertexColors=n.NoColors,this.fog=!0,this.setValues(e)},n.PointsMaterial.prototype=Object.create(n.Material.prototype),n.PointsMaterial.prototype.constructor=n.PointsMaterial,n.PointsMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.vertexColors=e.vertexColors,this.fog=e.fog,this},n.ShaderMaterial=function(e){n.Material.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.shading=n.SmoothShading,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.vertexColors=n.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))},n.ShaderMaterial.prototype=Object.create(n.Material.prototype),n.ShaderMaterial.prototype.constructor=n.ShaderMaterial,n.ShaderMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=n.UniformsUtils.clone(e.uniforms),this.defines=e.defines,this.shading=e.shading,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.vertexColors=e.vertexColors,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},n.ShaderMaterial.prototype.toJSON=function(e){var t=n.Material.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},n.RawShaderMaterial=function(e){n.ShaderMaterial.call(this,e),this.type="RawShaderMaterial"},n.RawShaderMaterial.prototype=Object.create(n.ShaderMaterial.prototype),n.RawShaderMaterial.prototype.constructor=n.RawShaderMaterial,n.SpriteMaterial=function(e){n.Material.call(this),this.type="SpriteMaterial",this.color=new n.Color(16777215),this.map=null,this.rotation=0,this.fog=!1,this.setValues(e)},n.SpriteMaterial.prototype=Object.create(n.Material.prototype),n.SpriteMaterial.prototype.constructor=n.SpriteMaterial,n.SpriteMaterial.prototype.copy=function(e){return n.Material.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this.fog=e.fog,this},n.Texture=function(e,t,i,r,o,a,s,c,u,l){Object.defineProperty(this,"id",{value:n.TextureIdCount++}),this.uuid=n.Math.generateUUID(),this.name="",this.sourceFile="",this.image=void 0!==e?e:n.Texture.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:n.Texture.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:n.ClampToEdgeWrapping,this.wrapT=void 0!==r?r:n.ClampToEdgeWrapping,this.magFilter=void 0!==o?o:n.LinearFilter,this.minFilter=void 0!==a?a:n.LinearMipMapLinearFilter,this.anisotropy=void 0!==u?u:1,this.format=void 0!==s?s:n.RGBAFormat,this.type=void 0!==c?c:n.UnsignedByteType, this.offset=new n.Vector2(0,0),this.repeat=new n.Vector2(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:n.LinearEncoding,this.version=0,this.onUpdate=null},n.Texture.DEFAULT_IMAGE=void 0,n.Texture.DEFAULT_MAPPING=n.UVMapping,n.Texture.prototype={constructor:n.Texture,set needsUpdate(e){e===!0&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){function t(e){var t;return void 0!==e.toDataURL?t=e:(t=document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0,e.width,e.height)),t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}if(void 0!==e.textures[this.uuid])return e.textures[this.uuid];var i={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=n.Math.generateUUID()),void 0===e.images[r.uuid]&&(e.images[r.uuid]={uuid:r.uuid,url:t(r)}),i.image=r.uuid}return e.textures[this.uuid]=i,i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(this.mapping===n.UVMapping){if(e.multiply(this.repeat),e.add(this.offset),e.x<0||e.x>1)switch(this.wrapS){case n.RepeatWrapping:e.x=e.x-Math.floor(e.x);break;case n.ClampToEdgeWrapping:e.x=e.x<0?0:1;break;case n.MirroredRepeatWrapping:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case n.RepeatWrapping:e.y=e.y-Math.floor(e.y);break;case n.ClampToEdgeWrapping:e.y=e.y<0?0:1;break;case n.MirroredRepeatWrapping:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}},n.EventDispatcher.prototype.apply(n.Texture.prototype),n.TextureIdCount=0,n.DepthTexture=function(e,t,i,r,o,a,s,c,u){n.Texture.call(this,null,r,o,a,s,c,n.DepthFormat,i,u),this.image={width:e,height:t},this.type=void 0!==i?i:n.UnsignedShortType,this.magFilter=void 0!==s?s:n.NearestFilter,this.minFilter=void 0!==c?c:n.NearestFilter,this.flipY=!1,this.generateMipmaps=!1},n.DepthTexture.prototype=Object.create(n.Texture.prototype),n.DepthTexture.prototype.constructor=n.DepthTexture,n.CanvasTexture=function(e,t,i,r,o,a,s,c,u){n.Texture.call(this,e,t,i,r,o,a,s,c,u),this.needsUpdate=!0},n.CanvasTexture.prototype=Object.create(n.Texture.prototype),n.CanvasTexture.prototype.constructor=n.CanvasTexture,n.CubeTexture=function(e,t,i,r,o,a,s,c,u,l){e=void 0!==e?e:[],t=void 0!==t?t:n.CubeReflectionMapping,n.Texture.call(this,e,t,i,r,o,a,s,c,u,l),this.flipY=!1},n.CubeTexture.prototype=Object.create(n.Texture.prototype),n.CubeTexture.prototype.constructor=n.CubeTexture,Object.defineProperty(n.CubeTexture.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}}),n.CompressedTexture=function(e,t,i,r,o,a,s,c,u,l,h,d){n.Texture.call(this,null,a,s,c,u,l,r,o,h,d),this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1},n.CompressedTexture.prototype=Object.create(n.Texture.prototype),n.CompressedTexture.prototype.constructor=n.CompressedTexture,n.DataTexture=function(e,t,i,r,o,a,s,c,u,l,h,d){n.Texture.call(this,null,a,s,c,u,l,r,o,h,d),this.image={data:e,width:t,height:i},this.magFilter=void 0!==u?u:n.NearestFilter,this.minFilter=void 0!==l?l:n.NearestFilter,this.flipY=!1,this.generateMipmaps=!1},n.DataTexture.prototype=Object.create(n.Texture.prototype),n.DataTexture.prototype.constructor=n.DataTexture,n.VideoTexture=function(e,t,i,r,o,a,s,c,u){function l(){requestAnimationFrame(l),e.readyState>=e.HAVE_CURRENT_DATA&&(h.needsUpdate=!0)}n.Texture.call(this,e,t,i,r,o,a,s,c,u),this.generateMipmaps=!1;var h=this;l()},n.VideoTexture.prototype=Object.create(n.Texture.prototype),n.VideoTexture.prototype.constructor=n.VideoTexture,n.Group=function(){n.Object3D.call(this),this.type="Group"},n.Group.prototype=Object.create(n.Object3D.prototype),n.Group.prototype.constructor=n.Group,n.Points=function(e,t){n.Object3D.call(this),this.type="Points",this.geometry=void 0!==e?e:new n.Geometry,this.material=void 0!==t?t:new n.PointsMaterial({color:16777215*Math.random()})},n.Points.prototype=Object.create(n.Object3D.prototype),n.Points.prototype.constructor=n.Points,n.Points.prototype.raycast=function(){var e=new n.Matrix4,t=new n.Ray,i=new n.Sphere;return function(r,o){function a(e,i){var n=t.distanceSqToPoint(e);if(n<d){var a=t.closestPointToPoint(e);a.applyMatrix4(u);var c=r.ray.origin.distanceTo(a);if(c<r.near||c>r.far)return;o.push({distance:c,distanceToRay:Math.sqrt(n),point:a.clone(),index:i,face:null,object:s})}}var s=this,c=this.geometry,u=this.matrixWorld,l=r.params.Points.threshold;if(null===c.boundingSphere&&c.computeBoundingSphere(),i.copy(c.boundingSphere),i.applyMatrix4(u),r.ray.intersectsSphere(i)!==!1){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var h=l/((this.scale.x+this.scale.y+this.scale.z)/3),d=h*h,p=new n.Vector3;if(c instanceof n.BufferGeometry){var f=c.index,m=c.attributes,g=m.position.array;if(null!==f)for(var v=f.array,y=0,M=v.length;y<M;y++){var A=v[y];p.fromArray(g,3*A),a(p,A)}else for(var y=0,x=g.length/3;y<x;y++)p.fromArray(g,3*y),a(p,y)}else for(var w=c.vertices,y=0,x=w.length;y<x;y++)a(w[y],y)}}}(),n.Points.prototype.clone=function(){return new this.constructor(this.geometry,this.material).copy(this)},n.Line=function(e,t,i){return 1===i?(console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new n.LineSegments(e,t)):(n.Object3D.call(this),this.type="Line",this.geometry=void 0!==e?e:new n.Geometry,void(this.material=void 0!==t?t:new n.LineBasicMaterial({color:16777215*Math.random()})))},n.Line.prototype=Object.create(n.Object3D.prototype),n.Line.prototype.constructor=n.Line,n.Line.prototype.raycast=function(){var e=new n.Matrix4,t=new n.Ray,i=new n.Sphere;return function(r,o){var a=r.linePrecision,s=a*a,c=this.geometry,u=this.matrixWorld;if(null===c.boundingSphere&&c.computeBoundingSphere(),i.copy(c.boundingSphere),i.applyMatrix4(u),r.ray.intersectsSphere(i)!==!1){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var l=new n.Vector3,h=new n.Vector3,d=new n.Vector3,p=new n.Vector3,f=this instanceof n.LineSegments?2:1;if(c instanceof n.BufferGeometry){var m=c.index,g=c.attributes,v=g.position.array;if(null!==m)for(var y=m.array,M=0,A=y.length-1;M<A;M+=f){var x=y[M],w=y[M+1];l.fromArray(v,3*x),h.fromArray(v,3*w);var E=t.distanceSqToSegment(l,h,p,d);if(!(E>s)){p.applyMatrix4(this.matrixWorld);var b=r.ray.origin.distanceTo(p);b<r.near||b>r.far||o.push({distance:b,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}else for(var M=0,A=v.length/3-1;M<A;M+=f){l.fromArray(v,3*M),h.fromArray(v,3*M+3);var E=t.distanceSqToSegment(l,h,p,d);if(!(E>s)){p.applyMatrix4(this.matrixWorld);var b=r.ray.origin.distanceTo(p);b<r.near||b>r.far||o.push({distance:b,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}}else if(c instanceof n.Geometry)for(var T=c.vertices,L=T.length,M=0;M<L-1;M+=f){var E=t.distanceSqToSegment(T[M],T[M+1],p,d);if(!(E>s)){p.applyMatrix4(this.matrixWorld);var b=r.ray.origin.distanceTo(p);b<r.near||b>r.far||o.push({distance:b,point:d.clone().applyMatrix4(this.matrixWorld),index:M,face:null,faceIndex:null,object:this})}}}}}(),n.Line.prototype.clone=function(){return new this.constructor(this.geometry,this.material).copy(this)},n.LineStrip=0,n.LinePieces=1,n.LineSegments=function(e,t){n.Line.call(this,e,t),this.type="LineSegments"},n.LineSegments.prototype=Object.create(n.Line.prototype),n.LineSegments.prototype.constructor=n.LineSegments,n.Mesh=function(e,t){n.Object3D.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new n.Geometry,this.material=void 0!==t?t:new n.MeshBasicMaterial({color:16777215*Math.random()}),this.drawMode=n.TrianglesDrawMode,this.updateMorphTargets()},n.Mesh.prototype=Object.create(n.Object3D.prototype),n.Mesh.prototype.constructor=n.Mesh,n.Mesh.prototype.setDrawMode=function(e){this.drawMode=e},n.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&this.geometry.morphTargets.length>0){this.morphTargetBase=-1,this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var e=0,t=this.geometry.morphTargets.length;e<t;e++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[e].name]=e}},n.Mesh.prototype.getMorphTargetIndexByName=function(e){return void 0!==this.morphTargetDictionary[e]?this.morphTargetDictionary[e]:(console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+e+" does not exist. Returning 0."),0)},n.Mesh.prototype.raycast=function(){function e(e,t,i,r,o,a,s){return n.Triangle.barycoordFromPoint(e,t,i,r,g),o.multiplyScalar(g.x),a.multiplyScalar(g.y),s.multiplyScalar(g.z),o.add(a).add(s),o.clone()}function t(e,t,i,r,o,a,s){var c,u=e.material;if(c=u.side===n.BackSide?i.intersectTriangle(a,o,r,!0,s):i.intersectTriangle(r,o,a,u.side!==n.DoubleSide,s),null===c)return null;y.copy(s),y.applyMatrix4(e.matrixWorld);var l=t.ray.origin.distanceTo(y);return l<t.near||l>t.far?null:{distance:l,point:y.clone(),object:e}}function i(i,r,o,a,l,h,d,g){s.fromArray(a,3*h),c.fromArray(a,3*d),u.fromArray(a,3*g);var y=t(i,r,o,s,c,u,v);return y&&(l&&(p.fromArray(l,2*h),f.fromArray(l,2*d),m.fromArray(l,2*g),y.uv=e(v,s,c,u,p,f,m)),y.face=new n.Face3(h,d,g,n.Triangle.normal(s,c,u)),y.faceIndex=h),y}var r=new n.Matrix4,o=new n.Ray,a=new n.Sphere,s=new n.Vector3,c=new n.Vector3,u=new n.Vector3,l=new n.Vector3,h=new n.Vector3,d=new n.Vector3,p=new n.Vector2,f=new n.Vector2,m=new n.Vector2,g=new n.Vector3,v=new n.Vector3,y=new n.Vector3;return function(g,y){var M=this.geometry,A=this.material,x=this.matrixWorld;if(void 0!==A&&(null===M.boundingSphere&&M.computeBoundingSphere(),a.copy(M.boundingSphere),a.applyMatrix4(x),g.ray.intersectsSphere(a)!==!1&&(r.getInverse(x),o.copy(g.ray).applyMatrix4(r),null===M.boundingBox||o.intersectsBox(M.boundingBox)!==!1))){var w,E;if(M instanceof n.BufferGeometry){var b,T,L,D=M.index,N=M.attributes,S=N.position.array;if(void 0!==N.uv&&(w=N.uv.array),null!==D)for(var C=D.array,I=0,j=C.length;I<j;I+=3)b=C[I],T=C[I+1],L=C[I+2],E=i(this,g,o,S,w,b,T,L),E&&(E.faceIndex=Math.floor(I/3),y.push(E));else for(var I=0,j=S.length;I<j;I+=9)b=I/3,T=b+1,L=b+2,E=i(this,g,o,S,w,b,T,L),E&&(E.index=b,y.push(E))}else if(M instanceof n.Geometry){var _,O,z,k=A instanceof n.MultiMaterial,R=k===!0?A.materials:null,B=M.vertices,U=M.faces,P=M.faceVertexUvs[0];P.length>0&&(w=P);for(var F=0,G=U.length;F<G;F++){var V=U[F],Q=k===!0?R[V.materialIndex]:A;if(void 0!==Q){if(_=B[V.a],O=B[V.b],z=B[V.c],Q.morphTargets===!0){var Y=M.morphTargets,H=this.morphTargetInfluences;s.set(0,0,0),c.set(0,0,0),u.set(0,0,0);for(var W=0,X=Y.length;W<X;W++){var q=H[W];if(0!==q){var Z=Y[W].vertices;s.addScaledVector(l.subVectors(Z[V.a],_),q),c.addScaledVector(h.subVectors(Z[V.b],O),q),u.addScaledVector(d.subVectors(Z[V.c],z),q)}}s.add(_),c.add(O),u.add(z),_=s,O=c,z=u}if(E=t(this,g,o,_,O,z,v)){if(w){var K=w[F];p.copy(K[0]),f.copy(K[1]),m.copy(K[2]),E.uv=e(v,_,O,z,p,f,m)}E.face=V,E.faceIndex=F,y.push(E)}}}}}}}(),n.Mesh.prototype.clone=function(){return new this.constructor(this.geometry,this.material).copy(this)},n.Bone=function(e){n.Object3D.call(this),this.type="Bone",this.skin=e},n.Bone.prototype=Object.create(n.Object3D.prototype),n.Bone.prototype.constructor=n.Bone,n.Bone.prototype.copy=function(e){return n.Object3D.prototype.copy.call(this,e),this.skin=e.skin,this},n.Skeleton=function(e,t,i){if(this.useVertexTexture=void 0===i||i,this.identityMatrix=new n.Matrix4,e=e||[],this.bones=e.slice(0),this.useVertexTexture){var r=Math.sqrt(4*this.bones.length);r=n.Math.nextPowerOfTwo(Math.ceil(r)),r=Math.max(r,4),this.boneTextureWidth=r,this.boneTextureHeight=r,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new n.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,n.RGBAFormat,n.FloatType)}else this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[];for(var o=0,a=this.bones.length;o<a;o++)this.boneInverses.push(new n.Matrix4)}},n.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var i=new n.Matrix4;this.bones[e]&&i.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(i)}},n.Skeleton.prototype.pose=function(){for(var e,t=0,i=this.bones.length;t<i;t++)e=this.bones[t],e&&e.matrixWorld.getInverse(this.boneInverses[t]);for(var t=0,i=this.bones.length;t<i;t++)e=this.bones[t],e&&(e.parent?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},n.Skeleton.prototype.update=function(){var e=new n.Matrix4;return function(){for(var t=0,i=this.bones.length;t<i;t++){var r=this.bones[t]?this.bones[t].matrixWorld:this.identityMatrix;e.multiplyMatrices(r,this.boneInverses[t]),e.toArray(this.boneMatrices,16*t)}this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),n.Skeleton.prototype.clone=function(){return new n.Skeleton(this.bones,this.boneInverses,this.useVertexTexture)},n.SkinnedMesh=function(e,t,i){n.Mesh.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new n.Matrix4,this.bindMatrixInverse=new n.Matrix4;var r=[];if(this.geometry&&void 0!==this.geometry.bones){for(var o,a,s=0,c=this.geometry.bones.length;s<c;++s)a=this.geometry.bones[s],o=new n.Bone(this),r.push(o),o.name=a.name,o.position.fromArray(a.pos),o.quaternion.fromArray(a.rotq),void 0!==a.scl&&o.scale.fromArray(a.scl);for(var s=0,c=this.geometry.bones.length;s<c;++s)a=this.geometry.bones[s],a.parent!==-1&&null!==a.parent&&void 0!==r[a.parent]?r[a.parent].add(r[s]):this.add(r[s])}this.normalizeSkinWeights(),this.updateMatrixWorld(!0),this.bind(new n.Skeleton(r,(void 0),i),this.matrixWorld)},n.SkinnedMesh.prototype=Object.create(n.Mesh.prototype),n.SkinnedMesh.prototype.constructor=n.SkinnedMesh,n.SkinnedMesh.prototype.bind=function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},n.SkinnedMesh.prototype.pose=function(){this.skeleton.pose()},n.SkinnedMesh.prototype.normalizeSkinWeights=function(){if(this.geometry instanceof n.Geometry)for(var e=0;e<this.geometry.skinWeights.length;e++){var t=this.geometry.skinWeights[e],i=1/t.lengthManhattan();i!==1/0?t.multiplyScalar(i):t.set(1,0,0,0)}else if(this.geometry instanceof n.BufferGeometry)for(var r=new n.Vector4,o=this.geometry.attributes.skinWeight,e=0;e<o.count;e++){r.x=o.getX(e),r.y=o.getY(e),r.z=o.getZ(e),r.w=o.getW(e);var i=1/r.lengthManhattan();i!==1/0?r.multiplyScalar(i):r.set(1,0,0,0),o.setXYZW(e,r.x,r.y,r.z,r.w)}},n.SkinnedMesh.prototype.updateMatrixWorld=function(e){n.Mesh.prototype.updateMatrixWorld.call(this,!0),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh unrecognized bindMode: "+this.bindMode)},n.SkinnedMesh.prototype.clone=function(){return new this.constructor(this.geometry,this.material,this.useVertexTexture).copy(this)},n.LOD=function(){n.Object3D.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})},n.LOD.prototype=Object.create(n.Object3D.prototype),n.LOD.prototype.constructor=n.LOD,n.LOD.prototype.addLevel=function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var i=this.levels,r=0;r<i.length&&!(t<i[r].distance);r++);i.splice(r,0,{distance:t,object:e}),this.add(e)},n.LOD.prototype.getObjectForDistance=function(e){for(var t=this.levels,i=1,r=t.length;i<r&&!(e<t[i].distance);i++);return t[i-1].object},n.LOD.prototype.raycast=function(){var e=new n.Vector3;return function(t,i){e.setFromMatrixPosition(this.matrixWorld);var r=t.ray.origin.distanceTo(e);this.getObjectForDistance(r).raycast(t,i)}}(),n.LOD.prototype.update=function(){var e=new n.Vector3,t=new n.Vector3;return function(i){var r=this.levels;if(r.length>1){e.setFromMatrixPosition(i.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var n=e.distanceTo(t);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&n>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),n.LOD.prototype.copy=function(e){n.Object3D.prototype.copy.call(this,e,!1);for(var t=e.levels,i=0,r=t.length;i<r;i++){var o=t[i];this.addLevel(o.object.clone(),o.distance)}return this},n.LOD.prototype.toJSON=function(e){var t=n.Object3D.prototype.toJSON.call(this,e);t.object.levels=[];for(var i=this.levels,r=0,o=i.length;r<o;r++){var a=i[r];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t},n.Sprite=function(){var e=new Uint16Array([0,1,2,0,2,3]),t=new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]),i=new Float32Array([0,0,1,0,1,1,0,1]),r=new n.BufferGeometry;return r.setIndex(new n.BufferAttribute(e,1)),r.addAttribute("position",new n.BufferAttribute(t,3)),r.addAttribute("uv",new n.BufferAttribute(i,2)),function(e){n.Object3D.call(this),this.type="Sprite",this.geometry=r,this.material=void 0!==e?e:new n.SpriteMaterial}}(),n.Sprite.prototype=Object.create(n.Object3D.prototype),n.Sprite.prototype.constructor=n.Sprite,n.Sprite.prototype.raycast=function(){var e=new n.Vector3;return function(t,i){e.setFromMatrixPosition(this.matrixWorld);var r=t.ray.distanceSqToPoint(e),n=this.scale.x*this.scale.y/4;r>n||i.push({distance:Math.sqrt(r),point:this.position,face:null,object:this})}}(),n.Sprite.prototype.clone=function(){return new this.constructor(this.material).copy(this)},n.Particle=n.Sprite,n.LensFlare=function(e,t,i,r,o){n.Object3D.call(this),this.lensFlares=[],this.positionScreen=new n.Vector3,this.customUpdateCallback=void 0,void 0!==e&&this.add(e,t,i,r,o)},n.LensFlare.prototype=Object.create(n.Object3D.prototype),n.LensFlare.prototype.constructor=n.LensFlare,n.LensFlare.prototype.add=function(e,t,i,r,o,a){void 0===t&&(t=-1),void 0===i&&(i=0),void 0===a&&(a=1),void 0===o&&(o=new n.Color(16777215)),void 0===r&&(r=n.NormalBlending),i=Math.min(i,Math.max(0,i)),this.lensFlares.push({texture:e,size:t,distance:i,x:0,y:0,z:0,scale:1,rotation:0,opacity:a,color:o,blending:r})},n.LensFlare.prototype.updateLensFlares=function(){var e,t,i=this.lensFlares.length,r=2*-this.positionScreen.x,n=2*-this.positionScreen.y;for(e=0;e<i;e++)t=this.lensFlares[e],t.x=this.positionScreen.x+r*t.distance,t.y=this.positionScreen.y+n*t.distance,t.wantedRotation=t.x*Math.PI*.25,t.rotation+=.25*(t.wantedRotation-t.rotation)},n.LensFlare.prototype.copy=function(e){n.Object3D.prototype.copy.call(this,e),this.positionScreen.copy(e.positionScreen),this.customUpdateCallback=e.customUpdateCallback;for(var t=0,i=e.lensFlares.length;t<i;t++)this.lensFlares.push(e.lensFlares[t]);return this},n.Scene=function(){n.Object3D.call(this),this.type="Scene",this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0},n.Scene.prototype=Object.create(n.Object3D.prototype),n.Scene.prototype.constructor=n.Scene,n.Scene.prototype.copy=function(e,t){return n.Object3D.prototype.copy.call(this,e,t),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},n.Fog=function(e,t,i){this.name="",this.color=new n.Color(e),this.near=void 0!==t?t:1,this.far=void 0!==i?i:1e3},n.Fog.prototype.clone=function(){return new n.Fog(this.color.getHex(),this.near,this.far)},n.FogExp2=function(e,t){this.name="",this.color=new n.Color(e),this.density=void 0!==t?t:25e-5},n.FogExp2.prototype.clone=function(){return new n.FogExp2(this.color.getHex(),this.density)},n.ShaderChunk={},n.ShaderChunk.alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",n.ShaderChunk.alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",n.ShaderChunk.alphatest_fragment="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",n.ShaderChunk.aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",n.ShaderChunk.aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",n.ShaderChunk.begin_vertex="\nvec3 transformed = vec3( position );\n",n.ShaderChunk.beginnormal_vertex="\nvec3 objectNormal = vec3( normal );\n",n.ShaderChunk.bsdfs="bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",n.ShaderChunk.bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",n.ShaderChunk.clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n#endif\n",n.ShaderChunk.clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",n.ShaderChunk.clipping_planes_pars_vertex="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",n.ShaderChunk.clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",n.ShaderChunk.color_fragment="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",n.ShaderChunk.color_pars_fragment="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",n.ShaderChunk.color_pars_vertex="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",n.ShaderChunk.color_vertex="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",n.ShaderChunk.common="#define PI 3.14159265359\n#define PI2 6.28318530718\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\n",n.ShaderChunk.cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\nconst float cubeUV_textureSize = 1024.0;\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\nfloat cubeUV_maxLods1 = log2(cubeUV_textureSize*0.25) - 1.0;\nfloat cubeUV_rangeClamp = exp2((6.0 - 1.0) * 2.0);\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\nfloat cubeUV_maxLods2 = log2(cubeUV_textureSize*0.25) - 2.0;\nconst float cubeUV_rcpTextureSize = 1.0 / cubeUV_textureSize;\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\nfloat cubeUV_maxLods3 = log2(cubeUV_textureSize*0.25) - 3.0;\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n", n.ShaderChunk.defaultnormal_vertex="#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n",n.ShaderChunk.displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",n.ShaderChunk.displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",n.ShaderChunk.emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",n.ShaderChunk.emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",n.ShaderChunk.encodings_pars_fragment="\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n float maxComponent = max( max( value.r, value.g ), value.b );\n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n M = ceil( M * 255.0 ) / 255.0;\n return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float D = max( maxRange / maxRGB, 1.0 );\n D = min( floor( D ) / 255.0, 1.0 );\n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n vec4 vResult;\n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n vResult.w = fract(Le);\n vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n float Le = value.z * 255.0 + value.w;\n vec3 Xp_Y_XYZp;\n Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n return vec4( max(vRGB, 0.0), 1.0 );\n}\n",n.ShaderChunk.encodings_fragment=" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",n.ShaderChunk.envmap_fragment="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#else\n\t\tfloat flipNormal = 1.0;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",n.ShaderChunk.envmap_pars_fragment="#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",n.ShaderChunk.envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",n.ShaderChunk.envmap_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",n.ShaderChunk.fog_fragment="#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",n.ShaderChunk.fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",n.ShaderChunk.lightmap_fragment="#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",n.ShaderChunk.lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",n.ShaderChunk.lights_lambert_vertex="vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",n.ShaderChunk.lights_pars="uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",n.ShaderChunk.lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",n.ShaderChunk.lights_phong_pars_fragment="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",n.ShaderChunk.lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.16 * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#endif\n",n.ShaderChunk.lights_physical_pars_fragment="struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t#endif\n};\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectSpecular += radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",n.ShaderChunk.lights_template="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\tRE_IndirectSpecular( radiance, geometry, material, reflectedLight );\n#endif\n",n.ShaderChunk.logdepthbuf_fragment="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",n.ShaderChunk.logdepthbuf_pars_fragment="#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",n.ShaderChunk.logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",n.ShaderChunk.logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",n.ShaderChunk.map_fragment="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",n.ShaderChunk.map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",n.ShaderChunk.map_particle_fragment="#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",n.ShaderChunk.map_particle_pars_fragment="#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",n.ShaderChunk.metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n",n.ShaderChunk.metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",n.ShaderChunk.morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",n.ShaderChunk.morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",n.ShaderChunk.morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",n.ShaderChunk.normal_fragment="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",n.ShaderChunk.normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",n.ShaderChunk.packing="vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 1.0 - 2.0 * rgb.xyz;\n}\nvec4 packDepthToRGBA( const in float value ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( value * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nfloat unpackRGBAToDepth( const in vec4 rgba ) {\n\tconst vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\treturn dot( rgba, bitSh );\n}\nfloat viewZToOrthoDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat OrthoDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",n.ShaderChunk.premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",n.ShaderChunk.project_vertex="#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n",n.ShaderChunk.roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n",n.ShaderChunk.roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",n.ShaderChunk.shadowmap_pars_fragment="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n", n.ShaderChunk.shadowmap_pars_vertex="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",n.ShaderChunk.shadowmap_vertex="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",n.ShaderChunk.shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",n.ShaderChunk.skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",n.ShaderChunk.skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",n.ShaderChunk.skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\tskinned = bindMatrixInverse * skinned;\n#endif\n",n.ShaderChunk.skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",n.ShaderChunk.specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",n.ShaderChunk.specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",n.ShaderChunk.tonemapping_fragment="#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",n.ShaderChunk.tonemapping_pars_fragment="#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",n.ShaderChunk.uv2_pars_fragment="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",n.ShaderChunk.uv2_pars_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",n.ShaderChunk.uv2_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",n.ShaderChunk.uv_pars_fragment="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",n.ShaderChunk.uv_pars_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",n.ShaderChunk.uv_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif",n.ShaderChunk.worldpos_vertex="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n",n.UniformsUtils={merge:function(e){for(var t={},i=0;i<e.length;i++){var r=this.clone(e[i]);for(var n in r)t[n]=r[n]}return t},clone:function(e){var t={};for(var i in e){t[i]={};for(var r in e[i]){var o=e[i][r];o instanceof n.Color||o instanceof n.Vector2||o instanceof n.Vector3||o instanceof n.Vector4||o instanceof n.Matrix3||o instanceof n.Matrix4||o instanceof n.Texture?t[i][r]=o.clone():Array.isArray(o)?t[i][r]=o.slice():t[i][r]=o}}return t}},n.UniformsLib={common:{diffuse:{type:"c",value:new n.Color(15658734)},opacity:{type:"1f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new n.Vector4(0,0,1,1)},specularMap:{type:"t",value:null},alphaMap:{type:"t",value:null},envMap:{type:"t",value:null},flipEnvMap:{type:"1f",value:-1},reflectivity:{type:"1f",value:1},refractionRatio:{type:"1f",value:.98}},aomap:{aoMap:{type:"t",value:null},aoMapIntensity:{type:"1f",value:1}},lightmap:{lightMap:{type:"t",value:null},lightMapIntensity:{type:"1f",value:1}},emissivemap:{emissiveMap:{type:"t",value:null}},bumpmap:{bumpMap:{type:"t",value:null},bumpScale:{type:"1f",value:1}},normalmap:{normalMap:{type:"t",value:null},normalScale:{type:"v2",value:new n.Vector2(1,1)}},displacementmap:{displacementMap:{type:"t",value:null},displacementScale:{type:"1f",value:1},displacementBias:{type:"1f",value:0}},roughnessmap:{roughnessMap:{type:"t",value:null}},metalnessmap:{metalnessMap:{type:"t",value:null}},fog:{fogDensity:{type:"1f",value:25e-5},fogNear:{type:"1f",value:1},fogFar:{type:"1f",value:2e3},fogColor:{type:"c",value:new n.Color(16777215)}},lights:{ambientLightColor:{type:"3fv",value:[]},directionalLights:{type:"sa",value:[],properties:{direction:{type:"v3"},color:{type:"c"},shadow:{type:"1i"},shadowBias:{type:"1f"},shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},directionalShadowMap:{type:"tv",value:[]},directionalShadowMatrix:{type:"m4v",value:[]},spotLights:{type:"sa",value:[],properties:{color:{type:"c"},position:{type:"v3"},direction:{type:"v3"},distance:{type:"1f"},coneCos:{type:"1f"},penumbraCos:{type:"1f"},decay:{type:"1f"},shadow:{type:"1i"},shadowBias:{type:"1f"},shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},spotShadowMap:{type:"tv",value:[]},spotShadowMatrix:{type:"m4v",value:[]},pointLights:{type:"sa",value:[],properties:{color:{type:"c"},position:{type:"v3"},decay:{type:"1f"},distance:{type:"1f"},shadow:{type:"1i"},shadowBias:{type:"1f"},shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},pointShadowMap:{type:"tv",value:[]},pointShadowMatrix:{type:"m4v",value:[]},hemisphereLights:{type:"sa",value:[],properties:{direction:{type:"v3"},skyColor:{type:"c"},groundColor:{type:"c"}}}},points:{diffuse:{type:"c",value:new n.Color(15658734)},opacity:{type:"1f",value:1},size:{type:"1f",value:1},scale:{type:"1f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new n.Vector4(0,0,1,1)}}},n.ShaderChunk.cube_frag="uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\t#include <logdepthbuf_fragment>\n}\n",n.ShaderChunk.cube_vert="varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",n.ShaderChunk.depth_frag="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",n.ShaderChunk.depth_vert="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",n.ShaderChunk.distanceRGBA_frag="uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\n#include <packing>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",n.ShaderChunk.distanceRGBA_vert="varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition;\n}\n",n.ShaderChunk.equirect_frag="uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <logdepthbuf_fragment>\n}\n",n.ShaderChunk.equirect_vert="varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",n.ShaderChunk.linedashed_frag="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.linedashed_vert="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",n.ShaderChunk.meshbasic_frag="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.meshbasic_vert="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n}\n",n.ShaderChunk.meshlambert_frag="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.meshlambert_vert="#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n}\n",n.ShaderChunk.meshphong_frag="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.meshphong_vert="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n}\n",n.ShaderChunk.meshphysical_frag="#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.meshphysical_vert="#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",n.ShaderChunk.normal_frag="uniform float opacity;\nvarying vec3 vNormal;\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( vNormal ), opacity );\n\t#include <logdepthbuf_fragment>\n}\n",n.ShaderChunk.normal_vert="varying vec3 vNormal;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",n.ShaderChunk.points_frag="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",n.ShaderChunk.points_vert="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n",n.ShaderLib={basic:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.aomap,n.UniformsLib.fog]),vertexShader:n.ShaderChunk.meshbasic_vert,fragmentShader:n.ShaderChunk.meshbasic_frag},lambert:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.aomap,n.UniformsLib.lightmap,n.UniformsLib.emissivemap,n.UniformsLib.fog,n.UniformsLib.lights,{emissive:{type:"c",value:new n.Color(0)}}]),vertexShader:n.ShaderChunk.meshlambert_vert,fragmentShader:n.ShaderChunk.meshlambert_frag},phong:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.aomap,n.UniformsLib.lightmap,n.UniformsLib.emissivemap,n.UniformsLib.bumpmap,n.UniformsLib.normalmap,n.UniformsLib.displacementmap,n.UniformsLib.fog,n.UniformsLib.lights,{emissive:{type:"c",value:new n.Color(0)},specular:{type:"c",value:new n.Color(1118481)},shininess:{type:"1f",value:30}}]),vertexShader:n.ShaderChunk.meshphong_vert,fragmentShader:n.ShaderChunk.meshphong_frag},standard:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.aomap,n.UniformsLib.lightmap,n.UniformsLib.emissivemap,n.UniformsLib.bumpmap,n.UniformsLib.normalmap,n.UniformsLib.displacementmap,n.UniformsLib.roughnessmap,n.UniformsLib.metalnessmap,n.UniformsLib.fog,n.UniformsLib.lights,{emissive:{type:"c",value:new n.Color(0)},roughness:{type:"1f",value:.5},metalness:{type:"1f",value:0},envMapIntensity:{type:"1f",value:1}}]),vertexShader:n.ShaderChunk.meshphysical_vert,fragmentShader:n.ShaderChunk.meshphysical_frag},points:{uniforms:n.UniformsUtils.merge([n.UniformsLib.points,n.UniformsLib.fog]),vertexShader:n.ShaderChunk.points_vert,fragmentShader:n.ShaderChunk.points_frag},dashed:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.fog,{scale:{type:"1f",value:1},dashSize:{type:"1f",value:1},totalSize:{type:"1f",value:2}}]),vertexShader:n.ShaderChunk.linedashed_vert,fragmentShader:n.ShaderChunk.linedashed_frag},depth:{uniforms:n.UniformsUtils.merge([n.UniformsLib.common,n.UniformsLib.displacementmap]),vertexShader:n.ShaderChunk.depth_vert,fragmentShader:n.ShaderChunk.depth_frag},normal:{uniforms:{opacity:{type:"1f",value:1}},vertexShader:n.ShaderChunk.normal_vert,fragmentShader:n.ShaderChunk.normal_frag},cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"1f",value:-1}},vertexShader:n.ShaderChunk.cube_vert,fragmentShader:n.ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{type:"t",value:null},tFlip:{type:"1f",value:-1}},vertexShader:n.ShaderChunk.equirect_vert,fragmentShader:n.ShaderChunk.equirect_frag},distanceRGBA:{uniforms:{lightPos:{type:"v3",value:new n.Vector3}},vertexShader:n.ShaderChunk.distanceRGBA_vert,fragmentShader:n.ShaderChunk.distanceRGBA_frag}},n.ShaderLib.physical={uniforms:n.UniformsUtils.merge([n.ShaderLib.standard.uniforms,{}]), vertexShader:n.ShaderChunk.meshphysical_vert,fragmentShader:n.ShaderChunk.meshphysical_frag},n.WebGLRenderer=function(e){function t(){return null===be?Re:1}function i(e,t,i,r){de===!0&&(e*=r,t*=r,i*=r),ut.clearColor(e,t,i,r)}function r(){ut.init(),ut.scissor(Se.copy(Be).multiplyScalar(Re)),ut.viewport(Ie.copy(Pe).multiplyScalar(Re)),i(_e.r,_e.g,_e.b,Oe)}function o(){Ee=null,Ne=null,De="",Le=-1,ut.reset()}function a(e){e.preventDefault(),o(),r(),lt.clear()}function s(e){var t=e.target;t.removeEventListener("dispose",s),l(t),tt.textures--}function c(e){var t=e.target;t.removeEventListener("dispose",c),h(t),tt.textures--}function u(e){var t=e.target;t.removeEventListener("dispose",u),d(t)}function l(e){var t=lt.get(e);if(e.image&&t.__image__webglTextureCube)rt.deleteTexture(t.__image__webglTextureCube);else{if(void 0===t.__webglInit)return;rt.deleteTexture(t.__webglTexture)}lt["delete"](e)}function h(e){var t=lt.get(e),i=lt.get(e.texture);if(e){if(void 0!==i.__webglTexture&&rt.deleteTexture(i.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e instanceof n.WebGLRenderTargetCube)for(var r=0;r<6;r++)rt.deleteFramebuffer(t.__webglFramebuffer[r]),t.__webglDepthbuffer&&rt.deleteRenderbuffer(t.__webglDepthbuffer[r]);else rt.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&rt.deleteRenderbuffer(t.__webglDepthbuffer);lt["delete"](e.texture),lt["delete"](e)}}function d(e){p(e),lt["delete"](e)}function p(e){var t=lt.get(e).program;e.program=void 0,void 0!==t&&dt.releaseProgram(t)}function f(e,t,i,r){var o;if(i instanceof n.InstancedBufferGeometry&&(o=st.get("ANGLE_instanced_arrays"),null===o))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0),ut.initAttributes();var a=i.attributes,s=t.getAttributes(),c=e.defaultAttributeValues;for(var u in s){var l=s[u];if(l>=0){var h=a[u];if(void 0!==h){var d=rt.FLOAT,p=h.array,f=h.normalized;p instanceof Float32Array?d=rt.FLOAT:p instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):p instanceof Uint16Array?d=rt.UNSIGNED_SHORT:p instanceof Int16Array?d=rt.SHORT:p instanceof Uint32Array?d=rt.UNSIGNED_INT:p instanceof Int32Array?d=rt.INT:p instanceof Int8Array?d=rt.BYTE:p instanceof Uint8Array&&(d=rt.UNSIGNED_BYTE);var m=h.itemSize,g=ht.getAttributeBuffer(h);if(h instanceof n.InterleavedBufferAttribute){var v=h.data,y=v.stride,M=h.offset;v instanceof n.InstancedInterleavedBuffer?(ut.enableAttributeAndDivisor(l,v.meshPerAttribute,o),void 0===i.maxInstancedCount&&(i.maxInstancedCount=v.meshPerAttribute*v.count)):ut.enableAttribute(l),rt.bindBuffer(rt.ARRAY_BUFFER,g),rt.vertexAttribPointer(l,m,d,f,y*v.array.BYTES_PER_ELEMENT,(r*y+M)*v.array.BYTES_PER_ELEMENT)}else h instanceof n.InstancedBufferAttribute?(ut.enableAttributeAndDivisor(l,h.meshPerAttribute,o),void 0===i.maxInstancedCount&&(i.maxInstancedCount=h.meshPerAttribute*h.count)):ut.enableAttribute(l),rt.bindBuffer(rt.ARRAY_BUFFER,g),rt.vertexAttribPointer(l,m,d,f,0,r*m*h.array.BYTES_PER_ELEMENT)}else if(void 0!==c){var A=c[u];if(void 0!==A)switch(A.length){case 2:rt.vertexAttrib2fv(l,A);break;case 3:rt.vertexAttrib3fv(l,A);break;case 4:rt.vertexAttrib4fv(l,A);break;default:rt.vertexAttrib1fv(l,A)}}}}ut.disableUnusedAttributes()}function m(e,t){return Math.abs(t[0])-Math.abs(e[0])}function g(e,t){return e.object.renderOrder!==t.object.renderOrder?e.object.renderOrder-t.object.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function v(e,t){return e.object.renderOrder!==t.object.renderOrder?e.object.renderOrder-t.object.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function y(e,t,i,r,n){var o,a;i.transparent?(o=ve,a=++ye):(o=me,a=++ge);var s=o[a];void 0!==s?(s.id=e.id,s.object=e,s.geometry=t,s.material=i,s.z=$e.z,s.group=n):(s={id:e.id,object:e,geometry:t,material:i,z:$e.z,group:n},o.push(s))}function M(e){var t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere();var i=Ze.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);if(!Fe.intersectsSphere(i))return!1;if(0===Ye)return!0;var r=we.clippingPlanes,n=i.center,o=-i.radius,a=0;do if(r[a].distanceToPoint(n)<o)return!1;while(++a!==Ye);return!0}function A(e,t){if(e.visible!==!1){if(e.layers.test(t.layers))if(e instanceof n.Light)fe.push(e);else if(e instanceof n.Sprite)e.frustumCulled!==!1&&M(e)!==!0||Ae.push(e);else if(e instanceof n.LensFlare)xe.push(e);else if(e instanceof n.ImmediateRenderObject)we.sortObjects===!0&&($e.setFromMatrixPosition(e.matrixWorld),$e.applyProjection(Je)),y(e,null,e.material,$e.z,null);else if((e instanceof n.Mesh||e instanceof n.Line||e instanceof n.Points)&&(e instanceof n.SkinnedMesh&&e.skeleton.update(),e.frustumCulled===!1||M(e)===!0)){var i=e.material;if(i.visible===!0){we.sortObjects===!0&&($e.setFromMatrixPosition(e.matrixWorld),$e.applyProjection(Je));var r=ht.update(e);if(i instanceof n.MultiMaterial)for(var o=r.groups,a=i.materials,s=0,c=o.length;s<c;s++){var u=o[s],l=a[u.materialIndex];l.visible===!0&&y(e,r,l,$e.z,u)}else y(e,r,i,$e.z,null)}}for(var h=e.children,s=0,c=h.length;s<c;s++)A(h[s],t)}}function x(e,t,i,r){for(var o=0,a=e.length;o<a;o++){var s=e[o],c=s.object,u=s.geometry,l=void 0===r?s.material:r,h=s.group;if(c.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse,c.matrixWorld),c.normalMatrix.getNormalMatrix(c.modelViewMatrix),c instanceof n.ImmediateRenderObject){E(l);var d=T(t,i,l,c);De="",c.render(function(e){we.renderBufferImmediate(e,d,l)})}else we.renderBufferDirect(t,i,u,l,c,h)}}function w(e,t,i){var r=lt.get(e),o=dt.getParameters(e,et,t,Ye,i),a=dt.getProgramCode(e,o),s=r.program,c=!0;if(void 0===s)e.addEventListener("dispose",u);else if(s.code!==a)p(e);else{if(void 0!==o.shaderID)return;c=!1}if(c){if(o.shaderID){var l=n.ShaderLib[o.shaderID];r.__webglShader={name:e.type,uniforms:n.UniformsUtils.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.__webglShader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.__webglShader=r.__webglShader,s=dt.acquireProgram(e,o,a),r.program=s,e.program=s}var h=s.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var d=0;d<we.maxMorphTargets;d++)h["morphTarget"+d]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var d=0;d<we.maxMorphNormals;d++)h["morphNormal"+d]>=0&&e.numSupportedMorphNormals++}var f=r.__webglShader.uniforms;(e instanceof n.ShaderMaterial||e instanceof n.RawShaderMaterial)&&e.clipping!==!0||(r.numClippingPlanes=Ye,f.clippingPlanes=He),(e instanceof n.MeshPhongMaterial||e instanceof n.MeshLambertMaterial||e instanceof n.MeshStandardMaterial||e.lights)&&(r.lightsHash=et.hash,f.ambientLightColor.value=et.ambient,f.directionalLights.value=et.directional,f.spotLights.value=et.spot,f.pointLights.value=et.point,f.hemisphereLights.value=et.hemi,f.directionalShadowMap.value=et.directionalShadowMap,f.directionalShadowMatrix.value=et.directionalShadowMatrix,f.spotShadowMap.value=et.spotShadowMap,f.spotShadowMatrix.value=et.spotShadowMatrix,f.pointShadowMap.value=et.pointShadowMap,f.pointShadowMatrix.value=et.pointShadowMatrix);var m=r.program.getUniforms(),g=n.WebGLUniforms.seqWithValue(m.seq,f);r.uniformsList=g,r.dynamicUniforms=n.WebGLUniforms.splitDynamic(g,f)}function E(e){b(e),e.transparent===!0?ut.setBlending(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):ut.setBlending(n.NoBlending),ut.setDepthFunc(e.depthFunc),ut.setDepthTest(e.depthTest),ut.setDepthWrite(e.depthWrite),ut.setColorWrite(e.colorWrite),ut.setPolygonOffset(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function b(e){e.side!==n.DoubleSide?ut.enable(rt.CULL_FACE):ut.disable(rt.CULL_FACE),ut.setFlipSided(e.side===n.BackSide)}function T(e,t,i,r){je=0;var o=lt.get(i);if(Ge){if(Ve||e!==Ne){var a=e===Ne&&i.id===Le;F(i.clippingPlanes,i.clipShadows,e,o,a)}void 0!==o.numClippingPlanes&&o.numClippingPlanes!==Ye&&(i.needsUpdate=!0)}void 0===o.program&&(i.needsUpdate=!0),void 0!==o.lightsHash&&o.lightsHash!==et.hash&&(i.needsUpdate=!0),i.needsUpdate&&(w(i,t,r),i.needsUpdate=!1);var s=!1,c=!1,u=!1,l=o.program,h=l.getUniforms(),d=o.__webglShader.uniforms;if(l.id!==Ee&&(rt.useProgram(l.program),Ee=l.id,s=!0,c=!0,u=!0),i.id!==Le&&(Le=i.id,c=!0),s||e!==Ne){if(h.set(rt,e,"projectionMatrix"),ct.logarithmicDepthBuffer&&h.setValue(rt,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),e!==Ne&&(Ne=e,c=!0,u=!0),i instanceof n.ShaderMaterial||i instanceof n.MeshPhongMaterial||i instanceof n.MeshStandardMaterial||i.envMap){var p=h.map.cameraPosition;void 0!==p&&p.setValue(rt,$e.setFromMatrixPosition(e.matrixWorld))}(i instanceof n.MeshPhongMaterial||i instanceof n.MeshLambertMaterial||i instanceof n.MeshBasicMaterial||i instanceof n.MeshStandardMaterial||i instanceof n.ShaderMaterial||i.skinning)&&h.setValue(rt,"viewMatrix",e.matrixWorldInverse),h.set(rt,we,"toneMappingExposure"),h.set(rt,we,"toneMappingWhitePoint")}if(i.skinning){h.setOptional(rt,r,"bindMatrix"),h.setOptional(rt,r,"bindMatrixInverse");var f=r.skeleton;f&&(ct.floatVertexTextures&&f.useVertexTexture?(h.set(rt,f,"boneTexture"),h.set(rt,f,"boneTextureWidth"),h.set(rt,f,"boneTextureHeight")):h.setOptional(rt,f,"boneMatrices"))}c&&((i instanceof n.MeshPhongMaterial||i instanceof n.MeshLambertMaterial||i instanceof n.MeshStandardMaterial||i.lights)&&z(d,u),t&&i.fog&&C(d,t),(i instanceof n.MeshBasicMaterial||i instanceof n.MeshLambertMaterial||i instanceof n.MeshPhongMaterial||i instanceof n.MeshStandardMaterial||i instanceof n.MeshDepthMaterial)&&L(d,i),i instanceof n.LineBasicMaterial?D(d,i):i instanceof n.LineDashedMaterial?(D(d,i),N(d,i)):i instanceof n.PointsMaterial?S(d,i):i instanceof n.MeshLambertMaterial?I(d,i):i instanceof n.MeshPhongMaterial?j(d,i):i instanceof n.MeshPhysicalMaterial?O(d,i):i instanceof n.MeshStandardMaterial?_(d,i):i instanceof n.MeshDepthMaterial?i.displacementMap&&(d.displacementMap.value=i.displacementMap,d.displacementScale.value=i.displacementScale,d.displacementBias.value=i.displacementBias):i instanceof n.MeshNormalMaterial&&(d.opacity.value=i.opacity),n.WebGLUniforms.upload(rt,o.uniformsList,d,we)),h.set(rt,r,"modelViewMatrix"),h.set(rt,r,"normalMatrix"),h.setValue(rt,"modelMatrix",r.matrixWorld);var m=o.dynamicUniforms;return null!==m&&(n.WebGLUniforms.evalDynamic(m,d,r,e),n.WebGLUniforms.upload(rt,m,d,we)),l}function L(e,t){e.opacity.value=t.opacity,e.diffuse.value=t.color,t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),e.map.value=t.map,e.specularMap.value=t.specularMap,e.alphaMap.value=t.alphaMap,t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity);var i;if(t.map?i=t.map:t.specularMap?i=t.specularMap:t.displacementMap?i=t.displacementMap:t.normalMap?i=t.normalMap:t.bumpMap?i=t.bumpMap:t.roughnessMap?i=t.roughnessMap:t.metalnessMap?i=t.metalnessMap:t.alphaMap?i=t.alphaMap:t.emissiveMap&&(i=t.emissiveMap),void 0!==i){i instanceof n.WebGLRenderTarget&&(i=i.texture);var r=i.offset,o=i.repeat;e.offsetRepeat.value.set(r.x,r.y,o.x,o.y)}e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap instanceof n.WebGLRenderTargetCube?1:-1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio}function D(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}function N(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function S(e,t){if(e.diffuse.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size*Re,e.scale.value=.5*ae.clientHeight,e.map.value=t.map,null!==t.map){var i=t.map.offset,r=t.map.repeat;e.offsetRepeat.value.set(i.x,i.y,r.x,r.y)}}function C(e,t){e.fogColor.value=t.color,t instanceof n.Fog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t instanceof n.FogExp2&&(e.fogDensity.value=t.density)}function I(e,t){t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}function j(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function _(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function O(e,t){_(e,t)}function z(e,t){e.ambientLightColor.needsUpdate=t,e.directionalLights.needsUpdate=t,e.pointLights.needsUpdate=t,e.spotLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function k(e){for(var t=0,i=0,r=e.length;i<r;i++){var n=e[i];n.castShadow&&(et.shadows[t++]=n)}et.shadows.length=t}function R(e,t){var i,r,o,a,s,c,u=0,l=0,h=0,d=t.matrixWorldInverse,p=0,f=0,m=0,g=0;for(i=0,r=e.length;i<r;i++)if(o=e[i],a=o.color,s=o.intensity,c=o.distance,o instanceof n.AmbientLight)u+=a.r*s,l+=a.g*s,h+=a.b*s;else if(o instanceof n.DirectionalLight){var v=pt.get(o);v.color.copy(o.color).multiplyScalar(o.intensity),v.direction.setFromMatrixPosition(o.matrixWorld),$e.setFromMatrixPosition(o.target.matrixWorld),v.direction.sub($e),v.direction.transformDirection(d),v.shadow=o.castShadow,o.castShadow&&(v.shadowBias=o.shadow.bias,v.shadowRadius=o.shadow.radius,v.shadowMapSize=o.shadow.mapSize),et.directionalShadowMap[p]=o.shadow.map,et.directionalShadowMatrix[p]=o.shadow.matrix,et.directional[p++]=v}else if(o instanceof n.SpotLight){var v=pt.get(o);v.position.setFromMatrixPosition(o.matrixWorld),v.position.applyMatrix4(d),v.color.copy(a).multiplyScalar(s),v.distance=c,v.direction.setFromMatrixPosition(o.matrixWorld),$e.setFromMatrixPosition(o.target.matrixWorld),v.direction.sub($e),v.direction.transformDirection(d),v.coneCos=Math.cos(o.angle),v.penumbraCos=Math.cos(o.angle*(1-o.penumbra)),v.decay=0===o.distance?0:o.decay,v.shadow=o.castShadow,o.castShadow&&(v.shadowBias=o.shadow.bias,v.shadowRadius=o.shadow.radius,v.shadowMapSize=o.shadow.mapSize),et.spotShadowMap[m]=o.shadow.map,et.spotShadowMatrix[m]=o.shadow.matrix,et.spot[m++]=v}else if(o instanceof n.PointLight){var v=pt.get(o);v.position.setFromMatrixPosition(o.matrixWorld),v.position.applyMatrix4(d),v.color.copy(o.color).multiplyScalar(o.intensity),v.distance=o.distance,v.decay=0===o.distance?0:o.decay,v.shadow=o.castShadow,o.castShadow&&(v.shadowBias=o.shadow.bias,v.shadowRadius=o.shadow.radius,v.shadowMapSize=o.shadow.mapSize),et.pointShadowMap[f]=o.shadow.map,void 0===et.pointShadowMatrix[f]&&(et.pointShadowMatrix[f]=new n.Matrix4),$e.setFromMatrixPosition(o.matrixWorld).negate(),et.pointShadowMatrix[f].identity().setPosition($e),et.point[f++]=v}else if(o instanceof n.HemisphereLight){var v=pt.get(o);v.direction.setFromMatrixPosition(o.matrixWorld),v.direction.transformDirection(d),v.direction.normalize(),v.skyColor.copy(o.color).multiplyScalar(s),v.groundColor.copy(o.groundColor).multiplyScalar(s),et.hemi[g++]=v}et.ambient[0]=u,et.ambient[1]=l,et.ambient[2]=h,et.directional.length=p,et.spot.length=m,et.point.length=f,et.hemi.length=g,et.hash=p+","+f+","+m+","+g+","+et.shadows.length}function B(e,t){Ge=0!==we.clippingPlanes.length||we.localClippingEnabled||0!==Xe||Ve,Ve=we.localClippingEnabled,We=U(e,t,0),Xe=null!==e?e.length:0}function U(e,t,i,r){var n=null!==e?e.length:0,o=null;if(0!==n){if(o=He.value,r!==!0||null===o){var a=i+4*n,s=t.matrixWorldInverse,c=qe.getNormalMatrix(s);(null===o||o.length<a)&&(o=new Float32Array(a));for(var u=0,l=i;u!==n;++u,l+=4){var h=Ke.copy(e[u]).applyMatrix4(s,c);h.normal.toArray(o,l),o[l+3]=h.constant}}He.value=o,He.needsUpdate=!0}return Ye=n,o}function P(){He.value!==We&&(He.value=We,He.needsUpdate=Xe>0),Ye=Xe}function F(e,t,i,r,n){if(!Ve||null===e||0===e.length||Qe&&!t)Qe?U(null):P();else{var o=Qe?0:Xe,a=4*o,s=r.clippingState||null;He.value=s,s=U(e,i,a,n);for(var c=0;c!==a;++c)s[c]=We[c];r.clippingState=s,Ye+=o}}function G(){var e=je;return e>=ct.maxTextures&&console.warn("WebGLRenderer: trying to use "+e+" texture units while this GPU supports only "+ct.maxTextures),je+=1,e}function V(e,t,i){var r;if(i?(rt.texParameteri(e,rt.TEXTURE_WRAP_S,oe(t.wrapS)),rt.texParameteri(e,rt.TEXTURE_WRAP_T,oe(t.wrapT)),rt.texParameteri(e,rt.TEXTURE_MAG_FILTER,oe(t.magFilter)),rt.texParameteri(e,rt.TEXTURE_MIN_FILTER,oe(t.minFilter))):(rt.texParameteri(e,rt.TEXTURE_WRAP_S,rt.CLAMP_TO_EDGE),rt.texParameteri(e,rt.TEXTURE_WRAP_T,rt.CLAMP_TO_EDGE),t.wrapS===n.ClampToEdgeWrapping&&t.wrapT===n.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",t),rt.texParameteri(e,rt.TEXTURE_MAG_FILTER,ne(t.magFilter)),rt.texParameteri(e,rt.TEXTURE_MIN_FILTER,ne(t.minFilter)),t.minFilter!==n.NearestFilter&&t.minFilter!==n.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",t)),r=st.get("EXT_texture_filter_anisotropic")){if(t.type===n.FloatType&&null===st.get("OES_texture_float_linear"))return;if(t.type===n.HalfFloatType&&null===st.get("OES_texture_half_float_linear"))return;(t.anisotropy>1||lt.get(t).__currentAnisotropy)&&(rt.texParameterf(e,r.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,we.getMaxAnisotropy())),lt.get(t).__currentAnisotropy=t.anisotropy)}}function Q(e,t,i){void 0===e.__webglInit&&(e.__webglInit=!0,t.addEventListener("dispose",s),e.__webglTexture=rt.createTexture(),tt.textures++),ut.activeTexture(rt.TEXTURE0+i),ut.bindTexture(rt.TEXTURE_2D,e.__webglTexture),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,t.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,t.unpackAlignment);var r=H(t.image,ct.maxTextureSize);X(t)&&W(r)===!1&&(r=q(r));var o=W(r),a=oe(t.format),c=oe(t.type);V(rt.TEXTURE_2D,t,o);var u,l=t.mipmaps;if(t instanceof n.DepthTexture){var h=rt.DEPTH_COMPONENT;if(t.type===n.FloatType){if(!at)throw new Error("Float Depth Texture only supported in WebGL2.0");h=rt.DEPTH_COMPONENT32F}else at&&(h=rt.DEPTH_COMPONENT16);ut.texImage2D(rt.TEXTURE_2D,0,h,r.width,r.height,0,a,c,null)}else if(t instanceof n.DataTexture)if(l.length>0&&o){for(var d=0,p=l.length;d<p;d++)u=l[d],ut.texImage2D(rt.TEXTURE_2D,d,a,u.width,u.height,0,a,c,u.data);t.generateMipmaps=!1}else ut.texImage2D(rt.TEXTURE_2D,0,a,r.width,r.height,0,a,c,r.data);else if(t instanceof n.CompressedTexture)for(var d=0,p=l.length;d<p;d++)u=l[d],t.format!==n.RGBAFormat&&t.format!==n.RGBFormat?ut.getCompressedTextureFormats().indexOf(a)>-1?ut.compressedTexImage2D(rt.TEXTURE_2D,d,a,u.width,u.height,0,u.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ut.texImage2D(rt.TEXTURE_2D,d,a,u.width,u.height,0,a,c,u.data);else if(l.length>0&&o){for(var d=0,p=l.length;d<p;d++)u=l[d],ut.texImage2D(rt.TEXTURE_2D,d,a,a,c,u);t.generateMipmaps=!1}else ut.texImage2D(rt.TEXTURE_2D,0,a,a,c,r);t.generateMipmaps&&o&&rt.generateMipmap(rt.TEXTURE_2D),e.__version=t.version,t.onUpdate&&t.onUpdate(t)}function Y(e,t){e instanceof n.WebGLRenderTarget&&(e=e.texture);var i=lt.get(e);if(e.version>0&&i.__version!==e.version){var r=e.image;return void 0===r?void console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e):r.complete===!1?void console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e):void Q(i,e,t)}ut.activeTexture(rt.TEXTURE0+t),ut.bindTexture(rt.TEXTURE_2D,i.__webglTexture)}function H(e,t){if(e.width>t||e.height>t){var i=t/Math.max(e.width,e.height),r=document.createElement("canvas");r.width=Math.floor(e.width*i),r.height=Math.floor(e.height*i);var n=r.getContext("2d");return n.drawImage(e,0,0,e.width,e.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+r.width+"x"+r.height,e),r}return e}function W(e){return n.Math.isPowerOfTwo(e.width)&&n.Math.isPowerOfTwo(e.height)}function X(e){return e.wrapS!==n.ClampToEdgeWrapping||e.wrapT!==n.ClampToEdgeWrapping||e.minFilter!==n.NearestFilter&&e.minFilter!==n.LinearFilter}function q(e){if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement){var t=document.createElement("canvas");t.width=n.Math.nearestPowerOfTwo(e.width),t.height=n.Math.nearestPowerOfTwo(e.height);var i=t.getContext("2d");return i.drawImage(e,0,0,t.width,t.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+t.width+"x"+t.height,e),t}return e}function Z(e,t){var i=lt.get(e);if(6===e.image.length)if(e.version>0&&i.__version!==e.version){i.__image__webglTextureCube||(e.addEventListener("dispose",s),i.__image__webglTextureCube=rt.createTexture(),tt.textures++),ut.activeTexture(rt.TEXTURE0+t),ut.bindTexture(rt.TEXTURE_CUBE_MAP,i.__image__webglTextureCube),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var r=e instanceof n.CompressedTexture,o=e.image[0]instanceof n.DataTexture,a=[],c=0;c<6;c++)!we.autoScaleCubemaps||r||o?a[c]=o?e.image[c].image:e.image[c]:a[c]=H(e.image[c],ct.maxCubemapSize);var u=a[0],l=W(u),h=oe(e.format),d=oe(e.type);V(rt.TEXTURE_CUBE_MAP,e,l);for(var c=0;c<6;c++)if(r)for(var p,f=a[c].mipmaps,m=0,g=f.length;m<g;m++)p=f[m],e.format!==n.RGBAFormat&&e.format!==n.RGBFormat?ut.getCompressedTextureFormats().indexOf(h)>-1?ut.compressedTexImage2D(rt.TEXTURE_CUBE_MAP_POSITIVE_X+c,m,h,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):ut.texImage2D(rt.TEXTURE_CUBE_MAP_POSITIVE_X+c,m,h,p.width,p.height,0,h,d,p.data);else o?ut.texImage2D(rt.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,h,a[c].width,a[c].height,0,h,d,a[c].data):ut.texImage2D(rt.TEXTURE_CUBE_MAP_POSITIVE_X+c,0,h,h,d,a[c]);e.generateMipmaps&&l&&rt.generateMipmap(rt.TEXTURE_CUBE_MAP),i.__version=e.version,e.onUpdate&&e.onUpdate(e)}else ut.activeTexture(rt.TEXTURE0+t),ut.bindTexture(rt.TEXTURE_CUBE_MAP,i.__image__webglTextureCube)}function K(e,t){ut.activeTexture(rt.TEXTURE0+t),ut.bindTexture(rt.TEXTURE_CUBE_MAP,lt.get(e).__webglTexture)}function J(e,t,i,r){var n=oe(t.texture.format),o=oe(t.texture.type);ut.texImage2D(r,0,n,t.width,t.height,0,n,o,null),rt.bindFramebuffer(rt.FRAMEBUFFER,e),rt.framebufferTexture2D(rt.FRAMEBUFFER,i,r,lt.get(t.texture).__webglTexture,0),rt.bindFramebuffer(rt.FRAMEBUFFER,null)}function $(e,t){rt.bindRenderbuffer(rt.RENDERBUFFER,e),t.depthBuffer&&!t.stencilBuffer?(rt.renderbufferStorage(rt.RENDERBUFFER,rt.DEPTH_COMPONENT16,t.width,t.height),rt.framebufferRenderbuffer(rt.FRAMEBUFFER,rt.DEPTH_ATTACHMENT,rt.RENDERBUFFER,e)):t.depthBuffer&&t.stencilBuffer?(rt.renderbufferStorage(rt.RENDERBUFFER,rt.DEPTH_STENCIL,t.width,t.height),rt.framebufferRenderbuffer(rt.FRAMEBUFFER,rt.DEPTH_STENCIL_ATTACHMENT,rt.RENDERBUFFER,e)):rt.renderbufferStorage(rt.RENDERBUFFER,rt.RGBA4,t.width,t.height),rt.bindRenderbuffer(rt.RENDERBUFFER,null)}function ee(e,t){var i=t instanceof n.WebGLRenderTargetCube;if(i)throw new Error("Depth Texture with cube render targets is not supported!");if(rt.bindFramebuffer(rt.FRAMEBUFFER,e),!(t.depthTexture instanceof n.DepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");lt.get(t.depthTexture).__webglTexture&&t.depthTexture.image.width===t.width&&t.depthTexture.image.height===t.height||(t.depthTexture.image.width=t.width,t.depthTexture.image.height=t.height,t.depthTexture.needsUpdate=!0),we.setTexture(t.depthTexture,0);var r=lt.get(t.depthTexture).__webglTexture;rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.DEPTH_ATTACHMENT,rt.TEXTURE_2D,r,0)}function te(e){var t=lt.get(e),i=e instanceof n.WebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");ee(t.__webglFramebuffer,e)}else if(i){t.__webglDepthbuffer=[];for(var r=0;r<6;r++)rt.bindFramebuffer(rt.FRAMEBUFFER,t.__webglFramebuffer[r]),t.__webglDepthbuffer[r]=rt.createRenderbuffer(),$(t.__webglDepthbuffer[r],e)}else rt.bindFramebuffer(rt.FRAMEBUFFER,t.__webglFramebuffer),t.__webglDepthbuffer=rt.createRenderbuffer(),$(t.__webglDepthbuffer,e);rt.bindFramebuffer(rt.FRAMEBUFFER,null)}function ie(e){var t=lt.get(e),i=lt.get(e.texture);e.addEventListener("dispose",c),i.__webglTexture=rt.createTexture(),tt.textures++;var r=e instanceof n.WebGLRenderTargetCube,o=n.Math.isPowerOfTwo(e.width)&&n.Math.isPowerOfTwo(e.height);if(r){t.__webglFramebuffer=[];for(var a=0;a<6;a++)t.__webglFramebuffer[a]=rt.createFramebuffer()}else t.__webglFramebuffer=rt.createFramebuffer();if(r){ut.bindTexture(rt.TEXTURE_CUBE_MAP,i.__webglTexture),V(rt.TEXTURE_CUBE_MAP,e.texture,o);for(var a=0;a<6;a++)J(t.__webglFramebuffer[a],e,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+a);e.texture.generateMipmaps&&o&&rt.generateMipmap(rt.TEXTURE_CUBE_MAP),ut.bindTexture(rt.TEXTURE_CUBE_MAP,null)}else ut.bindTexture(rt.TEXTURE_2D,i.__webglTexture),V(rt.TEXTURE_2D,e.texture,o),J(t.__webglFramebuffer,e,rt.COLOR_ATTACHMENT0,rt.TEXTURE_2D),e.texture.generateMipmaps&&o&&rt.generateMipmap(rt.TEXTURE_2D),ut.bindTexture(rt.TEXTURE_2D,null);e.depthBuffer&&te(e)}function re(e){var t=e instanceof n.WebGLRenderTargetCube?rt.TEXTURE_CUBE_MAP:rt.TEXTURE_2D,i=lt.get(e.texture).__webglTexture;ut.bindTexture(t,i),rt.generateMipmap(t),ut.bindTexture(t,null)}function ne(e){return e===n.NearestFilter||e===n.NearestMipMapNearestFilter||e===n.NearestMipMapLinearFilter?rt.NEAREST:rt.LINEAR}function oe(e){var t;if(e===n.RepeatWrapping)return rt.REPEAT;if(e===n.ClampToEdgeWrapping)return rt.CLAMP_TO_EDGE;if(e===n.MirroredRepeatWrapping)return rt.MIRRORED_REPEAT;if(e===n.NearestFilter)return rt.NEAREST;if(e===n.NearestMipMapNearestFilter)return rt.NEAREST_MIPMAP_NEAREST;if(e===n.NearestMipMapLinearFilter)return rt.NEAREST_MIPMAP_LINEAR;if(e===n.LinearFilter)return rt.LINEAR;if(e===n.LinearMipMapNearestFilter)return rt.LINEAR_MIPMAP_NEAREST;if(e===n.LinearMipMapLinearFilter)return rt.LINEAR_MIPMAP_LINEAR;if(e===n.UnsignedByteType)return rt.UNSIGNED_BYTE;if(e===n.UnsignedShort4444Type)return rt.UNSIGNED_SHORT_4_4_4_4;if(e===n.UnsignedShort5551Type)return rt.UNSIGNED_SHORT_5_5_5_1;if(e===n.UnsignedShort565Type)return rt.UNSIGNED_SHORT_5_6_5;if(e===n.ByteType)return rt.BYTE;if(e===n.ShortType)return rt.SHORT;if(e===n.UnsignedShortType)return rt.UNSIGNED_SHORT;if(e===n.IntType)return rt.INT;if(e===n.UnsignedIntType)return rt.UNSIGNED_INT;if(e===n.FloatType)return rt.FLOAT;if(t=st.get("OES_texture_half_float"),null!==t&&e===n.HalfFloatType)return t.HALF_FLOAT_OES;if(e===n.AlphaFormat)return rt.ALPHA;if(e===n.RGBFormat)return rt.RGB;if(e===n.RGBAFormat)return rt.RGBA;if(e===n.LuminanceFormat)return rt.LUMINANCE;if(e===n.LuminanceAlphaFormat)return rt.LUMINANCE_ALPHA;if(e===n.DepthFormat)return rt.DEPTH_COMPONENT;if(e===n.AddEquation)return rt.FUNC_ADD;if(e===n.SubtractEquation)return rt.FUNC_SUBTRACT;if(e===n.ReverseSubtractEquation)return rt.FUNC_REVERSE_SUBTRACT;if(e===n.ZeroFactor)return rt.ZERO;if(e===n.OneFactor)return rt.ONE;if(e===n.SrcColorFactor)return rt.SRC_COLOR;if(e===n.OneMinusSrcColorFactor)return rt.ONE_MINUS_SRC_COLOR;if(e===n.SrcAlphaFactor)return rt.SRC_ALPHA;if(e===n.OneMinusSrcAlphaFactor)return rt.ONE_MINUS_SRC_ALPHA;if(e===n.DstAlphaFactor)return rt.DST_ALPHA;if(e===n.OneMinusDstAlphaFactor)return rt.ONE_MINUS_DST_ALPHA;if(e===n.DstColorFactor)return rt.DST_COLOR;if(e===n.OneMinusDstColorFactor)return rt.ONE_MINUS_DST_COLOR;if(e===n.SrcAlphaSaturateFactor)return rt.SRC_ALPHA_SATURATE;if(t=st.get("WEBGL_compressed_texture_s3tc"),null!==t){if(e===n.RGB_S3TC_DXT1_Format)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===n.RGBA_S3TC_DXT1_Format)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===n.RGBA_S3TC_DXT3_Format)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===n.RGBA_S3TC_DXT5_Format)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(t=st.get("WEBGL_compressed_texture_pvrtc"),null!==t){if(e===n.RGB_PVRTC_4BPPV1_Format)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===n.RGB_PVRTC_2BPPV1_Format)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===n.RGBA_PVRTC_4BPPV1_Format)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===n.RGBA_PVRTC_2BPPV1_Format)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t=st.get("WEBGL_compressed_texture_etc1"),null!==t&&e===n.RGB_ETC1_Format)return t.COMPRESSED_RGB_ETC1_WEBGL;if(t=st.get("EXT_blend_minmax"),null!==t){if(e===n.MinEquation)return t.MIN_EXT;if(e===n.MaxEquation)return t.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",n.REVISION),e=e||{};var ae=void 0!==e.canvas?e.canvas:document.createElement("canvas"),se=void 0!==e.context?e.context:null,ce=void 0!==e.alpha&&e.alpha,ue=void 0===e.depth||e.depth,le=void 0===e.stencil||e.stencil,he=void 0!==e.antialias&&e.antialias,de=void 0===e.premultipliedAlpha||e.premultipliedAlpha,pe=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,fe=[],me=[],ge=-1,ve=[],ye=-1,Me=new Float32Array(8),Ae=[],xe=[];this.domElement=ae,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=n.LinearToneMapping,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4,this.autoScaleCubemaps=!0;var we=this,Ee=null,be=null,Te=null,Le=-1,De="",Ne=null,Se=new n.Vector4,Ce=null,Ie=new n.Vector4,je=0,_e=new n.Color(0),Oe=0,ze=ae.width,ke=ae.height,Re=1,Be=new n.Vector4(0,0,ze,ke),Ue=!1,Pe=new n.Vector4(0,0,ze,ke),Fe=new n.Frustum,Ge=!1,Ve=!1,Qe=!1,Ye=0,He={type:"4fv",value:null,needsUpdate:!1},We=null,Xe=0,qe=new n.Matrix3,Ze=new n.Sphere,Ke=new n.Plane,Je=new n.Matrix4,$e=new n.Vector3,et={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},tt={geometries:0,textures:0},it={calls:0,vertices:0,faces:0,points:0};this.info={render:it,memory:tt,programs:null};var rt;try{var nt={alpha:ce,depth:ue,stencil:le,antialias:he,premultipliedAlpha:de,preserveDrawingBuffer:pe};if(rt=se||ae.getContext("webgl",nt)||ae.getContext("experimental-webgl",nt),null===rt)throw null!==ae.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===rt.getShaderPrecisionFormat&&(rt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),ae.addEventListener("webglcontextlost",a,!1)}catch(ot){console.error("THREE.WebGLRenderer: "+ot)}var at="undefined"!=typeof WebGL2RenderingContext&&rt instanceof WebGL2RenderingContext,st=new n.WebGLExtensions(rt);st.get("WEBGL_depth_texture"),st.get("OES_texture_float"),st.get("OES_texture_float_linear"),st.get("OES_texture_half_float"),st.get("OES_texture_half_float_linear"),st.get("OES_standard_derivatives"),st.get("ANGLE_instanced_arrays"),st.get("OES_element_index_uint")&&(n.BufferGeometry.MaxIndex=4294967296);var ct=new n.WebGLCapabilities(rt,st,e),ut=new n.WebGLState(rt,st,oe),lt=new n.WebGLProperties,ht=new n.WebGLObjects(rt,lt,this.info),dt=new n.WebGLPrograms(this,ct),pt=new n.WebGLLights; this.info.programs=dt.programs;var ft=new n.WebGLBufferRenderer(rt,st,it),mt=new n.WebGLIndexedBufferRenderer(rt,st,it);r(),this.context=rt,this.capabilities=ct,this.extensions=st,this.properties=lt,this.state=ut;var gt=new n.WebGLShadowMap(this,et,ht);this.shadowMap=gt;var vt=new n.SpritePlugin(this,Ae),yt=new n.LensFlarePlugin(this,xe);this.getContext=function(){return rt},this.getContextAttributes=function(){return rt.getContextAttributes()},this.forceContextLoss=function(){st.get("WEBGL_lose_context").loseContext()},this.getMaxAnisotropy=function(){var e;return function(){if(void 0!==e)return e;var t=st.get("EXT_texture_filter_anisotropic");return e=null!==t?rt.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}(),this.getPrecision=function(){return ct.precision},this.getPixelRatio=function(){return Re},this.setPixelRatio=function(e){void 0!==e&&(Re=e,this.setSize(Pe.z,Pe.w,!1))},this.getSize=function(){return{width:ze,height:ke}},this.setSize=function(e,t,i){ze=e,ke=t,ae.width=e*Re,ae.height=t*Re,i!==!1&&(ae.style.width=e+"px",ae.style.height=t+"px"),this.setViewport(0,0,e,t)},this.setViewport=function(e,t,i,r){ut.viewport(Pe.set(e,t,i,r))},this.setScissor=function(e,t,i,r){ut.scissor(Be.set(e,t,i,r))},this.setScissorTest=function(e){ut.setScissorTest(Ue=e)},this.getClearColor=function(){return _e},this.setClearColor=function(e,t){_e.set(e),Oe=void 0!==t?t:1,i(_e.r,_e.g,_e.b,Oe)},this.getClearAlpha=function(){return Oe},this.setClearAlpha=function(e){Oe=e,i(_e.r,_e.g,_e.b,Oe)},this.clear=function(e,t,i){var r=0;(void 0===e||e)&&(r|=rt.COLOR_BUFFER_BIT),(void 0===t||t)&&(r|=rt.DEPTH_BUFFER_BIT),(void 0===i||i)&&(r|=rt.STENCIL_BUFFER_BIT),rt.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,i,r){this.setRenderTarget(e),this.clear(t,i,r)},this.resetGLState=o,this.dispose=function(){ae.removeEventListener("webglcontextlost",a,!1)},this.renderBufferImmediate=function(e,t,i){ut.initAttributes();var r=lt.get(e);e.hasPositions&&!r.position&&(r.position=rt.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=rt.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=rt.createBuffer()),e.hasColors&&!r.color&&(r.color=rt.createBuffer());var o=t.getAttributes();if(e.hasPositions&&(rt.bindBuffer(rt.ARRAY_BUFFER,r.position),rt.bufferData(rt.ARRAY_BUFFER,e.positionArray,rt.DYNAMIC_DRAW),ut.enableAttribute(o.position),rt.vertexAttribPointer(o.position,3,rt.FLOAT,!1,0,0)),e.hasNormals){if(rt.bindBuffer(rt.ARRAY_BUFFER,r.normal),"MeshPhongMaterial"!==i.type&&"MeshStandardMaterial"!==i.type&&"MeshPhysicalMaterial"!==i.type&&i.shading===n.FlatShading)for(var a=0,s=3*e.count;a<s;a+=9){var c=e.normalArray,u=(c[a+0]+c[a+3]+c[a+6])/3,l=(c[a+1]+c[a+4]+c[a+7])/3,h=(c[a+2]+c[a+5]+c[a+8])/3;c[a+0]=u,c[a+1]=l,c[a+2]=h,c[a+3]=u,c[a+4]=l,c[a+5]=h,c[a+6]=u,c[a+7]=l,c[a+8]=h}rt.bufferData(rt.ARRAY_BUFFER,e.normalArray,rt.DYNAMIC_DRAW),ut.enableAttribute(o.normal),rt.vertexAttribPointer(o.normal,3,rt.FLOAT,!1,0,0)}e.hasUvs&&i.map&&(rt.bindBuffer(rt.ARRAY_BUFFER,r.uv),rt.bufferData(rt.ARRAY_BUFFER,e.uvArray,rt.DYNAMIC_DRAW),ut.enableAttribute(o.uv),rt.vertexAttribPointer(o.uv,2,rt.FLOAT,!1,0,0)),e.hasColors&&i.vertexColors!==n.NoColors&&(rt.bindBuffer(rt.ARRAY_BUFFER,r.color),rt.bufferData(rt.ARRAY_BUFFER,e.colorArray,rt.DYNAMIC_DRAW),ut.enableAttribute(o.color),rt.vertexAttribPointer(o.color,3,rt.FLOAT,!1,0,0)),ut.disableUnusedAttributes(),rt.drawArrays(rt.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,i,r,o,a,s){E(o);var c=T(e,i,o,a),u=!1,l=r.id+"_"+c.id+"_"+o.wireframe;l!==De&&(De=l,u=!0);var h=a.morphTargetInfluences;if(void 0!==h){for(var d=[],p=0,g=h.length;p<g;p++){var v=h[p];d.push([v,p])}d.sort(m),d.length>8&&(d.length=8);for(var y=r.morphAttributes,p=0,g=d.length;p<g;p++){var v=d[p];if(Me[p]=v[0],0!==v[0]){var M=v[1];o.morphTargets===!0&&y.position&&r.addAttribute("morphTarget"+p,y.position[M]),o.morphNormals===!0&&y.normal&&r.addAttribute("morphNormal"+p,y.normal[M])}else o.morphTargets===!0&&r.removeAttribute("morphTarget"+p),o.morphNormals===!0&&r.removeAttribute("morphNormal"+p)}c.getUniforms().setValue(rt,"morphTargetInfluences",Me),u=!0}var M=r.index,A=r.attributes.position;o.wireframe===!0&&(M=ht.getWireframeAttribute(r));var x;null!==M?(x=mt,x.setIndex(M)):x=ft,u&&(f(o,c,r),null!==M&&rt.bindBuffer(rt.ELEMENT_ARRAY_BUFFER,ht.getAttributeBuffer(M)));var w=0,b=1/0;null!==M?b=M.count:void 0!==A&&(b=A.count);var L=r.drawRange.start,D=r.drawRange.count,N=null!==s?s.start:0,S=null!==s?s.count:1/0,C=Math.max(w,L,N),I=Math.min(w+b,L+D,N+S)-1,j=Math.max(0,I-C+1);if(a instanceof n.Mesh)if(o.wireframe===!0)ut.setLineWidth(o.wireframeLinewidth*t()),x.setMode(rt.LINES);else switch(a.drawMode){case n.TrianglesDrawMode:x.setMode(rt.TRIANGLES);break;case n.TriangleStripDrawMode:x.setMode(rt.TRIANGLE_STRIP);break;case n.TriangleFanDrawMode:x.setMode(rt.TRIANGLE_FAN)}else if(a instanceof n.Line){var _=o.linewidth;void 0===_&&(_=1),ut.setLineWidth(_*t()),a instanceof n.LineSegments?x.setMode(rt.LINES):x.setMode(rt.LINE_STRIP)}else a instanceof n.Points&&x.setMode(rt.POINTS);r instanceof n.InstancedBufferGeometry?r.maxInstancedCount>0&&x.renderInstances(r,C,j):x.render(C,j)},this.render=function(e,t,i,r){if(t instanceof n.Camera==!1)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");var o=e.fog;if(De="",Le=-1,Ne=null,e.autoUpdate===!0&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),t.matrixWorldInverse.getInverse(t.matrixWorld),Je.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Fe.setFromMatrix(Je),fe.length=0,ge=-1,ye=-1,Ae.length=0,xe.length=0,B(this.clippingPlanes,t),A(e,t),me.length=ge+1,ve.length=ye+1,we.sortObjects===!0&&(me.sort(g),ve.sort(v)),Ge&&(Qe=!0,U(null)),k(fe),gt.render(e,t),R(fe,t),Ge&&(Qe=!1,P()),it.calls=0,it.vertices=0,it.faces=0,it.points=0,void 0===i&&(i=null),this.setRenderTarget(i),(this.autoClear||r)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),e.overrideMaterial){var a=e.overrideMaterial;x(me,t,o,a),x(ve,t,o,a)}else ut.setBlending(n.NoBlending),x(me,t,o),x(ve,t,o);if(vt.render(e,t),yt.render(e,t,Ie),i){var s=i.texture;s.generateMipmaps&&W(i)&&s.minFilter!==n.NearestFilter&&s.minFilter!==n.LinearFilter&&re(i)}ut.setDepthTest(!0),ut.setDepthWrite(!0),ut.setColorWrite(!0)},this.setFaceCulling=function(e,t){e===n.CullFaceNone?ut.disable(rt.CULL_FACE):(t===n.FrontFaceDirectionCW?rt.frontFace(rt.CW):rt.frontFace(rt.CCW),e===n.CullFaceBack?rt.cullFace(rt.BACK):e===n.CullFaceFront?rt.cullFace(rt.FRONT):rt.cullFace(rt.FRONT_AND_BACK),ut.enable(rt.CULL_FACE))};var Mt=!1;this.setTexture=function(e,t){Mt||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),Mt=!0),Y(e,t)},this.allocTextureUnit=G,this.setTexture2D=Y,this.setTextureCube=function(e,t){e instanceof n.CubeTexture||Array.isArray(e.image)&&6===e.image.length?Z(e,t):K(e.texture,t)},this.getCurrentRenderTarget=function(){return be},this.setRenderTarget=function(e){be=e,e&&void 0===lt.get(e).__webglFramebuffer&&ie(e);var t,i=e instanceof n.WebGLRenderTargetCube;if(e){var r=lt.get(e);t=i?r.__webglFramebuffer[e.activeCubeFace]:r.__webglFramebuffer,Se.copy(e.scissor),Ce=e.scissorTest,Ie.copy(e.viewport)}else t=null,Se.copy(Be).multiplyScalar(Re),Ce=Ue,Ie.copy(Pe).multiplyScalar(Re);if(Te!==t&&(rt.bindFramebuffer(rt.FRAMEBUFFER,t),Te=t),ut.scissor(Se),ut.setScissorTest(Ce),ut.viewport(Ie),i){var o=lt.get(e.texture);rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,o.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,i,r,o,a){if(e instanceof n.WebGLRenderTarget==!1)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var s=lt.get(e).__webglFramebuffer;if(s){var c=!1;s!==Te&&(rt.bindFramebuffer(rt.FRAMEBUFFER,s),c=!0);try{var u=e.texture;if(u.format!==n.RGBAFormat&&oe(u.format)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(u.type===n.UnsignedByteType||oe(u.type)===rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_TYPE)||u.type===n.FloatType&&st.get("WEBGL_color_buffer_float")||u.type===n.HalfFloatType&&st.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");rt.checkFramebufferStatus(rt.FRAMEBUFFER)===rt.FRAMEBUFFER_COMPLETE?t>0&&t<=e.width-r&&i>0&&i<=e.height-o&&rt.readPixels(t,i,r,o,oe(u.format),oe(u.type),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{c&&rt.bindFramebuffer(rt.FRAMEBUFFER,Te)}}}},n.WebGLRenderTarget=function(e,t,i){this.uuid=n.Math.generateUUID(),this.width=e,this.height=t,this.scissor=new n.Vector4(0,0,e,t),this.scissorTest=!1,this.viewport=new n.Vector4(0,0,e,t),i=i||{},void 0===i.minFilter&&(i.minFilter=n.LinearFilter),this.texture=new n.Texture((void 0),(void 0),i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0===i.stencilBuffer||i.stencilBuffer,this.depthTexture=null},n.WebGLRenderTarget.prototype={constructor:n.WebGLRenderTarget,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}},n.EventDispatcher.prototype.apply(n.WebGLRenderTarget.prototype),n.WebGLRenderTargetCube=function(e,t,i){n.WebGLRenderTarget.call(this,e,t,i),this.activeCubeFace=0,this.activeMipMapLevel=0},n.WebGLRenderTargetCube.prototype=Object.create(n.WebGLRenderTarget.prototype),n.WebGLRenderTargetCube.prototype.constructor=n.WebGLRenderTargetCube,n.WebGLBufferRenderer=function(e,t,i){function r(e){s=e}function o(t,r){e.drawArrays(s,t,r),i.calls++,i.vertices+=r,s===e.TRIANGLES&&(i.faces+=r/3)}function a(r){var o=t.get("ANGLE_instanced_arrays");if(null===o)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var a=r.attributes.position,c=0;a instanceof n.InterleavedBufferAttribute?(c=a.data.count,o.drawArraysInstancedANGLE(s,0,c,r.maxInstancedCount)):(c=a.count,o.drawArraysInstancedANGLE(s,0,c,r.maxInstancedCount)),i.calls++,i.vertices+=c*r.maxInstancedCount,s===e.TRIANGLES&&(i.faces+=r.maxInstancedCount*c/3)}var s;this.setMode=r,this.render=o,this.renderInstances=a},n.WebGLIndexedBufferRenderer=function(e,t,i){function r(e){s=e}function n(i){i.array instanceof Uint32Array&&t.get("OES_element_index_uint")?(c=e.UNSIGNED_INT,u=4):(c=e.UNSIGNED_SHORT,u=2)}function o(t,r){e.drawElements(s,r,c,t*u),i.calls++,i.vertices+=r,s===e.TRIANGLES&&(i.faces+=r/3)}function a(r,n,o){var a=t.get("ANGLE_instanced_arrays");return null===a?void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(a.drawElementsInstancedANGLE(s,o,c,n*u,r.maxInstancedCount),i.calls++,i.vertices+=o*r.maxInstancedCount,void(s===e.TRIANGLES&&(i.faces+=r.maxInstancedCount*o/3)))}var s,c,u;this.setMode=r,this.setIndex=n,this.render=o,this.renderInstances=a},n.WebGLExtensions=function(e){var t={};this.get=function(i){if(void 0!==t[i])return t[i];var r;switch(i){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=e.getExtension("WEBGL_compressed_texture_etc1");break;default:r=e.getExtension(i)}return null===r&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),t[i]=r,r}},n.WebGLCapabilities=function(e,t,i){function r(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}this.getMaxPrecision=r,this.precision=void 0!==i.precision?i.precision:"highp",this.logarithmicDepthBuffer=void 0!==i.logarithmicDepthBuffer&&i.logarithmicDepthBuffer,this.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxVertexTextures=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this.maxCubemapSize=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),this.maxAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.maxVertexUniforms=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),this.maxVaryings=e.getParameter(e.MAX_VARYING_VECTORS),this.maxFragmentUniforms=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),this.vertexTextures=this.maxVertexTextures>0,this.floatFragmentTextures=!!t.get("OES_texture_float"),this.floatVertexTextures=this.vertexTextures&&this.floatFragmentTextures;var n=r(this.precision);n!==this.precision&&(console.warn("THREE.WebGLRenderer:",this.precision,"not supported, using",n,"instead."),this.precision=n),this.logarithmicDepthBuffer&&(this.logarithmicDepthBuffer=!!t.get("EXT_frag_depth"))},n.WebGLGeometries=function(e,t,i){function r(e){var t=e.geometry;if(void 0!==l[t.id])return l[t.id];t.addEventListener("dispose",o);var r;return t instanceof n.BufferGeometry?r=t:t instanceof n.Geometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new n.BufferGeometry).setFromObject(e)),r=t._bufferGeometry),l[t.id]=r,i.memory.geometries++,r}function o(e){var r=e.target,n=l[r.id];null!==n.index&&s(n.index),c(n.attributes),r.removeEventListener("dispose",o),delete l[r.id];var a=t.get(r);a.wireframe&&s(a.wireframe),t["delete"](r);var u=t.get(n);u.wireframe&&s(u.wireframe),t["delete"](n),i.memory.geometries--}function a(e){return e instanceof n.InterleavedBufferAttribute?t.get(e.data).__webglBuffer:t.get(e).__webglBuffer}function s(t){var i=a(t);void 0!==i&&(e.deleteBuffer(i),u(t))}function c(e){for(var t in e)s(e[t])}function u(e){e instanceof n.InterleavedBufferAttribute?t["delete"](e.data):t["delete"](e)}var l={};this.get=r},n.WebGLLights=function(){var e={};this.get=function(t){if(void 0!==e[t.id])return e[t.id];var i;switch(t.type){case"DirectionalLight":i={direction:new n.Vector3,color:new n.Color,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n.Vector2};break;case"SpotLight":i={position:new n.Vector3,direction:new n.Vector3,color:new n.Color,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n.Vector2};break;case"PointLight":i={position:new n.Vector3,color:new n.Color,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new n.Vector2};break;case"HemisphereLight":i={direction:new n.Vector3,skyColor:new n.Color,groundColor:new n.Color}}return e[t.id]=i,i}},n.WebGLObjects=function(e,t,i){function r(t){var i=h.get(t);t.geometry instanceof n.Geometry&&i.updateFromObject(t);var r=i.index,a=i.attributes;null!==r&&o(r,e.ELEMENT_ARRAY_BUFFER);for(var s in a)o(a[s],e.ARRAY_BUFFER);var c=i.morphAttributes;for(var s in c)for(var u=c[s],l=0,d=u.length;l<d;l++)o(u[l],e.ARRAY_BUFFER);return i}function o(e,i){var r=e instanceof n.InterleavedBufferAttribute?e.data:e,o=t.get(r);void 0===o.__webglBuffer?a(o,r,i):o.version!==r.version&&s(o,r,i)}function a(t,i,r){t.__webglBuffer=e.createBuffer(),e.bindBuffer(r,t.__webglBuffer);var n=i.dynamic?e.DYNAMIC_DRAW:e.STATIC_DRAW;e.bufferData(r,i.array,n),t.version=i.version}function s(t,i,r){e.bindBuffer(r,t.__webglBuffer),i.dynamic===!1||i.updateRange.count===-1?e.bufferSubData(r,0,i.array):0===i.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(e.bufferSubData(r,i.updateRange.offset*i.array.BYTES_PER_ELEMENT,i.array.subarray(i.updateRange.offset,i.updateRange.offset+i.updateRange.count)),i.updateRange.count=0),t.version=i.version}function c(e){return e instanceof n.InterleavedBufferAttribute?t.get(e.data).__webglBuffer:t.get(e).__webglBuffer}function u(i){var r=t.get(i);if(void 0!==r.wireframe)return r.wireframe;var a=[],s=i.index,c=i.attributes,u=c.position;if(null!==s)for(var h={},d=s.array,p=0,f=d.length;p<f;p+=3){var m=d[p+0],g=d[p+1],v=d[p+2];l(h,m,g)&&a.push(m,g),l(h,g,v)&&a.push(g,v),l(h,v,m)&&a.push(v,m)}else for(var d=c.position.array,p=0,f=d.length/3-1;p<f;p+=3){var m=p+0,g=p+1,v=p+2;a.push(m,g,g,v,v,m)}var y=u.count>65535?Uint32Array:Uint16Array,M=new n.BufferAttribute(new y(a),1);return o(M,e.ELEMENT_ARRAY_BUFFER),r.wireframe=M,M}function l(e,t,i){if(t>i){var r=t;t=i,i=r}var n=e[t];return void 0===n?(e[t]=[i],!0):n.indexOf(i)===-1&&(n.push(i),!0)}var h=new n.WebGLGeometries(e,t,i);this.getAttributeBuffer=c,this.getWireframeAttribute=u,this.update=r},n.WebGLProgram=function(){function e(e){switch(e){case n.LinearEncoding:return["Linear","( value )"];case n.sRGBEncoding:return["sRGB","( value )"];case n.RGBEEncoding:return["RGBE","( value )"];case n.RGBM7Encoding:return["RGBM","( value, 7.0 )"];case n.RGBM16Encoding:return["RGBM","( value, 16.0 )"];case n.RGBDEncoding:return["RGBD","( value, 256.0 )"];case n.GammaEncoding:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function t(t,i){var r=e(i);return"vec4 "+t+"( vec4 value ) { return "+r[0]+"ToLinear"+r[1]+"; }"}function i(t,i){var r=e(i);return"vec4 "+t+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function r(e,t){var i;switch(t){case n.LinearToneMapping:i="Linear";break;case n.ReinhardToneMapping:i="Reinhard";break;case n.Uncharted2ToneMapping:i="Uncharted2";break;case n.CineonToneMapping:i="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function o(e,t,i){e=e||{};var r=[e.derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return r.filter(c).join("\n")}function a(e){var t=[];for(var i in e){var r=e[i];r!==!1&&t.push("#define "+i+" "+r)}return t.join("\n")}function s(e,t,i){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++){var a=e.getActiveAttrib(t,o),s=a.name;r[s]=e.getAttribLocation(t,s)}return r}function c(e){return""!==e}function u(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function l(e){function t(e,t){var i=n.ShaderChunk[t];if(void 0===i)throw new Error("Can not resolve #include <"+t+">");return l(i)}var i=/#include +<([\w\d.]+)>/g;return e.replace(i,t)}function h(e){function t(e,t,i,r){for(var n="",o=parseInt(t);o<parseInt(i);o++)n+=r.replace(/\[ i \]/g,"[ "+o+" ]");return n}var i=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return e.replace(i,t)}var d=0;return function(e,p,f,m){var g=e.context,v=f.extensions,y=f.defines,M=f.__webglShader.vertexShader,A=f.__webglShader.fragmentShader,x="SHADOWMAP_TYPE_BASIC";m.shadowMapType===n.PCFShadowMap?x="SHADOWMAP_TYPE_PCF":m.shadowMapType===n.PCFSoftShadowMap&&(x="SHADOWMAP_TYPE_PCF_SOFT");var w="ENVMAP_TYPE_CUBE",E="ENVMAP_MODE_REFLECTION",b="ENVMAP_BLENDING_MULTIPLY";if(m.envMap){switch(f.envMap.mapping){case n.CubeReflectionMapping:case n.CubeRefractionMapping:w="ENVMAP_TYPE_CUBE";break;case n.CubeUVReflectionMapping:case n.CubeUVRefractionMapping:w="ENVMAP_TYPE_CUBE_UV";break;case n.EquirectangularReflectionMapping:case n.EquirectangularRefractionMapping:w="ENVMAP_TYPE_EQUIREC";break;case n.SphericalReflectionMapping:w="ENVMAP_TYPE_SPHERE"}switch(f.envMap.mapping){case n.CubeRefractionMapping:case n.EquirectangularRefractionMapping:E="ENVMAP_MODE_REFRACTION"}switch(f.combine){case n.MultiplyOperation:b="ENVMAP_BLENDING_MULTIPLY";break;case n.MixOperation:b="ENVMAP_BLENDING_MIX";break;case n.AddOperation:b="ENVMAP_BLENDING_ADD"}}var T,L,D=e.gammaFactor>0?e.gammaFactor:1,N=o(v,m,e.extensions),S=a(y),C=g.createProgram();f instanceof n.RawShaderMaterial?(T="",L=""):(T=["precision "+m.precision+" float;","precision "+m.precision+" int;","#define SHADER_NAME "+f.__webglShader.name,S,m.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+D,"#define MAX_BONES "+m.maxBones,m.map?"#define USE_MAP":"",m.envMap?"#define USE_ENVMAP":"",m.envMap?"#define "+E:"",m.lightMap?"#define USE_LIGHTMAP":"",m.aoMap?"#define USE_AOMAP":"",m.emissiveMap?"#define USE_EMISSIVEMAP":"",m.bumpMap?"#define USE_BUMPMAP":"",m.normalMap?"#define USE_NORMALMAP":"",m.displacementMap&&m.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",m.specularMap?"#define USE_SPECULARMAP":"",m.roughnessMap?"#define USE_ROUGHNESSMAP":"",m.metalnessMap?"#define USE_METALNESSMAP":"",m.alphaMap?"#define USE_ALPHAMAP":"",m.vertexColors?"#define USE_COLOR":"",m.flatShading?"#define FLAT_SHADED":"",m.skinning?"#define USE_SKINNING":"",m.useVertexTexture?"#define BONE_TEXTURE":"",m.morphTargets?"#define USE_MORPHTARGETS":"",m.morphNormals&&m.flatShading===!1?"#define USE_MORPHNORMALS":"",m.doubleSided?"#define DOUBLE_SIDED":"",m.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+m.numClippingPlanes,m.shadowMapEnabled?"#define USE_SHADOWMAP":"",m.shadowMapEnabled?"#define "+x:"",m.sizeAttenuation?"#define USE_SIZEATTENUATION":"",m.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",m.logarithmicDepthBuffer&&e.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(c).join("\n"),L=[N,"precision "+m.precision+" float;","precision "+m.precision+" int;","#define SHADER_NAME "+f.__webglShader.name,S,m.alphaTest?"#define ALPHATEST "+m.alphaTest:"","#define GAMMA_FACTOR "+D,m.useFog&&m.fog?"#define USE_FOG":"",m.useFog&&m.fogExp?"#define FOG_EXP2":"",m.map?"#define USE_MAP":"",m.envMap?"#define USE_ENVMAP":"",m.envMap?"#define "+w:"",m.envMap?"#define "+E:"",m.envMap?"#define "+b:"",m.lightMap?"#define USE_LIGHTMAP":"",m.aoMap?"#define USE_AOMAP":"",m.emissiveMap?"#define USE_EMISSIVEMAP":"",m.bumpMap?"#define USE_BUMPMAP":"",m.normalMap?"#define USE_NORMALMAP":"",m.specularMap?"#define USE_SPECULARMAP":"",m.roughnessMap?"#define USE_ROUGHNESSMAP":"",m.metalnessMap?"#define USE_METALNESSMAP":"",m.alphaMap?"#define USE_ALPHAMAP":"",m.vertexColors?"#define USE_COLOR":"",m.flatShading?"#define FLAT_SHADED":"",m.doubleSided?"#define DOUBLE_SIDED":"",m.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+m.numClippingPlanes,m.shadowMapEnabled?"#define USE_SHADOWMAP":"",m.shadowMapEnabled?"#define "+x:"",m.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",m.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",m.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",m.logarithmicDepthBuffer&&e.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",m.envMap&&e.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",m.toneMapping!==n.NoToneMapping?"#define TONE_MAPPING":"",m.toneMapping!==n.NoToneMapping?n.ShaderChunk.tonemapping_pars_fragment:"",m.toneMapping!==n.NoToneMapping?r("toneMapping",m.toneMapping):"",m.outputEncoding||m.mapEncoding||m.envMapEncoding||m.emissiveMapEncoding?n.ShaderChunk.encodings_pars_fragment:"",m.mapEncoding?t("mapTexelToLinear",m.mapEncoding):"",m.envMapEncoding?t("envMapTexelToLinear",m.envMapEncoding):"",m.emissiveMapEncoding?t("emissiveMapTexelToLinear",m.emissiveMapEncoding):"",m.outputEncoding?i("linearToOutputTexel",m.outputEncoding):"",m.depthPacking?"#define DEPTH_PACKING "+f.depthPacking:"","\n"].filter(c).join("\n")),M=l(M,m),M=u(M,m),A=l(A,m),A=u(A,m),f instanceof n.ShaderMaterial==!1&&(M=h(M),A=h(A));var I=T+M,j=L+A,_=n.WebGLShader(g,g.VERTEX_SHADER,I),O=n.WebGLShader(g,g.FRAGMENT_SHADER,j);g.attachShader(C,_),g.attachShader(C,O),void 0!==f.index0AttributeName?g.bindAttribLocation(C,0,f.index0AttributeName):m.morphTargets===!0&&g.bindAttribLocation(C,0,"position"),g.linkProgram(C);var z=g.getProgramInfoLog(C),k=g.getShaderInfoLog(_),R=g.getShaderInfoLog(O),B=!0,U=!0;g.getProgramParameter(C,g.LINK_STATUS)===!1?(B=!1,console.error("THREE.WebGLProgram: shader error: ",g.getError(),"gl.VALIDATE_STATUS",g.getProgramParameter(C,g.VALIDATE_STATUS),"gl.getProgramInfoLog",z,k,R)):""!==z?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",z):""!==k&&""!==R||(U=!1),U&&(this.diagnostics={runnable:B,material:f,programLog:z,vertexShader:{log:k,prefix:T},fragmentShader:{log:R,prefix:L}}),g.deleteShader(_),g.deleteShader(O);var P;this.getUniforms=function(){return void 0===P&&(P=new n.WebGLUniforms(g,C,e)),P};var F;return this.getAttributes=function(){return void 0===F&&(F=s(g,C)),F},this.destroy=function(){g.deleteProgram(C),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=d++,this.code=p,this.usedTimes=1,this.program=C,this.vertexShader=_,this.fragmentShader=O,this}}(),n.WebGLPrograms=function(e,t){function i(e){if(t.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture)return 1024;var i=t.maxVertexUniforms,r=Math.floor((i-20)/4),o=r;return void 0!==e&&e instanceof n.SkinnedMesh&&(o=Math.min(e.skeleton.bones.length,o),o<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+o+" (try OpenGL instead of ANGLE)")),o}function r(e,t){var i;return e?e instanceof n.Texture?i=e.encoding:e instanceof n.WebGLRenderTarget&&(i=e.texture.encoding):i=n.LinearEncoding,i===n.LinearEncoding&&t&&(i=n.GammaEncoding),i}var o=[],a={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},s=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","depthPacking"];this.getParameters=function(o,s,c,u,l){var h=a[o.type],d=i(l),p=e.getPrecision();null!==o.precision&&(p=t.getMaxPrecision(o.precision),p!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",p,"instead."));var f={shaderID:h,precision:p,supportsVertexTextures:t.vertexTextures,outputEncoding:r(e.getCurrentRenderTarget(),e.gammaOutput),map:!!o.map,mapEncoding:r(o.map,e.gammaInput),envMap:!!o.envMap,envMapMode:o.envMap&&o.envMap.mapping,envMapEncoding:r(o.envMap,e.gammaInput),envMapCubeUV:!!o.envMap&&(o.envMap.mapping===n.CubeUVReflectionMapping||o.envMap.mapping===n.CubeUVRefractionMapping),lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,emissiveMapEncoding:r(o.emissiveMap,e.gammaInput),bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,alphaMap:!!o.alphaMap,combine:o.combine,vertexColors:o.vertexColors,fog:c,useFog:o.fog,fogExp:c instanceof n.FogExp2,flatShading:o.shading===n.FlatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:t.logarithmicDepthBuffer,skinning:o.skinning,maxBones:d,useVertexTexture:t.floatVertexTextures&&l&&l.skeleton&&l.skeleton.useVertexTexture,morphTargets:o.morphTargets,morphNormals:o.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numHemiLights:s.hemi.length,numClippingPlanes:u,shadowMapEnabled:e.shadowMap.enabled&&l.receiveShadow&&s.shadows.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,alphaTest:o.alphaTest,doubleSided:o.side===n.DoubleSide,flipSided:o.side===n.BackSide,depthPacking:void 0!==o.depthPacking&&o.depthPacking};return f},this.getProgramCode=function(e,t){var i=[];if(t.shaderID?i.push(t.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)i.push(r),i.push(e.defines[r]);for(var n=0;n<s.length;n++)i.push(t[s[n]]);return i.join()},this.acquireProgram=function(t,i,r){for(var a,s=0,c=o.length;s<c;s++){var u=o[s];if(u.code===r){a=u,++a.usedTimes;break}}return void 0===a&&(a=new n.WebGLProgram(e,r,t,i),o.push(a)),a},this.releaseProgram=function(e){if(0===--e.usedTimes){var t=o.indexOf(e);o[t]=o[o.length-1],o.pop(),e.destroy()}},this.programs=o},n.WebGLProperties=function(){var e={};this.get=function(t){var i=t.uuid,r=e[i];return void 0===r&&(r={},e[i]=r),r},this["delete"]=function(t){delete e[t.uuid]},this.clear=function(){e={}}},n.WebGLShader=function(){function e(e){ for(var t=e.split("\n"),i=0;i<t.length;i++)t[i]=i+1+": "+t[i];return t.join("\n")}return function(t,i,r){var n=t.createShader(i);return t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(n)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",i===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(n),e(r)),n}}(),n.WebGLShadowMap=function(e,t,i){function r(t,i,r,o){var a=t.geometry,s=null,c=y,u=t.customDepthMaterial;if(r&&(c=M,u=t.customDistanceMaterial),u)s=u;else{var l=void 0!==a.morphTargets&&a.morphTargets.length>0&&i.morphTargets,h=t instanceof n.SkinnedMesh&&i.skinning,d=0;l&&(d|=m),h&&(d|=g),s=c[d]}if(e.localClippingEnabled&&i.clipShadows===!0&&0!==i.clippingPlanes.length){var p=s.uuid,f=i.uuid,v=A[p];void 0===v&&(v={},A[p]=v);var x=v[f];void 0===x&&(x=s.clone(),v[f]=x),s=x}return s.visible=i.visible,s.wireframe=i.wireframe,s.side=i.side,s.clipShadows=i.clipShadows,s.clippingPlanes=i.clippingPlanes,s.wireframeLinewidth=i.wireframeLinewidth,s.linewidth=i.linewidth,r&&void 0!==s.uniforms.lightPos&&s.uniforms.lightPos.value.copy(o),s}function o(e,t,i){if(e.visible!==!1){if(e.layers.test(t.layers)&&(e instanceof n.Mesh||e instanceof n.Line||e instanceof n.Points)&&e.castShadow&&(e.frustumCulled===!1||c.intersectsObject(e)===!0)){var r=e.material;r.visible===!0&&(e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld),f.push(e))}for(var a=e.children,s=0,u=a.length;s<u;s++)o(a[s],t,i)}}var a=e.context,s=e.state,c=new n.Frustum,u=new n.Matrix4,l=t.shadows,h=new n.Vector2,d=new n.Vector3,p=new n.Vector3,f=[],m=1,g=2,v=(m|g)+1,y=new Array(v),M=new Array(v),A={},x=[new n.Vector3(1,0,0),new n.Vector3((-1),0,0),new n.Vector3(0,0,1),new n.Vector3(0,0,(-1)),new n.Vector3(0,1,0),new n.Vector3(0,(-1),0)],w=[new n.Vector3(0,1,0),new n.Vector3(0,1,0),new n.Vector3(0,1,0),new n.Vector3(0,1,0),new n.Vector3(0,0,1),new n.Vector3(0,0,(-1))],E=[new n.Vector4,new n.Vector4,new n.Vector4,new n.Vector4,new n.Vector4,new n.Vector4],b=new n.MeshDepthMaterial;b.depthPacking=n.RGBADepthPacking,b.clipping=!0;for(var T=n.ShaderLib.distanceRGBA,L=n.UniformsUtils.clone(T.uniforms),D=0;D!==v;++D){var N=0!==(D&m),S=0!==(D&g),C=b.clone();C.morphTargets=N,C.skinning=S,y[D]=C;var I=new n.ShaderMaterial({defines:{USE_SHADOWMAP:""},uniforms:L,vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,morphTargets:N,skinning:S,clipping:!0});M[D]=I}var j=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n.PCFShadowMap,this.cullFace=n.CullFaceFront,this.render=function(t,m){if(j.enabled!==!1&&(j.autoUpdate!==!1||j.needsUpdate!==!1)&&0!==l.length){s.clearColor(1,1,1,1),s.disable(a.BLEND),s.enable(a.CULL_FACE),a.frontFace(a.CCW),a.cullFace(j.cullFace===n.CullFaceFront?a.FRONT:a.BACK),s.setDepthTest(!0),s.setScissorTest(!1);for(var g,v,y=0,M=l.length;y<M;y++){var A=l[y],b=A.shadow,T=b.camera;if(h.copy(b.mapSize),A instanceof n.PointLight){g=6,v=!0;var L=h.x,D=h.y;E[0].set(2*L,D,L,D),E[1].set(0,D,L,D),E[2].set(3*L,D,L,D),E[3].set(L,D,L,D),E[4].set(3*L,0,L,D),E[5].set(L,0,L,D),h.x*=4,h.y*=2}else g=1,v=!1;if(null===b.map){var N={minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat};b.map=new n.WebGLRenderTarget(h.x,h.y,N),T.updateProjectionMatrix()}b instanceof n.SpotLightShadow&&b.update(A);var S=b.map,C=b.matrix;p.setFromMatrixPosition(A.matrixWorld),T.position.copy(p),e.setRenderTarget(S),e.clear();for(var I=0;I<g;I++){if(v){d.copy(T.position),d.add(x[I]),T.up.copy(w[I]),T.lookAt(d);var _=E[I];s.viewport(_)}else d.setFromMatrixPosition(A.target.matrixWorld),T.lookAt(d);T.updateMatrixWorld(),T.matrixWorldInverse.getInverse(T.matrixWorld),C.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),C.multiply(T.projectionMatrix),C.multiply(T.matrixWorldInverse),u.multiplyMatrices(T.projectionMatrix,T.matrixWorldInverse),c.setFromMatrix(u),f.length=0,o(t,m,T);for(var O=0,z=f.length;O<z;O++){var k=f[O],R=i.update(k),B=k.material;if(B instanceof n.MultiMaterial)for(var U=R.groups,P=B.materials,F=0,G=U.length;F<G;F++){var V=U[F],Q=P[V.materialIndex];if(Q.visible===!0){var Y=r(k,Q,v,p);e.renderBufferDirect(T,null,R,Y,k,V)}}else{var Y=r(k,B,v,p);e.renderBufferDirect(T,null,R,Y,k,null)}}}}var H=e.getClearColor(),W=e.getClearAlpha();e.setClearColor(H,W),s.enable(a.BLEND),j.cullFace===n.CullFaceFront&&a.cullFace(a.BACK),j.needsUpdate=!1}}},n.WebGLState=function(e,t,i){var r=this,o=new n.Vector4,a=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,d=null,p=null,f=null,m=null,g=null,v=null,y=null,M=!1,A=null,x=null,w=null,E=null,b=null,T=null,L=null,D=null,N=null,S=null,C=null,I=null,j=null,_=null,O=null,z=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),k=void 0,R={},B=new n.Vector4,U=null,P=null,F=new n.Vector4,G=new n.Vector4;this.init=function(){this.clearColor(0,0,0,1),this.clearDepth(1),this.clearStencil(0),this.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.frontFace(e.CCW),e.cullFace(e.BACK),this.enable(e.CULL_FACE),this.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA)},this.initAttributes=function(){for(var e=0,t=s.length;e<t;e++)s[e]=0},this.enableAttribute=function(i){if(s[i]=1,0===c[i]&&(e.enableVertexAttribArray(i),c[i]=1),0!==u[i]){var r=t.get("ANGLE_instanced_arrays");r.vertexAttribDivisorANGLE(i,0),u[i]=0}},this.enableAttributeAndDivisor=function(t,i,r){s[t]=1,0===c[t]&&(e.enableVertexAttribArray(t),c[t]=1),u[t]!==i&&(r.vertexAttribDivisorANGLE(t,i),u[t]=i)},this.disableUnusedAttributes=function(){for(var t=0,i=c.length;t<i;t++)c[t]!==s[t]&&(e.disableVertexAttribArray(t),c[t]=0)},this.enable=function(t){l[t]!==!0&&(e.enable(t),l[t]=!0)},this.disable=function(t){l[t]!==!1&&(e.disable(t),l[t]=!1)},this.getCompressedTextureFormats=function(){if(null===h&&(h=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")))for(var i=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),r=0;r<i.length;r++)h.push(i[r]);return h},this.setBlending=function(t,r,o,a,s,c,u,l){t===n.NoBlending?this.disable(e.BLEND):this.enable(e.BLEND),t===d&&l===M||(t===n.AdditiveBlending?l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE)):t===n.SubtractiveBlending?l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR)):t===n.MultiplyBlending?l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.SRC_COLOR,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR)):l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)),d=t,M=l),t===n.CustomBlending?(s=s||r,c=c||o,u=u||a,r===p&&s===g||(e.blendEquationSeparate(i(r),i(s)),p=r,g=s),o===f&&a===m&&c===v&&u===y||(e.blendFuncSeparate(i(o),i(a),i(c),i(u)),f=o,m=a,v=c,y=u)):(p=null,f=null,m=null,g=null,v=null,y=null)},this.setDepthFunc=function(t){if(A!==t){if(t)switch(t){case n.NeverDepth:e.depthFunc(e.NEVER);break;case n.AlwaysDepth:e.depthFunc(e.ALWAYS);break;case n.LessDepth:e.depthFunc(e.LESS);break;case n.LessEqualDepth:e.depthFunc(e.LEQUAL);break;case n.EqualDepth:e.depthFunc(e.EQUAL);break;case n.GreaterEqualDepth:e.depthFunc(e.GEQUAL);break;case n.GreaterDepth:e.depthFunc(e.GREATER);break;case n.NotEqualDepth:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);A=t}},this.setDepthTest=function(t){t?this.enable(e.DEPTH_TEST):this.disable(e.DEPTH_TEST)},this.setDepthWrite=function(t){x!==t&&(e.depthMask(t),x=t)},this.setColorWrite=function(t){w!==t&&(e.colorMask(t,t,t,t),w=t)},this.setStencilFunc=function(t,i,r){b===t&&T===i&&L===r||(e.stencilFunc(t,i,r),b=t,T=i,L=r)},this.setStencilOp=function(t,i,r){D===t&&N===i&&S===r||(e.stencilOp(t,i,r),D=t,N=i,S=r)},this.setStencilTest=function(t){t?this.enable(e.STENCIL_TEST):this.disable(e.STENCIL_TEST)},this.setStencilWrite=function(t){E!==t&&(e.stencilMask(t),E=t)},this.setFlipSided=function(t){C!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),C=t)},this.setLineWidth=function(t){t!==I&&(e.lineWidth(t),I=t)},this.setPolygonOffset=function(t,i,r){t?this.enable(e.POLYGON_OFFSET_FILL):this.disable(e.POLYGON_OFFSET_FILL),!t||j===i&&_===r||(e.polygonOffset(i,r),j=i,_=r)},this.getScissorTest=function(){return O},this.setScissorTest=function(t){O=t,t?this.enable(e.SCISSOR_TEST):this.disable(e.SCISSOR_TEST)},this.activeTexture=function(t){void 0===t&&(t=e.TEXTURE0+z-1),k!==t&&(e.activeTexture(t),k=t)},this.bindTexture=function(t,i){void 0===k&&r.activeTexture();var n=R[k];void 0===n&&(n={type:void 0,texture:void 0},R[k]=n),n.type===t&&n.texture===i||(e.bindTexture(t,i),n.type=t,n.texture=i)},this.compressedTexImage2D=function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error(t)}},this.texImage2D=function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error(t)}},this.clearColor=function(t,i,r,n){o.set(t,i,r,n),B.equals(o)===!1&&(e.clearColor(t,i,r,n),B.copy(o))},this.clearDepth=function(t){U!==t&&(e.clearDepth(t),U=t)},this.clearStencil=function(t){P!==t&&(e.clearStencil(t),P=t)},this.scissor=function(t){F.equals(t)===!1&&(e.scissor(t.x,t.y,t.z,t.w),F.copy(t))},this.viewport=function(t){G.equals(t)===!1&&(e.viewport(t.x,t.y,t.z,t.w),G.copy(t))},this.reset=function(){for(var t=0;t<c.length;t++)1===c[t]&&(e.disableVertexAttribArray(t),c[t]=0);l={},h=null,k=void 0,R={},d=null,w=null,x=null,E=null,C=null}},n.WebGLUniforms=function(){var e=function(){this.seq=[],this.map={}},t=[],i=[],r=function(e,i,r){var n=e[0];if(n<=0||n>0)return e;var o=i*r,a=t[o];if(void 0===a&&(a=new Float32Array(o),t[o]=a),0!==i){n.toArray(a,0);for(var s=1,c=0;s!==i;++s)c+=r,e[s].toArray(a,c)}return a},n=function(e,t){var r=i[t];void 0===r&&(r=new Int32Array(t),i[t]=r);for(var n=0;n!==t;++n)r[n]=e.allocTextureUnit();return r},o=function(e,t){e.uniform1f(this.addr,t)},a=function(e,t){e.uniform1i(this.addr,t)},s=function(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)},c=function(e,t){void 0!==t.x?e.uniform3f(this.addr,t.x,t.y,t.z):void 0!==t.r?e.uniform3f(this.addr,t.r,t.g,t.b):e.uniform3fv(this.addr,t)},u=function(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)},l=function(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)},h=function(e,t){e.uniformMatrix3fv(this.addr,!1,t.elements||t)},d=function(e,t){e.uniformMatrix4fv(this.addr,!1,t.elements||t)},p=function(e,t,i){var r=i.allocTextureUnit();e.uniform1i(this.addr,r),t&&i.setTexture2D(t,r)},f=function(e,t,i){var r=i.allocTextureUnit();e.uniform1i(this.addr,r),t&&i.setTextureCube(t,r)},m=function(e,t){e.uniform2iv(this.addr,t)},g=function(e,t){e.uniform3iv(this.addr,t)},v=function(e,t){e.uniform4iv(this.addr,t)},y=function(e){switch(e){case 5126:return o;case 35664:return s;case 35665:return c;case 35666:return u;case 35674:return l;case 35675:return h;case 35676:return d;case 35678:return p;case 35680:return f;case 5124:case 35670:return a;case 35667:case 35671:return m;case 35668:case 35672:return g;case 35669:case 35673:return v}},M=function(e,t){e.uniform1fv(this.addr,t)},A=function(e,t){e.uniform1iv(this.addr,t)},x=function(e,t){e.uniform2fv(this.addr,r(t,this.size,2))},w=function(e,t){e.uniform3fv(this.addr,r(t,this.size,3))},E=function(e,t){e.uniform4fv(this.addr,r(t,this.size,4))},b=function(e,t){e.uniformMatrix2fv(this.addr,!1,r(t,this.size,4))},T=function(e,t){e.uniformMatrix3fv(this.addr,!1,r(t,this.size,9))},L=function(e,t){e.uniformMatrix4fv(this.addr,!1,r(t,this.size,16))},D=function(e,t,i){var r=t.length,o=n(i,r);e.uniform1iv(this.addr,o);for(var a=0;a!==r;++a){var s=t[a];s&&i.setTexture2D(s,o[a])}},N=function(e,t,i){var r=t.length,o=n(i,r);e.uniform1iv(this.addr,o);for(var a=0;a!==r;++a){var s=t[a];s&&i.setTextureCube(s,o[a])}},S=function(e){switch(e){case 5126:return M;case 35664:return x;case 35665:return w;case 35666:return E;case 35674:return b;case 35675:return T;case 35676:return L;case 35678:return D;case 35680:return N;case 5124:case 35670:return A;case 35667:case 35671:return m;case 35668:case 35672:return g;case 35669:case 35673:return v}},C=function(e,t,i){this.id=e,this.addr=i,this.setValue=y(t.type)},I=function(e,t,i){this.id=e,this.addr=i,this.size=t.size,this.setValue=S(t.type)},j=function(t){this.id=t,e.call(this)};j.prototype.setValue=function(e,t){for(var i=this.seq,r=0,n=i.length;r!==n;++r){var o=i[r];o.setValue(e,t[o.id])}};var _=/([\w\d_]+)(\])?(\[|\.)?/g,O=function(e,t){e.seq.push(t),e.map[t.id]=t},z=function(e,t,i){var r=e.name,n=r.length;for(_.lastIndex=0;;){var o=_.exec(r),a=_.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s=0|s),void 0===u||"["===u&&a+2===n){O(i,void 0===u?new C(s,e,t):new I(s,e,t));break}var l=i.map,h=l[s];void 0===h&&(h=new j(s),O(i,h)),i=h}},k=function(t,i,r){e.call(this),this.renderer=r;for(var n=t.getProgramParameter(i,t.ACTIVE_UNIFORMS),o=0;o!==n;++o){var a=t.getActiveUniform(i,o),s=a.name,c=t.getUniformLocation(i,s);z(a,c,this)}};return k.prototype.setValue=function(e,t,i){var r=this.map[t];void 0!==r&&r.setValue(e,i,this.renderer)},k.prototype.set=function(e,t,i){var r=this.map[i];void 0!==r&&r.setValue(e,t[i],this.renderer)},k.prototype.setOptional=function(e,t,i){var r=t[i];void 0!==r&&this.setValue(e,i,r)},k.upload=function(e,t,i,r){for(var n=0,o=t.length;n!==o;++n){var a=t[n],s=i[a.id];s.needsUpdate!==!1&&a.setValue(e,s.value,r)}},k.seqWithValue=function(e,t){for(var i=[],r=0,n=e.length;r!==n;++r){var o=e[r];o.id in t&&i.push(o)}return i},k.splitDynamic=function(e,t){for(var i=null,r=e.length,n=0,o=0;o!==r;++o){var a=e[o],s=t[a.id];s&&s.dynamic===!0?(null===i&&(i=[]),i.push(a)):(n<o&&(e[n]=a),++n)}return n<r&&(e.length=n),i},k.evalDynamic=function(e,t,i,r){for(var n=0,o=e.length;n!==o;++n){var a=t[e[n].id],s=a.onUpdateCallback;void 0!==s&&s.call(a,i,r)}},k}(),n.LensFlarePlugin=function(e,t){function i(){var e=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),t=new Uint16Array([0,1,2,0,2,3]);o=p.createBuffer(),a=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,o),p.bufferData(p.ARRAY_BUFFER,e,p.STATIC_DRAW),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,a),p.bufferData(p.ELEMENT_ARRAY_BUFFER,t,p.STATIC_DRAW),h=p.createTexture(),d=p.createTexture(),f.bindTexture(p.TEXTURE_2D,h),p.texImage2D(p.TEXTURE_2D,0,p.RGB,16,16,0,p.RGB,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),f.bindTexture(p.TEXTURE_2D,d),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,16,16,0,p.RGBA,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),s={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join("\n"),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join("\n")},c=r(s),u={vertex:p.getAttribLocation(c,"position"),uv:p.getAttribLocation(c,"uv")},l={renderType:p.getUniformLocation(c,"renderType"),map:p.getUniformLocation(c,"map"),occlusionMap:p.getUniformLocation(c,"occlusionMap"),opacity:p.getUniformLocation(c,"opacity"),color:p.getUniformLocation(c,"color"),scale:p.getUniformLocation(c,"scale"),rotation:p.getUniformLocation(c,"rotation"),screenPosition:p.getUniformLocation(c,"screenPosition")}}function r(t){var i=p.createProgram(),r=p.createShader(p.FRAGMENT_SHADER),n=p.createShader(p.VERTEX_SHADER),o="precision "+e.getPrecision()+" float;\n";return p.shaderSource(r,o+t.fragmentShader),p.shaderSource(n,o+t.vertexShader),p.compileShader(r),p.compileShader(n),p.attachShader(i,r),p.attachShader(i,n),p.linkProgram(i),i}var o,a,s,c,u,l,h,d,p=e.context,f=e.state;this.render=function(r,s,m){if(0!==t.length){var g=new n.Vector3,v=m.w/m.z,y=.5*m.z,M=.5*m.w,A=16/m.w,x=new n.Vector2(A*v,A),w=new n.Vector3(1,1,0),E=new n.Vector2(1,1),b=new n.Box2;b.min.set(0,0),b.max.set(m.z-16,m.w-16),void 0===c&&i(),p.useProgram(c),f.initAttributes(),f.enableAttribute(u.vertex),f.enableAttribute(u.uv),f.disableUnusedAttributes(),p.uniform1i(l.occlusionMap,0),p.uniform1i(l.map,1),p.bindBuffer(p.ARRAY_BUFFER,o),p.vertexAttribPointer(u.vertex,2,p.FLOAT,!1,16,0),p.vertexAttribPointer(u.uv,2,p.FLOAT,!1,16,8),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,a),f.disable(p.CULL_FACE),f.setDepthWrite(!1);for(var T=0,L=t.length;T<L;T++){A=16/m.w,x.set(A*v,A);var D=t[T];if(g.set(D.matrixWorld.elements[12],D.matrixWorld.elements[13],D.matrixWorld.elements[14]),g.applyMatrix4(s.matrixWorldInverse),g.applyProjection(s.projectionMatrix),w.copy(g),E.x=m.x+w.x*y+y-8,E.y=m.y+w.y*M+M-8,b.containsPoint(E)===!0){f.activeTexture(p.TEXTURE0),f.bindTexture(p.TEXTURE_2D,null),f.activeTexture(p.TEXTURE1),f.bindTexture(p.TEXTURE_2D,h),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGB,E.x,E.y,16,16,0),p.uniform1i(l.renderType,0),p.uniform2f(l.scale,x.x,x.y),p.uniform3f(l.screenPosition,w.x,w.y,w.z),f.disable(p.BLEND),f.enable(p.DEPTH_TEST),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0),f.activeTexture(p.TEXTURE0),f.bindTexture(p.TEXTURE_2D,d),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,E.x,E.y,16,16,0),p.uniform1i(l.renderType,1),f.disable(p.DEPTH_TEST),f.activeTexture(p.TEXTURE1),f.bindTexture(p.TEXTURE_2D,h),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0),D.positionScreen.copy(w),D.customUpdateCallback?D.customUpdateCallback(D):D.updateLensFlares(),p.uniform1i(l.renderType,2),f.enable(p.BLEND);for(var N=0,S=D.lensFlares.length;N<S;N++){var C=D.lensFlares[N];C.opacity>.001&&C.scale>.001&&(w.x=C.x,w.y=C.y,w.z=C.z,A=C.size*C.scale/m.w,x.x=A*v,x.y=A,p.uniform3f(l.screenPosition,w.x,w.y,w.z),p.uniform2f(l.scale,x.x,x.y),p.uniform1f(l.rotation,C.rotation),p.uniform1f(l.opacity,C.opacity),p.uniform3f(l.color,C.color.r,C.color.g,C.color.b),f.setBlending(C.blending,C.blendEquation,C.blendSrc,C.blendDst),e.setTexture2D(C.texture,1),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0))}}}f.enable(p.CULL_FACE),f.enable(p.DEPTH_TEST),f.setDepthWrite(!0),e.resetGLState()}}},n.SpritePlugin=function(e,t){function i(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),t=new Uint16Array([0,1,2,0,2,3]);a=d.createBuffer(),s=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,a),d.bufferData(d.ARRAY_BUFFER,e,d.STATIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.bufferData(d.ELEMENT_ARRAY_BUFFER,t,d.STATIC_DRAW),c=r(),u={position:d.getAttribLocation(c,"position"),uv:d.getAttribLocation(c,"uv")},l={uvOffset:d.getUniformLocation(c,"uvOffset"),uvScale:d.getUniformLocation(c,"uvScale"),rotation:d.getUniformLocation(c,"rotation"),scale:d.getUniformLocation(c,"scale"),color:d.getUniformLocation(c,"color"),map:d.getUniformLocation(c,"map"),opacity:d.getUniformLocation(c,"opacity"),modelViewMatrix:d.getUniformLocation(c,"modelViewMatrix"),projectionMatrix:d.getUniformLocation(c,"projectionMatrix"),fogType:d.getUniformLocation(c,"fogType"),fogDensity:d.getUniformLocation(c,"fogDensity"),fogNear:d.getUniformLocation(c,"fogNear"),fogFar:d.getUniformLocation(c,"fogFar"),fogColor:d.getUniformLocation(c,"fogColor"),alphaTest:d.getUniformLocation(c,"alphaTest")};var i=document.createElement("canvas");i.width=8,i.height=8;var o=i.getContext("2d");o.fillStyle="white",o.fillRect(0,0,8,8),h=new n.Texture(i),h.needsUpdate=!0}function r(){var t=d.createProgram(),i=d.createShader(d.VERTEX_SHADER),r=d.createShader(d.FRAGMENT_SHADER);return d.shaderSource(i,["precision "+e.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),d.shaderSource(r,["precision "+e.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),d.compileShader(i),d.compileShader(r),d.attachShader(t,i),d.attachShader(t,r),d.linkProgram(t),t}function o(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}var a,s,c,u,l,h,d=e.context,p=e.state,f=new n.Vector3,m=new n.Quaternion,g=new n.Vector3;this.render=function(r,v){if(0!==t.length){void 0===c&&i(),d.useProgram(c),p.initAttributes(),p.enableAttribute(u.position),p.enableAttribute(u.uv),p.disableUnusedAttributes(),p.disable(d.CULL_FACE),p.enable(d.BLEND),d.bindBuffer(d.ARRAY_BUFFER,a),d.vertexAttribPointer(u.position,2,d.FLOAT,!1,16,0),d.vertexAttribPointer(u.uv,2,d.FLOAT,!1,16,8),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,s),d.uniformMatrix4fv(l.projectionMatrix,!1,v.projectionMatrix.elements),p.activeTexture(d.TEXTURE0),d.uniform1i(l.map,0);var y=0,M=0,A=r.fog;A?(d.uniform3f(l.fogColor,A.color.r,A.color.g,A.color.b),A instanceof n.Fog?(d.uniform1f(l.fogNear,A.near),d.uniform1f(l.fogFar,A.far),d.uniform1i(l.fogType,1),y=1,M=1):A instanceof n.FogExp2&&(d.uniform1f(l.fogDensity,A.density),d.uniform1i(l.fogType,2),y=2,M=2)):(d.uniform1i(l.fogType,0),y=0,M=0);for(var x=0,w=t.length;x<w;x++){var E=t[x];E.modelViewMatrix.multiplyMatrices(v.matrixWorldInverse,E.matrixWorld),E.z=-E.modelViewMatrix.elements[14]}t.sort(o);for(var b=[],x=0,w=t.length;x<w;x++){var E=t[x],T=E.material;d.uniform1f(l.alphaTest,T.alphaTest),d.uniformMatrix4fv(l.modelViewMatrix,!1,E.modelViewMatrix.elements),E.matrixWorld.decompose(f,m,g),b[0]=g.x,b[1]=g.y;var L=0;r.fog&&T.fog&&(L=M),y!==L&&(d.uniform1i(l.fogType,L),y=L),null!==T.map?(d.uniform2f(l.uvOffset,T.map.offset.x,T.map.offset.y),d.uniform2f(l.uvScale,T.map.repeat.x,T.map.repeat.y)):(d.uniform2f(l.uvOffset,0,0),d.uniform2f(l.uvScale,1,1)),d.uniform1f(l.opacity,T.opacity),d.uniform3f(l.color,T.color.r,T.color.g,T.color.b),d.uniform1f(l.rotation,T.rotation),d.uniform2fv(l.scale,b),p.setBlending(T.blending,T.blendEquation,T.blendSrc,T.blendDst),p.setDepthTest(T.depthTest),p.setDepthWrite(T.depthWrite),T.map?e.setTexture2D(T.map,0):e.setTexture2D(h,0),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0)}p.enable(d.CULL_FACE),e.resetGLState()}}},Object.defineProperties(n.Box2.prototype,{empty:{value:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()}},isIntersectionBox:{value:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)}}}),Object.defineProperties(n.Box3.prototype,{empty:{value:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()}},isIntersectionBox:{value:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)}},isIntersectionSphere:{value:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}}),Object.defineProperties(n.Matrix3.prototype,{multiplyVector3:{value:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)}},multiplyVector3Array:{value:function(e){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(e)}}}),Object.defineProperties(n.Matrix4.prototype,{extractPosition:{value:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)}},setRotationFromQuaternion:{value:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)}},multiplyVector3:{value:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."),e.applyProjection(this)}},multiplyVector4:{value:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)}},multiplyVector3Array:{value:function(e){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(e)}},rotateAxis:{value:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)}},crossVector:{value:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)}},translate:{value:function(e){console.error("THREE.Matrix4: .translate() has been removed.")}},rotateX:{value:function(e){console.error("THREE.Matrix4: .rotateX() has been removed.")}},rotateY:{value:function(e){console.error("THREE.Matrix4: .rotateY() has been removed.")}},rotateZ:{value:function(e){console.error("THREE.Matrix4: .rotateZ() has been removed.")}},rotateByAxis:{value:function(e,t){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}}}),Object.defineProperties(n.Plane.prototype,{isIntersectionLine:{value:function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)}}}),Object.defineProperties(n.Quaternion.prototype,{multiplyVector3:{value:function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)}}}),Object.defineProperties(n.Ray.prototype,{isIntersectionBox:{value:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)}},isIntersectionPlane:{value:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)}},isIntersectionSphere:{value:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}}),Object.defineProperties(n.Vector3.prototype,{setEulerFromRotationMatrix:{value:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")}},setEulerFromQuaternion:{value:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")}},getPositionFromMatrix:{value:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)}},getScaleFromMatrix:{value:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)}},getColumnFromMatrix:{value:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)}}}),n.Face4=function(e,t,i,r,o,a,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new n.Face3(e,t,i,o,a,s)},n.Vertex=function(e,t,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new n.Vector3(e,t,i)},Object.defineProperties(n.Object3D.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},getChildByName:{value:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)}},renderDepth:{set:function(e){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")}},translate:{value:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(e){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(n,{PointCloud:{value:function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new n.Points(e,t)}},ParticleSystem:{value:function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new n.Points(e,t)}}}),Object.defineProperties(n.Light.prototype,{onlyShadow:{set:function(e){ console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(e){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(e){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(n.BufferAttribute.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."),this.array.length}}}),Object.defineProperties(n.BufferGeometry.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}},addIndex:{value:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)}},addDrawCall:{value:function(e,t,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)}},clearDrawCalls:{value:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()}},computeTangents:{value:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")}},computeOffsets:{value:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}}),Object.defineProperties(n.Material.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")},set:function(e){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE."+this.type+": .wrapRGB has been removed."),new n.Color}}}),Object.defineProperties(n,{PointCloudMaterial:{value:function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new n.PointsMaterial(e)}},ParticleBasicMaterial:{value:function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new n.PointsMaterial(e)}},ParticleSystemMaterial:{value:function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new n.PointsMaterial(e)}}}),Object.defineProperties(n.MeshPhongMaterial.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(e){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(n.ShaderMaterial.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.defineProperties(n.WebGLRenderer.prototype,{supportsFloatTextures:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")}},supportsHalfFloatTextures:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")}},supportsStandardDerivatives:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")}},supportsCompressedTextureS3TC:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")}},supportsCompressedTexturePVRTC:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")}},supportsBlendMinMax:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")}},supportsVertexTextures:{value:function(){return this.capabilities.vertexTextures}},supportsInstancedArrays:{value:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")}},enableScissorTest:{value:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)}},initMaterial:{value:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")}},addPrePlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")}},addPostPlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")}},updateShadowMap:{value:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}},shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=e}}}),Object.defineProperties(n.WebGLRenderTarget.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(n.Audio.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.");var t=this,i=new n.AudioLoader;return i.load(e,function(e){t.setBuffer(e)}),this}}}),n.GeometryUtils={merge:function(e,t,i){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;t instanceof n.Mesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,i)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}},n.ImageUtils={crossOrigin:void 0,loadTexture:function(e,t,i,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var o=new n.TextureLoader;o.setCrossOrigin(this.crossOrigin);var a=o.load(e,i,void 0,r);return t&&(a.mapping=t),a},loadTextureCube:function(e,t,i,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var o=new n.CubeTextureLoader;o.setCrossOrigin(this.crossOrigin);var a=o.load(e,i,void 0,r);return t&&(a.mapping=t),a},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}},n.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(e,t){console.warn("THREE.Projector: .projectVector() is now vector.project()."),e.project(t)},this.unprojectVector=function(e,t){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),e.unproject(t)},this.pickingRay=function(e,t){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},n.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElement("canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}},n.MeshFaceMaterial=n.MultiMaterial,Object.defineProperties(n.LOD.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),n.CurveUtils={tangentQuadraticBezier:function(e,t,i,r){return 2*(1-e)*(i-t)+2*e*(r-i)},tangentCubicBezier:function(e,t,i,r,n){return-3*t*(1-e)*(1-e)+3*i*(1-e)*(1-e)-6*e*i*(1-e)+6*e*r*(1-e)-3*e*e*r+3*e*e*n},tangentSpline:function(e,t,i,r,n){var o=6*e*e-6*e,a=3*e*e-4*e+1,s=-6*e*e+6*e,c=3*e*e-2*e;return o+a+s+c},interpolate:function(e,t,i,r,n){var o=.5*(i-e),a=.5*(r-t),s=n*n,c=n*s;return(2*t-2*i+o+a)*c+(-3*t+3*i-2*o-a)*s+o*n+t}},n.SceneUtils={createMultiMaterialObject:function(e,t){for(var i=new n.Group,r=0,o=t.length;r<o;r++)i.add(new n.Mesh(e,t[r]));return i},detach:function(e,t,i){e.applyMatrix(t.matrixWorld),t.remove(e),i.add(e)},attach:function(e,t,i){var r=new n.Matrix4;r.getInverse(i.matrixWorld),e.applyMatrix(r),t.remove(e),i.add(e)}},n.ShapeUtils={area:function(e){for(var t=e.length,i=0,r=t-1,n=0;n<t;r=n++)i+=e[r].x*e[n].y-e[n].x*e[r].y;return.5*i},triangulate:function(){function e(e,t,i,r,n,o){var a,s,c,u,l,h,d,p,f;if(s=e[o[t]].x,c=e[o[t]].y,u=e[o[i]].x,l=e[o[i]].y,h=e[o[r]].x,d=e[o[r]].y,Number.EPSILON>(u-s)*(d-c)-(l-c)*(h-s))return!1;var m,g,v,y,M,A,x,w,E,b,T,L,D,N,S;for(m=h-u,g=d-l,v=s-h,y=c-d,M=u-s,A=l-c,a=0;a<n;a++)if(p=e[o[a]].x,f=e[o[a]].y,!(p===s&&f===c||p===u&&f===l||p===h&&f===d)&&(x=p-s,w=f-c,E=p-u,b=f-l,T=p-h,L=f-d,S=m*b-g*E,D=M*w-A*x,N=v*L-y*T,S>=-Number.EPSILON&&N>=-Number.EPSILON&&D>=-Number.EPSILON))return!1;return!0}return function(t,i){var r=t.length;if(r<3)return null;var o,a,s,c=[],u=[],l=[];if(n.ShapeUtils.area(t)>0)for(a=0;a<r;a++)u[a]=a;else for(a=0;a<r;a++)u[a]=r-1-a;var h=r,d=2*h;for(a=h-1;h>2;){if(d--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),i?l:c;if(o=a,h<=o&&(o=0),a=o+1,h<=a&&(a=0),s=a+1,h<=s&&(s=0),e(t,o,a,s,h,u)){var p,f,m,g,v;for(p=u[o],f=u[a],m=u[s],c.push([t[p],t[f],t[m]]),l.push([u[o],u[a],u[s]]),g=a,v=a+1;v<h;g++,v++)u[g]=u[v];h--,d=2*h}}return i?l:c}}(),triangulateShape:function(e,t){function i(e,t,i){return e.x!==t.x?e.x<t.x?e.x<=i.x&&i.x<=t.x:t.x<=i.x&&i.x<=e.x:e.y<t.y?e.y<=i.y&&i.y<=t.y:t.y<=i.y&&i.y<=e.y}function r(e,t,r,n,o){var a=t.x-e.x,s=t.y-e.y,c=n.x-r.x,u=n.y-r.y,l=e.x-r.x,h=e.y-r.y,d=s*c-a*u,p=s*l-a*h;if(Math.abs(d)>Number.EPSILON){var f;if(d>0){if(p<0||p>d)return[];if(f=u*l-c*h,f<0||f>d)return[]}else{if(p>0||p<d)return[];if(f=u*l-c*h,f>0||f<d)return[]}if(0===f)return!o||0!==p&&p!==d?[e]:[];if(f===d)return!o||0!==p&&p!==d?[t]:[];if(0===p)return[r];if(p===d)return[n];var m=f/d;return[{x:e.x+m*a,y:e.y+m*s}]}if(0!==p||u*l!==c*h)return[];var g=0===a&&0===s,v=0===c&&0===u;if(g&&v)return e.x!==r.x||e.y!==r.y?[]:[e];if(g)return i(r,n,e)?[e]:[];if(v)return i(e,t,r)?[r]:[];var y,M,A,x,w,E,b,T;return 0!==a?(e.x<t.x?(y=e,A=e.x,M=t,x=t.x):(y=t,A=t.x,M=e,x=e.x),r.x<n.x?(w=r,b=r.x,E=n,T=n.x):(w=n,b=n.x,E=r,T=r.x)):(e.y<t.y?(y=e,A=e.y,M=t,x=t.y):(y=t,A=t.y,M=e,x=e.y),r.y<n.y?(w=r,b=r.y,E=n,T=n.y):(w=n,b=n.y,E=r,T=r.y)),A<=b?x<b?[]:x===b?o?[]:[w]:x<=T?[w,M]:[w,E]:A>T?[]:A===T?o?[]:[y]:x<=T?[y,M]:[y,E]}function o(e,t,i,r){var n=t.x-e.x,o=t.y-e.y,a=i.x-e.x,s=i.y-e.y,c=r.x-e.x,u=r.y-e.y,l=n*s-o*a,h=n*u-o*c;if(Math.abs(l)>Number.EPSILON){var d=c*s-u*a;return l>0?h>=0&&d>=0:h>=0||d>=0}return h>0}function a(e,t){function i(e,t){var i=y.length-1,r=e-1;r<0&&(r=i);var n=e+1;n>i&&(n=0);var a=o(y[e],y[r],y[n],s[t]);if(!a)return!1;var c=s.length-1,u=t-1;u<0&&(u=c);var l=t+1;return l>c&&(l=0),a=o(s[t],s[u],s[l],y[e]),!!a}function n(e,t){var i,n,o;for(i=0;i<y.length;i++)if(n=i+1,n%=y.length,o=r(e,t,y[i],y[n],!0),o.length>0)return!0;return!1}function a(e,i){var n,o,a,s,c;for(n=0;n<M.length;n++)for(o=t[M[n]],a=0;a<o.length;a++)if(s=a+1,s%=o.length,c=r(e,i,o[a],o[s],!0),c.length>0)return!0;return!1}for(var s,c,u,l,h,d,p,f,m,g,v,y=e.concat(),M=[],A=[],x=0,w=t.length;x<w;x++)M.push(x);for(var E=0,b=2*M.length;M.length>0;){if(b--,b<0){console.log("Infinite Loop! Holes left:"+M.length+", Probably Hole outside Shape!");break}for(u=E;u<y.length;u++){l=y[u],c=-1;for(var x=0;x<M.length;x++)if(d=M[x],p=l.x+":"+l.y+":"+d,void 0===A[p]){s=t[d];for(var T=0;T<s.length;T++)if(h=s[T],i(u,T)&&!n(l,h)&&!a(l,h)){c=T,M.splice(x,1),f=y.slice(0,u+1),m=y.slice(u),g=s.slice(c),v=s.slice(0,c+1),y=f.concat(g).concat(v).concat(m),E=u;break}if(c>=0)break;A[p]=!0}if(c>=0)break}}return y}for(var s,c,u,l,h,d,p={},f=e.concat(),m=0,g=t.length;m<g;m++)Array.prototype.push.apply(f,t[m]);for(s=0,c=f.length;s<c;s++)h=f[s].x+":"+f[s].y,void 0!==p[h]&&console.warn("THREE.Shape: Duplicate point",h),p[h]=s;var v=a(e,t),y=n.ShapeUtils.triangulate(v,!1);for(s=0,c=y.length;s<c;s++)for(l=y[s],u=0;u<3;u++)h=l[u].x+":"+l[u].y,d=p[h],void 0!==d&&(l[u]=d);return y.concat()},isClockWise:function(e){return n.ShapeUtils.area(e)<0},b2:function(){function e(e,t){var i=1-e;return i*i*t}function t(e,t){return 2*(1-e)*e*t}function i(e,t){return e*e*t}return function(r,n,o,a){return e(r,n)+t(r,o)+i(r,a)}}(),b3:function(){function e(e,t){var i=1-e;return i*i*i*t}function t(e,t){var i=1-e;return 3*i*i*e*t}function i(e,t){var i=1-e;return 3*i*e*e*t}function r(e,t){return e*e*e*t}return function(n,o,a,s,c){return e(n,o)+t(n,a)+i(n,s)+r(n,c)}}()},n.Curve=function(){},n.Curve.prototype={constructor:n.Curve,getPoint:function(e){return console.warn("THREE.Curve: Warning, getPoint() not implemented!"),null},getPointAt:function(e){var t=this.getUtoTmapping(e);return this.getPoint(t)},getPoints:function(e){e||(e=5);var t,i=[];for(t=0;t<=e;t++)i.push(this.getPoint(t/e));return i},getSpacedPoints:function(e){e||(e=5);var t,i=[];for(t=0;t<=e;t++)i.push(this.getPointAt(t/e));return i},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,i,r=[],n=this.getPoint(0),o=0;for(r.push(0),i=1;i<=e;i++)t=this.getPoint(i/e),o+=t.distanceTo(n),r.push(o),n=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var i,r=this.getLengths(),n=0,o=r.length;i=t?t:e*r[o-1];for(var a,s=0,c=o-1;s<=c;)if(n=Math.floor(s+(c-s)/2),a=r[n]-i,a<0)s=n+1;else{if(!(a>0)){c=n;break}c=n-1}if(n=c,r[n]===i){var u=n/(o-1);return u}var l=r[n],h=r[n+1],d=h-l,p=(i-l)/d,u=(n+p)/(o-1);return u},getTangent:function(e){var t=1e-4,i=e-t,r=e+t;i<0&&(i=0),r>1&&(r=1);var n=this.getPoint(i),o=this.getPoint(r),a=o.clone().sub(n);return a.normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)}},n.Curve.create=function(e,t){return e.prototype=Object.create(n.Curve.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},n.CurvePath=function(){this.curves=[],this.autoClose=!1},n.CurvePath.prototype=Object.create(n.Curve.prototype),n.CurvePath.prototype.constructor=n.CurvePath,n.CurvePath.prototype.add=function(e){this.curves.push(e)},n.CurvePath.prototype.closePath=function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new n.LineCurve(t,e))},n.CurvePath.prototype.getPoint=function(e){for(var t=e*this.getLength(),i=this.getCurveLengths(),r=0;r<i.length;){if(i[r]>=t){var n=i[r]-t,o=this.curves[r],a=1-n/o.getLength();return o.getPointAt(a)}r++}return null},n.CurvePath.prototype.getLength=function(){var e=this.getCurveLengths();return e[e.length-1]},n.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,i=0,r=this.curves.length;i<r;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e},n.CurvePath.prototype.createPointsGeometry=function(e){var t=this.getPoints(e);return this.createGeometry(t)},n.CurvePath.prototype.createSpacedPointsGeometry=function(e){var t=this.getSpacedPoints(e);return this.createGeometry(t)},n.CurvePath.prototype.createGeometry=function(e){for(var t=new n.Geometry,i=0,r=e.length;i<r;i++){var o=e[i];t.vertices.push(new n.Vector3(o.x,o.y,o.z||0))}return t},n.Font=function(e){this.data=e},n.Font.prototype={constructor:n.Font,generateShapes:function(e,t,i){function r(e){for(var i=String(e).split(""),r=t/a.resolution,n=0,s=[],c=0;c<i.length;c++){var u=o(i[c],r,n);n+=u.offset,s.push(u.path)}return s}function o(e,t,r){var o=a.glyphs[e]||a.glyphs["?"];if(o){var s,c,u,l,h,d,p,f,m,g,v,y=new n.Path,M=[],A=n.ShapeUtils.b2,x=n.ShapeUtils.b3;if(o.o)for(var w=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),E=0,b=w.length;E<b;){var T=w[E++];switch(T){case"m":s=w[E++]*t+r,c=w[E++]*t,y.moveTo(s,c);break;case"l":s=w[E++]*t+r,c=w[E++]*t,y.lineTo(s,c);break;case"q":if(u=w[E++]*t+r,l=w[E++]*t,p=w[E++]*t+r,f=w[E++]*t,y.quadraticCurveTo(p,f,u,l),v=M[M.length-1]){h=v.x,d=v.y;for(var L=1;L<=i;L++){var D=L/i;A(D,h,p,u),A(D,d,f,l)}}break;case"b":if(u=w[E++]*t+r,l=w[E++]*t,p=w[E++]*t+r,f=w[E++]*t,m=w[E++]*t+r,g=w[E++]*t,y.bezierCurveTo(p,f,m,g,u,l),v=M[M.length-1]){h=v.x,d=v.y;for(var L=1;L<=i;L++){var D=L/i;x(D,h,p,m,u),x(D,d,f,g,l)}}}}return{offset:o.ha*t,path:y}}}void 0===t&&(t=100),void 0===i&&(i=4);for(var a=this.data,s=r(e),c=[],u=0,l=s.length;u<l;u++)Array.prototype.push.apply(c,s[u].toShapes());return c}},n.Path=function(e){n.CurvePath.call(this),this.actions=[],e&&this.fromPoints(e)},n.Path.prototype=Object.create(n.CurvePath.prototype),n.Path.prototype.constructor=n.Path,n.Path.prototype.fromPoints=function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y)},n.Path.prototype.moveTo=function(e,t){this.actions.push({action:"moveTo",args:[e,t]})},n.Path.prototype.lineTo=function(e,t){var i=this.actions[this.actions.length-1].args,r=i[i.length-2],o=i[i.length-1],a=new n.LineCurve(new n.Vector2(r,o),new n.Vector2(e,t));this.curves.push(a),this.actions.push({action:"lineTo",args:[e,t]})},n.Path.prototype.quadraticCurveTo=function(e,t,i,r){var o=this.actions[this.actions.length-1].args,a=o[o.length-2],s=o[o.length-1],c=new n.QuadraticBezierCurve(new n.Vector2(a,s),new n.Vector2(e,t),new n.Vector2(i,r));this.curves.push(c),this.actions.push({action:"quadraticCurveTo",args:[e,t,i,r]})},n.Path.prototype.bezierCurveTo=function(e,t,i,r,o,a){var s=this.actions[this.actions.length-1].args,c=s[s.length-2],u=s[s.length-1],l=new n.CubicBezierCurve(new n.Vector2(c,u),new n.Vector2(e,t),new n.Vector2(i,r),new n.Vector2(o,a));this.curves.push(l),this.actions.push({action:"bezierCurveTo",args:[e,t,i,r,o,a]})},n.Path.prototype.splineThru=function(e){var t=Array.prototype.slice.call(arguments),i=this.actions[this.actions.length-1].args,r=i[i.length-2],o=i[i.length-1],a=[new n.Vector2(r,o)];Array.prototype.push.apply(a,e);var s=new n.SplineCurve(a);this.curves.push(s),this.actions.push({action:"splineThru",args:t})},n.Path.prototype.arc=function(e,t,i,r,n,o){var a=this.actions[this.actions.length-1].args,s=a[a.length-2],c=a[a.length-1];this.absarc(e+s,t+c,i,r,n,o)},n.Path.prototype.absarc=function(e,t,i,r,n,o){this.absellipse(e,t,i,i,r,n,o)},n.Path.prototype.ellipse=function(e,t,i,r,n,o,a,s){var c=this.actions[this.actions.length-1].args,u=c[c.length-2],l=c[c.length-1];this.absellipse(e+u,t+l,i,r,n,o,a,s)},n.Path.prototype.absellipse=function(e,t,i,r,o,a,s,c){var u=[e,t,i,r,o,a,s,c||0],l=new n.EllipseCurve(e,t,i,r,o,a,s,c);this.curves.push(l);var h=l.getPoint(1);u.push(h.x),u.push(h.y),this.actions.push({action:"ellipse",args:u})},n.Path.prototype.getSpacedPoints=function(e){e||(e=40);for(var t=[],i=0;i<e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t},n.Path.prototype.getPoints=function(e){e=e||12;for(var t,i,r,o,a,s,c,u,l,h,d,p=n.ShapeUtils.b2,f=n.ShapeUtils.b3,m=[],g=0,v=this.actions.length;g<v;g++){var y=this.actions[g],M=y.action,A=y.args;switch(M){case"moveTo":m.push(new n.Vector2(A[0],A[1]));break;case"lineTo":m.push(new n.Vector2(A[0],A[1]));break;case"quadraticCurveTo":t=A[2],i=A[3],a=A[0],s=A[1],m.length>0?(l=m[m.length-1],c=l.x,u=l.y):(l=this.actions[g-1].args,c=l[l.length-2],u=l[l.length-1]);for(var x=1;x<=e;x++){var w=x/e;h=p(w,c,a,t),d=p(w,u,s,i),m.push(new n.Vector2(h,d))}break;case"bezierCurveTo":t=A[4],i=A[5],a=A[0],s=A[1],r=A[2],o=A[3],m.length>0?(l=m[m.length-1],c=l.x,u=l.y):(l=this.actions[g-1].args,c=l[l.length-2],u=l[l.length-1]);for(var x=1;x<=e;x++){var w=x/e;h=f(w,c,a,r,t),d=f(w,u,s,o,i),m.push(new n.Vector2(h,d))}break;case"splineThru":l=this.actions[g-1].args;var E=new n.Vector2(l[l.length-2],l[l.length-1]),b=[E],T=e*A[0].length;b=b.concat(A[0]);for(var L=new n.SplineCurve(b),x=1;x<=T;x++)m.push(L.getPointAt(x/T));break;case"arc":for(var D,N=A[0],S=A[1],C=A[2],I=A[3],j=A[4],_=!!A[5],O=j-I,z=2*e,x=1;x<=z;x++){var w=x/z;_||(w=1-w),D=I+w*O,h=N+C*Math.cos(D),d=S+C*Math.sin(D),m.push(new n.Vector2(h,d))}break;case"ellipse":var D,k,R,N=A[0],S=A[1],B=A[2],U=A[3],I=A[4],j=A[5],_=!!A[6],P=A[7],O=j-I,z=2*e;0!==P&&(k=Math.cos(P),R=Math.sin(P));for(var x=1;x<=z;x++){var w=x/z;if(_||(w=1-w),D=I+w*O,h=N+B*Math.cos(D),d=S+U*Math.sin(D),0!==P){var F=h,G=d;h=(F-N)*k-(G-S)*R+N,d=(F-N)*R+(G-S)*k+S}m.push(new n.Vector2(h,d))}}}var V=m[m.length-1];return Math.abs(V.x-m[0].x)<Number.EPSILON&&Math.abs(V.y-m[0].y)<Number.EPSILON&&m.splice(m.length-1,1),this.autoClose&&m.push(m[0]),m},n.Path.prototype.toShapes=function(e,t){function i(e){for(var t=[],i=new n.Path,r=0,o=e.length;r<o;r++){var a=e[r],s=a.args,c=a.action;"moveTo"===c&&0!==i.actions.length&&(t.push(i),i=new n.Path),i[c].apply(i,s)}return 0!==i.actions.length&&t.push(i),t}function r(e){for(var t=[],i=0,r=e.length;i<r;i++){var o=e[i],a=new n.Shape;a.actions=o.actions,a.curves=o.curves,t.push(a)}return t}function o(e,t){for(var i=t.length,r=!1,n=i-1,o=0;o<i;n=o++){var a=t[n],s=t[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=t[o],c=-c,s=t[n],u=-u),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var l=u*(e.x-a.x)-c*(e.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r}var a=n.ShapeUtils.isClockWise,s=i(this.actions);if(0===s.length)return[];if(t===!0)return r(s);var c,u,l,h=[];if(1===s.length)return u=s[0],l=new n.Shape,l.actions=u.actions,l.curves=u.curves,h.push(l),h;var d=!a(s[0].getPoints());d=e?!d:d;var p,f=[],m=[],g=[],v=0;m[v]=void 0,g[v]=[];for(var y=0,M=s.length;y<M;y++)u=s[y],p=u.getPoints(),c=a(p),c=e?!c:c,c?(!d&&m[v]&&v++,m[v]={s:new n.Shape,p:p},m[v].s.actions=u.actions,m[v].s.curves=u.curves,d&&v++,g[v]=[]):g[v].push({h:u,p:p[0]});if(!m[0])return r(s);if(m.length>1){for(var A=!1,x=[],w=0,E=m.length;w<E;w++)f[w]=[];for(var w=0,E=m.length;w<E;w++)for(var b=g[w],T=0;T<b.length;T++){for(var L=b[T],D=!0,N=0;N<m.length;N++)o(L.p,m[N].p)&&(w!==N&&x.push({froms:w,tos:N,hole:T}),D?(D=!1,f[N].push(L)):A=!0);D&&f[w].push(L)}x.length>0&&(A||(g=f))}for(var S,y=0,C=m.length;y<C;y++){l=m[y].s,h.push(l),S=g[y];for(var I=0,j=S.length;I<j;I++)l.holes.push(S[I].h)}return h},n.Shape=function(){n.Path.apply(this,arguments),this.holes=[]},n.Shape.prototype=Object.create(n.Path.prototype),n.Shape.prototype.constructor=n.Shape,n.Shape.prototype.extrude=function(e){return new n.ExtrudeGeometry(this,e)},n.Shape.prototype.makeGeometry=function(e){return new n.ShapeGeometry(this,e)},n.Shape.prototype.getPointsHoles=function(e){for(var t=[],i=0,r=this.holes.length;i<r;i++)t[i]=this.holes[i].getPoints(e);return t},n.Shape.prototype.extractAllPoints=function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},n.Shape.prototype.extractPoints=function(e){return this.extractAllPoints(e)},n.LineCurve=function(e,t){this.v1=e,this.v2=t},n.LineCurve.prototype=Object.create(n.Curve.prototype),n.LineCurve.prototype.constructor=n.LineCurve,n.LineCurve.prototype.getPoint=function(e){var t=this.v2.clone().sub(this.v1);return t.multiplyScalar(e).add(this.v1),t},n.LineCurve.prototype.getPointAt=function(e){return this.getPoint(e)},n.LineCurve.prototype.getTangent=function(e){var t=this.v2.clone().sub(this.v1);return t.normalize()},n.QuadraticBezierCurve=function(e,t,i){this.v0=e,this.v1=t,this.v2=i},n.QuadraticBezierCurve.prototype=Object.create(n.Curve.prototype),n.QuadraticBezierCurve.prototype.constructor=n.QuadraticBezierCurve,n.QuadraticBezierCurve.prototype.getPoint=function(e){var t=n.ShapeUtils.b2;return new n.Vector2(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y))},n.QuadraticBezierCurve.prototype.getTangent=function(e){var t=n.CurveUtils.tangentQuadraticBezier;return new n.Vector2(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y)).normalize()},n.CubicBezierCurve=function(e,t,i,r){this.v0=e,this.v1=t,this.v2=i,this.v3=r},n.CubicBezierCurve.prototype=Object.create(n.Curve.prototype),n.CubicBezierCurve.prototype.constructor=n.CubicBezierCurve,n.CubicBezierCurve.prototype.getPoint=function(e){var t=n.ShapeUtils.b3;return new n.Vector2(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y))},n.CubicBezierCurve.prototype.getTangent=function(e){var t=n.CurveUtils.tangentCubicBezier;return new n.Vector2(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y)).normalize()},n.SplineCurve=function(e){this.points=void 0==e?[]:e},n.SplineCurve.prototype=Object.create(n.Curve.prototype),n.SplineCurve.prototype.constructor=n.SplineCurve,n.SplineCurve.prototype.getPoint=function(e){var t=this.points,i=(t.length-1)*e,r=Math.floor(i),o=i-r,a=t[0===r?r:r-1],s=t[r],c=t[r>t.length-2?t.length-1:r+1],u=t[r>t.length-3?t.length-1:r+2],l=n.CurveUtils.interpolate;return new n.Vector2(l(a.x,s.x,c.x,u.x,o),l(a.y,s.y,c.y,u.y,o))},n.EllipseCurve=function(e,t,i,r,n,o,a,s){this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=n,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0},n.EllipseCurve.prototype=Object.create(n.Curve.prototype),n.EllipseCurve.prototype.constructor=n.EllipseCurve,n.EllipseCurve.prototype.getPoint=function(e){var t=this.aEndAngle-this.aStartAngle;t<0&&(t+=2*Math.PI),t>2*Math.PI&&(t-=2*Math.PI);var i;i=this.aClockwise===!0?this.aEndAngle+(1-e)*(2*Math.PI-t):this.aStartAngle+e*t;var r=this.aX+this.xRadius*Math.cos(i),o=this.aY+this.yRadius*Math.sin(i);if(0!==this.aRotation){var a=Math.cos(this.aRotation),s=Math.sin(this.aRotation),c=r,u=o;r=(c-this.aX)*a-(u-this.aY)*s+this.aX,o=(c-this.aX)*s+(u-this.aY)*a+this.aY}return new n.Vector2(r,o)},n.ArcCurve=function(e,t,i,r,o,a){n.EllipseCurve.call(this,e,t,i,i,r,o,a)},n.ArcCurve.prototype=Object.create(n.EllipseCurve.prototype),n.ArcCurve.prototype.constructor=n.ArcCurve,n.LineCurve3=n.Curve.create(function(e,t){this.v1=e,this.v2=t},function(e){var t=new n.Vector3;return t.subVectors(this.v2,this.v1),t.multiplyScalar(e),t.add(this.v1),t}),n.QuadraticBezierCurve3=n.Curve.create(function(e,t,i){this.v0=e,this.v1=t,this.v2=i},function(e){var t=n.ShapeUtils.b2;return new n.Vector3(t(e,this.v0.x,this.v1.x,this.v2.x),t(e,this.v0.y,this.v1.y,this.v2.y),t(e,this.v0.z,this.v1.z,this.v2.z))}),n.CubicBezierCurve3=n.Curve.create(function(e,t,i,r){this.v0=e,this.v1=t,this.v2=i,this.v3=r},function(e){var t=n.ShapeUtils.b3;return new n.Vector3(t(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y),t(e,this.v0.z,this.v1.z,this.v2.z,this.v3.z))}),n.SplineCurve3=n.Curve.create(function(e){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"),this.points=void 0==e?[]:e},function(e){var t=this.points,i=(t.length-1)*e,r=Math.floor(i),o=i-r,a=t[0==r?r:r-1],s=t[r],c=t[r>t.length-2?t.length-1:r+1],u=t[r>t.length-3?t.length-1:r+2],l=n.CurveUtils.interpolate;return new n.Vector3(l(a.x,s.x,c.x,u.x,o),l(a.y,s.y,c.y,u.y,o),l(a.z,s.z,c.z,u.z,o))}),n.CatmullRomCurve3=function(){function e(){}var t=new n.Vector3,i=new e,r=new e,o=new e;return e.prototype.init=function(e,t,i,r){this.c0=e,this.c1=i,this.c2=-3*e+3*t-2*i-r,this.c3=2*e-2*t+i+r},e.prototype.initNonuniformCatmullRom=function(e,t,i,r,n,o,a){ var s=(t-e)/n-(i-e)/(n+o)+(i-t)/o,c=(i-t)/o-(r-t)/(o+a)+(r-i)/a;s*=o,c*=o,this.init(t,i,s,c)},e.prototype.initCatmullRom=function(e,t,i,r,n){this.init(t,i,n*(i-e),n*(r-t))},e.prototype.calc=function(e){var t=e*e,i=t*e;return this.c0+this.c1*e+this.c2*t+this.c3*i},n.Curve.create(function(e){this.points=e||[],this.closed=!1},function(e){var a,s,c,u,l=this.points;u=l.length,u<2&&console.log("duh, you need at least 2 points"),a=(u-(this.closed?0:1))*e,s=Math.floor(a),c=a-s,this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/l.length)+1)*l.length:0===c&&s===u-1&&(s=u-2,c=1);var h,d,p,f;if(this.closed||s>0?h=l[(s-1)%u]:(t.subVectors(l[0],l[1]).add(l[0]),h=t),d=l[s%u],p=l[(s+1)%u],this.closed||s+2<u?f=l[(s+2)%u]:(t.subVectors(l[u-1],l[u-2]).add(l[u-1]),f=t),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var m="chordal"===this.type?.5:.25,g=Math.pow(h.distanceToSquared(d),m),v=Math.pow(d.distanceToSquared(p),m),y=Math.pow(p.distanceToSquared(f),m);v<1e-4&&(v=1),g<1e-4&&(g=v),y<1e-4&&(y=v),i.initNonuniformCatmullRom(h.x,d.x,p.x,f.x,g,v,y),r.initNonuniformCatmullRom(h.y,d.y,p.y,f.y,g,v,y),o.initNonuniformCatmullRom(h.z,d.z,p.z,f.z,g,v,y)}else if("catmullrom"===this.type){var M=void 0!==this.tension?this.tension:.5;i.initCatmullRom(h.x,d.x,p.x,f.x,M),r.initCatmullRom(h.y,d.y,p.y,f.y,M),o.initCatmullRom(h.z,d.z,p.z,f.z,M)}var A=new n.Vector3(i.calc(c),r.calc(c),o.calc(c));return A})}(),n.ClosedSplineCurve3=function(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."),n.CatmullRomCurve3.call(this,e),this.type="catmullrom",this.closed=!0},n.ClosedSplineCurve3.prototype=Object.create(n.CatmullRomCurve3.prototype),n.BoxGeometry=function(e,t,i,r,o,a){n.Geometry.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:a},this.fromBufferGeometry(new n.BoxBufferGeometry(e,t,i,r,o,a)),this.mergeVertices()},n.BoxGeometry.prototype=Object.create(n.Geometry.prototype),n.BoxGeometry.prototype.constructor=n.BoxGeometry,n.CubeGeometry=n.BoxGeometry,n.BoxBufferGeometry=function(e,t,i,r,o,a){function s(e,t,i){var r=0;return r+=e*t*2,r+=e*i*2,r+=i*t*2,4*r}function c(e,t,i,r,o,a,s,c,l,h,x){for(var w=a/l,E=s/h,b=a/2,T=s/2,L=c/2,D=l+1,N=h+1,S=0,C=0,I=new n.Vector3,j=0;j<N;j++)for(var _=j*E-T,O=0;O<D;O++){var z=O*w-b;I[e]=z*r,I[t]=_*o,I[i]=L,p[g]=I.x,p[g+1]=I.y,p[g+2]=I.z,I[e]=0,I[t]=0,I[i]=c>0?1:-1,f[g]=I.x,f[g+1]=I.y,f[g+2]=I.z,m[v]=O/l,m[v+1]=1-j/h,g+=3,v+=2,S+=1}for(j=0;j<h;j++)for(O=0;O<l;O++){var k=M+O+D*j,R=M+O+D*(j+1),B=M+(O+1)+D*(j+1),U=M+(O+1)+D*j;d[y]=k,d[y+1]=R,d[y+2]=U,d[y+3]=R,d[y+4]=B,d[y+5]=U,y+=6,C+=6}u.addGroup(A,C,x),A+=C,M+=S}n.BufferGeometry.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:a};var u=this;r=Math.floor(r)||1,o=Math.floor(o)||1,a=Math.floor(a)||1;var l=s(r,o,a),h=l/4*6,d=new(h>65535?Uint32Array:Uint16Array)(h),p=new Float32Array(3*l),f=new Float32Array(3*l),m=new Float32Array(2*l),g=0,v=0,y=0,M=0,A=0;c("z","y","x",-1,-1,i,t,e,a,o,0),c("z","y","x",1,-1,i,t,-e,a,o,1),c("x","z","y",1,1,e,i,t,r,a,2),c("x","z","y",1,-1,e,i,-t,r,a,3),c("x","y","z",1,-1,e,t,i,r,o,4),c("x","y","z",-1,-1,e,t,-i,r,o,5),this.setIndex(new n.BufferAttribute(d,1)),this.addAttribute("position",new n.BufferAttribute(p,3)),this.addAttribute("normal",new n.BufferAttribute(f,3)),this.addAttribute("uv",new n.BufferAttribute(m,2))},n.BoxBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.BoxBufferGeometry.prototype.constructor=n.BoxBufferGeometry,n.CircleGeometry=function(e,t,i,r){n.Geometry.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:r},this.fromBufferGeometry(new n.CircleBufferGeometry(e,t,i,r))},n.CircleGeometry.prototype=Object.create(n.Geometry.prototype),n.CircleGeometry.prototype.constructor=n.CircleGeometry,n.CircleBufferGeometry=function(e,t,i,r){n.BufferGeometry.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:r},e=e||50,t=void 0!==t?Math.max(3,t):8,i=void 0!==i?i:0,r=void 0!==r?r:2*Math.PI;var o=t+2,a=new Float32Array(3*o),s=new Float32Array(3*o),c=new Float32Array(2*o);s[2]=1,c[0]=.5,c[1]=.5;for(var u=0,l=3,h=2;u<=t;u++,l+=3,h+=2){var d=i+u/t*r;a[l]=e*Math.cos(d),a[l+1]=e*Math.sin(d),s[l+2]=1,c[h]=(a[l]/e+1)/2,c[h+1]=(a[l+1]/e+1)/2}for(var p=[],l=1;l<=t;l++)p.push(l,l+1,0);this.setIndex(new n.BufferAttribute(new Uint16Array(p),1)),this.addAttribute("position",new n.BufferAttribute(a,3)),this.addAttribute("normal",new n.BufferAttribute(s,3)),this.addAttribute("uv",new n.BufferAttribute(c,2)),this.boundingSphere=new n.Sphere(new n.Vector3,e)},n.CircleBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.CircleBufferGeometry.prototype.constructor=n.CircleBufferGeometry,n.CylinderBufferGeometry=function(e,t,i,r,o,a,s,c){function u(){var e=(r+1)*(o+1);return a===!1&&(e+=2*(r+1)+2*r),e}function l(){var e=r*o*2*3;return a===!1&&(e+=2*r*3),e}function h(){var a,u,l=new n.Vector3,h=new n.Vector3,d=0,f=(t-e)/i;for(u=0;u<=o;u++){var m=[],T=u/o,L=T*(t-e)+e;for(a=0;a<=r;a++){var D=a/r;h.x=L*Math.sin(D*c+s),h.y=-T*i+E,h.z=L*Math.cos(D*c+s),v.setXYZ(A,h.x,h.y,h.z),l.copy(h),(0===e&&0===u||0===t&&u===o)&&(l.x=Math.sin(D*c+s),l.z=Math.cos(D*c+s)),l.setY(Math.sqrt(l.x*l.x+l.z*l.z)*f).normalize(),y.setXYZ(A,l.x,l.y,l.z),M.setXY(A,D,1-T),m.push(A),A++}w.push(m)}for(a=0;a<r;a++)for(u=0;u<o;u++){var N=w[u][a],S=w[u+1][a],C=w[u+1][a+1],I=w[u][a+1];g.setX(x,N),x++,g.setX(x,S),x++,g.setX(x,I),x++,g.setX(x,S),x++,g.setX(x,C),x++,g.setX(x,I),x++,d+=6}p.addGroup(b,d,0),b+=d}function d(i){var o,a,u,l=new n.Vector2,h=new n.Vector3,d=0,f=i===!0?e:t,m=i===!0?1:-1;for(a=A,o=1;o<=r;o++)v.setXYZ(A,0,E*m,0),y.setXYZ(A,0,m,0),i===!0?(l.x=o/r,l.y=0):(l.x=(o-1)/r,l.y=1),M.setXY(A,l.x,l.y),A++;for(u=A,o=0;o<=r;o++){var w=o/r;h.x=f*Math.sin(w*c+s),h.y=E*m,h.z=f*Math.cos(w*c+s),v.setXYZ(A,h.x,h.y,h.z),y.setXYZ(A,0,m,0),M.setXY(A,w,i===!0?1:0),A++}for(o=0;o<r;o++){var T=a+o,L=u+o;i===!0?(g.setX(x,L),x++,g.setX(x,L+1),x++,g.setX(x,T),x++):(g.setX(x,L+1),x++,g.setX(x,L),x++,g.setX(x,T),x++),d+=3}p.addGroup(b,d,i===!0?1:2),b+=d}n.BufferGeometry.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c};var p=this;e=void 0!==e?e:20,t=void 0!==t?t:20,i=void 0!==i?i:100,r=Math.floor(r)||8,o=Math.floor(o)||1,a=void 0!==a&&a,s=void 0!==s?s:0,c=void 0!==c?c:2*Math.PI;var f=u(),m=l(),g=new n.BufferAttribute(new(m>65535?Uint32Array:Uint16Array)(m),1),v=new n.BufferAttribute(new Float32Array(3*f),3),y=new n.BufferAttribute(new Float32Array(3*f),3),M=new n.BufferAttribute(new Float32Array(2*f),2),A=0,x=0,w=[],E=i/2,b=0;h(),a===!1&&(e>0&&d(!0),t>0&&d(!1)),this.setIndex(g),this.addAttribute("position",v),this.addAttribute("normal",y),this.addAttribute("uv",M)},n.CylinderBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.CylinderBufferGeometry.prototype.constructor=n.CylinderBufferGeometry,n.CylinderGeometry=function(e,t,i,r,o,a,s,c){n.Geometry.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c},this.fromBufferGeometry(new n.CylinderBufferGeometry(e,t,i,r,o,a,s,c)),this.mergeVertices()},n.CylinderGeometry.prototype=Object.create(n.Geometry.prototype),n.CylinderGeometry.prototype.constructor=n.CylinderGeometry,n.EdgesGeometry=function(e,t){function i(e,t){return e-t}n.BufferGeometry.call(this),t=void 0!==t?t:1;var r,o=Math.cos(n.Math.DEG2RAD*t),a=[0,0],s={},c=["a","b","c"];e instanceof n.BufferGeometry?(r=new n.Geometry,r.fromBufferGeometry(e)):r=e.clone(),r.mergeVertices(),r.computeFaceNormals();for(var u=r.vertices,l=r.faces,h=0,d=l.length;h<d;h++)for(var p=l[h],f=0;f<3;f++){a[0]=p[c[f]],a[1]=p[c[(f+1)%3]],a.sort(i);var m=a.toString();void 0===s[m]?s[m]={vert1:a[0],vert2:a[1],face1:h,face2:void 0}:s[m].face2=h}var g=[];for(var m in s){var v=s[m];if(void 0===v.face2||l[v.face1].normal.dot(l[v.face2].normal)<=o){var y=u[v.vert1];g.push(y.x),g.push(y.y),g.push(y.z),y=u[v.vert2],g.push(y.x),g.push(y.y),g.push(y.z)}}this.addAttribute("position",new n.BufferAttribute(new Float32Array(g),3))},n.EdgesGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.EdgesGeometry.prototype.constructor=n.EdgesGeometry,n.ExtrudeGeometry=function(e,t){return"undefined"==typeof e?void(e=[]):(n.Geometry.call(this),this.type="ExtrudeGeometry",e=Array.isArray(e)?e:[e],this.addShapeList(e,t),void this.computeFaceNormals())},n.ExtrudeGeometry.prototype=Object.create(n.Geometry.prototype),n.ExtrudeGeometry.prototype.constructor=n.ExtrudeGeometry,n.ExtrudeGeometry.prototype.addShapeList=function(e,t){for(var i=e.length,r=0;r<i;r++){var n=e[r];this.addShape(n,t)}},n.ExtrudeGeometry.prototype.addShape=function(e,t){function i(e,t,i){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(i).add(e)}function r(e,t,i){var r,o,a=1,s=e.x-t.x,c=e.y-t.y,u=i.x-e.x,l=i.y-e.y,h=s*s+c*c,d=s*l-c*u;if(Math.abs(d)>Number.EPSILON){var p=Math.sqrt(h),f=Math.sqrt(u*u+l*l),m=t.x-c/p,g=t.y+s/p,v=i.x-l/f,y=i.y+u/f,M=((v-m)*l-(y-g)*u)/(s*l-c*u);r=m+s*M-e.x,o=g+c*M-e.y;var A=r*r+o*o;if(A<=2)return new n.Vector2(r,o);a=Math.sqrt(A/2)}else{var x=!1;s>Number.EPSILON?u>Number.EPSILON&&(x=!0):s<-Number.EPSILON?u<-Number.EPSILON&&(x=!0):Math.sign(c)===Math.sign(l)&&(x=!0),x?(r=-c,o=s,a=Math.sqrt(h)):(r=s,o=c,a=Math.sqrt(h/2))}return new n.Vector2(r/a,o/a)}function o(){if(A){var e=0,t=V*e;for(H=0;H<Q;H++)G=z[H],u(G[2]+t,G[1]+t,G[0]+t);for(e=w+2*M,t=V*e,H=0;H<Q;H++)G=z[H],u(G[0]+t,G[1]+t,G[2]+t)}else{for(H=0;H<Q;H++)G=z[H],u(G[2],G[1],G[0]);for(H=0;H<Q;H++)G=z[H],u(G[0]+V*w,G[1]+V*w,G[2]+V*w)}}function a(){var e=0;for(s(k,e),e+=k.length,D=0,N=_.length;D<N;D++)L=_[D],s(L,e),e+=L.length}function s(e,t){var i,r;for(H=e.length;--H>=0;){i=H,r=H-1,r<0&&(r=e.length-1);var n=0,o=w+2*M;for(n=0;n<o;n++){var a=V*n,s=V*(n+1),c=t+i+a,u=t+r+a,h=t+r+s,d=t+i+s;l(c,u,h,d,e,n,o,i,r)}}}function c(e,t,i){S.vertices.push(new n.Vector3(e,t,i))}function u(e,t,i){e+=C,t+=C,i+=C,S.faces.push(new n.Face3(e,t,i,null,null,0));var r=T.generateTopUV(S,e,t,i);S.faceVertexUvs[0].push(r)}function l(e,t,i,r,o,a,s,c,u){e+=C,t+=C,i+=C,r+=C,S.faces.push(new n.Face3(e,t,r,null,null,1)),S.faces.push(new n.Face3(t,i,r,null,null,1));var l=T.generateSideWallUV(S,e,t,i,r);S.faceVertexUvs[0].push([l[0],l[1],l[3]]),S.faceVertexUvs[0].push([l[1],l[2],l[3]])}var h,d,p,f,m,g=void 0!==t.amount?t.amount:100,v=void 0!==t.bevelThickness?t.bevelThickness:6,y=void 0!==t.bevelSize?t.bevelSize:v-2,M=void 0!==t.bevelSegments?t.bevelSegments:3,A=void 0===t.bevelEnabled||t.bevelEnabled,x=void 0!==t.curveSegments?t.curveSegments:12,w=void 0!==t.steps?t.steps:1,E=t.extrudePath,b=!1,T=void 0!==t.UVGenerator?t.UVGenerator:n.ExtrudeGeometry.WorldUVGenerator;E&&(h=E.getSpacedPoints(w),b=!0,A=!1,d=void 0!==t.frames?t.frames:new n.TubeGeometry.FrenetFrames(E,w,(!1)),p=new n.Vector3,f=new n.Vector3,m=new n.Vector3),A||(M=0,v=0,y=0);var L,D,N,S=this,C=this.vertices.length,I=e.extractPoints(x),j=I.shape,_=I.holes,O=!n.ShapeUtils.isClockWise(j);if(O){for(j=j.reverse(),D=0,N=_.length;D<N;D++)L=_[D],n.ShapeUtils.isClockWise(L)&&(_[D]=L.reverse());O=!1}var z=n.ShapeUtils.triangulateShape(j,_),k=j;for(D=0,N=_.length;D<N;D++)L=_[D],j=j.concat(L);for(var R,B,U,P,F,G,V=j.length,Q=z.length,Y=[],H=0,W=k.length,X=W-1,q=H+1;H<W;H++,X++,q++)X===W&&(X=0),q===W&&(q=0),Y[H]=r(k[H],k[X],k[q]);var Z,K=[],J=Y.concat();for(D=0,N=_.length;D<N;D++){for(L=_[D],Z=[],H=0,W=L.length,X=W-1,q=H+1;H<W;H++,X++,q++)X===W&&(X=0),q===W&&(q=0),Z[H]=r(L[H],L[X],L[q]);K.push(Z),J=J.concat(Z)}for(R=0;R<M;R++){for(U=R/M,P=v*(1-U),B=y*Math.sin(U*Math.PI/2),H=0,W=k.length;H<W;H++)F=i(k[H],Y[H],B),c(F.x,F.y,-P);for(D=0,N=_.length;D<N;D++)for(L=_[D],Z=K[D],H=0,W=L.length;H<W;H++)F=i(L[H],Z[H],B),c(F.x,F.y,-P)}for(B=y,H=0;H<V;H++)F=A?i(j[H],J[H],B):j[H],b?(f.copy(d.normals[0]).multiplyScalar(F.x),p.copy(d.binormals[0]).multiplyScalar(F.y),m.copy(h[0]).add(f).add(p),c(m.x,m.y,m.z)):c(F.x,F.y,0);var $;for($=1;$<=w;$++)for(H=0;H<V;H++)F=A?i(j[H],J[H],B):j[H],b?(f.copy(d.normals[$]).multiplyScalar(F.x),p.copy(d.binormals[$]).multiplyScalar(F.y),m.copy(h[$]).add(f).add(p),c(m.x,m.y,m.z)):c(F.x,F.y,g/w*$);for(R=M-1;R>=0;R--){for(U=R/M,P=v*(1-U),B=y*Math.sin(U*Math.PI/2),H=0,W=k.length;H<W;H++)F=i(k[H],Y[H],B),c(F.x,F.y,g+P);for(D=0,N=_.length;D<N;D++)for(L=_[D],Z=K[D],H=0,W=L.length;H<W;H++)F=i(L[H],Z[H],B),b?c(F.x,F.y+h[w-1].y,h[w-1].x+P):c(F.x,F.y,g+P)}o(),a()},n.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(e,t,i,r){var o=e.vertices,a=o[t],s=o[i],c=o[r];return[new n.Vector2(a.x,a.y),new n.Vector2(s.x,s.y),new n.Vector2(c.x,c.y)]},generateSideWallUV:function(e,t,i,r,o){var a=e.vertices,s=a[t],c=a[i],u=a[r],l=a[o];return Math.abs(s.y-c.y)<.01?[new n.Vector2(s.x,1-s.z),new n.Vector2(c.x,1-c.z),new n.Vector2(u.x,1-u.z),new n.Vector2(l.x,1-l.z)]:[new n.Vector2(s.y,1-s.z),new n.Vector2(c.y,1-c.z),new n.Vector2(u.y,1-u.z),new n.Vector2(l.y,1-l.z)]}},n.ShapeGeometry=function(e,t){n.Geometry.call(this),this.type="ShapeGeometry",Array.isArray(e)===!1&&(e=[e]),this.addShapeList(e,t),this.computeFaceNormals()},n.ShapeGeometry.prototype=Object.create(n.Geometry.prototype),n.ShapeGeometry.prototype.constructor=n.ShapeGeometry,n.ShapeGeometry.prototype.addShapeList=function(e,t){for(var i=0,r=e.length;i<r;i++)this.addShape(e[i],t);return this},n.ShapeGeometry.prototype.addShape=function(e,t){void 0===t&&(t={});var i,r,o,a=void 0!==t.curveSegments?t.curveSegments:12,s=t.material,c=void 0===t.UVGenerator?n.ExtrudeGeometry.WorldUVGenerator:t.UVGenerator,u=this.vertices.length,l=e.extractPoints(a),h=l.shape,d=l.holes,p=!n.ShapeUtils.isClockWise(h);if(p){for(h=h.reverse(),i=0,r=d.length;i<r;i++)o=d[i],n.ShapeUtils.isClockWise(o)&&(d[i]=o.reverse());p=!1}var f=n.ShapeUtils.triangulateShape(h,d);for(i=0,r=d.length;i<r;i++)o=d[i],h=h.concat(o);var m,g,v=h.length,y=f.length;for(i=0;i<v;i++)m=h[i],this.vertices.push(new n.Vector3(m.x,m.y,0));for(i=0;i<y;i++){g=f[i];var M=g[0]+u,A=g[1]+u,x=g[2]+u;this.faces.push(new n.Face3(M,A,x,null,null,s)),this.faceVertexUvs[0].push(c.generateTopUV(this,M,A,x))}},n.LatheBufferGeometry=function(e,t,i,r){n.BufferGeometry.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t)||12,i=i||0,r=r||2*Math.PI,r=n.Math.clamp(r,0,2*Math.PI);var o,a,s,c=(t+1)*e.length,u=t*e.length*2*3,l=new n.BufferAttribute(new(u>65535?Uint32Array:Uint16Array)(u),1),h=new n.BufferAttribute(new Float32Array(3*c),3),d=new n.BufferAttribute(new Float32Array(2*c),2),p=0,f=0,m=(1/(e.length-1),1/t),g=new n.Vector3,v=new n.Vector2;for(a=0;a<=t;a++){var y=i+a*m*r,M=Math.sin(y),A=Math.cos(y);for(s=0;s<=e.length-1;s++)g.x=e[s].x*M,g.y=e[s].y,g.z=e[s].x*A,h.setXYZ(p,g.x,g.y,g.z),v.x=a/t,v.y=s/(e.length-1),d.setXY(p,v.x,v.y),p++}for(a=0;a<t;a++)for(s=0;s<e.length-1;s++){o=s+a*e.length;var x=o,w=o+e.length,E=o+e.length+1,b=o+1;l.setX(f,x),f++,l.setX(f,w),f++,l.setX(f,b),f++,l.setX(f,w),f++,l.setX(f,E),f++,l.setX(f,b),f++}if(this.setIndex(l),this.addAttribute("position",h),this.addAttribute("uv",d),this.computeVertexNormals(),r===2*Math.PI){var T=this.attributes.normal.array,L=new n.Vector3,D=new n.Vector3,N=new n.Vector3;for(o=t*e.length*3,a=0,s=0;a<e.length;a++,s+=3)L.x=T[s+0],L.y=T[s+1],L.z=T[s+2],D.x=T[o+s+0],D.y=T[o+s+1],D.z=T[o+s+2],N.addVectors(L,D).normalize(),T[s+0]=T[o+s+0]=N.x,T[s+1]=T[o+s+1]=N.y,T[s+2]=T[o+s+2]=N.z}},n.LatheBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.LatheBufferGeometry.prototype.constructor=n.LatheBufferGeometry,n.LatheGeometry=function(e,t,i,r){n.Geometry.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},this.fromBufferGeometry(new n.LatheBufferGeometry(e,t,i,r)),this.mergeVertices()},n.LatheGeometry.prototype=Object.create(n.Geometry.prototype),n.LatheGeometry.prototype.constructor=n.LatheGeometry,n.PlaneGeometry=function(e,t,i,r){n.Geometry.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r},this.fromBufferGeometry(new n.PlaneBufferGeometry(e,t,i,r))},n.PlaneGeometry.prototype=Object.create(n.Geometry.prototype),n.PlaneGeometry.prototype.constructor=n.PlaneGeometry,n.PlaneBufferGeometry=function(e,t,i,r){n.BufferGeometry.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r};for(var o=e/2,a=t/2,s=Math.floor(i)||1,c=Math.floor(r)||1,u=s+1,l=c+1,h=e/s,d=t/c,p=new Float32Array(u*l*3),f=new Float32Array(u*l*3),m=new Float32Array(u*l*2),g=0,v=0,y=0;y<l;y++)for(var M=y*d-a,A=0;A<u;A++){var x=A*h-o;p[g]=x,p[g+1]=-M,f[g+2]=1,m[v]=A/s,m[v+1]=1-y/c,g+=3,v+=2}g=0;for(var w=new(p.length/3>65535?Uint32Array:Uint16Array)(s*c*6),y=0;y<c;y++)for(var A=0;A<s;A++){var E=A+u*y,b=A+u*(y+1),T=A+1+u*(y+1),L=A+1+u*y;w[g]=E,w[g+1]=b,w[g+2]=L,w[g+3]=b,w[g+4]=T,w[g+5]=L,g+=6}this.setIndex(new n.BufferAttribute(w,1)),this.addAttribute("position",new n.BufferAttribute(p,3)),this.addAttribute("normal",new n.BufferAttribute(f,3)),this.addAttribute("uv",new n.BufferAttribute(m,2))},n.PlaneBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.PlaneBufferGeometry.prototype.constructor=n.PlaneBufferGeometry,n.RingBufferGeometry=function(e,t,i,r,o,a){n.BufferGeometry.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:r,thetaStart:o,thetaLength:a},e=e||20,t=t||50,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,i=void 0!==i?Math.max(3,i):8,r=void 0!==r?Math.max(1,r):1;var s,c,u,l=(i+1)*(r+1),h=i*r*2*3,d=new n.BufferAttribute(new(h>65535?Uint32Array:Uint16Array)(h),1),p=new n.BufferAttribute(new Float32Array(3*l),3),f=new n.BufferAttribute(new Float32Array(3*l),3),m=new n.BufferAttribute(new Float32Array(2*l),2),g=0,v=0,y=e,M=(t-e)/r,A=new n.Vector3,x=new n.Vector2;for(c=0;c<=r;c++){for(u=0;u<=i;u++)s=o+u/i*a,A.x=y*Math.cos(s),A.y=y*Math.sin(s),p.setXYZ(g,A.x,A.y,A.z),f.setXYZ(g,0,0,1),x.x=(A.x/t+1)/2,x.y=(A.y/t+1)/2,m.setXY(g,x.x,x.y),g++;y+=M}for(c=0;c<r;c++){var w=c*(i+1);for(u=0;u<i;u++){s=u+w;var E=s,b=s+i+1,T=s+i+2,L=s+1;d.setX(v,E),v++,d.setX(v,b),v++,d.setX(v,T),v++,d.setX(v,E),v++,d.setX(v,T),v++,d.setX(v,L),v++}}this.setIndex(d),this.addAttribute("position",p),this.addAttribute("normal",f),this.addAttribute("uv",m)},n.RingBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.RingBufferGeometry.prototype.constructor=n.RingBufferGeometry,n.RingGeometry=function(e,t,i,r,o,a){n.Geometry.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:r,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new n.RingBufferGeometry(e,t,i,r,o,a))},n.RingGeometry.prototype=Object.create(n.Geometry.prototype),n.RingGeometry.prototype.constructor=n.RingGeometry,n.SphereGeometry=function(e,t,i,r,o,a,s){n.Geometry.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new n.SphereBufferGeometry(e,t,i,r,o,a,s))},n.SphereGeometry.prototype=Object.create(n.Geometry.prototype),n.SphereGeometry.prototype.constructor=n.SphereGeometry,n.SphereBufferGeometry=function(e,t,i,r,o,a,s){n.BufferGeometry.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:o,thetaStart:a,thetaLength:s},e=e||50,t=Math.max(3,Math.floor(t)||8),i=Math.max(2,Math.floor(i)||6),r=void 0!==r?r:0,o=void 0!==o?o:2*Math.PI,a=void 0!==a?a:0,s=void 0!==s?s:Math.PI;for(var c=a+s,u=(t+1)*(i+1),l=new n.BufferAttribute(new Float32Array(3*u),3),h=new n.BufferAttribute(new Float32Array(3*u),3),d=new n.BufferAttribute(new Float32Array(2*u),2),p=0,f=[],m=new n.Vector3,g=0;g<=i;g++){for(var v=[],y=g/i,M=0;M<=t;M++){var A=M/t,x=-e*Math.cos(r+A*o)*Math.sin(a+y*s),w=e*Math.cos(a+y*s),E=e*Math.sin(r+A*o)*Math.sin(a+y*s);m.set(x,w,E).normalize(),l.setXYZ(p,x,w,E),h.setXYZ(p,m.x,m.y,m.z),d.setXY(p,A,1-y),v.push(p),p++}f.push(v)}for(var b=[],g=0;g<i;g++)for(var M=0;M<t;M++){var T=f[g][M+1],L=f[g][M],D=f[g+1][M],N=f[g+1][M+1];(0!==g||a>0)&&b.push(T,L,N),(g!==i-1||c<Math.PI)&&b.push(L,D,N)}this.setIndex(new(l.count>65535?n.Uint32Attribute:n.Uint16Attribute)(b,1)),this.addAttribute("position",l),this.addAttribute("normal",h),this.addAttribute("uv",d),this.boundingSphere=new n.Sphere(new n.Vector3,e)},n.SphereBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.SphereBufferGeometry.prototype.constructor=n.SphereBufferGeometry,n.TextGeometry=function(e,t){t=t||{};var i=t.font;if(i instanceof n.Font==!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new n.Geometry;var r=i.generateShapes(e,t.size,t.curveSegments);t.amount=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),n.ExtrudeGeometry.call(this,r,t),this.type="TextGeometry"},n.TextGeometry.prototype=Object.create(n.ExtrudeGeometry.prototype),n.TextGeometry.prototype.constructor=n.TextGeometry,n.TorusBufferGeometry=function(e,t,i,r,o){n.BufferGeometry.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:r,arc:o},e=e||100,t=t||40,i=Math.floor(i)||8,r=Math.floor(r)||6,o=o||2*Math.PI;var a,s,c=(i+1)*(r+1),u=i*r*2*3,l=new(u>65535?Uint32Array:Uint16Array)(u),h=new Float32Array(3*c),d=new Float32Array(3*c),p=new Float32Array(2*c),f=0,m=0,g=0,v=new n.Vector3,y=new n.Vector3,M=new n.Vector3;for(a=0;a<=i;a++)for(s=0;s<=r;s++){var A=s/r*o,x=a/i*Math.PI*2;y.x=(e+t*Math.cos(x))*Math.cos(A),y.y=(e+t*Math.cos(x))*Math.sin(A),y.z=t*Math.sin(x),h[f]=y.x,h[f+1]=y.y,h[f+2]=y.z,v.x=e*Math.cos(A),v.y=e*Math.sin(A),M.subVectors(y,v).normalize(),d[f]=M.x,d[f+1]=M.y,d[f+2]=M.z,p[m]=s/r,p[m+1]=a/i,f+=3,m+=2}for(a=1;a<=i;a++)for(s=1;s<=r;s++){var w=(r+1)*a+s-1,E=(r+1)*(a-1)+s-1,b=(r+1)*(a-1)+s,T=(r+1)*a+s;l[g]=w,l[g+1]=E,l[g+2]=T,l[g+3]=E,l[g+4]=b,l[g+5]=T,g+=6}this.setIndex(new n.BufferAttribute(l,1)),this.addAttribute("position",new n.BufferAttribute(h,3)),this.addAttribute("normal",new n.BufferAttribute(d,3)),this.addAttribute("uv",new n.BufferAttribute(p,2))},n.TorusBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.TorusBufferGeometry.prototype.constructor=n.TorusBufferGeometry,n.TorusGeometry=function(e,t,i,r,o){n.Geometry.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:r,arc:o},this.fromBufferGeometry(new n.TorusBufferGeometry(e,t,i,r,o))},n.TorusGeometry.prototype=Object.create(n.Geometry.prototype),n.TorusGeometry.prototype.constructor=n.TorusGeometry,n.TorusKnotBufferGeometry=function(e,t,i,r,o,a){function s(e,t,i,r,n){var o=Math.cos(e),a=Math.sin(e),s=i/t*e,c=Math.cos(s);n.x=r*(2+c)*.5*o,n.y=r*(2+c)*a*.5,n.z=r*Math.sin(s)*.5}n.BufferGeometry.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:r,p:o,q:a},e=e||100,t=t||40,i=Math.floor(i)||64,r=Math.floor(r)||8,o=o||2,a=a||3;var c,u,l=(r+1)*(i+1),h=r*i*2*3,d=new n.BufferAttribute(new(h>65535?Uint32Array:Uint16Array)(h),1),p=new n.BufferAttribute(new Float32Array(3*l),3),f=new n.BufferAttribute(new Float32Array(3*l),3),m=new n.BufferAttribute(new Float32Array(2*l),2),g=0,v=0,y=new n.Vector3,M=new n.Vector3,A=new n.Vector2,x=new n.Vector3,w=new n.Vector3,E=new n.Vector3,b=new n.Vector3,T=new n.Vector3;for(c=0;c<=i;++c){var L=c/i*o*Math.PI*2;for(s(L,o,a,e,x),s(L+.01,o,a,e,w),b.subVectors(w,x),T.addVectors(w,x),E.crossVectors(b,T),T.crossVectors(E,b),E.normalize(),T.normalize(),u=0;u<=r;++u){var D=u/r*Math.PI*2,N=-t*Math.cos(D),S=t*Math.sin(D);y.x=x.x+(N*T.x+S*E.x),y.y=x.y+(N*T.y+S*E.y),y.z=x.z+(N*T.z+S*E.z),p.setXYZ(g,y.x,y.y,y.z),M.subVectors(y,x).normalize(),f.setXYZ(g,M.x,M.y,M.z),A.x=c/i,A.y=u/r,m.setXY(g,A.x,A.y),g++}}for(u=1;u<=i;u++)for(c=1;c<=r;c++){var C=(r+1)*(u-1)+(c-1),I=(r+1)*u+(c-1),j=(r+1)*u+c,_=(r+1)*(u-1)+c;d.setX(v,C),v++,d.setX(v,I),v++,d.setX(v,_),v++,d.setX(v,I),v++,d.setX(v,j),v++,d.setX(v,_),v++}this.setIndex(d),this.addAttribute("position",p),this.addAttribute("normal",f),this.addAttribute("uv",m)},n.TorusKnotBufferGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.TorusKnotBufferGeometry.prototype.constructor=n.TorusKnotBufferGeometry,n.TorusKnotGeometry=function(e,t,i,r,o,a,s){n.Geometry.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:r,p:o,q:a},void 0!==s&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new n.TorusKnotBufferGeometry(e,t,i,r,o,a)),this.mergeVertices()},n.TorusKnotGeometry.prototype=Object.create(n.Geometry.prototype),n.TorusKnotGeometry.prototype.constructor=n.TorusKnotGeometry,n.TubeGeometry=function(e,t,i,r,o,a){function s(e,t,i){return C.vertices.push(new n.Vector3(e,t,i))-1}n.Geometry.call(this),this.type="TubeGeometry",this.parameters={path:e,segments:t,radius:i,radialSegments:r,closed:o,taper:a},t=t||64,i=i||1,r=r||8,o=o||!1,a=a||n.TubeGeometry.NoTaper;var c,u,l,h,d,p,f,m,g,v,y,M,A,x,w,E,b,T,L,D,N,S=[],C=this,I=t+1,j=new n.Vector3,_=new n.TubeGeometry.FrenetFrames(e,t,o),O=_.tangents,z=_.normals,k=_.binormals;for(this.tangents=O,this.normals=z,this.binormals=k,v=0;v<I;v++)for(S[v]=[],h=v/(I-1),g=e.getPointAt(h),c=O[v],u=z[v],l=k[v],p=i*a(h),y=0;y<r;y++)d=y/r*2*Math.PI,f=-p*Math.cos(d),m=p*Math.sin(d),j.copy(g),j.x+=f*u.x+m*l.x,j.y+=f*u.y+m*l.y,j.z+=f*u.z+m*l.z,S[v][y]=s(j.x,j.y,j.z);for(v=0;v<t;v++)for(y=0;y<r;y++)M=o?(v+1)%t:v+1,A=(y+1)%r,x=S[v][y],w=S[M][y],E=S[M][A],b=S[v][A],T=new n.Vector2(v/t,y/r),L=new n.Vector2((v+1)/t,y/r),D=new n.Vector2((v+1)/t,(y+1)/r),N=new n.Vector2(v/t,(y+1)/r),this.faces.push(new n.Face3(x,w,b)),this.faceVertexUvs[0].push([T,L,N]),this.faces.push(new n.Face3(w,E,b)),this.faceVertexUvs[0].push([L.clone(),D,N.clone()]);this.computeFaceNormals(),this.computeVertexNormals()},n.TubeGeometry.prototype=Object.create(n.Geometry.prototype),n.TubeGeometry.prototype.constructor=n.TubeGeometry,n.TubeGeometry.NoTaper=function(e){return 1},n.TubeGeometry.SinusoidalTaper=function(e){return Math.sin(Math.PI*e)},n.TubeGeometry.FrenetFrames=function(e,t,i){function r(){f[0]=new n.Vector3,m[0]=new n.Vector3,a=Number.MAX_VALUE,s=Math.abs(p[0].x),c=Math.abs(p[0].y),u=Math.abs(p[0].z),s<=a&&(a=s,d.set(1,0,0)),c<=a&&(a=c,d.set(0,1,0)),u<=a&&d.set(0,0,1),g.crossVectors(p[0],d).normalize(),f[0].crossVectors(p[0],g),m[0].crossVectors(p[0],f[0])}var o,a,s,c,u,l,h,d=new n.Vector3,p=[],f=[],m=[],g=new n.Vector3,v=new n.Matrix4,y=t+1;for(this.tangents=p,this.normals=f,this.binormals=m,l=0;l<y;l++)h=l/(y-1),p[l]=e.getTangentAt(h),p[l].normalize();for(r(),l=1;l<y;l++)f[l]=f[l-1].clone(),m[l]=m[l-1].clone(),g.crossVectors(p[l-1],p[l]),g.length()>Number.EPSILON&&(g.normalize(),o=Math.acos(n.Math.clamp(p[l-1].dot(p[l]),-1,1)),f[l].applyMatrix4(v.makeRotationAxis(g,o))),m[l].crossVectors(p[l],f[l]);if(i)for(o=Math.acos(n.Math.clamp(f[0].dot(f[y-1]),-1,1)),o/=y-1,p[0].dot(g.crossVectors(f[0],f[y-1]))>0&&(o=-o),l=1;l<y;l++)f[l].applyMatrix4(v.makeRotationAxis(p[l],o*l)),m[l].crossVectors(p[l],f[l])},n.PolyhedronGeometry=function(e,t,i,r){function o(e){var t=e.normalize().clone();t.index=h.vertices.push(t)-1;var i=c(e)/2/Math.PI+.5,r=u(e)/Math.PI+.5;return t.uv=new n.Vector2(i,1-r),t}function a(e,t,i,r){var o=new n.Face3(e.index,t.index,i.index,[e.clone(),t.clone(),i.clone()],(void 0),r);h.faces.push(o),A.copy(e).add(t).add(i).divideScalar(3);var a=c(A);h.faceVertexUvs[0].push([l(e.uv,e,a),l(t.uv,t,a),l(i.uv,i,a)])}function s(e,t){for(var i=Math.pow(2,t),r=o(h.vertices[e.a]),n=o(h.vertices[e.b]),s=o(h.vertices[e.c]),c=[],u=e.materialIndex,l=0;l<=i;l++){c[l]=[];for(var d=o(r.clone().lerp(s,l/i)),p=o(n.clone().lerp(s,l/i)),f=i-l,m=0;m<=f;m++)0===m&&l===i?c[l][m]=d:c[l][m]=o(d.clone().lerp(p,m/f))}for(var l=0;l<i;l++)for(var m=0;m<2*(i-l)-1;m++){var g=Math.floor(m/2);m%2===0?a(c[l][g+1],c[l+1][g],c[l][g],u):a(c[l][g+1],c[l+1][g+1],c[l+1][g],u)}}function c(e){return Math.atan2(e.z,-e.x)}function u(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}function l(e,t,i){return i<0&&1===e.x&&(e=new n.Vector2(e.x-1,e.y)),0===t.x&&0===t.z&&(e=new n.Vector2(i/2/Math.PI+.5,e.y)),e.clone()}n.Geometry.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:r},i=i||1,r=r||0;for(var h=this,d=0,p=e.length;d<p;d+=3)o(new n.Vector3(e[d],e[d+1],e[d+2]));for(var f=this.vertices,m=[],d=0,g=0,p=t.length;d<p;d+=3,g++){var v=f[t[d]],y=f[t[d+1]],M=f[t[d+2]];m[g]=new n.Face3(v.index,y.index,M.index,[v.clone(),y.clone(),M.clone()],(void 0),g)}for(var A=new n.Vector3,d=0,p=m.length;d<p;d++)s(m[d],r);for(var d=0,p=this.faceVertexUvs[0].length;d<p;d++){var x=this.faceVertexUvs[0][d],w=x[0].x,E=x[1].x,b=x[2].x,T=Math.max(w,E,b),L=Math.min(w,E,b);T>.9&&L<.1&&(w<.2&&(x[0].x+=1),E<.2&&(x[1].x+=1),b<.2&&(x[2].x+=1))}for(var d=0,p=this.vertices.length;d<p;d++)this.vertices[d].multiplyScalar(i);this.mergeVertices(),this.computeFaceNormals(),this.boundingSphere=new n.Sphere(new n.Vector3,i)},n.PolyhedronGeometry.prototype=Object.create(n.Geometry.prototype),n.PolyhedronGeometry.prototype.constructor=n.PolyhedronGeometry,n.DodecahedronGeometry=function(e,t){var i=(1+Math.sqrt(5))/2,r=1/i,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r],a=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];n.PolyhedronGeometry.call(this,o,a,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}},n.DodecahedronGeometry.prototype=Object.create(n.PolyhedronGeometry.prototype),n.DodecahedronGeometry.prototype.constructor=n.DodecahedronGeometry,n.IcosahedronGeometry=function(e,t){var i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],o=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];n.PolyhedronGeometry.call(this,r,o,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}},n.IcosahedronGeometry.prototype=Object.create(n.PolyhedronGeometry.prototype),n.IcosahedronGeometry.prototype.constructor=n.IcosahedronGeometry,n.OctahedronGeometry=function(e,t){var i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];n.PolyhedronGeometry.call(this,i,r,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}},n.OctahedronGeometry.prototype=Object.create(n.PolyhedronGeometry.prototype),n.OctahedronGeometry.prototype.constructor=n.OctahedronGeometry,n.TetrahedronGeometry=function(e,t){var i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];n.PolyhedronGeometry.call(this,i,r,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}},n.TetrahedronGeometry.prototype=Object.create(n.PolyhedronGeometry.prototype),n.TetrahedronGeometry.prototype.constructor=n.TetrahedronGeometry,n.ParametricGeometry=function(e,t,i){n.Geometry.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:i};var r,o,a,s,c,u=this.vertices,l=this.faces,h=this.faceVertexUvs[0],d=t+1;for(r=0;r<=i;r++)for(c=r/i,o=0;o<=t;o++)s=o/t,a=e(s,c),u.push(a);var p,f,m,g,v,y,M,A;for(r=0;r<i;r++)for(o=0;o<t;o++)p=r*d+o,f=r*d+o+1,m=(r+1)*d+o+1,g=(r+1)*d+o,v=new n.Vector2(o/t,r/i),y=new n.Vector2((o+1)/t,r/i), M=new n.Vector2((o+1)/t,(r+1)/i),A=new n.Vector2(o/t,(r+1)/i),l.push(new n.Face3(p,f,g)),h.push([v,y,A]),l.push(new n.Face3(f,m,g)),h.push([y.clone(),M,A.clone()]);this.computeFaceNormals(),this.computeVertexNormals()},n.ParametricGeometry.prototype=Object.create(n.Geometry.prototype),n.ParametricGeometry.prototype.constructor=n.ParametricGeometry,n.WireframeGeometry=function(e){function t(e,t){return e-t}n.BufferGeometry.call(this);var i=[0,0],r={},o=["a","b","c"];if(e instanceof n.Geometry){for(var a=e.vertices,s=e.faces,c=0,u=new Uint32Array(6*s.length),l=0,h=s.length;l<h;l++)for(var d=s[l],p=0;p<3;p++){i[0]=d[o[p]],i[1]=d[o[(p+1)%3]],i.sort(t);var f=i.toString();void 0===r[f]&&(u[2*c]=i[0],u[2*c+1]=i[1],r[f]=!0,c++)}for(var m=new Float32Array(2*c*3),l=0,h=c;l<h;l++)for(var p=0;p<2;p++){var g=a[u[2*l+p]],v=6*l+3*p;m[v+0]=g.x,m[v+1]=g.y,m[v+2]=g.z}this.addAttribute("position",new n.BufferAttribute(m,3))}else if(e instanceof n.BufferGeometry)if(null!==e.index){var y=e.index.array,a=e.attributes.position,M=e.groups,c=0;0===M.length&&e.addGroup(0,y.length);for(var u=new Uint32Array(2*y.length),A=0,x=M.length;A<x;++A)for(var w=M[A],E=w.start,b=w.count,l=E,T=E+b;l<T;l+=3)for(var p=0;p<3;p++){i[0]=y[l+p],i[1]=y[l+(p+1)%3],i.sort(t);var f=i.toString();void 0===r[f]&&(u[2*c]=i[0],u[2*c+1]=i[1],r[f]=!0,c++)}for(var m=new Float32Array(2*c*3),l=0,h=c;l<h;l++)for(var p=0;p<2;p++){var v=6*l+3*p,L=u[2*l+p];m[v+0]=a.getX(L),m[v+1]=a.getY(L),m[v+2]=a.getZ(L)}this.addAttribute("position",new n.BufferAttribute(m,3))}else{for(var a=e.attributes.position.array,c=a.length/3,D=c/3,m=new Float32Array(2*c*3),l=0,h=D;l<h;l++)for(var p=0;p<3;p++){var v=18*l+6*p,N=9*l+3*p;m[v+0]=a[N],m[v+1]=a[N+1],m[v+2]=a[N+2];var L=9*l+3*((p+1)%3);m[v+3]=a[L],m[v+4]=a[L+1],m[v+5]=a[L+2]}this.addAttribute("position",new n.BufferAttribute(m,3))}},n.WireframeGeometry.prototype=Object.create(n.BufferGeometry.prototype),n.WireframeGeometry.prototype.constructor=n.WireframeGeometry,n.AxisHelper=function(e){e=e||1;var t=new Float32Array([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e]),i=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]),r=new n.BufferGeometry;r.addAttribute("position",new n.BufferAttribute(t,3)),r.addAttribute("color",new n.BufferAttribute(i,3));var o=new n.LineBasicMaterial({vertexColors:n.VertexColors});n.LineSegments.call(this,r,o)},n.AxisHelper.prototype=Object.create(n.LineSegments.prototype),n.AxisHelper.prototype.constructor=n.AxisHelper,n.ArrowHelper=function(){var e=new n.Geometry;e.vertices.push(new n.Vector3(0,0,0),new n.Vector3(0,1,0));var t=new n.CylinderGeometry(0,.5,1,5,1);return t.translate(0,-.5,0),function(i,r,o,a,s,c){n.Object3D.call(this),void 0===a&&(a=16776960),void 0===o&&(o=1),void 0===s&&(s=.2*o),void 0===c&&(c=.2*s),this.position.copy(r),this.line=new n.Line(e,new n.LineBasicMaterial({color:a})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new n.Mesh(t,new n.MeshBasicMaterial({color:a})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(i),this.setLength(o,s,c)}}(),n.ArrowHelper.prototype=Object.create(n.Object3D.prototype),n.ArrowHelper.prototype.constructor=n.ArrowHelper,n.ArrowHelper.prototype.setDirection=function(){var e,t=new n.Vector3;return function(i){i.y>.99999?this.quaternion.set(0,0,0,1):i.y<-.99999?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),n.ArrowHelper.prototype.setLength=function(e,t,i){void 0===t&&(t=.2*e),void 0===i&&(i=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()},n.ArrowHelper.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},n.BoxHelper=function(e){var t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new n.BufferGeometry;r.setIndex(new n.BufferAttribute(t,1)),r.addAttribute("position",new n.BufferAttribute(i,3)),n.LineSegments.call(this,r,new n.LineBasicMaterial({color:16776960})),void 0!==e&&this.update(e)},n.BoxHelper.prototype=Object.create(n.LineSegments.prototype),n.BoxHelper.prototype.constructor=n.BoxHelper,n.BoxHelper.prototype.update=function(){var e=new n.Box3;return function(t){if(t instanceof n.Box3?e.copy(t):e.setFromObject(t),!e.isEmpty()){var i=e.min,r=e.max,o=this.geometry.attributes.position,a=o.array;a[0]=r.x,a[1]=r.y,a[2]=r.z,a[3]=i.x,a[4]=r.y,a[5]=r.z,a[6]=i.x,a[7]=i.y,a[8]=r.z,a[9]=r.x,a[10]=i.y,a[11]=r.z,a[12]=r.x,a[13]=r.y,a[14]=i.z,a[15]=i.x,a[16]=r.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=r.x,a[22]=i.y,a[23]=i.z,o.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),n.BoundingBoxHelper=function(e,t){var i=void 0!==t?t:8947848;this.object=e,this.box=new n.Box3,n.Mesh.call(this,new n.BoxGeometry(1,1,1),new n.MeshBasicMaterial({color:i,wireframe:!0}))},n.BoundingBoxHelper.prototype=Object.create(n.Mesh.prototype),n.BoundingBoxHelper.prototype.constructor=n.BoundingBoxHelper,n.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object),this.box.size(this.scale),this.box.center(this.position)},n.CameraHelper=function(e){function t(e,t,r){i(e,r),i(t,r)}function i(e,t){r.vertices.push(new n.Vector3),r.colors.push(new n.Color(t)),void 0===a[e]&&(a[e]=[]),a[e].push(r.vertices.length-1)}var r=new n.Geometry,o=new n.LineBasicMaterial({color:16777215,vertexColors:n.FaceColors}),a={},s=16755200,c=16711680,u=43775,l=16777215,h=3355443;t("n1","n2",s),t("n2","n4",s),t("n4","n3",s),t("n3","n1",s),t("f1","f2",s),t("f2","f4",s),t("f4","f3",s),t("f3","f1",s),t("n1","f1",s),t("n2","f2",s),t("n3","f3",s),t("n4","f4",s),t("p","n1",c),t("p","n2",c),t("p","n3",c),t("p","n4",c),t("u1","u2",u),t("u2","u3",u),t("u3","u1",u),t("c","t",l),t("p","c",h),t("cn1","cn2",h),t("cn3","cn4",h),t("cf1","cf2",h),t("cf3","cf4",h),n.LineSegments.call(this,r,o),this.camera=e,this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()},n.CameraHelper.prototype=Object.create(n.LineSegments.prototype),n.CameraHelper.prototype.constructor=n.CameraHelper,n.CameraHelper.prototype.update=function(){function e(e,n,a,s){r.set(n,a,s).unproject(o);var c=i[e];if(void 0!==c)for(var u=0,l=c.length;u<l;u++)t.vertices[c[u]].copy(r)}var t,i,r=new n.Vector3,o=new n.Camera;return function(){t=this.geometry,i=this.pointMap;var r=1,n=1;o.projectionMatrix.copy(this.camera.projectionMatrix),e("c",0,0,-1),e("t",0,0,1),e("n1",-r,-n,-1),e("n2",r,-n,-1),e("n3",-r,n,-1),e("n4",r,n,-1),e("f1",-r,-n,1),e("f2",r,-n,1),e("f3",-r,n,1),e("f4",r,n,1),e("u1",.7*r,1.1*n,-1),e("u2",.7*-r,1.1*n,-1),e("u3",0,2*n,-1),e("cf1",-r,0,1),e("cf2",r,0,1),e("cf3",0,-n,1),e("cf4",0,n,1),e("cn1",-r,0,-1),e("cn2",r,0,-1),e("cn3",0,-n,-1),e("cn4",0,n,-1),t.verticesNeedUpdate=!0}}(),n.DirectionalLightHelper=function(e,t){n.Object3D.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,t=t||1;var i=new n.Geometry;i.vertices.push(new n.Vector3((-t),t,0),new n.Vector3(t,t,0),new n.Vector3(t,(-t),0),new n.Vector3((-t),(-t),0),new n.Vector3((-t),t,0));var r=new n.LineBasicMaterial({fog:!1});r.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.lightPlane=new n.Line(i,r),this.add(this.lightPlane),i=new n.Geometry,i.vertices.push(new n.Vector3,new n.Vector3),r=new n.LineBasicMaterial({fog:!1}),r.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.targetLine=new n.Line(i,r),this.add(this.targetLine),this.update()},n.DirectionalLightHelper.prototype=Object.create(n.Object3D.prototype),n.DirectionalLightHelper.prototype.constructor=n.DirectionalLightHelper,n.DirectionalLightHelper.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},n.DirectionalLightHelper.prototype.update=function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Vector3;return function(){e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(t,e),this.lightPlane.lookAt(i),this.lightPlane.material.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.targetLine.geometry.vertices[1].copy(i),this.targetLine.geometry.verticesNeedUpdate=!0,this.targetLine.material.color.copy(this.lightPlane.material.color)}}(),n.EdgesHelper=function(e,t,i){var r=void 0!==t?t:16777215;n.LineSegments.call(this,new n.EdgesGeometry(e.geometry,i),new n.LineBasicMaterial({color:r})),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1},n.EdgesHelper.prototype=Object.create(n.LineSegments.prototype),n.EdgesHelper.prototype.constructor=n.EdgesHelper,n.FaceNormalsHelper=function(e,t,i,r){this.object=e,this.size=void 0!==t?t:1;var o=void 0!==i?i:16776960,a=void 0!==r?r:1,s=0,c=this.object.geometry;c instanceof n.Geometry?s=c.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var u=new n.BufferGeometry,l=new n.Float32Attribute(2*s*3,3);u.addAttribute("position",l),n.LineSegments.call(this,u,new n.LineBasicMaterial({color:o,linewidth:a})),this.matrixAutoUpdate=!1,this.update()},n.FaceNormalsHelper.prototype=Object.create(n.LineSegments.prototype),n.FaceNormalsHelper.prototype.constructor=n.FaceNormalsHelper,n.FaceNormalsHelper.prototype.update=function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Matrix3;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,n=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],d=h.normal;e.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),t.copy(d).applyMatrix3(i).normalize().multiplyScalar(this.size).add(e),n.setXYZ(c,e.x,e.y,e.z),c+=1,n.setXYZ(c,t.x,t.y,t.z),c+=1}return n.needsUpdate=!0,this}}(),n.GridHelper=function(e,t){var i=new n.Geometry,r=new n.LineBasicMaterial({vertexColors:n.VertexColors});this.color1=new n.Color(4473924),this.color2=new n.Color(8947848);for(var o=-e;o<=e;o+=t){i.vertices.push(new n.Vector3((-e),0,o),new n.Vector3(e,0,o),new n.Vector3(o,0,(-e)),new n.Vector3(o,0,e));var a=0===o?this.color1:this.color2;i.colors.push(a,a,a,a)}n.LineSegments.call(this,i,r)},n.GridHelper.prototype=Object.create(n.LineSegments.prototype),n.GridHelper.prototype.constructor=n.GridHelper,n.GridHelper.prototype.setColors=function(e,t){this.color1.set(e),this.color2.set(t),this.geometry.colorsNeedUpdate=!0},n.HemisphereLightHelper=function(e,t){n.Object3D.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.colors=[new n.Color,new n.Color];var i=new n.SphereGeometry(t,4,2);i.rotateX(-Math.PI/2);for(var r=0,o=8;r<o;r++)i.faces[r].color=this.colors[r<4?0:1];var a=new n.MeshBasicMaterial({vertexColors:n.FaceColors,wireframe:!0});this.lightSphere=new n.Mesh(i,a),this.add(this.lightSphere),this.update()},n.HemisphereLightHelper.prototype=Object.create(n.Object3D.prototype),n.HemisphereLightHelper.prototype.constructor=n.HemisphereLightHelper,n.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose(),this.lightSphere.material.dispose()},n.HemisphereLightHelper.prototype.update=function(){var e=new n.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity),this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity),this.lightSphere.lookAt(e.setFromMatrixPosition(this.light.matrixWorld).negate()),this.lightSphere.geometry.colorsNeedUpdate=!0}}(),n.PointLightHelper=function(e,t){this.light=e,this.light.updateMatrixWorld();var i=new n.SphereGeometry(t,4,2),r=new n.MeshBasicMaterial({wireframe:!0,fog:!1});r.color.copy(this.light.color).multiplyScalar(this.light.intensity),n.Mesh.call(this,i,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1},n.PointLightHelper.prototype=Object.create(n.Mesh.prototype),n.PointLightHelper.prototype.constructor=n.PointLightHelper,n.PointLightHelper.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},n.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)},n.SkeletonHelper=function(e){this.bones=this.getBoneList(e);for(var t=new n.Geometry,i=0;i<this.bones.length;i++){var r=this.bones[i];r.parent instanceof n.Bone&&(t.vertices.push(new n.Vector3),t.vertices.push(new n.Vector3),t.colors.push(new n.Color(0,0,1)),t.colors.push(new n.Color(0,1,0)))}t.dynamic=!0;var o=new n.LineBasicMaterial({vertexColors:n.VertexColors,depthTest:!1,depthWrite:!1,transparent:!0});n.LineSegments.call(this,t,o),this.root=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.update()},n.SkeletonHelper.prototype=Object.create(n.LineSegments.prototype),n.SkeletonHelper.prototype.constructor=n.SkeletonHelper,n.SkeletonHelper.prototype.getBoneList=function(e){var t=[];e instanceof n.Bone&&t.push(e);for(var i=0;i<e.children.length;i++)t.push.apply(t,this.getBoneList(e.children[i]));return t},n.SkeletonHelper.prototype.update=function(){for(var e=this.geometry,t=(new n.Matrix4).getInverse(this.root.matrixWorld),i=new n.Matrix4,r=0,o=0;o<this.bones.length;o++){var a=this.bones[o];a.parent instanceof n.Bone&&(i.multiplyMatrices(t,a.matrixWorld),e.vertices[r].setFromMatrixPosition(i),i.multiplyMatrices(t,a.parent.matrixWorld),e.vertices[r+1].setFromMatrixPosition(i),r+=2)}e.verticesNeedUpdate=!0,e.computeBoundingSphere()},n.SpotLightHelper=function(e){n.Object3D.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;for(var t=new n.BufferGeometry,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,o=1,a=32;r<a;r++,o++){var s=r/a*Math.PI*2,c=o/a*Math.PI*2;i.push(Math.cos(s),Math.sin(s),1,Math.cos(c),Math.sin(c),1)}t.addAttribute("position",new n.Float32Attribute(i,3));var u=new n.LineBasicMaterial({fog:!1});this.cone=new n.LineSegments(t,u),this.add(this.cone),this.update()},n.SpotLightHelper.prototype=Object.create(n.Object3D.prototype),n.SpotLightHelper.prototype.constructor=n.SpotLightHelper,n.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},n.SpotLightHelper.prototype.update=function(){var e=new n.Vector3,t=new n.Vector3;return function(){var i=this.light.distance?this.light.distance:1e3,r=i*Math.tan(this.light.angle);this.cone.scale.set(r,r,i),e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(t.sub(e)),this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(),n.VertexNormalsHelper=function(e,t,i,r){this.object=e,this.size=void 0!==t?t:1;var o=void 0!==i?i:16711680,a=void 0!==r?r:1,s=0,c=this.object.geometry;c instanceof n.Geometry?s=3*c.faces.length:c instanceof n.BufferGeometry&&(s=c.attributes.normal.count);var u=new n.BufferGeometry,l=new n.Float32Attribute(2*s*3,3);u.addAttribute("position",l),n.LineSegments.call(this,u,new n.LineBasicMaterial({color:o,linewidth:a})),this.matrixAutoUpdate=!1,this.update()},n.VertexNormalsHelper.prototype=Object.create(n.LineSegments.prototype),n.VertexNormalsHelper.prototype.constructor=n.VertexNormalsHelper,n.VertexNormalsHelper.prototype.update=function(){var e=new n.Vector3,t=new n.Vector3,i=new n.Matrix3;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var o=this.object.matrixWorld,a=this.geometry.attributes.position,s=this.object.geometry;if(s instanceof n.Geometry)for(var c=s.vertices,u=s.faces,l=0,h=0,d=u.length;h<d;h++)for(var p=u[h],f=0,m=p.vertexNormals.length;f<m;f++){var g=c[p[r[f]]],v=p.vertexNormals[f];e.copy(g).applyMatrix4(o),t.copy(v).applyMatrix3(i).normalize().multiplyScalar(this.size).add(e),a.setXYZ(l,e.x,e.y,e.z),l+=1,a.setXYZ(l,t.x,t.y,t.z),l+=1}else if(s instanceof n.BufferGeometry)for(var y=s.attributes.position,M=s.attributes.normal,l=0,f=0,m=y.count;f<m;f++)e.set(y.getX(f),y.getY(f),y.getZ(f)).applyMatrix4(o),t.set(M.getX(f),M.getY(f),M.getZ(f)),t.applyMatrix3(i).normalize().multiplyScalar(this.size).add(e),a.setXYZ(l,e.x,e.y,e.z),l+=1,a.setXYZ(l,t.x,t.y,t.z),l+=1;return a.needsUpdate=!0,this}}(),n.WireframeHelper=function(e,t){var i=void 0!==t?t:16777215;n.LineSegments.call(this,new n.WireframeGeometry(e.geometry),new n.LineBasicMaterial({color:i})),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1},n.WireframeHelper.prototype=Object.create(n.LineSegments.prototype),n.WireframeHelper.prototype.constructor=n.WireframeHelper,n.ImmediateRenderObject=function(e){n.Object3D.call(this),this.material=e,this.render=function(e){}},n.ImmediateRenderObject.prototype=Object.create(n.Object3D.prototype),n.ImmediateRenderObject.prototype.constructor=n.ImmediateRenderObject,n.MorphBlendMesh=function(e,t){n.Mesh.call(this,e,t),this.animationsMap={},this.animationsList=[];var i=this.geometry.morphTargets.length,r="__default",o=0,a=i-1,s=i/1;this.createAnimation(r,o,a,s),this.setAnimationWeight(r,1)},n.MorphBlendMesh.prototype=Object.create(n.Mesh.prototype),n.MorphBlendMesh.prototype.constructor=n.MorphBlendMesh,n.MorphBlendMesh.prototype.createAnimation=function(e,t,i,r){var n={start:t,end:i,length:i-t+1,fps:r,duration:(i-t)/r,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[e]=n,this.animationsList.push(n)},n.MorphBlendMesh.prototype.autoCreateAnimations=function(e){for(var t,i=/([a-z]+)_?(\d+)/i,r={},n=this.geometry,o=0,a=n.morphTargets.length;o<a;o++){var s=n.morphTargets[o],c=s.name.match(i);if(c&&c.length>1){var u=c[1];r[u]||(r[u]={start:1/0,end:-(1/0)});var l=r[u];o<l.start&&(l.start=o),o>l.end&&(l.end=o),t||(t=u)}}for(var u in r){var l=r[u];this.createAnimation(u,l.start,l.end,e)}this.firstAnimation=t},n.MorphBlendMesh.prototype.setAnimationDirectionForward=function(e){var t=this.animationsMap[e];t&&(t.direction=1,t.directionBackwards=!1)},n.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(e){var t=this.animationsMap[e];t&&(t.direction=-1,t.directionBackwards=!0)},n.MorphBlendMesh.prototype.setAnimationFPS=function(e,t){var i=this.animationsMap[e];i&&(i.fps=t,i.duration=(i.end-i.start)/i.fps)},n.MorphBlendMesh.prototype.setAnimationDuration=function(e,t){var i=this.animationsMap[e];i&&(i.duration=t,i.fps=(i.end-i.start)/i.duration)},n.MorphBlendMesh.prototype.setAnimationWeight=function(e,t){var i=this.animationsMap[e];i&&(i.weight=t)},n.MorphBlendMesh.prototype.setAnimationTime=function(e,t){var i=this.animationsMap[e];i&&(i.time=t)},n.MorphBlendMesh.prototype.getAnimationTime=function(e){var t=0,i=this.animationsMap[e];return i&&(t=i.time),t},n.MorphBlendMesh.prototype.getAnimationDuration=function(e){var t=-1,i=this.animationsMap[e];return i&&(t=i.duration),t},n.MorphBlendMesh.prototype.playAnimation=function(e){var t=this.animationsMap[e];t?(t.time=0,t.active=!0):console.warn("THREE.MorphBlendMesh: animation["+e+"] undefined in .playAnimation()")},n.MorphBlendMesh.prototype.stopAnimation=function(e){var t=this.animationsMap[e];t&&(t.active=!1)},n.MorphBlendMesh.prototype.update=function(e){for(var t=0,i=this.animationsList.length;t<i;t++){var r=this.animationsList[t];if(r.active){var o=r.duration/r.length;r.time+=r.direction*e,r.mirroredLoop?(r.time>r.duration||r.time<0)&&(r.direction*=-1,r.time>r.duration&&(r.time=r.duration,r.directionBackwards=!0),r.time<0&&(r.time=0,r.directionBackwards=!1)):(r.time=r.time%r.duration,r.time<0&&(r.time+=r.duration));var a=r.start+n.Math.clamp(Math.floor(r.time/o),0,r.length-1),s=r.weight;a!==r.currentFrame&&(this.morphTargetInfluences[r.lastFrame]=0,this.morphTargetInfluences[r.currentFrame]=1*s,this.morphTargetInfluences[a]=0,r.lastFrame=r.currentFrame,r.currentFrame=a);var c=r.time%o/o;r.directionBackwards&&(c=1-c),r.currentFrame!==r.lastFrame?(this.morphTargetInfluences[r.currentFrame]=c*s,this.morphTargetInfluences[r.lastFrame]=(1-c)*s):this.morphTargetInfluences[r.currentFrame]=s}}},"undefined"!=typeof r?("undefined"!=typeof i&&i.exports&&(r=i.exports=n),r.THREE=n):this.THREE=n},{}],18:[function(e,i,r){!function(e){if("performance"in e==!1&&(e.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in e.performance==!1){var t=e.performance.timing&&e.performance.timing.navigationStart?performance.timing.navigationStart:Date.now();e.performance.now=function(){return Date.now()-t}}}(this);var n=n||function(){var e=[];return{REVISION:"14",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);i!==-1&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:window.performance.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}}}();n.Tween=function(e){var t=e,i={},r={},o={},a=1e3,s=0,c=!1,u=!1,l=!1,h=0,d=null,p=n.Easing.Linear.None,f=n.Interpolation.Linear,m=[],g=null,v=!1,y=null,M=null,A=null;for(var x in e)i[x]=parseFloat(e[x],10);this.to=function(e,t){return void 0!==t&&(a=t),r=e,this},this.start=function(e){n.add(this),u=!0,v=!1,d=void 0!==e?e:window.performance.now(),d+=h;for(var a in r){if(r[a]instanceof Array){if(0===r[a].length)continue;r[a]=[t[a]].concat(r[a])}i[a]=t[a],i[a]instanceof Array==!1&&(i[a]*=1),o[a]=i[a]||0}return this},this.stop=function(){return u?(n.remove(this),u=!1,null!==A&&A.call(t),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var e=0,t=m.length;e<t;e++)m[e].stop()},this.delay=function(e){return h=e,this},this.repeat=function(e){return s=e,this},this.yoyo=function(e){return c=e,this},this.easing=function(e){return p=e,this},this.interpolation=function(e){return f=e,this},this.chain=function(){return m=arguments,this},this.onStart=function(e){return g=e,this},this.onUpdate=function(e){return y=e,this},this.onComplete=function(e){return M=e,this},this.onStop=function(e){return A=e,this},this.update=function(e){var n;if(e<d)return!0;v===!1&&(null!==g&&g.call(t),v=!0);var u=(e-d)/a;u=u>1?1:u;var A=p(u);for(n in r){var x=i[n]||0,w=r[n];w instanceof Array?t[n]=f(w,A):("string"==typeof w&&(w=x+parseFloat(w,10)),"number"==typeof w&&(t[n]=x+(w-x)*A))}if(null!==y&&y.call(t,A),1==u){if(s>0){isFinite(s)&&s--;for(n in o){if("string"==typeof r[n]&&(o[n]=o[n]+parseFloat(r[n],10)),c){var E=o[n];o[n]=r[n],r[n]=E}i[n]=o[n]}return c&&(l=!l),d=e+h,!0}null!==M&&M.call(t);for(var b=0,T=m.length;b<T;b++)m[b].start(e);return!1}return!0}},n.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1,r=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=r/4):t=r*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},Out:function(e){var t,i=.1,r=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=r/4):t=r*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},InOut:function(e){var t,i=.1,r=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=r/4):t=r*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-n.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*n.Easing.Bounce.In(2*e):.5*n.Easing.Bounce.Out(2*e-1)+.5}}},n.Interpolation={Linear:function(e,t){var i=e.length-1,r=i*t,o=Math.floor(r),a=n.Interpolation.Utils.Linear;return t<0?a(e[0],e[1],r):t>1?a(e[i],e[i-1],i-r):a(e[o],e[o+1>i?i:o+1],r-o)},Bezier:function(e,t){var i,r=0,o=e.length-1,a=Math.pow,s=n.Interpolation.Utils.Bernstein;for(i=0;i<=o;i++)r+=a(1-t,o-i)*a(t,i)*e[i]*s(o,i);return r},CatmullRom:function(e,t){var i=e.length-1,r=i*t,o=Math.floor(r),a=n.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(o=Math.floor(r=i*(1+t))),a(e[(o-1+i)%i],e[o],e[(o+1)%i],e[(o+2)%i],r-o)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[i]-(a(e[i],e[i],e[i-1],e[i-1],r-i)-e[i]):a(e[o?o-1:0],e[o],e[i<o+1?i:o+1],e[i<o+2?i:o+2],r-o)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=n.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:function(){var e=[1];return function(t){var i,r=1;if(e[t])return e[t];for(i=t;i>1;i--)r*=i;return e[t]=r}}(),CatmullRom:function(e,t,i,r,n){var o=.5*(i-e),a=.5*(r-t),s=n*n,c=n*s;return(2*t-2*i+o+a)*c+(-3*t+3*i-2*o-a)*s+o*n+t}}},function(e){"function"==typeof t&&t.amd?t([],function(){return n}):"object"==typeof r?i.exports=n:e.TWEEN=n}(this)},{}],19:[function(e,r,n){(function(i){!function r(t,i,n){function o(s,c){if(!i[s]){if(!t[s]){var u="function"==typeof e&&e;if(!c&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[s]={exports:{}};t[s][0].call(h.exports,function(e){var i=t[s][1][e];return o(i?i:e)},h,h.exports,r,t,i,n)}return i[s].exports}for(var a="function"==typeof e&&e,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,r,n){(function(i,n){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * See path_to_url * @version 3.1.2 */ (function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function a(e){return"function"==typeof e}function s(e){H=e}function c(e){Z=e}function u(){return function(){i.nextTick(f)}}function l(){return function(){Y(f)}}function h(){var e=0,t=new $(f),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function d(){var e=new MessageChannel;return e.port1.onmessage=f,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(f,1)}}function f(){for(var e=0;e<q;e+=2){var t=ie[e],i=ie[e+1];t(i),ie[e]=void 0,ie[e+1]=void 0}q=0}function m(){try{var t=e,i=t("vertx");return Y=i.runOnLoop||i.runOnContext,l()}catch(r){return p()}}function g(e,t){var i=this,r=i._state;if(r===ae&&!e||r===se&&!t)return this;var n=new this.constructor(y),o=i._result;if(r){var a=arguments[r-1];Z(function(){O(r,n,a,o)})}else C(i,n,e,t);return n}function v(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var i=new t(y);return L(i,e),i}function y(){}function M(){return new TypeError("You cannot resolve a promise with itself")}function A(){return new TypeError("A promises callback cannot return that same promise.")}function x(e){try{return e.then}catch(t){return ce.error=t,ce}}function w(e,t,i,r){try{e.call(t,i,r)}catch(n){return n}}function E(e,t,i){Z(function(e){var r=!1,n=w(i,t,function(i){r||(r=!0,t!==i?L(e,i):N(e,i))},function(t){r||(r=!0,S(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&n&&(r=!0,S(e,n))},e)}function b(e,t){t._state===ae?N(e,t._result):t._state===se?S(e,t._result):C(t,void 0,function(t){L(e,t)},function(t){S(e,t)})}function T(e,t,i){t.constructor===e.constructor&&i===re&&constructor.resolve===ne?b(e,t):i===ce?S(e,ce.error):void 0===i?N(e,t):a(i)?E(e,t,i):N(e,t)}function L(e,t){e===t?S(e,M()):o(t)?T(e,t,x(t)):N(e,t)}function D(e){e._onerror&&e._onerror(e._result),I(e)}function N(e,t){e._state===oe&&(e._result=t,e._state=ae,0!==e._subscribers.length&&Z(I,e))}function S(e,t){e._state===oe&&(e._state=se,e._result=t,Z(D,e))}function C(e,t,i,r){var n=e._subscribers,o=n.length;e._onerror=null,n[o]=t,n[o+ae]=i,n[o+se]=r,0===o&&e._state&&Z(I,e)}function I(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var r,n,o=e._result,a=0;a<t.length;a+=3)r=t[a],n=t[a+i],r?O(i,r,n,o):n(o);e._subscribers.length=0}}function j(){this.error=null}function _(e,t){try{return e(t)}catch(i){return ue.error=i,ue}}function O(e,t,i,r){var n,o,s,c,u=a(i);if(u){if(n=_(i,r),n===ue?(c=!0,o=n.error,n=null):s=!0,t===n)return void S(t,A())}else n=r,s=!0;t._state!==oe||(u&&s?L(t,n):c?S(t,o):e===ae?N(t,n):e===se&&S(t,n))}function z(e,t){try{t(function(t){L(e,t)},function(t){S(e,t)})}catch(i){S(e,i)}}function k(e){return new me(this,e).promise}function R(e){function t(e){L(n,e)}function i(e){S(n,e)}var r=this,n=new r(y);if(!X(e))return S(n,new TypeError("You must pass an array to race.")),n;for(var o=e.length,a=0;n._state===oe&&a<o;a++)C(r.resolve(e[a]),void 0,t,i);return n}function B(e){var t=this,i=new t(y);return S(i,e),i}function U(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function P(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&U(),this instanceof F?z(this,e):P())}function G(e,t){this._instanceConstructor=e,this.promise=new e(y),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?N(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&N(this.promise,this._result))):S(this.promise,this._validationError())}function V(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var i=e.Promise;i&&"[object Promise]"===Object.prototype.toString.call(i.resolve())&&!i.cast||(e.Promise=fe)}var Q;Q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Y,H,W,X=Q,q=0,Z=function(e,t){ie[q]=e,ie[q+1]=t,q+=2,2===q&&(H?H(f):W())},K="undefined"!=typeof window?window:void 0,J=K||{},$=J.MutationObserver||J.WebKitMutationObserver,ee="undefined"!=typeof i&&"[object process]"==={}.toString.call(i),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ie=new Array(1e3);W=ee?u():$?h():te?d():void 0===K&&"function"==typeof e?m():p();var re=g,ne=v,oe=void 0,ae=1,se=2,ce=new j,ue=new j,le=k,he=R,de=B,pe=0,fe=F;F.all=le,F.race=he,F.resolve=ne,F.reject=de,F._setScheduler=s,F._setAsap=c,F._asap=Z,F.prototype={constructor:F,then:re,"catch":function(e){return this.then(null,e)}};var me=G;G.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},G.prototype._enumerate=function(){for(var e=this.length,t=this._input,i=0;this._state===oe&&i<e;i++)this._eachEntry(t[i],i)},G.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,r=i.resolve;if(r===ne){var n=x(e);if(n===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(i===fe){var o=new i(y);T(o,e,n),this._willSettleAt(o,t)}else this._willSettleAt(new i(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},G.prototype._settledAt=function(e,t,i){var r=this.promise;r._state===oe&&(this._remaining--,e===se?S(r,i):this._result[t]=i),0===this._remaining&&N(r,this._result)},G.prototype._willSettleAt=function(e,t){var i=this;C(e,void 0,function(e){i._settledAt(ae,t,e)},function(e){i._settledAt(se,t,e)})};var ge=V,ve={Promise:fe,polyfill:ge};"function"==typeof t&&t.amd?t(function(){return ve}):"undefined"!=typeof r&&r.exports?r.exports=ve:"undefined"!=typeof this&&(this.ES6Promise=ve),ge()}).call(this)}).call(this,e("_process"),"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,i){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(e,t){for(var i,a,s=r(e),c=1;c<arguments.length;c++){i=Object(arguments[c]);for(var u in i)n.call(i,u)&&(s[u]=i[u]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(i);for(var l=0;l<a.length;l++)o.call(i,a[l])&&(s[a[l]]=i[a[l]])}}return s}},{}],3:[function(e,t,i){function r(){l=!1,s.length?u=s.concat(u):h=-1,u.length&&n()}function n(){if(!l){var e=setTimeout(r);l=!0;for(var t=u.length;t;){for(s=u,u=[];++h<t;)s&&s[h].run();h=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,h=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];u.push(new o(e,t)),1!==u.length||l||setTimeout(n,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],4:[function(e,t,i){function r(){this.isPolyfilled=!0,this.displayId=u++,this.displayName="webvr-polyfill displayName",this.isConnected=!0,this.isPresenting=!1,this.capabilities={hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1},this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,this.wakelock_=new c}function n(){this.isPolyfilled=!0,this.hardwareUnitId="webvr-polyfill hardwareUnitId",this.deviceId="webvr-polyfill deviceId",this.deviceName="webvr-polyfill deviceName"}function o(){}function a(){}var s=e("./util.js"),c=e("./wakelock.js"),u=1e3,l=!1;r.prototype.getPose=function(){return this.getImmediatePose()},r.prototype.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)},r.prototype.cancelAnimationFrame=function(e){return window.cancelAnimationFrame(e)},r.prototype.wrapForFullscreen=function(e){function t(){if(n.fullscreenElement_){var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];n.fullscreenElement_.setAttribute("style",e.join("; ")+";")}}if(s.isIOS())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var i=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",i.join("; ")+";"),this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;this.removeFullscreenWrapper(),this.fullscreenElement_=e;var r=this.fullscreenElement_.parentElement;r.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),r.removeChild(this.fullscreenElement_),this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var n=this;return t(),this.fullscreenWrapper_},r.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute("style",this.fullscreenElementCachedStyle_):e.removeAttribute("style"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),t.insertBefore(e,this.fullscreenWrapper_),t.removeChild(this.fullscreenWrapper_),e}},r.prototype.requestPresent=function(e){if(this.isPresenting)return void console.error("Already presenting!");var t=this;return e instanceof Array||(l||(console.warn("Using a deprecated form of requestPresent. Should pass in an array of VRLayers."),l=!0),e=[e]),new Promise(function(i,r){function n(){var e=s.getFullscreenElement();t.isPresenting=a===e,t.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary"),t.waitingForPresent_=!1,t.beginPresent_(),i()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.removeFullscreenWrapper(),t.wakelock_.release(),t.endPresent_(),t.removeFullscreenListeners_()),t.fireVRDisplayPresentChange_()}function o(){t.waitingForPresent_&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.wakelock_.release(),t.waitingForPresent_=!1,t.isPresenting=!1,r(new Error("Unable to present.")))}if(!t.capabilities.canPresent)return void r(new Error("VRDisplay is not capable of presenting."));if(0==e.length||e.length>t.capabilities.maxLayers)return void r(new Error("Invalid number of layers."));if(t.layer_=e[0],t.waitingForPresent_=!1,t.layer_&&t.layer_.source){var a=t.wrapForFullscreen(t.layer_.source);t.addFullscreenListeners_(a,n,o),s.requestFullscreen(a)?(t.wakelock_.request(),t.waitingForPresent_=!0):s.isIOS()&&(t.wakelock_.request(),t.isPresenting=!0,t.beginPresent_(),t.fireVRDisplayPresentChange_(),i())}t.waitingForPresent_||s.isIOS()||(s.exitFullscreen(),r(new Error("Unable to present.")))})},r.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.wakelock_.release(),new Promise(function(i,r){e?(!s.exitFullscreen()&&s.isIOS()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),i()):r(new Error("Was not presenting to VRDisplay."))})},r.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},r.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{vrdisplay:this}});window.dispatchEvent(e)},r.prototype.addFullscreenListeners_=function(e,t,i){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=i,t&&(e.addEventListener("fullscreenchange",t,!1),e.addEventListener("webkitfullscreenchange",t,!1),document.addEventListener("mozfullscreenchange",t,!1),e.addEventListener("msfullscreenchange",t,!1)),i&&(e.addEventListener("fullscreenerror",i,!1),e.addEventListener("webkitfullscreenerror",i,!1),document.addEventListener("mozfullscreenerror",i,!1),e.addEventListener("msfullscreenerror",i,!1))},r.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var i=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",i,!1),e.removeEventListener("webkitfullscreenerror",i,!1),document.removeEventListener("mozfullscreenerror",i,!1),e.removeEventListener("msfullscreenerror",i,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},r.prototype.beginPresent_=function(){},r.prototype.endPresent_=function(){},r.prototype.submitFrame=function(e){},r.prototype.getEyeParameters=function(e){return null},o.prototype=new n,a.prototype=new n,t.exports.VRDisplay=r,t.exports.VRDevice=n,t.exports.HMDVRDevice=o,t.exports.PositionSensorVRDevice=a},{"./util.js":24,"./wakelock.js":26}],5:[function(e,t,i){function r(e){this.gl=e,this.ctxAttribs=e.getContextAttributes(),this.meshWidth=20,this.meshHeight=20,this.bufferScale=WebVRConfig.BUFFER_SCALE,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,o.isIOS()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=o.linkProgram(e,s,c,this.attribs),this.uniforms=o.getProgramUniforms(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize(),WebVRConfig.CARDBOARD_UI_DISABLED||(this.cardboardUI=new n(e))}var n=e("./cardboard-ui.js"),o=e("./util.js"),a=e("./deps/wglu-preserve-state.js"),s=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),c=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");r.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},r.prototype.onResize=function(){var e=this.gl,t=this,i=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];a(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)}),this.cardboardUI&&this.cardboardUI.onResize()},r.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,i=this.gl;o.isIOS()||(t.width=o.getScreenWidth()*this.bufferScale,t.height=o.getScreenHeight()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(t){e.bufferWidth=t,e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(t){e.bufferHeight=t,e.onResize()}})),this.lastBoundFramebuffer=i.getParameter(i.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(i.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,r){e.lastBoundFramebuffer=r?r:e.framebuffer,e.realBindFramebuffer.call(i,t,e.lastBoundFramebuffer)},this.cullFace=i.getParameter(i.CULL_FACE),this.depthTest=i.getParameter(i.DEPTH_TEST),this.blend=i.getParameter(i.BLEND),this.scissorTest=i.getParameter(i.SCISSOR_TEST),this.stencilTest=i.getParameter(i.STENCIL_TEST),i.enable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!0;break;case i.DEPTH_TEST:e.depthTest=!0;break;case i.BLEND:e.blend=!0;break;case i.SCISSOR_TEST:e.scissorTest=!0;break;case i.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(i,t)},i.disable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!1;break;case i.DEPTH_TEST:e.depthTest=!1;break;case i.BLEND:e.blend=!1;break;case i.SCISSOR_TEST:e.scissorTest=!1;break;case i.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(i,t)},this.colorMask=i.getParameter(i.COLOR_WRITEMASK),i.colorMask=function(t,r,n,o){e.colorMask[0]=t,e.colorMask[1]=r,e.colorMask[2]=n,e.colorMask[3]=o,e.realColorMask.call(i,t,r,n,o)},this.clearColor=i.getParameter(i.COLOR_CLEAR_VALUE),i.clearColor=function(t,r,n,o){e.clearColor[0]=t,e.clearColor[1]=r,e.clearColor[2]=n,e.clearColor[3]=o,e.realClearColor.call(i,t,r,n,o)},this.viewport=i.getParameter(i.VIEWPORT),i.viewport=function(t,r,n,o){e.viewport[0]=t,e.viewport[1]=r,e.viewport[2]=n,e.viewport[3]=o,e.realViewport.call(i,t,r,n,o)},this.isPatched=!0,o.safariCssSizeWorkaround(t)}},r.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;o.isIOS()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout(function(){o.safariCssSizeWorkaround(t)},1)}},r.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},r.prototype.submitFrame=function(){var e=this.gl,t=this,i=[];if(WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||i.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),a(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||o.isIOS())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor)}),o.isIOS()){var r=e.canvas;r.width==t.bufferWidth&&r.height==t.bufferHeight||(t.bufferWidth=r.width,t.bufferHeight=r.height,t.onResize())}},r.prototype.updateDeviceInfo=function(e){var t=this.gl,i=this,r=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];a(t,r,function(t){var r=i.computeMeshVertices_(i.meshWidth,i.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,i.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,r,t.STATIC_DRAW),!i.indexCount){var n=i.computeMeshIndices_(i.meshWidth,i.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW),i.indexCount=n.length}})},r.prototype.computeMeshVertices_=function(e,t,i){for(var r=new Float32Array(2*e*t*5),n=i.getLeftEyeVisibleTanAngles(),a=i.getLeftEyeNoLensTanAngles(),s=i.getLeftEyeVisibleScreenRect(a),c=0,u=0;u<2;u++){for(var l=0;l<t;l++)for(var h=0;h<e;h++,c++){var d=h/(e-1),p=l/(t-1),f=d,m=p,g=o.lerp(n[0],n[2],d),v=o.lerp(n[3],n[1],p),y=Math.sqrt(g*g+v*v),M=i.distortion.distortInverse(y),A=g*M/y,x=v*M/y;d=(A-a[0])/(a[2]-a[0]),p=(x-a[3])/(a[1]-a[3]);i.device.widthMeters/i.device.heightMeters;d=2*(s.x+d*s.width-.5),p=2*(s.y+p*s.height-.5),r[5*c+0]=d,r[5*c+1]=p,r[5*c+2]=f,r[5*c+3]=m,r[5*c+4]=u}var w=n[2]-n[0];n[0]=-(w+n[0]),n[2]=w-n[2],w=a[2]-a[0],a[0]=-(w+a[0]),a[2]=w-a[2],s.x=1-(s.x+s.width)}return r},r.prototype.computeMeshIndices_=function(e,t){for(var i=new Uint16Array(2*(e-1)*(t-1)*6),r=e/2,n=t/2,o=0,a=0,s=0;s<2;s++)for(var c=0;c<t;c++)for(var u=0;u<e;u++,o++)0!=u&&0!=c&&(u<=r==c<=n?(i[a++]=o,i[a++]=o-e-1,i[a++]=o-e,i[a++]=o-e-1,i[a++]=o,i[a++]=o-1):(i[a++]=o-1,i[a++]=o-e,i[a++]=o,i[a++]=o-e,i[a++]=o-1,i[a++]=o-e-1));return i},r.prototype.getOwnPropertyDescriptor_=function(e,t){var i=Object.getOwnPropertyDescriptor(e,t);return void 0!==i.get&&void 0!==i.set||(i.configurable=!0,i.enumerable=!0,i.get=function(){return this.getAttribute(t)},i.set=function(e){this.setAttribute(t,e)}),i},t.exports=r},{"./cardboard-ui.js":6,"./deps/wglu-preserve-state.js":8,"./util.js":24}],6:[function(e,t,i){function r(e){this.gl=e,this.attribs={position:0},this.program=n.linkProgram(e,a,s,this.attribs),this.uniforms=n.getProgramUniforms(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}var n=e("./util.js"),o=e("./deps/wglu-preserve-state.js"),a=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),s=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n"),c=Math.PI/180,u=60,l=12,h=20,d=1,p=.75,f=.3125,m=4,g=28,v=1.5;r.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener("click",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},r.prototype.listen=function(e,t){var i=this.gl.canvas;this.listener=function(r){var n=i.clientWidth/2,o=g*v;r.clientX>n-o&&r.clientX<n+o&&r.clientY>i.clientHeight-o?e(r):r.clientX<o&&r.clientY<o&&t(r)},i.addEventListener("click",this.listener,!1)},r.prototype.onResize=function(){var e=this.gl,t=this,i=[e.ARRAY_BUFFER_BINDING];o(e,i,function(e){function i(e,t){var i=(90-e)*c,r=Math.cos(i),n=Math.sin(i);o.push(f*r*A+a,f*n*A+A),o.push(t*r*A+a,t*n*A+A)}function r(t,i){o.push(x+t,e.drawingBufferHeight-x-i)}var o=[],a=e.drawingBufferWidth/2,s=e.drawingBufferWidth/(screen.width*window.devicePixelRatio);n.isIOS()||(s*=window.devicePixelRatio);var y=m*s/2,M=g*v*s,A=g*s/2,x=(g*v-g)*s;o.push(a-y,M),o.push(a-y,e.drawingBufferHeight),o.push(a+y,M),o.push(a+y,e.drawingBufferHeight),t.gearOffset=o.length/2;for(var w=0;w<=6;w++){var E=w*u;i(E,d),i(E+l,d),i(E+h,p),i(E+(u-h),p),i(E+(u-l),d)}t.gearVertexCount=o.length/2-t.gearOffset,t.arrowOffset=o.length/2;var b=y/Math.sin(45*c);r(0,A),r(A,0),r(A+b,b),r(b,A+b),r(b,A-b),r(0,A),r(A,2*A),r(A+b,2*A-b),r(b,A-b),r(0,A),r(b,A-y),r(g*s,A-y),r(b,A+y),r(g*s,A+y),t.arrowVertexCount=o.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(o),e.STATIC_DRAW)})},r.prototype.render=function(){var e=this.gl,t=this,i=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];o(e,i,function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()})},r.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),n.orthoMatrix(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},t.exports=r},{"./deps/wglu-preserve-state.js":8,"./util.js":24}],7:[function(e,t,i){function r(){this.displayName="Cardboard VRDisplay (webvr-polyfill)",this.capabilities.hasOrientation=!0,this.capabilities.canPresent=!0,this.bufferScale_=WebVRConfig.BUFFER_SCALE,this.poseSensor_=new c,this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new s((!0),this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new a(this.dpdb_.getDeviceParams()),this.viewerSelector_=new l,this.viewerSelector_.on("change",this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),WebVRConfig.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new u),d.isIOS()&&window.addEventListener("resize",this.onResize_.bind(this))}var n=e("./cardboard-distorter.js"),o=e("./cardboard-ui.js"),a=e("./device-info.js"),s=e("./dpdb/dpdb.js"),c=e("./sensor-fusion/fusion-pose-sensor.js"),u=e("./rotate-instructions.js"),l=e("./viewer-selector.js"),h=e("./base.js").VRDisplay,d=e("./util.js"),p={LEFT:"left",RIGHT:"right"};r.prototype=new h,r.prototype.getImmediatePose=function(){return{position:this.poseSensor_.getPosition(),orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},r.prototype.resetPose=function(){this.poseSensor_.resetPose()},r.prototype.getEyeParameters=function(e){var t,i=[.5*this.deviceInfo_.viewer.interLensDistance,0,0];if(e==p.LEFT)i[0]*=-1,t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=p.RIGHT)return console.error("Invalid eye provided: %s",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return{fieldOfView:t,offset:i,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_}},r.prototype.onDeviceParamsUpdated_=function(e){console.log("DPDB reported that device params were updated."),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter.updateDeviceInfo(this.deviceInfo_)},r.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");e||(e=this.layer_.source.getContext("experimental-webgl")),e||(e=this.layer_.source.getContext("webgl2")),e&&(this.layer_.predistorted?WebVRConfig.CARDBOARD_UI_DISABLED||(e.canvas.width=d.getScreenWidth()*this.bufferScale_,e.canvas.height=d.getScreenHeight()*this.bufferScale_,this.cardboardUI_=new o(e)):(this.distorter_=new n(e),this.distorter_.updateDeviceInfo(this.deviceInfo_),this.cardboardUI_=this.distorter_.cardboardUI,(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(), e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(d.isLandscapeMode()&&d.isMobile()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener("orientationchange",this.orientationHandler),this.fireVRDisplayDeviceParamsChange_())},r.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener("orientationchange",this.orientationHandler)},r.prototype.submitFrame=function(e){if(this.distorter_)this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl").canvas;t.width==this.lastWidth&&t.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=t.width,this.lastHeight=t.height,this.cardboardUI_.render()}},r.prototype.onOrientationChange_=function(e){console.log("onOrientationChange_"),this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},r.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl"),i=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0 10px 10px 0"];t.canvas.setAttribute("style",i.join("; ")+";"),d.safariCssSizeWorkaround(t.canvas)}},r.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},r.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},t.exports=r},{"./base.js":4,"./cardboard-distorter.js":5,"./cardboard-ui.js":6,"./device-info.js":9,"./dpdb/dpdb.js":13,"./rotate-instructions.js":18,"./sensor-fusion/fusion-pose-sensor.js":20,"./util.js":24,"./viewer-selector.js":25}],8:[function(e,t,i){function r(e,t,i){if(!t)return void i(e);for(var r=[],n=null,o=0;o<t.length;++o){var a=t[o];switch(a){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:var s=t[++o];if(s<e.TEXTURE0||s>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),r.push(null,null);break}n||(n=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(s),r.push(e.getParameter(a),null);break;case e.ACTIVE_TEXTURE:n=e.getParameter(e.ACTIVE_TEXTURE),r.push(null);break;default:r.push(e.getParameter(a))}}i(e);for(var o=0;o<t.length;++o){var a=t[o],c=r[o];switch(a){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,c);break;case e.COLOR_CLEAR_VALUE:e.clearColor(c[0],c[1],c[2],c[3]);break;case e.COLOR_WRITEMASK:e.colorMask(c[0],c[1],c[2],c[3]);break;case e.CURRENT_PROGRAM:e.useProgram(c);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,c);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,c);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,c);break;case e.TEXTURE_BINDING_2D:var s=t[++o];if(s<e.TEXTURE0||s>e.TEXTURE31)break;e.activeTexture(s),e.bindTexture(e.TEXTURE_2D,c);break;case e.TEXTURE_BINDING_CUBE_MAP:var s=t[++o];if(s<e.TEXTURE0||s>e.TEXTURE31)break;e.activeTexture(s),e.bindTexture(e.TEXTURE_CUBE_MAP,c);break;case e.VIEWPORT:e.viewport(c[0],c[1],c[2],c[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:c?e.enable(a):e.disable(a);break;default:console.log("No GL restore behavior for 0x"+a.toString(16))}n&&e.activeTexture(n)}}t.exports=r},{}],9:[function(e,t,i){function r(e){this.width=e.width||c.getScreenWidth(),this.height=e.height||c.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}function n(e){this.viewer=h.CardboardV2,this.updateDeviceParams(e),this.distortion=new a(this.viewer.distortionCoefficients)}function o(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}var a=e("./distortion/distortion.js"),s=e("./math-util.js"),c=e("./util.js"),u=new r({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),l=new r({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),h={CardboardV1:new o({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new o({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};n.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},n.prototype.getDevice=function(){return this.device},n.prototype.setViewer=function(e){this.viewer=e,this.distortion=new a(this.viewer.distortionCoefficients)},n.prototype.determineDevice_=function(e){if(!e)return c.isIOS()?(console.warn("Using fallback iOS device measurements."),l):(console.warn("Using fallback Android device measurements."),u);var t=.0254,i=t/e.xdpi,n=t/e.ydpi,o=c.getScreenWidth(),a=c.getScreenHeight();return new r({widthMeters:i*o,heightMeters:n*a,bevelMeters:.001*e.bevelMm})},n.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,i=this.distortion,r=e.screenLensDistance,n=(t.widthMeters-e.interLensDistance)/2,o=e.interLensDistance/2,a=e.baselineLensDistance-t.bevelMeters,c=t.heightMeters-a,u=s.radToDeg*Math.atan(i.distort(n/r)),l=s.radToDeg*Math.atan(i.distort(o/r)),h=s.radToDeg*Math.atan(i.distort(a/r)),d=s.radToDeg*Math.atan(i.distort(c/r));return{leftDegrees:Math.min(u,e.fov),rightDegrees:Math.min(l,e.fov),downDegrees:Math.min(h,e.fov),upDegrees:Math.min(d,e.fov)}},n.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,r=Math.tan(-s.degToRad*e.fov),n=Math.tan(s.degToRad*e.fov),o=Math.tan(s.degToRad*e.fov),a=Math.tan(-s.degToRad*e.fov),c=t.widthMeters/4,u=t.heightMeters/2,l=e.baselineLensDistance-t.bevelMeters-u,h=e.interLensDistance/2-c,d=-l,p=e.screenLensDistance,f=i.distort((h-c)/p),m=i.distort((d+u)/p),g=i.distort((h+c)/p),v=i.distort((d-u)/p),y=new Float32Array(4);return y[0]=Math.max(r,f),y[1]=Math.min(n,m),y[2]=Math.min(o,g),y[3]=Math.max(a,v),y},n.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,r=new Float32Array(4),n=i.distortInverse(Math.tan(-s.degToRad*e.fov)),o=i.distortInverse(Math.tan(s.degToRad*e.fov)),a=i.distortInverse(Math.tan(s.degToRad*e.fov)),c=i.distortInverse(Math.tan(-s.degToRad*e.fov)),u=t.widthMeters/4,l=t.heightMeters/2,h=e.baselineLensDistance-t.bevelMeters-l,d=e.interLensDistance/2-u,p=-h,f=e.screenLensDistance,m=(d-u)/f,g=(p+l)/f,v=(d+u)/f,y=(p-l)/f;return r[0]=Math.max(n,m),r[1]=Math.min(o,g),r[2]=Math.min(a,v),r[3]=Math.max(c,y),r},n.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,i=this.device,r=t.screenLensDistance,n=(i.widthMeters-t.interLensDistance)/2,o=t.baselineLensDistance-i.bevelMeters,a=(e[0]*r+n)/i.widthMeters,s=(e[1]*r+o)/i.heightMeters,c=(e[2]*r+n)/i.widthMeters,u=(e[3]*r+o)/i.heightMeters;return{x:a,y:u,width:c-a,height:s-u}},n.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},n.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},n.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:s.radToDeg*Math.atan(e.outerDist),rightDegrees:s.radToDeg*Math.atan(e.innerDist),downDegrees:s.radToDeg*Math.atan(e.bottomDist),upDegrees:s.radToDeg*Math.atan(e.topDist)}},n.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,i=this.device,r=t.screenLensDistance,n=i.widthMeters/r,o=i.heightMeters/r,a=i.width/n,s=i.height/o,c=Math.round((e.eyePosX-e.outerDist)*a),u=Math.round((e.eyePosY-e.bottomDist)*s);return{x:c,y:u,width:Math.round((e.eyePosX+e.innerDist)*a)-c,height:Math.round((e.eyePosY+e.topDist)*s)-u}},n.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,i=this.distortion,r=e.screenLensDistance,n=e.interLensDistance/2/r,o=t.widthMeters/r,a=t.heightMeters/r,c=o/2-n,u=(e.baselineLensDistance-t.bevelMeters)/r,l=e.fov,h=i.distortInverse(Math.tan(s.degToRad*l)),d=Math.min(c,h),p=Math.min(n,h),f=Math.min(u,h),m=Math.min(a-u,h);return{outerDist:d,innerDist:p,topDist:m,bottomDist:f,eyePosX:c,eyePosY:u}},n.Viewers=h,t.exports=n},{"./distortion/distortion.js":11,"./math-util.js":16,"./util.js":24}],10:[function(e,t,i){function r(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:HMD:"+e.displayId,this.deviceName=e.displayName+" (HMD)"}function n(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:PositionSensor: "+e.displayId,this.deviceName=e.displayName+" (PositionSensor)"}var o=(e("./base.js").VRDisplay,e("./base.js").HMDVRDevice),a=e("./base.js").PositionSensorVRDevice;r.prototype=new o,r.prototype.getEyeParameters=function(e){var t=this.display.getEyeParameters(e);return{currentFieldOfView:t.fieldOfView,maximumFieldOfView:t.fieldOfView,minimumFieldOfView:t.fieldOfView,recommendedFieldOfView:t.fieldOfView,eyeTranslation:{x:t.offset[0],y:t.offset[1],z:t.offset[2]},renderRect:{x:"right"==e?t.renderWidth:0,y:0,width:t.renderWidth,height:t.renderHeight}}},r.prototype.setFieldOfView=function(e,t,i,r){},n.prototype=new a,n.prototype.getState=function(){var e=this.display.getPose();return{position:e.position?{x:e.position[0],y:e.position[1],z:e.position[2]}:null,orientation:e.orientation?{x:e.orientation[0],y:e.orientation[1],z:e.orientation[2],w:e.orientation[3]}:null,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},n.prototype.resetState=function(){return this.positionDevice.resetPose()},t.exports.VRDisplayHMDDevice=r,t.exports.VRDisplayPositionSensorDevice=n},{"./base.js":4}],11:[function(e,t,i){function r(e){this.coefficients=e}r.prototype.distortInverse=function(e){for(var t=0,i=1,r=e-this.distort(t);Math.abs(i-t)>1e-4;){var n=e-this.distort(i),o=i-n*((i-t)/(n-r));t=i,i=o,r=n}return i},r.prototype.distort=function(e){for(var t=e*e,i=0,r=0;r<this.coefficients.length;r++)i=t*(i+this.coefficients[r]);return(i+1)*e},r.prototype.solveLinear_=function(e,t){for(var i=e.length,r=0;r<i-1;++r)for(var n=r+1;n<i;++n){for(var o=e[r][n]/e[r][r],a=r+1;a<i;++a)e[a][n]-=o*e[a][r];t[n]-=o*t[r]}for(var s=new Array(i),r=i-1;r>=0;--r){for(var c=t[r],a=r+1;a<i;++a)c-=e[a][r]*s[a];s[r]=c/e[r][r]}return s},r.prototype.solveLeastSquares_=function(e,t){var i,r,n,o,a=e.length,s=e[0].length;if(a!=t.Length)throw new Error("Matrix / vector dimension mismatch");var c=new Array(s);for(n=0;n<s;++n)for(c[n]=new Array(s),r=0;r<s;++r){for(o=0,i=0;i<a;++i)o+=e[r][i]*e[n][i];c[n][r]=o}var u=new Array(s);for(r=0;r<s;++r){for(o=0,i=0;i<a;++i)o+=e[r][i]*t[i];u[r]=o}return this.solveLinear_(c,u)},r.prototype.approximateInverse=function(e,t){e=e||1,t=t||100;var i,n,o=6,a=new Array(o);for(n=0;n<o;++n)a[n]=new Array(t);var s=new Array(t);for(i=0;i<t;++i){var c=e*(i+1)/t,u=this.distort(c),l=u;for(n=0;n<o;++n)l*=u*u,a[n][i]=l;s[i]=c-u}var h=this.solveLeastSquares_(a,s);return new r(h)},t.exports=r},{}],12:[function(e,t,i){var r={format:1,last_updated:"2016-01-20T00:18:35Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}]};t.exports=r},{}],13:[function(e,t,i){function r(e,t){if(this.dpdb=o,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t,console.log("Fetching DPDB...");var i=new XMLHttpRequest,r=this;i.open("GET",s,!0),i.addEventListener("load",function(){r.loading=!1,i.status>=200&&i.status<=299?(console.log("Successfully loaded online DPDB."),r.dpdb=JSON.parse(i.response),r.recalculateDeviceParams_()):console.error("Error loading online DPDB!")}),i.send()}}function n(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}var o=e("./dpdb-cache.js"),a=e("../util.js"),s="path_to_url";r.prototype.getDeviceParams=function(){return this.deviceParams},r.prototype.recalculateDeviceParams_=function(){console.log("Recalculating device params.");var e=this.calcDeviceParams_();console.log("New device parameters:"),console.log(e),e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},r.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,i=a.getScreenWidth(),r=a.getScreenHeight();if(console.log("User agent: "+t),console.log("Pixel width: "+i),console.log("Pixel height: "+r),!e.devices)return console.error("DPDB has no devices section."),null;for(var o=0;o<e.devices.length;o++){var s=e.devices[o];if(s.rules)if("ios"==s.type||"android"==s.type){if(a.isIOS()==("ios"==s.type)){for(var c=!1,u=0;u<s.rules.length;u++){var l=s.rules[u];if(this.matchRule_(l,t,i,r)){console.log("Rule matched:"),console.log(l),c=!0;break}}if(c){var h=s.dpi[0]||s.dpi,d=s.dpi[1]||s.dpi;return new n({xdpi:h,ydpi:d,bevelMm:s.bw})}}}else console.warn("Device["+o+"] has invalid type.");else console.warn("Device["+o+"] has no rules section.")}return console.warn("No DPDB device match."),null},r.prototype.matchRule_=function(e,t,i,r){if(!e.ua&&!e.res)return!1;if(e.ua&&t.indexOf(e.ua)<0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var n=e.res[0],o=e.res[1];if(Math.min(i,r)!=Math.min(n,o)||Math.max(i,r)!=Math.max(n,o))return!1}return!0},t.exports=r},{"../util.js":24,"./dpdb-cache.js":12}],14:[function(e,t,i){function r(){this.callbacks={}}r.prototype.emit=function(e){var t=this.callbacks[e];if(t){var i=[].slice.call(arguments);i.shift();for(var r=0;r<t.length;r++)t[r].apply(this,i)}},r.prototype.on=function(e,t){e in this.callbacks?this.callbacks[e].push(t):this.callbacks[e]=[t]},t.exports=r},{}],15:[function(e,t,i){var r=e("./util.js"),n=e("./webvr-polyfill.js");window.WebVRConfig=r.extend({FORCE_ENABLE_VR:!1,K_FILTER:.98,PREDICTION_TIME_S:.04,TOUCH_PANNER_DISABLED:!1,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,MOUSE_KEYBOARD_CONTROLS_DISABLED:!1,DEFER_INITIALIZATION:!1,ENABLE_DEPRECATED_API:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},window.WebVRConfig),window.WebVRConfig.DEFER_INITIALIZATION?window.InitializeWebVRPolyfill=function(){new n}:new n},{"./util.js":24,"./webvr-polyfill.js":27}],16:[function(e,t,i){var r=window.MathUtil||{};r.degToRad=Math.PI/180,r.radToDeg=180/Math.PI,r.Vector2=function(e,t){this.x=e||0,this.y=t||0},r.Vector2.prototype={constructor:r.Vector2,set:function(e,t){return this.x=e,this.y=t,this},copy:function(e){return this.x=e.x,this.y=e.y,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}},r.Vector3=function(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0},r.Vector3.prototype={constructor:r.Vector3,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},applyQuaternion:function(e){var t=this.x,i=this.y,r=this.z,n=e.x,o=e.y,a=e.z,s=e.w,c=s*t+o*r-a*i,u=s*i+a*t-n*r,l=s*r+n*i-o*t,h=-n*t-o*i-a*r;return this.x=c*s+h*-n+u*-a-l*-o,this.y=u*s+h*-o+l*-n-c*-a,this.z=l*s+h*-a+c*-o-u*-n,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},crossVectors:function(e,t){var i=e.x,r=e.y,n=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-n*a,this.y=n*o-i*s,this.z=i*a-r*o,this}},r.Quaternion=function(e,t,i,r){this.x=e||0,this.y=t||0,this.z=i||0,this.w=void 0!==r?r:1},r.Quaternion.prototype={constructor:r.Quaternion,set:function(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,i){var r=Math.cos(e/2),n=Math.cos(t/2),o=Math.cos(i/2),a=Math.sin(e/2),s=Math.sin(t/2),c=Math.sin(i/2);return this.x=a*n*o+r*s*c,this.y=r*s*o-a*n*c,this.z=r*n*c+a*s*o,this.w=r*n*o-a*s*c,this},setFromEulerYXZ:function(e,t,i){var r=Math.cos(e/2),n=Math.cos(t/2),o=Math.cos(i/2),a=Math.sin(e/2),s=Math.sin(t/2),c=Math.sin(i/2);return this.x=a*n*o+r*s*c,this.y=r*s*o-a*n*c,this.z=r*n*c-a*s*o,this.w=r*n*o+a*s*c,this},setFromAxisAngle:function(e,t){var i=t/2,r=Math.sin(i);return this.x=e.x*r,this.y=e.y*r,this.z=e.z*r,this.w=Math.cos(i),this},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var i=e.x,r=e.y,n=e.z,o=e.w,a=t.x,s=t.y,c=t.z,u=t.w;return this.x=i*u+o*a+r*c-n*s,this.y=r*u+o*s+n*a-i*c,this.z=n*u+o*c+i*s-r*a,this.w=o*u-i*a-r*s-n*c,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this.x,r=this.y,n=this.z,o=this.w,a=o*e.w+i*e.x+r*e.y+n*e.z;if(a<0?(this.w=-e.w,this.x=-e.x,this.y=-e.y,this.z=-e.z,a=-a):this.copy(e),a>=1)return this.w=o,this.x=i,this.y=r,this.z=n,this;var s=Math.acos(a),c=Math.sqrt(1-a*a);if(Math.abs(c)<.001)return this.w=.5*(o+this.w),this.x=.5*(i+this.x),this.y=.5*(r+this.y),this.z=.5*(n+this.z),this;var u=Math.sin((1-t)*s)/c,l=Math.sin(t*s)/c;return this.w=o*u+this.w*l,this.x=i*u+this.x*l,this.y=r*u+this.y*l,this.z=n*u+this.z*l,this},setFromUnitVectors:function(){var e,t,i=1e-6;return function(n,o){return void 0===e&&(e=new r.Vector3),t=n.dot(o)+1,t<i?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,o),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()},t.exports=r},{}],17:[function(e,t,i){function r(){this.displayName="Mouse and Keyboard VRDisplay (webvr-polyfill)",this.capabilities.hasOrientation=!0,window.addEventListener("keydown",this.onKeyDown_.bind(this)),window.addEventListener("mousemove",this.onMouseMove_.bind(this)),window.addEventListener("mousedown",this.onMouseDown_.bind(this)),window.addEventListener("mouseup",this.onMouseUp_.bind(this)),this.phi_=0,this.theta_=0,this.targetAngle_=null,this.angleAnimation_=null,this.orientation_=new o.Quaternion,this.rotateStart_=new o.Vector2,this.rotateEnd_=new o.Vector2,this.rotateDelta_=new o.Vector2,this.isDragging_=!1,this.orientationOut_=new Float32Array(4)}var n=e("./base.js").VRDisplay,o=e("./math-util.js"),a=e("./util.js"),s=.15,c=80,u=.5,l=.3;r.prototype=new n,r.prototype.getImmediatePose=function(){return this.orientation_.setFromEulerYXZ(this.phi_,this.theta_,0),this.orientationOut_[0]=this.orientation_.x,this.orientationOut_[1]=this.orientation_.y,this.orientationOut_[2]=this.orientation_.z,this.orientationOut_[3]=this.orientation_.w,{position:null,orientation:this.orientationOut_,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},r.prototype.onKeyDown_=function(e){38==e.keyCode?this.animatePhi_(this.phi_+s):39==e.keyCode?this.animateTheta_(this.theta_-s):40==e.keyCode?this.animatePhi_(this.phi_-s):37==e.keyCode&&this.animateTheta_(this.theta_+s)},r.prototype.animateTheta_=function(e){this.animateKeyTransitions_("theta_",e)},r.prototype.animatePhi_=function(e){e=a.clamp(e,-Math.PI/2,Math.PI/2),this.animateKeyTransitions_("phi_",e)},r.prototype.animateKeyTransitions_=function(e,t){this.angleAnimation_&&cancelAnimationFrame(this.angleAnimation_);var i=this[e],r=new Date;this.angleAnimation_=requestAnimationFrame(function n(){var o=new Date-r;if(o>=c)return this[e]=t,void cancelAnimationFrame(this.angleAnimation_);this.angleAnimation_=requestAnimationFrame(n.bind(this));var a=o/c;this[e]=i+(t-i)*a}.bind(this))},r.prototype.onMouseDown_=function(e){this.rotateStart_.set(e.clientX,e.clientY),this.isDragging_=!0},r.prototype.onMouseMove_=function(e){if(this.isDragging_||this.isPointerLocked_()){if(this.isPointerLocked_()){var t=e.movementX||e.mozMovementX||0,i=e.movementY||e.mozMovementY||0;this.rotateEnd_.set(this.rotateStart_.x-t,this.rotateStart_.y-i)}else this.rotateEnd_.set(e.clientX,e.clientY);this.rotateDelta_.subVectors(this.rotateEnd_,this.rotateStart_),this.rotateStart_.copy(this.rotateEnd_),this.phi_+=2*Math.PI*this.rotateDelta_.y/screen.height*l,this.theta_+=2*Math.PI*this.rotateDelta_.x/screen.width*u,this.phi_=a.clamp(this.phi_,-Math.PI/2,Math.PI/2)}},r.prototype.onMouseUp_=function(e){this.isDragging_=!1},r.prototype.isPointerLocked_=function(){var e=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement;return void 0!==e},r.prototype.resetPose=function(){this.phi_=0,this.theta_=0},t.exports=r},{"./base.js":4,"./math-util.js":16,"./util.js":24}],18:[function(e,t,i){function r(){this.loadIcon_();var e=document.createElement("div"),t=e.style;t.position="fixed",t.top=0,t.right=0,t.bottom=0,t.left=0,t.backgroundColor="gray",t.fontFamily="sans-serif",t.zIndex=1e6;var i=document.createElement("img");i.src=this.icon;var t=i.style;t.marginLeft="25%",t.marginTop="25%",t.width="50%",e.appendChild(i);var r=document.createElement("div"),t=r.style;t.textAlign="center",t.fontSize="16px",t.lineHeight="24px",t.margin="24px 25%",t.width="50%",r.innerHTML="Place your phone into your Cardboard viewer.",e.appendChild(r);var n=document.createElement("div"),t=n.style;t.backgroundColor="#CFD8DC",t.position="fixed",t.bottom=0,t.width="100%",t.height="48px",t.padding="14px 24px",t.boxSizing="border-box",t.color="#656A6B",e.appendChild(n);var o=document.createElement("div");o.style["float"]="left",o.innerHTML="No Cardboard viewer?";var a=document.createElement("a");a.href="path_to_url",a.innerHTML="get one",a.target="_blank";var t=a.style;t["float"]="right",t.fontWeight=600,t.textTransform="uppercase",t.borderLeft="1px solid gray",t.paddingLeft="24px",t.textDecoration="none",t.color="#656A6B",n.appendChild(o),n.appendChild(a),this.overlay=e,this.text=r,this.hide()}var n=e("./util.js");r.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay), this.overlay.style.display="block";var t=this.overlay.querySelector("img"),i=t.style;n.isLandscapeMode()?(i.width="20%",i.marginLeft="40%",i.marginTop="3%"):(i.width="50%",i.marginLeft="25%",i.marginTop="25%")},r.prototype.hide=function(){this.overlay.style.display="none"},r.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},r.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},r.prototype.update=function(){this.disableShowTemporarily(),!n.isLandscapeMode()&&n.isMobile()?this.show():this.hide()},r.prototype.loadIcon_=function(){this.icon=n.base64("image/svg+xml",your_sha256_hashIm5vIj8+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashL3NrZXRjaC9ucyI+your_sha256_hashOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcm91cCI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashL3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQSI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLjk5NyBaIiBpZD0iRmlsbC03IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOS41ODgsMjIuMzc1IiBpZD0iRmlsbC05IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZD0iRmlsbC0xMCIgZmlsbD0iIzYwN0Q4QiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashMSIgZmlsbD0iI0ZGRkZGRiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIGlkPSJGaWxsLTEzIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOTQuNTE1LDYyLjk0OCBaIiBpZD0iRmlsbC0xOCIgZmlsbD0iIzYwN0Q4QiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLjUwNSBaIiBpZD0iRmlsbC0yMSIgZmlsbD0iIzYwN0Q4QiI+your_sha256_hashyour_sha256_hashyour_sha256_hashL3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLjc2Miw0OS40ODQiIGlkPSJGaWxsLTI2IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashNDIiIGlkPSJGaWxsLTI3IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashPSJGaWxsLTI4IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashRmlsbC0zMCIgZmlsbD0iIzYwN0Q4QiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashRmlsbC0zMSIgZmlsbD0iI0ZBRkFGQSI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIGlkPSJGaWxsLTMyIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIGlkPSJGaWxsLTMzIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashaWxsPSIjRkFGQUZBIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashaWxsLTM4IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashL3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZmlsbD0iIzYwN0Q4QiI+your_sha256_hashyour_sha256_hashyour_sha256_hashMy43NjQsNDIuNjU0IiBpZD0iRmlsbC01IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZD0iRmlsbC04IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashNy4yNjkgTDYuMTMsOTMuOTAxIiBpZD0iRmlsbC0xMSIgZmlsbD0iI0ZBRkFGQSI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashRkZGRiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashOC42NzQiIGlkPSJGaWxsLTE0IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIGlkPSJGaWxsLTE1IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashNDQ0LDg1LjM1IiBpZD0iRmlsbC0xNiIgZmlsbD0iI0ZGRkZGRiI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLTE4IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+your_sha256_hashyour_sha256_hashNy43NjkiIGlkPSJGaWxsLTE5IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"); },t.exports=r},{"./util.js":24}],19:[function(e,t,i){function r(e){this.kFilter=e,this.currentAccelMeasurement=new n,this.currentGyroMeasurement=new n,this.previousGyroMeasurement=new n,this.filterQ=new o.Quaternion,this.previousFilterQ=new o.Quaternion,this.accelQ=new o.Quaternion,this.isOrientationInitialized=!1,this.estimatedGravity=new o.Vector3,this.measuredGravity=new o.Vector3,this.gyroIntegralQ=new o.Quaternion}var n=e("./sensor-sample.js"),o=e("../math-util.js"),a=e("../util.js"),s=!1;r.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},r.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var i=t-this.previousGyroMeasurement.timestampS;a.isTimestampDeltaValid(i)&&this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},r.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var i=new o.Quaternion;i.copy(this.filterQ),i.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(i),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var r=new o.Quaternion;r.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),r.inverse(),s&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",o.radToDeg*a.getQuaternionAngle(r),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var n=new o.Quaternion;n.copy(this.filterQ),n.multiply(r),this.filterQ.slerp(n,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},r.prototype.getOrientation=function(){return this.filterQ},r.prototype.accelToQuaternion_=function(e){var t=new o.Vector3;t.copy(e),t.normalize();var i=new o.Quaternion;return i.setFromUnitVectors(new o.Vector3(0,0,(-1)),t),i.inverse(),i},r.prototype.gyroToQuaternionDelta_=function(e,t){var i=new o.Quaternion,r=new o.Vector3;return r.copy(e),r.normalize(),i.setFromAxisAngle(r,e.length()*t),i},t.exports=r},{"../math-util.js":16,"../util.js":24,"./sensor-sample.js":22}],20:[function(e,t,i){function r(){this.deviceId="webvr-polyfill:fused",this.deviceName="VR Position Device (webvr-polyfill:fused)",this.accelerometer=new s.Vector3,this.gyroscope=new s.Vector3,window.addEventListener("devicemotion",this.onDeviceMotionChange_.bind(this)),window.addEventListener("orientationchange",this.onScreenOrientationChange_.bind(this)),this.filter=new n(WebVRConfig.K_FILTER),this.posePredictor=new o(WebVRConfig.PREDICTION_TIME_S),this.touchPanner=new a,this.filterToWorldQ=new s.Quaternion,c.isIOS()?this.filterToWorldQ.setFromAxisAngle(new s.Vector3(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new s.Vector3(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new s.Quaternion,this.worldToScreenQ=new s.Quaternion,this.originalPoseAdjustQ=new s.Quaternion,this.originalPoseAdjustQ.setFromAxisAngle(new s.Vector3(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),c.isLandscapeMode()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new s.Quaternion,this.isFirefoxAndroid=c.isFirefoxAndroid(),this.isIOS=c.isIOS(),this.orientationOut_=new Float32Array(4)}var n=e("./complementary-filter.js"),o=e("./pose-predictor.js"),a=e("../touch-panner.js"),s=e("../math-util.js"),c=e("../util.js");r.prototype.getPosition=function(){return null},r.prototype.getOrientation=function(){var e=this.filter.getOrientation();this.predictedQ=this.posePredictor.getPrediction(e,this.gyroscope,this.previousTimestampS);var t=new s.Quaternion;return t.copy(this.filterToWorldQ),t.multiply(this.resetQ),WebVRConfig.TOUCH_PANNER_DISABLED||t.multiply(this.touchPanner.getOrientation()),t.multiply(this.predictedQ),t.multiply(this.worldToScreenQ),WebVRConfig.YAW_ONLY&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},r.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),c.isLandscapeMode()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ),WebVRConfig.TOUCH_PANNER_DISABLED||this.touchPanner.resetSensor()},r.prototype.onDeviceMotionChange_=function(e){var t=e.accelerationIncludingGravity,i=e.rotationRate,r=e.timeStamp/1e3;this.isFirefoxAndroid&&(r/=1e3);var n=r-this.previousTimestampS;return n<=c.MIN_TIMESTEP||n>c.MAX_TIMESTEP?(console.warn("Invalid timestamps detected. Time step between successive gyroscope sensor samples is very small or not monotonic"),void(this.previousTimestampS=r)):(this.accelerometer.set(-t.x,-t.y,-t.z),this.gyroscope.set(i.alpha,i.beta,i.gamma),(this.isIOS||this.isFirefoxAndroid)&&this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addAccelMeasurement(this.accelerometer,r),this.filter.addGyroMeasurement(this.gyroscope,r),void(this.previousTimestampS=r))},r.prototype.onScreenOrientationChange_=function(e){this.setScreenTransform_()},r.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new s.Vector3(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new s.Vector3(0,0,1),Math.PI/2);break;case 180:}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},t.exports=r},{"../math-util.js":16,"../touch-panner.js":23,"../util.js":24,"./complementary-filter.js":19,"./pose-predictor.js":21}],21:[function(e,t,i){function r(e){this.predictionTimeS=e,this.previousQ=new n.Quaternion,this.previousTimestampS=null,this.deltaQ=new n.Quaternion,this.outQ=new n.Quaternion}var n=e("../math-util.js"),o=!1;r.prototype.getPrediction=function(e,t,i){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=i,e;var r=new n.Vector3;r.copy(t),r.normalize();var a=t.length();if(a<20*n.degToRad)return o&&console.log("Moving slowly, at %s deg/s: no prediction",(n.radToDeg*a).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var s=(i-this.previousTimestampS,a*this.predictionTimeS);return this.deltaQ.setFromAxisAngle(r,s),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.outQ},t.exports=r},{"../math-util.js":16}],22:[function(e,t,i){function r(e,t){this.set(e,t)}r.prototype.set=function(e,t){this.sample=e,this.timestampS=t},r.prototype.copy=function(e){this.set(e.sample,e.timestampS)},t.exports=r},{}],23:[function(e,t,i){function r(){window.addEventListener("touchstart",this.onTouchStart_.bind(this)),window.addEventListener("touchmove",this.onTouchMove_.bind(this)),window.addEventListener("touchend",this.onTouchEnd_.bind(this)),this.isTouching=!1,this.rotateStart=new n.Vector2,this.rotateEnd=new n.Vector2,this.rotateDelta=new n.Vector2,this.theta=0,this.orientation=new n.Quaternion}var n=e("./math-util.js"),o=e("./util.js"),a=.5;r.prototype.getOrientation=function(){return this.orientation.setFromEulerXYZ(0,0,this.theta),this.orientation},r.prototype.resetSensor=function(){this.theta=0},r.prototype.onTouchStart_=function(e){1==e.touches.length&&(this.rotateStart.set(e.touches[0].pageX,e.touches[0].pageY),this.isTouching=!0)},r.prototype.onTouchMove_=function(e){if(this.isTouching){this.rotateEnd.set(e.touches[0].pageX,e.touches[0].pageY),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateStart.copy(this.rotateEnd),o.isIOS()&&(this.rotateDelta.x*=-1);var t=document.body;this.theta+=2*Math.PI*this.rotateDelta.x/t.clientWidth*a}},r.prototype.onTouchEnd_=function(e){this.isTouching=!1},t.exports=r},{"./math-util.js":16,"./util.js":24}],24:[function(e,t,i){var r=e("object-assign"),n=window.Util||{};n.MIN_TIMESTEP=.001,n.MAX_TIMESTEP=1,n.base64=function(e,t){return"data:"+e+";base64,"+t},n.clamp=function(e,t,i){return Math.min(Math.max(t,e),i)},n.lerp=function(e,t,i){return e+(t-e)*i},n.isIOS=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),n.isSafari=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),n.isFirefoxAndroid=function(){var e=navigator.userAgent.indexOf("Firefox")!==-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return e}}(),n.isLandscapeMode=function(){return 90==window.orientation||window.orientation==-90},n.isTimestampDeltaValid=function(e){return!isNaN(e)&&(!(e<=n.MIN_TIMESTEP)&&!(e>n.MAX_TIMESTEP))},n.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},n.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},n.requestFullscreen=function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0},n.exitFullscreen=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},n.getFullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},n.linkProgram=function(e,t,i,r){var n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t),e.compileShader(n);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,i),e.compileShader(o);var a=e.createProgram();e.attachShader(a,n),e.attachShader(a,o);for(var s in r)e.bindAttribLocation(a,r[s],s);return e.linkProgram(a),e.deleteShader(n),e.deleteShader(o),a},n.getProgramUniforms=function(e,t){for(var i={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n="",o=0;o<r;o++){var a=e.getActiveUniform(t,o);n=a.name.replace("[0]",""),i[n]=e.getUniformLocation(t,n)}return i},n.orthoMatrix=function(e,t,i,r,n,o,a){var s=1/(t-i),c=1/(r-n),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(n+r)*c,e[14]=(a+o)*u,e[15]=1,e},n.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},n.extend=r,n.safariCssSizeWorkaround=function(e){if(n.isIOS()){var t=e.style.width,i=e.style.height;e.style.width=parseInt(t)+1+"px",e.style.height=parseInt(i)+"px",console.log("Resetting width to...",t),setTimeout(function(){console.log("Done. Width is now",t),e.style.width=t,e.style.height=i},100)}window.Util=n,window.canvas=e},t.exports=n},{"object-assign":2}],25:[function(e,t,i){function r(){try{this.selectedKey=localStorage.getItem(s)||a}catch(e){console.error("Failed to load viewer profile: %s",e)}this.dialog=this.createDialog_(o.Viewers),this.root=null}var n=e("./emitter.js"),o=(e("./util.js"),e("./device-info.js")),a="CardboardV1",s="WEBVR_CARDBOARD_VIEWER",c="webvr-polyfill-viewer-selector";r.prototype=new n,r.prototype.show=function(e){this.root=e,e.appendChild(this.dialog);var t=this.dialog.querySelector("#"+this.selectedKey);t.checked=!0,this.dialog.style.display="block"},r.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},r.prototype.getCurrentViewer=function(){return o.Viewers[this.selectedKey]},r.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");return e?e.id:null},r.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),!this.selectedKey||!o.Viewers[this.selectedKey])return void console.error("ViewerSelector.onSave_: this should never happen!");this.emit("change",o.Viewers[this.selectedKey]);try{localStorage.setItem(s,this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()},r.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add(c),t.style.display="none";var i=document.createElement("div"),r=i.style;r.position="fixed",r.left=0,r.top=0,r.width="100%",r.height="100%",r.background="rgba(0, 0, 0, 0.3)",i.addEventListener("click",this.hide.bind(this));var n=280,o=document.createElement("div"),r=o.style;r.boxSizing="border-box",r.position="fixed",r.top="24px",r.left="50%",r.marginLeft=-n/2+"px",r.width=n+"px",r.padding="24px",r.overflow="hidden",r.background="#fafafa",r.fontFamily="'Roboto', sans-serif",r.boxShadow="0px 5px 20px #666",o.appendChild(this.createH1_("Select your viewer"));for(var a in e)o.appendChild(this.createChoice_(a,e[a].label));return o.appendChild(this.createButton_("Save",this.onSave_.bind(this))),t.appendChild(i),t.appendChild(o),t},r.prototype.createH1_=function(e){var t=document.createElement("h1"),i=t.style;return i.color="black",i.fontSize="20px",i.fontWeight="bold",i.marginTop=0,i.marginBottom="24px",t.innerHTML=e,t},r.prototype.createChoice_=function(e,t){var i=document.createElement("div");i.style.marginTop="8px",i.style.color="black";var r=document.createElement("input");r.style.fontSize="30px",r.setAttribute("id",e),r.setAttribute("type","radio"),r.setAttribute("value",e),r.setAttribute("name","field");var n=document.createElement("label");return n.style.marginLeft="4px",n.setAttribute("for",e),n.innerHTML=t,i.appendChild(r),i.appendChild(n),i},r.prototype.createButton_=function(e,t){var i=document.createElement("button");i.innerHTML=e;var r=i.style;return r["float"]="right",r.textTransform="uppercase",r.color="#1094f7",r.fontSize="14px",r.letterSpacing=0,r.border=0,r.background="none",r.marginTop="16px",i.addEventListener("click",t),i},t.exports=r},{"./device-info.js":9,"./emitter.js":14,"./util.js":24}],26:[function(e,t,i){function r(){var e=document.createElement("video");e.addEventListener("ended",function(){e.play()}),this.request=function(){e.paused&&(e.src=a.base64("video/mp4",your_sha256_hash0mvb+gABX5AAlw/your_sha256_hashyour_sha256_hashkAAAAAdJr2/rSa9v6AAAAAQAAAAAAlw/your_sha256_hashyour_sha256_hashAAAAG3G1kaWEAAAAgbWRoZAAAAADSa9v60mvb+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADFhdmNDAWQAC//your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashACRRtZGF0AAACrgX//6vcRem95tlIt5Ys2CDZI+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashWIhAAQ/8ltlOeyour_sha512_hash+fyaL6efyour_sha512_hashEgQAAAA5BmmhJqEFomUwIIf/+4QAAAApBnoZFESw//76BAAAACAGepXRDf8SBAAAACAGep2pDf8SAAAAADkGarEmoQWyZTAgh//7gAAAACkGeykUVLD//voEAAAAIAZ7pdEN/xIAAAAAIAZ7rakN/xIAAAAAOQZrwSahBbJlMCCH//uEAAAAKQZ8ORRUsP/++gQAAAAgBny10Q3/EgQAAAAgBny9qQ3/EgAAAAA5BmzRJqEFsmUwIIf/+4AAAAApBn1JFFSw//your_sha512_hash1dENyour_sha512_hash/tqQ3/EgQAAAA5Bm+your_sha512_hash//7gAAAACkGeQkUVLD//voEAAAAIAZ5hdEN/xIAAAAAIAZ5jakN/xIEAAAAOQZpoSahBbJlMCCH//uEAAAAKQZ6GRRUsP/++gQAAAAgBnqV0Q3/EgQAAAAgBnqdqQ3/EgAAAAA5BmqxJqEFsmUwIIf/+4AAAAApBnspFFSw//76BAAAACAGe6XRDf8SAAAAACAGe62pDf8SAAAAADkGa8EmoQWyZTAgh//7hAAAACkGfDkUVLD//voEAAAAIAZ8tdEN/xIEAAAAIAZ8vakN/xIAAAAAOQZs0SahBbJlMCCH//uAAAAAKQZ9SRRUsP/++gQAAAAgBn3F0Q3/EgAAAAAgBn3NqQ3/EgAAAAA5Bm3hJqEFsmUwIIf/+4QAAAApBn5ZFFSw//your_sha512_hash5dEN/xIAAAAAIAZ/7akN/xIEAAAAOQZvgSahBbJlMCCH//uEAAAAKQZ4eRRUsP/++gAAAAAgBnj10Q3/EgAAAAAgBnj9qQ3/EgQAAAA5BmiRJqEFsmUwIIf/+4AAAAApBnkJFFSw//76BAAAACAGeYXRDf8SAAAAACAGeY2pDf8SBAAAADkGaaEmoQWyZTAgh//7hAAAACkGehkUVLD//voEAAAAIAZ6ldEN/xIEAAAAIAZ6nakN/xIAAAAAOQZqsSahBbJlMCCH//uAAAAAKQZ7KRRUsP/++gQAAAAgBnul0Q3/EgAAAAAgBnutqQ3/EgAAAAA5BmvBJqEFsmUwIIf/+4QAAAApBnw5FFSw//your_sha256_hash12_hash+WRRUsP/++gAAAAAgBn7V0Q3your_sha512_hash+2pDf8SBAAAADkGb4EmoQWyZTAgh//7hAAAACkGeHkUVLD//voAAAAAIAZ49dEN/xIAAAAAIAZ4/akN/xIEAAAAOQZokSahBbJlMCCH//uAAAAAKQZ5CRRUsP/++gQAAAAgBnmF0Q3/EgAAAAAgBnmNqQ3/EgQAAAA5BmmhJqEFsmUwIIf/+4QAAAApBnoZFFSw//76BAAAACAGepXRDf8SBAAAACAGep2pDf8SAAAAADkGarEmoQWyZTAgh//7gAAAACkGeykUVLD//voEAAAAIAZ7pdEN/xIAAAAAIAZ7rakN/xIAAAAAPQZruSahBbJlMFEw3//7B"),e.play())},this.release=function(){e.pause(),e.src=""}}function n(){var e=null;this.request=function(){e||(e=setInterval(function(){window.location=window.location,setTimeout(window.stop,0)},3e4))},this.release=function(){e&&(clearInterval(e),e=null)}}function o(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?n:r}var a=e("./util.js");t.exports=o()},{"./util.js":24}],27:[function(e,t,i){function r(){this.displays=[],this.devices=[],this.devicesPopulated=!1,this.nativeWebVRAvailable=this.isWebVRAvailable(),this.nativeLegacyWebVRAvailable=this.isDeprecatedWebVRAvailable(),this.nativeLegacyWebVRAvailable||(this.nativeWebVRAvailable||this.enablePolyfill(),WebVRConfig.ENABLE_DEPRECATED_API&&this.enableDeprecatedPolyfill())}e("es6-promise").polyfill();var n=e("./cardboard-vr-display.js"),o=e("./mouse-keyboard-vr-display.js"),a=e("./base.js").VRDisplay,s=e("./base.js").HMDVRDevice,c=e("./base.js").PositionSensorVRDevice,u=e("./display-wrappers.js").VRDisplayHMDDevice,l=e("./display-wrappers.js").VRDisplayPositionSensorDevice;r.prototype.isWebVRAvailable=function(){return"getVRDisplays"in navigator},r.prototype.isDeprecatedWebVRAvailable=function(){return"getVRDevices"in navigator||"mozGetVRDevices"in navigator},r.prototype.populateDevices=function(){if(!this.devicesPopulated){var e=null;this.isCardboardCompatible()&&(e=new n,this.displays.push(e),WebVRConfig.ENABLE_DEPRECATED_API&&(this.devices.push(new u(e)),this.devices.push(new l(e)))),this.isMobile()||WebVRConfig.MOUSE_KEYBOARD_CONTROLS_DISABLED||(e=new o,this.displays.push(e),WebVRConfig.ENABLE_DEPRECATED_API&&(this.devices.push(new u(e)),this.devices.push(new l(e)))),this.devicesPopulated=!0}},r.prototype.enablePolyfill=function(){navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=a},r.prototype.enableDeprecatedPolyfill=function(){navigator.getVRDevices=this.getVRDevices.bind(this),window.HMDVRDevice=s,window.PositionSensorVRDevice=c},r.prototype.getVRDisplays=function(){this.populateDevices();var e=this.displays;return new Promise(function(t,i){try{t(e)}catch(r){i(r)}})},r.prototype.getVRDevices=function(){console.warn("getVRDevices is deprecated. Please update your code to use getVRDisplays instead.");var e=this;return new Promise(function(t,i){try{if(!e.devicesPopulated){if(e.nativeWebVRAvailable)return navigator.getVRDisplays(function(i){for(var r=0;r<i.length;++r)e.devices.push(new u(i[r])),e.devices.push(new l(i[r]));e.devicesPopulated=!0,t(e.devices)},i);if(e.nativeLegacyWebVRAvailable)return(navigator.getVRDDevices||navigator.mozGetVRDevices)(function(i){for(var r=0;r<i.length;++r)i[r]instanceof s&&e.devices.push(i[r]),i[r]instanceof c&&e.devices.push(i[r]);e.devicesPopulated=!0,t(e.devices)},i)}e.populateDevices(),t(e.devices)}catch(r){i(r)}})},r.prototype.isMobile=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},r.prototype.isCardboardCompatible=function(){return this.isMobile()||WebVRConfig.FORCE_ENABLE_VR},t.exports=r},{"./base.js":4,"./cardboard-vr-display.js":7,"./display-wrappers.js":10,"./mouse-keyboard-vr-display.js":17,"es6-promise":1}]},{},[15])}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,i){t.exports={name:"aframe",version:"0.3.0",description:"Building blocks for the VR Web",homepage:"path_to_url",main:"dist/aframe.js",scripts:{browserify:"browserify src/index.js -s 'AFRAME' -p browserify-derequire",build:"mkdirp build/ && npm run browserify -- --debug -o build/aframe.js",codecov:"codecov",dev:"npm run build && node ./scripts/budo",dist:"npm run dist:min && npm run dist:max","dist:max":"npm run browserify -s -- --debug | exorcist dist/aframe.js.map > dist/aframe.js","dist:min":"npm run browserify -s -- --debug -p [minifyify --map aframe.min.js.map --output dist/aframe.min.js.map] -o dist/aframe.min.js","dist:release":"npm run dist:release:min && npm run dist:release:max","dist:release:max":"npm run browserify -s -- --debug | exorcist dist/aframe-v0.3.0.js.map > dist/aframe-v0.3.0.js","dist:release:min":"npm run browserify -s -- --debug -p [minifyify --map aframe-v0.3.0.min.js.map --output dist/aframe-v0.3.0.min.js.map] -o dist/aframe-v0.3.0.min.js","gh-pages":"npm run ghpages",ghpages:"node ./scripts/gh-pages",lint:"semistandard -v | snazzy",precommit:"npm run lint",preghpages:"npm run dist && rimraf gh-pages && mkdirp gh-pages && cp -r {.nojekyll,dist,lib,examples,index.html,style} gh-pages/. 2>/dev/null || : && git checkout dist/ && replace 'build/aframe.js' 'dist/aframe.min.js' gh-pages/ -r --silent","release:bump":"npm run dist && git commit -am 'bump dist' && npm version patch --preminor","release:push":"npm login && npm publish && git push --follow-tags",start:"npm run dev",test:"karma start ./tests/karma.conf.js","test:firefox":"karma start ./tests/karma.conf.js --browsers Firefox","test:chrome":"karma start ./tests/karma.conf.js --browsers Chrome","test:ci":"TEST_ENV=ci karma start ./tests/karma.conf.js --single-run --browsers Firefox",version:"npm run dist"},repository:"aframevr/aframe",license:"MIT",dependencies:{debug:"^2.2.0","deep-assign":"^2.0.0","document-register-element":"dmarcos/document-register-element#8ccc532b7","promise-polyfill":"^3.1.0","object-assign":"^4.0.1",present:"0.0.6","style-attr":"^1.0.2",three:"^0.76.1","tween.js":"^15.0.0","webvr-polyfill":"0.9.15"},devDependencies:{browserify:"^13.1.0","browserify-css":"^0.8.2","browserify-derequire":"^0.9.4","browserify-istanbul":"^2.0.0",budo:"^8.1.0",chai:"^3.5.0","chai-shallow-deep-equal":"^1.3.0",codecov:"^1.0.1",exorcist:"^0.4.0","gh-pages":"^0.6.0",husky:"^0.10.1",istanbul:"^0.4.4",karma:"^1.2.0","karma-browserify":"^5.1.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^1.0.1","karma-coverage":"^1.1.1","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-sinon-chai":"^1.2.3",lolex:"^1.5.1",minifyify:"^7.3.3",mkdirp:"0.5.1",mocha:"^3.0.2","mozilla-download":"^1.0.5",open:"0.0.5",replace:"^0.3.0",rimraf:"2.5.0",semistandard:"^7.0.2",sinon:"^1.17.5","sinon-chai":"^2.8.0",snazzy:"^3.0.0",uglifyjs:"^2.4.10"},link:!0,browserify:{transform:["browserify-css"]},semistandard:{ignore:["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},keywords:["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","web-components","webvr"],"browserify-css":{minify:!0},engines:{node:">= 0.12.7",npm:"^2.12.1"}}},{}],21:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../lib/three");t.exports.Component=r("blend-character-model",{schema:{type:"src"},init:function(){this.model=null},update:function(){var e=this,t=this.el,i=this.data;i&&(this.remove(),this.model=new n.BlendCharacter,this.model.load(i,function(){t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"blend",model:e.model}),e.model.castShadow=!0,e.model.receiveShadow=!0,e.model.material.shading=n.FlatShading,e.model.geometry.computeBoundingBox()}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},{"../core/component":59,"../lib/three":103}],22:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../lib/three"),o=e("../utils/"),a=o.checkHeadsetConnected;t.exports.Component=r("camera",{schema:{active:{"default":!0},far:{"default":1e4},fov:{"default":80,min:0},near:{"default":.005,min:0},userHeight:{"default":0,min:0},zoom:{"default":1,min:0}},init:function(){var e,t=this.el,i=t.sceneEl;this.savedPose=null,e=this.camera=new n.PerspectiveCamera,t.setObject3D("camera",e),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this),i.addEventListener("enter-vr",this.onEnterVR),i.addEventListener("exit-vr",this.onExitVR)},update:function(e){var t=this.el,i=this.data,r=this.camera,n=this.system;this.addHeightOffset(e.userHeight),r.aspect=i.aspect||window.innerWidth/window.innerHeight,r.far=i.far,r.fov=i.fov,r.near=i.near,r.zoom=i.zoom,r.updateProjectionMatrix(),e&&e.active===i.active||(i.active&&n.activeCameraEl!==t?n.setActiveCamera(t):i.active||n.activeCameraEl!==t||n.disableActiveCamera())},remove:function(){var e=this.el.sceneEl;this.el.removeObject3D("camera"),e.removeEventListener("enter-vr",this.onEnterVR),e.removeEventListener("exit-vr",this.onExitVR)},onEnterVR:function(){this.saveCameraPose(),this.removeHeightOffset()},onExitVR:function(){this.restoreCameraPose()},addHeightOffset:function(e){var t,i=this.el,r=this.data.userHeight;e=e||0,t=i.getComputedAttribute("position")||{x:0,y:0,z:0},i.setAttribute("position",{x:t.x,y:t.y-e+r,z:t.z})},removeHeightOffset:function(){var e,t,i=this.el,r=i.sceneEl,n=this.data.userHeight;t=this.headsetConnected||a(),!r.isMobile&&n&&t&&(e=i.getAttribute("position")||{x:0,y:0,z:0},i.setAttribute("position",{x:e.x,y:e.y-n,z:e.z}))},saveCameraPose:function(){var e=this.el,t=this.headsetConnected||a();!this.savedPose&&t&&(this.savedPose={position:e.getAttribute("position"),rotation:e.getAttribute("rotation")})},restoreCameraPose:function(){var e=this.el,t=this.savedPose,i=this.headsetConnected||a();t&&i&&(e.setAttribute("position",t.position),e.setAttribute("rotation",t.rotation),this.savedPose=null)}})},{"../core/component":59,"../lib/three":103,"../utils/":120}],23:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../lib/three");t.exports.Component=r("collada-model",{schema:{type:"src"},init:function(){this.model=null,this.loader=new n.ColladaLoader,this.loader.options.convertUpAxis=!0},update:function(){var e=this,t=this.el,i=this.data; i&&(this.remove(),this.loader.load(i,function(i){e.model=i.scene,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"collada",model:e.model})}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},{"../core/component":59,"../lib/three":103}],24:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../utils/"),o={CLICK:"click",MOUSEENTER:"mouseenter",MOUSEDOWN:"mousedown",MOUSELEAVE:"mouseleave",MOUSEUP:"mouseup"},a={FUSING:"cursor-fusing",HOVERING:"cursor-hovering",HOVERED:"cursor-hovered"};t.exports.Component=r("cursor",{dependencies:["raycaster"],schema:{fuse:{"default":n.isMobile()},fuseTimeout:{"default":1500,min:0}},init:function(){var e=this.el,t=e.sceneEl.canvas;return this.fuseTimeout=void 0,this.mouseDownEl=null,this.intersectedEl=null,t?(t.addEventListener("mousedown",this.onMouseDown.bind(this)),t.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("raycaster-intersection",this.onIntersection.bind(this)),void e.addEventListener("raycaster-intersection-cleared",this.onIntersectionCleared.bind(this))):void e.sceneEl.addEventListener("render-target-loaded",this.init.bind(this))},onMouseDown:function(e){this.twoWayEmit(o.MOUSEDOWN),this.mouseDownEl=this.intersectedEl},onMouseUp:function(){this.twoWayEmit(o.MOUSEUP),!this.data.fuse&&this.intersectedEl&&this.mouseDownEl===this.intersectedEl&&this.twoWayEmit(o.CLICK)},onIntersection:function(e){var t=this,i=this.el,r=this.data,n=e.detail.els[0];this.intersectedEl!==n&&(this.intersectedEl=n,i.addState(a.HOVERING),n.addState(a.HOVERED),t.twoWayEmit(o.MOUSEENTER),0!==r.fuseTimeout&&r.fuse&&(i.addState(a.FUSING),this.fuseTimeout=setTimeout(function(){i.removeState(a.FUSING),t.twoWayEmit(o.CLICK)},r.fuseTimeout)))},onIntersectionCleared:function(e){var t=this.el,i=e.detail.el;i&&this.intersectedEl&&(i.removeState(a.HOVERED),t.removeState(a.HOVERING),t.removeState(a.FUSING),this.twoWayEmit(o.MOUSELEAVE),this.intersectedEl=null,clearTimeout(this.fuseTimeout))},twoWayEmit:function(e){var t=this.intersectedEl;this.el.emit(e,{intersectedEl:this.intersectedEl}),t&&t.emit(e,{cursorEl:this.el})}})},{"../core/component":59,"../utils/":120}],25:[function(e,t,i){var r=e("../utils/debug"),n=e("../core/geometry").geometries,o=e("../core/geometry").geometryNames,a=e("../core/component").registerComponent,s=e("../lib/three"),c=new s.Geometry,u=r("components:geometry:warn");t.exports.Component=a("geometry",{schema:{buffer:{"default":!0},mergeTo:{type:"selector"},primitive:{"default":"box",oneOf:o},skipCache:{"default":!1}},init:function(){this.geometry=null},update:function(e){var t=this.data,i=this.el.getOrCreateObject3D("mesh",s.Mesh),r=this.system;this.geometry&&(r.unuseGeometry(e),this.geometry=null),this.geometry=i.geometry=r.getOrCreateGeometry(t),t.mergeTo&&this.mergeTo(t.mergeTo)},mergeTo:function(e){var t,i=this.el,r=i.getObject3D("mesh");return e?e===i?void u("Source and target geometries cannot be the same for merge"):(t=e.getObject3D("mesh"))?t.geometry instanceof s.Geometry==!1||r.geometry instanceof s.Geometry==!1?void u("Geometry merge is only available for `THREE.Geometry` types. Check that both of the merging geometry and the target geometry have `buffer` set to false"):this.data.skipCache===!1?void u("Cached geometries are not allowed to merge. Set `skipCache` to true"):(r.parent.updateMatrixWorld(),t.geometry.merge(r.geometry,r.matrixWorld),i.emit("geometry-merged",{mergeTarget:e}),void i.parentNode.removeChild(i)):(t=e.getOrCreateObject3D("mesh",s.Mesh),void e.setAttribute("material",i.getComputedAttribute("material"))):void u("There is not a valid entity to merge the geometry to")},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D("mesh").geometry=c,this.geometry=null},updateSchema:function(e){var t=e.primitive,i=this.data&&this.data.primitive,r=n[t]&&n[t].schema;if(!r)throw new Error("Unknown geometry schema `"+t+"`");i&&i===t||this.extendSchema(r)}})},{"../core/component":59,"../core/geometry":60,"../lib/three":103,"../utils/debug":117}],26:[function(e,t,i){var r=e("../core/component").registerComponent,n="path_to_url",o="path_to_url";t.exports.Component=r("hand-controls",{schema:{"default":"left"},init:function(){var e=this;this.onGripDown=function(){e.handleButton("grip","down")},this.onGripUp=function(){e.handleButton("grip","up")},this.onTrackpadDown=function(){e.handleButton("trackpad","down")},this.onTrackpadUp=function(){e.handleButton("trackpad","up")},this.onTriggerDown=function(){e.handleButton("trigger","down")},this.onTriggerUp=function(){e.handleButton("trigger","up")}},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},addEventListeners:function(){var e=this.el;e.addEventListener("gripdown",this.onGripDown),e.addEventListener("gripup",this.onGripUp),e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("triggerdown",this.onTriggerDown),e.addEventListener("triggerup",this.onTriggerUp)},removeEventListeners:function(){var e=this.el;e.removeEventListener("gripdown",this.onGripDown),e.removeEventListener("gripup",this.onGripUp),e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("triggerdown",this.onTriggerDown),e.removeEventListener("triggerup",this.onTriggerUp)},update:function(){var e,t=this.el,i=this.data;e="left"===i?"url("+n+")":"url("+o+")",t.setAttribute("vive-controls",{hand:i,model:!1}),t.setAttribute("blend-character-model",e)},handleButton:function(e,t){var i=this.el,r="down"===t;switch(e){case"trackpad":if(r===this.trackpadPressed)return;this.trackpadPressed=r,this.playAnimation("thumb",!r),t=r?"thumbup":"thumbdown",i.emit(t);break;case"trigger":if(r===this.triggerPressed)return;this.triggerPressed=r,this.playAnimation("pointing",!r),t=r?"pointup":"pointdown",i.emit(t);break;case"grip":if(r===this.gripPressed)return;this.gripPressed=r,this.playAnimation("close",!r),t=r?"gripclose":"gripopen",i.emit(t)}},playAnimation:function(e,t){var i=this.animationActive,r=1,n=this.el.getObject3D("mesh");n&&(t&&(r=-1),i&&n.play(i,0),n.mixer.clipAction(e).loop=2200,n.mixer.clipAction(e).clampWhenFinished=!0,n.mixer.clipAction(e).timeScale=r,n.play(e,1),this.animationActive=e)}})},{"../core/component":59}],27:[function(e,t,i){e("./blend-character-model"),e("./camera"),e("./collada-model"),e("./cursor"),e("./geometry"),e("./hand-controls"),e("./light"),e("./look-at"),e("./look-controls"),e("./material"),e("./obj-model"),e("./position"),e("./raycaster"),e("./rotation"),e("./scale"),e("./sound"),e("./tracked-controls"),e("./visible"),e("./vive-controls"),e("./wasd-controls"),e("./scene/canvas"),e("./scene/debug"),e("./scene/embedded"),e("./scene/inspector"),e("./scene/fog"),e("./scene/keyboard-shortcuts"),e("./scene/stats"),e("./scene/vr-mode-ui")},{"./blend-character-model":21,"./camera":22,"./collada-model":23,"./cursor":24,"./geometry":25,"./hand-controls":26,"./light":28,"./look-at":29,"./look-controls":30,"./material":31,"./obj-model":32,"./position":33,"./raycaster":34,"./rotation":35,"./scale":36,"./scene/canvas":37,"./scene/debug":38,"./scene/embedded":39,"./scene/fog":40,"./scene/inspector":41,"./scene/keyboard-shortcuts":42,"./scene/stats":43,"./scene/vr-mode-ui":44,"./sound":45,"./tracked-controls":46,"./visible":47,"./vive-controls":48,"./wasd-controls":49}],28:[function(e,t,i){var r=e("../utils").diff,n=e("../utils/debug"),o=e("../core/component").registerComponent,a=e("../lib/three"),s=a.Math.degToRad,c=n("components:light:warn");t.exports.Component=o("light",{schema:{angle:{"default":60,"if":{type:["spot"]}},color:{type:"color"},groundColor:{type:"color","if":{type:["hemisphere"]}},decay:{"default":1,"if":{type:["point","spot"]}},distance:{"default":0,min:0,"if":{type:["point","spot"]}},intensity:{"default":1,min:0,"if":{type:["ambient","directional","hemisphere","point","spot"]}},penumbra:{"default":0,min:0,max:1,"if":{type:["spot"]}},type:{"default":"directional",oneOf:["ambient","directional","hemisphere","point","spot"]},target:{type:"selector","if":{type:["spot","directional"]}}},init:function(){var e=this.el;this.light=null,this.defaultTarget=null,this.system.registerLight(e)},update:function(e){var t=this.data,i=r(t,e),n=this.light,o=this;return!n||"type"in i?void this.setLight(this.data):void Object.keys(i).forEach(function(e){var i=t[e];switch(e){case"color":n.color.set(i);break;case"groundcolor":n.groundColor.set(i);break;case"angle":n.angle=s(i);break;case"target":null===i?"spot"!==t.type&&"directional"!==t.type||(n.target=o.defaultTarget):i.hasLoaded?o.onSetTarget(i):i.addEventListener("loaded",o.onSetTarget.bind(o,i));break;default:n[e]=i}})},setLight:function(e){var t=this.el,i=this.getLight(e);i&&(this.light&&t.removeObject3D("light"),this.light=i,this.light.el=t,t.setObject3D("light",this.light),"spot"!==e.type&&"directional"!==e.type&&"hemisphere"!==e.type||t.getObject3D("light").translateY(-1),"spot"===e.type&&(t.setObject3D("light-target",this.defaultTarget),t.getObject3D("light-target").position.set(0,0,-1)))},getLight:function(e){var t=e.angle,i=new a.Color(e.color).getHex(),r=e.decay,n=e.distance,o=new a.Color(e.groundColor).getHex(),u=e.intensity,l=e.type,h=e.target,d=null;switch(l.toLowerCase()){case"ambient":return new a.AmbientLight(i,u);case"directional":return d=new a.DirectionalLight(i,u),this.defaultTarget=d.target,h&&(h.hasLoaded?this.onSetTarget(h):h.addEventListener("loaded",this.onSetTarget.bind(this,h))),d;case"hemisphere":return new a.HemisphereLight(i,o,u);case"point":return new a.PointLight(i,u,n,r);case"spot":return d=new a.SpotLight(i,u,n,s(t),e.penumbra,r),this.defaultTarget=d.target,h&&(h.hasLoaded?this.onSetTarget(h):h.addEventListener("loaded",this.onSetTarget.bind(this,h))),d;default:c("%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.",l)}},onSetTarget:function(e){this.light.target=e.object3D},remove:function(){this.el.removeObject3D("light")}})},{"../core/component":59,"../lib/three":103,"../utils":120,"../utils/debug":117}],29:[function(e,t,i){var r=e("../utils/debug"),n=e("../utils/coordinates"),o=e("../core/component").registerComponent,a=e("../lib/three"),s=r("components:look-at:warn"),c=n.isCoordinate;t.exports.Component=o("look-at",{schema:{"default":"",parse:function(e){return c(e)||"object"==typeof e?n.parse(e):e},stringify:function(e){return"object"==typeof e?n.stringify(e):e}},init:function(){this.target3D=null,this.vector=new a.Vector3,s("The `look-at` component is deprecated - use path_to_url instead.")},update:function(){var e,t=this,i=t.data,r=t.el.object3D;return!i||"object"==typeof i&&!Object.keys(i).length?t.remove():"object"==typeof i?r.lookAt(new a.Vector3(i.x,i.y,i.z)):(e=t.el.sceneEl.querySelector(i),e?e.hasLoaded?t.beginTracking(e):e.addEventListener("loaded",function(){t.beginTracking(e)}):void s('"'+i+'" does not point to a valid entity to look-at'))},tick:function(e){var t=this.target3D;if(t)return this.el.object3D.lookAt(this.vector.setFromMatrixPosition(t.matrixWorld))},beginTracking:function(e){this.target3D=e.object3D}})},{"../core/component":59,"../lib/three":103,"../utils/coordinates":116,"../utils/debug":117}],30:[function(e,t,i){function r(e){return 0===e.x&&0===e.y&&0===e.z}var n=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/").isMobile(),s=Math.PI/2,c=o.Math.radToDeg;t.exports.Component=n("look-controls",{dependencies:["position","rotation"],schema:{enabled:{"default":!0},hmdEnabled:{"default":!0},standing:{"default":!0}},init:function(){function e(){t.canvas.classList.add("a-grab-cursor")}var t=this.el.sceneEl;this.previousHMDPosition=new o.Vector3,this.setupMouseControls(),this.setupHMDControls(),this.bindMethods(),t.canvas?e():t.addEventListener("render-target-loaded",e)},update:function(e){var t=this.data,i=t.hmdEnabled;t.enabled&&(!i&&e&&i!==e.hmdEnabled&&(this.pitchObject.rotation.set(0,0,0),this.yawObject.rotation.set(0,0,0)),this.controls.standing=t.standing,this.controls.update(),this.updateOrientation(),this.updatePosition())},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(e){this.update()},remove:function(){this.pause()},bindMethods:function(){this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.releaseMouse=this.releaseMouse.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new o.Object3D,this.yawObject=new o.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},setupHMDControls:function(){this.dolly=new o.Object3D,this.euler=new o.Euler,this.controls=new o.VRControls(this.dolly),this.controls.userHeight=0},addEventListeners:function(){var e=this.el.sceneEl,t=e.canvas;return t?(t.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.releaseMouse,!1),t.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchmove",this.onTouchMove),void window.addEventListener("touchend",this.onTouchEnd)):void e.addEventListener("render-target-loaded",this.addEventListeners.bind(this))},removeEventListeners:function(){var e=this.el.sceneEl,t=e&&e.canvas;t&&(t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseup",this.releaseMouse),t.removeEventListener("mouseout",this.releaseMouse),t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd))},updateOrientation:function(){var e=new o.Euler;return function(){var t,i,n,o=this.pitchObject,s=this.yawObject,u=this.calculateHMDQuaternion(),l=this.el.sceneEl;e.setFromQuaternion(u,"YXZ"),a?n={x:c(e.x)+c(o.rotation.x),y:c(e.y)+c(s.rotation.y),z:c(e.z)}:l.is("vr-mode")&&!r(e)&&this.data.hmdEnabled?n={x:c(e.x),y:c(e.y),z:c(e.z)}:(t=this.el.getComputedAttribute("rotation"),i=this.calculateDeltaRotation(),n={x:t.x+i.x,y:t.y+i.y,z:t.z}),this.el.setAttribute("rotation",n)}}(),calculateDeltaRotation:function(){var e,t;return function(){var i,r=c(this.pitchObject.rotation.x),n=c(this.yawObject.rotation.y);return e=e||r,t=t||n,i={x:r-e,y:n-t},e=r,t=n,i}}(),calculateHMDQuaternion:function(){var e=new o.Quaternion;return function(){return e.copy(this.dolly.quaternion),e}}(),updatePosition:function(){var e=new o.Vector3;return function(){var t,i=this.el,n=i.getComputedAttribute("position"),o=this.previousHMDPosition,a=this.el.sceneEl;t=this.calculateHMDPosition(),e.copy(t).sub(o),a.is("vr-mode")&&!r(e)&&(o.copy(t),a.is("vr-mode")&&i.setAttribute("position",{x:n.x+e.x,y:n.y+e.y,z:n.z+e.z}))}}(),calculateHMDPosition:function(){var e=this.dolly,t=new o.Vector3;return e.updateMatrix(),t.setFromMatrixPosition(e.matrix),t},onMouseMove:function(e){var t=this.pitchObject,i=this.yawObject,r=this.previousMouseEvent;if(this.mouseDown&&this.data.enabled){var n=e.movementX||e.mozMovementX,o=e.movementY||e.mozMovementY;void 0!==n&&void 0!==o||(n=e.screenX-r.screenX,o=e.screenY-r.screenY),this.previousMouseEvent=e,i.rotation.y-=.002*n,t.rotation.x-=.002*o,t.rotation.x=Math.max(-s,Math.min(s,t.rotation.x))}},onMouseDown:function(e){this.mouseDown=!0,this.previousMouseEvent=e,document.body.classList.add("a-grabbing")},releaseMouse:function(){this.mouseDown=!1,document.body.classList.remove("a-grabbing")},onTouchStart:function(e){1===e.touches.length&&(this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(e){var t,i=this.yawObject;this.touchStarted&&(t=2*Math.PI*(e.touches[0].pageX-this.touchStart.x)/this.el.sceneEl.canvas.clientWidth,i.rotation.y-=.5*t,this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1}})},{"../core/component":59,"../lib/three":103,"../utils/":120}],31:[function(e,t,i){function r(e){switch(e){case"back":return s.BackSide;case"double":return s.DoubleSide;default:return s.FrontSide}}function n(e,t){e.dispose(),t.unregisterMaterial(e)}var o=e("../utils/"),a=e("../core/component"),s=e("../lib/three"),c=e("../core/shader"),u=o.debug("components:material:error"),l=a.registerComponent,h=c.shaders,d=c.shaderNames;t.exports.Component=l("material",{schema:{depthTest:{"default":!0},flatShading:{"default":!1},opacity:{"default":1,min:0,max:1},shader:{"default":"standard",oneOf:d},side:{"default":"front",oneOf:["front","back","double"]},transparent:{"default":!1},visible:{"default":!0}},init:function(){this.material=null},update:function(e){var t=this.data;this.shader&&t.shader===e.shader||this.updateShader(t.shader),this.shader.update(this.data),this.updateMaterial()},updateSchema:function(e){var t=e.shader,i=this.data&&this.data.shader,r=t||i,n=h[r]&&h[r].schema;n||u("Unknown shader schema "+r),i&&t===i||(this.extendSchema(n),this.updateBehavior())},updateBehavior:function(){var e=this.el.sceneEl,t=this.schema,i=this,r={},n=function(e,t){function n(t){r[t]=e}var o=Object.keys(r);o.forEach(n),i.shader.update(r)},o=Object.keys(t);o.forEach(function(o){"time"===t[o].type&&(i.tick=n,r[o]=!0,e.addBehavior(i))}),0===Object.keys(r).length&&e.removeBehavior(this)},updateShader:function(e){var t,i=this.data,r=h[e]&&h[e].Shader;if(!r)throw new Error("Unknown shader "+e);t=this.shader=new r,t.el=this.el,t.init(i),this.setMaterial(t.material),this.updateSchema(i)},updateMaterial:function(){var e=this.data,t=this.material;t.side=r(e.side),t.opacity=e.opacity,t.transparent=e.transparent!==!1||e.opacity<1,t.depthTest=e.depthTest!==!1,t.shading=e.flatShading?s.FlatShading:s.SmoothShading,t.visible=e.visible},remove:function(){var e=new s.MeshBasicMaterial,t=this.material,i=this.el.getObject3D("mesh");i&&(i.material=e),n(t,this.system)},setMaterial:function(e){var t=this.el.getOrCreateObject3D("mesh",s.Mesh),i=this.system;this.material&&n(this.material,i),this.material=t.material=e,i.registerMaterial(e)}})},{"../core/component":59,"../core/shader":67,"../lib/three":103,"../utils/":120}],32:[function(e,t,i){var r=e("../utils/debug"),n=e("../core/component").registerComponent,o=e("../lib/three"),a=r("components:obj-model:warn");t.exports.Component=n("obj-model",{dependencies:["material"],schema:{mtl:{type:"src"},obj:{type:"src"}},init:function(){this.model=null,this.objLoader=new o.OBJLoader,this.mtlLoader=new o.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin=""},update:function(){var e=this.data;e.obj&&(this.remove(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.el.removeObject3D("mesh")},loadObj:function(e,t){var i=this,r=this.el,n=this.mtlLoader,s=this.objLoader;return t?(r.hasAttribute("material")&&a("Material component properties are ignored when a .MTL is provided"),n.setBaseUrl(t.substr(0,t.lastIndexOf("/")+1)),void n.load(t,function(t){t.preload(),s.setMaterials(t),s.load(e,function(e){i.model=e,r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})})})):void s.load(e,function(e){var t=r.components.material;t&&e.traverse(function(e){e instanceof o.Mesh&&(e.material=t.material)}),i.model=e,r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})})}})},{"../core/component":59,"../lib/three":103,"../utils/debug":117}],33:[function(e,t,i){var r=e("../core/component").registerComponent;t.exports.Component=r("position",{schema:{type:"vec3"},update:function(){var e=this.el.object3D,t=this.data;e.position.set(t.x,t.y,t.z)}})},{"../core/component":59}],34:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../lib/three"),o=new n.Vector3;t.exports.Component=r("raycaster",{schema:{far:{"default":1/0},interval:{"default":100},near:{"default":0},objects:{"default":""},recursive:{"default":!0}},init:function(){this.direction=new n.Vector3,this.intersectedEls=[],this.objects=null,this.prevCheckTime=void 0,this.raycaster=new n.Raycaster,this.updateOriginDirection()},update:function(){var e=this.data,t=this.raycaster;t.far=e.far,t.near=e.near,this.refreshObjects()},refreshObjects:function(){var e,t,i=this.data;if(i.objects)for(t=this.el.sceneEl.querySelectorAll(i.objects),this.objects=[],e=0;e<t.length;e++)this.objects.push(t[e].object3D);else this.objects=this.el.sceneEl.object3D.children},tick:function(e){var t,i,r,n=this.el,o=this.data,a=this.prevCheckTime;a&&e-a<o.interval||(r=this.intersectedEls.slice(),this.updateOriginDirection(),i=this.raycaster.intersectObjects(this.objects,o.recursive),i=i.filter(function(e){return!!e.object.el}),t=this.intersectedEls=i.map(function(e){return e.object.el}),i.forEach(function(e){var t=e.object.el;t.emit("raycaster-intersected",{el:n,intersection:e})}),i.length&&n.emit("raycaster-intersection",{els:t,intersections:i}),r.forEach(function(e){t.indexOf(e)===-1&&(n.emit("raycaster-intersection-cleared",{el:e}),e.emit("raycaster-intersected-cleared",{el:n}))}))},updateOriginDirection:function(){var e=new n.Quaternion,t=new n.Vector3;return function(){var i=this.el,r=i.object3D;r.updateMatrixWorld(),r.matrixWorld.decompose(t,e,o),this.direction.set(0,0,-1),this.direction.applyQuaternion(e),this.raycaster.set(t,this.direction)}}()})},{"../core/component":59,"../lib/three":103}],35:[function(e,t,i){var r=e("../lib/three").Math.degToRad,n=e("../core/component").registerComponent;t.exports.Component=n("rotation",{schema:{type:"vec3"},update:function(){var e=this.data,t=this.el.object3D;t.rotation.set(r(e.x),r(e.y),r(e.z)),t.rotation.order="YXZ"}})},{"../core/component":59,"../lib/three":103}],36:[function(e,t,i){var r=e("../core/component").registerComponent,n=1e-5;t.exports.Component=r("scale",{schema:{type:"vec3","default":{x:1,y:1,z:1}},update:function(){var e=this.data,t=this.el.object3D,i=0===e.x?n:e.x,r=0===e.y?n:e.y,o=0===e.z?n:e.z;t.scale.set(i,r,o)}})},{"../core/component":59}],37:[function(e,t,i){var r=e("../../core/component").registerComponent;t.exports.Component=r("canvas",{init:function(){function e(e){n.classList.add("fullscreen")}function t(e){n.classList.remove("fullscreen")}function i(){var e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;e||r.exitVR(),document.activeElement.blur(),document.body.focus(),setTimeout(r.resize.bind(r),0)}var r=this.el,n=document.createElement("canvas");n.classList.add("a-canvas"),n.dataset.aframeCanvas=!0,r.appendChild(n),document.addEventListener("fullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),n.addEventListener("touchmove",function(e){e.preventDefault()}),r.addEventListener("enter-vr",e),r.addEventListener("exit-vr",t),r.canvas=n,r.emit("render-target-loaded",{target:n})}})},{"../../core/component":59}],38:[function(e,t,i){var r=e("../../core/component").registerComponent;t.exports.Component=r("debug",{schema:{"default":!0}})},{"../../core/component":59}],39:[function(e,t,i){var r=e("../../core/component").registerComponent;t.exports.Component=r("embedded",{dependencies:["vr-mode-ui"],schema:{"default":!0},update:function(){var e=this.el,t=e.querySelector(".a-enter-vr");this.data===!0?(t.classList.add("embedded"),e.removeFullScreenStyles()):(t.classList.remove("embedded"),e.addFullScreenStyles())}})},{"../../core/component":59}],40:[function(e,t,i){function r(e){var t;return t="exponential"===e.type?new o.FogExp2(e.color,e.density):new o.Fog(e.color,e.near,e.far),t.name=e.type,t}var n=e("../../core/component").registerComponent,o=e("../../lib/three"),a=e("../../utils/debug"),s=a("components:fog:warn");t.exports.Component=n("fog",{schema:{color:{"default":"#000"},density:{"default":25e-5},far:{"default":1e3,min:0},near:{"default":1,min:0},type:{"default":"linear",oneOf:["linear","exponential"]}},update:function(){var e=this.data,t=this.el,i=this.el.object3D.fog;return t.isScene?i&&e.type===i.name?void Object.keys(this.schema).forEach(function(t){var r=e[t];"color"===t&&(r=new o.Color(r)),i[t]=r}):(t.object3D.fog=r(e),void t.systems.material.updateMaterials()):void s("Fog component can only be applied to <a-scene>")},remove:function(){var e=this.el.object3D.fog;e&&(e.density=0,e.far=0,e.near=0)}})},{"../../core/component":59,"../../lib/three":103,"../../utils/debug":117}],41:[function(e,t,i){var r=e("../../core/component").registerComponent,n=e("../../../package"),o=n.homepage+"releases/"+n.version+"/aframe-inspector.min.js";t.exports.Component=r("inspector",{schema:{url:{"default":o}},init:function(){this.onKeydown=this.onKeydown.bind(this),window.addEventListener("keydown",this.onKeydown)},onKeydown:function(e){var t=73===e.keyCode&&e.ctrlKey&&e.altKey;this.data&&t&&this.injectInspector()},injectInspector:function(){var e,t=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected||(e=document.createElement("script"),e.src=this.data.url,e.onload=function(){AFRAME.INSPECTOR.open(),window.removeEventListener("keydown",t.onKeydown)},document.head.appendChild(e),AFRAME.inspectorInjected=!0)},remove:function(){window.removeEventListener("keydown",this.onKeydown)}})},{"../../../package":20,"../../core/component":59}],42:[function(e,t,i){var r=e("../../core/component").registerComponent,n=e("../../utils/").shouldCaptureKeyEvent,o=e("../../lib/three"),a=new o.VRControls(new o.Object3D);t.exports.Component=r("keyboard-shortcuts",{schema:{enterVR:{"default":!0},exitVR:{"default":!0},resetSensor:{"default":!0}},init:function(){var e=this,t=this.el;this.listener=window.addEventListener("keyup",function(i){n(i)&&(e.enterVREnabled&&70===i.keyCode&&t.enterVR(),e.enterVREnabled&&27===i.keyCode&&t.exitVR(),e.resetSensorEnabled&&90===i.keyCode&&a.resetSensor())},!1)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR,this.resetSensorEnabled=t.resetSensor},remove:function(){window.removeEventListener("keyup",this.listener)}})},{"../../core/component":59,"../../lib/three":103,"../../utils/":120}],43:[function(e,t,i){function r(e){var t=new s(e.renderer),i=new c(e),r=e.isMobile?[]:[t,i];return new o({css:[],values:{fps:{caption:"fps",below:30}},groups:[{caption:"Framerate",values:["fps","raf"]}],plugins:r})}var n=e("../../core/component").registerComponent,o=e("../../../vendor/rStats");e("../../../vendor/rStats.extras"),e("../../lib/rStatsAframe");var a="a-hidden",s=window.threeStats,c=window.aframeStats;t.exports.Component=n("stats",{schema:{"default":!0},init:function(){var e=this.el;this.stats=r(e),this.statsEl=document.querySelector(".rs-base"),this.hideBound=this.hide.bind(this),this.showBound=this.show.bind(this),e.addEventListener("enter-vr",this.hideBound),e.addEventListener("exit-vr",this.showBound)},update:function(){return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener("enter-vr",this.hideBound),this.el.removeEventListener("exit-vr",this.showBound),this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var e=this.stats;e("rAF").tick(),e("FPS").frame(),e().update()},hide:function(){this.statsEl.classList.add(a)},show:function(){this.statsEl.classList.remove(a)}})},{"../../../vendor/rStats":127,"../../../vendor/rStats.extras":126,"../../core/component":59,"../../lib/rStatsAframe":102}],44:[function(e,t,i){function r(e){var t,i;return i=document.createElement("div"),i.classList.add(c),i.setAttribute(a.AFRAME_INJECTED,""),t=document.createElement("button"),t.className=u,t.setAttribute(a.AFRAME_INJECTED,""),i.appendChild(t),t.addEventListener("click",e),i}function n(e){var t=document.createElement("div");t.className=h,t.classList.add(l),t.setAttribute(a.AFRAME_INJECTED,"");var i=document.createElement("button");return i.setAttribute(a.AFRAME_INJECTED,""),i.innerHTML="Exit VR",i.addEventListener("click",e),t.appendChild(i),t}var o=e("../../core/component").registerComponent,a=e("../../constants/"),s=e("../../utils/"),c="a-enter-vr",u="a-enter-vr-button",l="a-hidden",h="a-orientation-modal";t.exports.Component=o("vr-mode-ui",{dependencies:["canvas"],schema:{enabled:{"default":!0}},init:function(){var e=this,t=this.el;"false"!==s.getUrlParameter("ui")&&(this.enterVR=t.enterVR.bind(t),this.exitVR=t.exitVR.bind(t),this.insideLoader=!1,this.enterVREl=null,this.orientationModalEl=null,t.addEventListener("enter-vr",this.updateEnterVRInterface.bind(this)),t.addEventListener("exit-vr",this.updateEnterVRInterface.bind(this)),window.addEventListener("message",function(t){"loaderReady"===t.data.type&&(e.insideLoader=!0,e.remove())}),window.addEventListener("orientationchange",this.toggleOrientationModalIfNeeded.bind(this)))},update:function(){var e=this.el;return!this.data.enabled||this.insideLoader||"false"===s.getUrlParameter("ui")?this.remove():void(this.enterVREl||this.orientationModalEl||(this.enterVREl=r(this.enterVR),e.appendChild(this.enterVREl),this.orientationModalEl=n(this.exitVR),e.appendChild(this.orientationModalEl),this.updateEnterVRInterface()))},remove:function(){[this.enterVREl,this.orientationModalEl].forEach(function(e){e&&e.parentNode.removeChild(e)})},updateEnterVRInterface:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is("vr-mode")?this.enterVREl.classList.add(l):this.enterVREl.classList.remove(l))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!s.isLandscape()&&e.is("vr-mode")?t.classList.remove(l):t.classList.add(l))}})},{"../../constants/":51,"../../core/component":59,"../../utils/":120}],45:[function(e,t,i){var r=e("../utils/debug"),n=e("../core/component").registerComponent,o=e("../lib/three"),a=r("components:sound:warn");t.exports.Component=n("sound",{schema:{src:{type:"src"},on:{"default":""},autoplay:{"default":!1},loop:{"default":!1},volume:{"default":1}},multiple:!0,init:function(){this.listener=null,this.audioLoader=new o.AudioLoader,this.sound=null,this.playSound=this.playSound.bind(this)},update:function(e){var t=this.data,i=this.sound,r=t.src!==e.src;if(r){if(!t.src)return void a("Audio source was not specified with `src`");i=this.setupSound()}i.autoplay=t.autoplay,i.setLoop(t.loop),i.setVolume(t.volume),t.on!==e.on&&this.updateEventListener(e.on),r&&this.audioLoader.load(t.src,function(e){i.setBuffer(e),o.Cache.remove(t.src)})},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSound),t.addEventListener(this.data.on,this.playSound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSound)},remove:function(){this.removeEventListener(),this.el.removeObject3D(this.attrName);try{this.sound.disconnect()}catch(e){a("Audio source not properly disconnected")}},play:function(){this.sound&&(this.sound.source.buffer&&this.data.autoplay&&this.sound.play(),this.updateEventListener())},pause:function(){this.sound&&(this.sound.source.buffer&&this.sound.isPlaying&&this.sound.pause(),this.removeEventListener())},setupSound:function(){var e=this.el,t=e.sceneEl,i=this.sound;i&&(this.stopSound(),e.removeObject3D("sound"));var r=this.listener=t.audioListener||new o.AudioListener;return t.audioListener=r,t.camera&&t.camera.add(r),t.addEventListener("camera-set-active",function(e){e.detail.cameraEl.getObject3D("camera").add(r)}),i=this.sound=new o.PositionalAudio(r),e.setObject3D(this.attrName,i),i.source.onended=function(){i.onEnded(),e.emit("sound-ended")},i},playSound:function(){this.sound.source.buffer&&this.sound.play()},stopSound:function(){this.sound.source.buffer&&this.sound.stop()}})},{"../core/component":59,"../lib/three":103,"../utils/debug":117}],46:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../lib/three");t.exports.Component=r("tracked-controls",{schema:{ controller:{"default":0},id:{"default":"OpenVR Gamepad"}},init:function(){this.buttonStates={},this.axisState=[]},update:function(){function e(e){return e.id===i.id}var t=this.system.controllers,i=this.data;t=t.filter(e),this.controller=t[i.controller]},tick:function(e,t){var i=this.el.getObject3D("mesh");i&&(i.update&&i.update(t/1e3),this.updatePose(),this.updateButtons())},updatePose:function(){var e=new n.Euler,t=new n.Vector3,i=new n.Quaternion,r=new n.Object3D,o=new n.Matrix4;return e.order="YXZ",function(){var a,s,c,u,l=this.el,h=this.system.vrDisplay;this.update(),a=this.controller,a&&(s=a.pose,c=s.orientation||[0,0,0,1],u=s.position||[0,0,0],i.fromArray(c),r.quaternion.fromArray(c),r.position.fromArray(u),r.updateMatrix(),h&&h.stageParameters&&(o.fromArray(h.stageParameters.sittingToStandingTransform),r.applyMatrix(o)),e.setFromRotationMatrix(r.matrix),t.setFromMatrixPosition(r.matrix),l.setAttribute("rotation",{x:n.Math.radToDeg(e.x),y:n.Math.radToDeg(e.y),z:n.Math.radToDeg(e.z)}),l.setAttribute("position",{x:t.x,y:t.y,z:t.z}))}}(),updateButtons:function(){var e,t,i=this.controller;if(this.controller){for(e=0;e<i.buttons.length;++e)t=i.buttons[e],this.handleButton(e,t);this.handleAxes(i.axes)}},handleAxes:function(e){var t,i=this.axisState,r=!1;for(t=0;t<e.length;++t)if(i[t]!==e[t]){r=!0;break}r&&(i=e.slice(),this.el.emit("axismove",{axis:i}))},handleButton:function(e,t){var i=!1;i=i||this.handlePress(e,t),i=i||this.handleTouch(e,t),i=i||this.handleValue(e,t),i&&this.el.emit("buttonchanged",{id:e,state:t})},handlePress:function(e,t){var i,r=this.buttonStates,n=r[e]=r[e]||{};t.pressed!==n.pressed&&(i=t.pressed?"down":"up",this.el.emit("button"+i,{id:e}),n.pressed=t.pressed)},handleTouch:function(e,t){var i,r=this.buttonStates,n=r[e]=r[e]||{};return t.touched!==n.touched&&(i=t.touched?"start":"end",n.touched=t.touched,this.el.emit("touch"+i,{id:e,state:n}),!0)},handleValue:function(e,t){var i=this.buttonStates,r=i[e]=i[e]||{};return t.value!==r.value&&(r.value=t.value,!0)}})},{"../core/component":59,"../lib/three":103}],47:[function(e,t,i){var r=e("../core/component").registerComponent;t.exports.Component=r("visible",{schema:{"default":!0},update:function(){this.el.object3D.visible=this.data}})},{"../core/component":59}],48:[function(e,t,i){var r=e("../core/component").registerComponent,n="path_to_url",o="path_to_url";t.exports.Component=r("vive-controls",{dependencies:["tracked-controls"],schema:{hand:{"default":"left"},buttonColor:{"default":"#FAFAFA"},buttonHighlightColor:{"default":"#22D1EE"},model:{"default":!0}},mapping:{axis0:"trackpad",axis1:"trackpad",button0:"trackpad",button1:"trigger",button2:"grip",button3:"menu",button4:"system"},init:function(){var e=this;this.animationActive="pointing",this.onButtonChanged=this.onButtonChanged.bind(this),this.onButtonDown=function(t){e.onButtonEvent(t.detail.id,"down")},this.onButtonUp=function(t){e.onButtonEvent(t.detail.id,"up")},this.onModelLoaded=this.onModelLoaded.bind(this)},play:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("model-loaded",this.onModelLoaded)},pause:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("model-loaded",this.onModelLoaded)},update:function(){var e=this.el,t=this.data,i="url("+n+")",r="url("+o+")",a="right"===t.hand?0:1;e.setAttribute("tracked-controls","controller",a),t.model&&e.setAttribute("obj-model",{obj:i,mtl:r})},onButtonChanged:function(e){var t,i=this.mapping["button"+e.detail.id],r=this.buttonMeshes;"trigger"===i&&r&&(t=e.detail.state.value,r.trigger.rotation.x=-t*(Math.PI/12))},onModelLoaded:function(e){var t,i=e.detail.model;this.data.model&&(t=this.buttonMeshes={},t.grip={left:i.getObjectByName("leftgrip"),right:i.getObjectByName("rightgrip")},t.menu=i.getObjectByName("menubutton"),t.system=i.getObjectByName("systembutton"),t.trackpad=i.getObjectByName("touchpad"),t.trigger=i.getObjectByName("trigger"),i.position.set(0,-.015,.04))},onButtonEvent:function(e,t){var i=this.mapping["button"+e];this.el.emit(i+t),this.data.model&&this.updateModel(i,t)},updateModel:function(e,t){var i="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,r=this.buttonMeshes;if(r)return"grip"===e?(r.grip.left.material.color.set(i),void r.grip.right.material.color.set(i)):void r[e].material.color.set(i)}})},{"../core/component":59}],49:[function(e,t,i){var r=e("../core/component").registerComponent,n=e("../utils/").shouldCaptureKeyEvent,o=e("../lib/three"),a=.2;t.exports.Component=r("wasd-controls",{schema:{easing:{"default":20},acceleration:{"default":65},enabled:{"default":!0},fly:{"default":!1},wsAxis:{"default":"z",oneOf:["x","y","z"]},adAxis:{"default":"x",oneOf:["x","y","z"]},wsInverted:{"default":!1},wsEnabled:{"default":!0},adInverted:{"default":!1},adEnabled:{"default":!0}},init:function(){this.velocity=new o.Vector3,this.keys={},this.onBlur=this.onBlur.bind(this),this.onFocus=this.onFocus.bind(this),this.onVisibilityChange=this.onVisibilityChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.attachVisibilityEventListeners()},update:function(e){var t,i=this.data,r=i.acceleration,n=i.easing,o=this.velocity,s=this.prevTime=this.prevTime||Date.now(),c=window.performance.now(),u=(c-s)/1e3,l=this.keys,h=i.adAxis,d=i.wsAxis,p=i.adInverted?-1:1,f=i.wsInverted?-1:1,m=this.el;if(this.prevTime=c,e||u>a)return o[h]=0,void(o[d]=0);o[h]-=o[h]*n*u,o[d]-=o[d]*n*u;var g=m.getComputedAttribute("position");i.enabled&&(i.adEnabled&&(l[65]&&(o[h]-=p*r*u),l[68]&&(o[h]+=p*r*u)),i.wsEnabled&&(l[87]&&(o[d]-=f*r*u),l[83]&&(o[d]+=f*r*u))),t=this.getMovementVector(u),m.object3D.translateX(t.x),m.object3D.translateY(t.y),m.object3D.translateZ(t.z),m.setAttribute("position",{x:g.x+t.x,y:g.y+t.y,z:g.z+t.z})},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},tick:function(e){this.update()},remove:function(){this.pause(),this.removeVisibilityEventListeners()},attachVisibilityEventListeners:function(){window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),document.addEventListener("visibilitychange",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),document.removeEventListener("visibilitychange",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){n(e)&&(this.keys[e.keyCode]=!0)},onKeyUp:function(e){n(e)&&(this.keys[e.keyCode]=!1)},getMovementVector:function(e){var t=new o.Vector3(0,0,0),i=new o.Euler(0,0,0,"YXZ");return function(e){var r=this.velocity,n=this.el.getComputedAttribute("rotation");return t.copy(r),t.multiplyScalar(e),n?(this.data.fly||(n.x=0),i.set(o.Math.degToRad(n.x),o.Math.degToRad(n.y),0),t.applyEuler(i),t):t}}()})},{"../core/component":59,"../lib/three":103,"../utils/":120}],50:[function(e,t,i){var r=e("tween.js"),n={alternate:"alternate",alternateReverse:"alternate-reverse",normal:"normal",reverse:"reverse"},o={linear:r.Easing.Linear.None,ease:r.Easing.Cubic.InOut,"ease-in":r.Easing.Cubic.In,"ease-out":r.Easing.Cubic.Out,"ease-in-out":r.Easing.Cubic.InOut,"ease-cubic":r.Easing.Cubic.In,"ease-in-cubic":r.Easing.Cubic.In,"ease-out-cubic":r.Easing.Cubic.Out,"ease-in-out-cubic":r.Easing.Cubic.InOut,"ease-quad":r.Easing.Quadratic.InOut,"ease-in-quad":r.Easing.Quadratic.In,"ease-out-quad":r.Easing.Quadratic.Out,"ease-in-out-quad":r.Easing.Quadratic.InOut,"ease-quart":r.Easing.Quartic.InOut,"ease-in-quart":r.Easing.Quartic.In,"ease-out-quart":r.Easing.Quartic.Out,"ease-in-out-quart":r.Easing.Quartic.InOut,"ease-quint":r.Easing.Quintic.InOut,"ease-in-quint":r.Easing.Quintic.In,"ease-out-quint":r.Easing.Quintic.Out,"ease-in-out-quint":r.Easing.Quintic.InOut,"ease-sine":r.Easing.Sinusoidal.InOut,"ease-in-sine":r.Easing.Sinusoidal.In,"ease-out-sine":r.Easing.Sinusoidal.Out,"ease-in-out-sine":r.Easing.Sinusoidal.InOut,"ease-expo":r.Easing.Exponential.InOut,"ease-in-expo":r.Easing.Exponential.In,"ease-out-expo":r.Easing.Exponential.Out,"ease-in-out-expo":r.Easing.Exponential.InOut,"ease-circ":r.Easing.Circular.InOut,"ease-in-circ":r.Easing.Circular.In,"ease-out-circ":r.Easing.Circular.Out,"ease-in-out-circ":r.Easing.Circular.InOut,"ease-elastic":r.Easing.Elastic.InOut,"ease-in-elastic":r.Easing.Elastic.In,"ease-out-elastic":r.Easing.Elastic.Out,"ease-in-out-elastic":r.Easing.Elastic.InOut,"ease-back":r.Easing.Back.InOut,"ease-in-back":r.Easing.Back.In,"ease-out-back":r.Easing.Back.Out,"ease-in-out-back":r.Easing.Back.InOut,"ease-bounce":r.Easing.Bounce.InOut,"ease-in-bounce":r.Easing.Bounce.In,"ease-out-bounce":r.Easing.Bounce.Out,"ease-in-out-bounce":r.Easing.Bounce.InOut},a={backwards:"backwards",both:"both",forwards:"forwards",none:"none"},s={indefinite:"indefinite"},c={attribute:"rotation",begin:"",end:"",delay:0,dur:1e3,easing:"ease",direction:n.normal,fill:a.forwards,from:void 0,repeat:0,to:void 0};t.exports.defaults=c,t.exports.directions=n,t.exports.easingFunctions=o,t.exports.fills=a,t.exports.repeats=s},{"tween.js":18}],51:[function(e,t,i){t.exports={AFRAME_INJECTED:"aframe-injected",animation:e("./animation")}},{"./animation":50}],52:[function(e,t,i){function r(e){return v.extend({},e)}function n(e,t,i,r,n){function s(){var t=E[0],i=E[1],r=e.components[t],n=r&&r.schema;return n&&n[i]&&"color"===n[i].type}function c(){x=E[0],A=E[1],M=e.components[x],M||(e.setAttribute(x,""),M=e.components[x]),v=M.schema,void 0===i?T[t]=y(e,t):T[t]=i,T[t]=p(T[t],v[A]),L[t]=p(r,v[A]),w=function(i){t in i&&e.setAttribute(x,A,i[t])}}function l(){T=i?d.parse(i):n,L=d.parse(r),w=function(i){e.setAttribute(t,i)}}function h(){void 0===i?T[t]=!1:T[t]=o(i),T[t]=a(T[t]),L[t]=a(o(r)),w=function(i){e.setAttribute(t,!!i[t])}}function f(){T=new g.Color(i),L=new g.Color(r),w=function(i){E.length>1&&e.setAttribute(E[0],E[1],u(i)),e.setAttribute(t,u(i))}}function m(){void 0===i?T[t]=parseFloat(e.getAttribute(t)):T[t]=parseFloat(i),L[t]=parseFloat(r),w=function(i){e.setAttribute(t,i[t])}}var v,M,A,x,w,E=t.split("."),T={},L={};return 2===E.length?s()?f():c():r&&b(r)?l():["true","false"].indexOf(r)!==-1?h():isNaN(r)?f():m(),{from:T,partialSetAttribute:w,to:L}}function o(e){return"true"===e}function a(e){return e?1:0}function s(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function c(e){return Math.floor(255*Math.min(Math.abs(e),1))}function u(e){return"#"+["r","g","b"].map(function(t){return s(c(e[t]))}).join("")}var l=e("./a-node"),h=e("../constants/animation"),d=e("../utils/").coordinates,p=e("./schema").parseProperty,f=e("./a-register-element").registerElement,m=e("tween.js"),g=e("../lib/three"),v=e("../utils/"),y=v.entity.getComponentProperty,M=h.defaults,A=h.directions,x=h.easingFunctions,w=h.fills,E=h.repeats,b=d.isCoordinate;t.exports.AAnimation=f("a-animation",{prototype:Object.create(l.prototype,{createdCallback:{value:function(){this.bindMethods(),this.isRunning=!1,this.partialSetAttribute=function(){},this.tween=null}},attachedCallback:{value:function(){this.el=this.parentNode,this.handleMixinUpdate(),this.update(),this.load()}},attributeChangedCallback:{value:function(e,t,i){this.hasLoaded&&this.isRunning&&(this.stop(),this.handleMixinUpdate(),this.update())}},detachedCallback:{value:function(){this.isRunning&&this.stop()}},getTween:{value:function(){var e,t,i,o,a=this,s=a.data,c=a.el,u=s.attribute,l=parseInt(s.delay,10),h=y(c,u),d=a.getDirection(s.direction),p=x[s.easing],f=s.fill,g=s.repeat===E.indefinite?1/0:0,v=!1;return e=n(c,u,s.from||a.initialValue,s.to,h),t=e.from,i=e.to,a.partialSetAttribute=e.partialSetAttribute,void 0===a.count&&(a.count=g===1/0?0:parseInt(s.repeat,10)),isNaN(l)&&(l=0),a.initialValue=a.initialValue||r(h),g===1/0&&f===w.forwards&&[A.alternate,A.alternateReverse].indexOf(s.direction)!==-1&&(v=!0),d===A.reverse&&(o=i,i=r(t),t=r(o)),[w.backwards,w.both].indexOf(f)!==-1&&a.partialSetAttribute(t),new m.Tween(r(t)).to(i,s.dur).delay(l).easing(p).repeat(g).yoyo(v).onUpdate(function(){a.partialSetAttribute(this)}).onComplete(a.onCompleted.bind(a))}},update:{value:function(){var e=this.data;"infinite"===e.repeat&&console.warn("Using 'infinite' as 'repeat' value is invalid. Use 'indefinite' instead."),""===e.begin||isNaN(e.begin)||(console.warn("Using 'begin' to specify a delay is deprecated. Use 'delay' instead."),e.delay=e.begin,e.begin="");var t=e.begin,i=e.end;this.evt&&this.removeEventListeners(this.evt),this.evt={begin:t,end:i},this.addEventListeners(this.evt),""===t&&(this.stop(),this.start())},writable:window.debug},onCompleted:{value:function(){var e=this.data;return this.isRunning=!1,[w.backwards,w.none].indexOf(e.fill)!==-1&&this.partialSetAttribute(this.initialValue),0===this.count?(this.count=void 0,void this.emit("animationend")):(this.isRunning=!1,this.count--,void this.start())}},start:{value:function(){var e=this;return this.el.hasLoaded?void(!this.isRunning&&this.el.isPlaying&&(this.tween=this.getTween(),this.isRunning=!0,this.tween.start(),this.emit("animationstart"))):void this.el.addEventListener("loaded",function(){e.start()})},writable:!0},stop:{value:function(){var e=this.tween;e&&(e.stop(),this.isRunning=!1,[w.backwards,w.none].indexOf(this.data.fill)!==-1&&this.partialSetAttribute(this.initialValue),this.emit("animationstop"))},writable:!0},getDirection:{value:function(e){return e===A.alternate?(this.prevDirection=this.prevDirection===A.normal?A.reverse:A.normal,this.prevDirection):e===A.alternateReverse?(this.prevDirection=this.prevDirection===A.reverse?A.normal:A.reverse,this.prevDirection):e}},bindMethods:{value:function(){this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.onStateAdded=this.onStateAdded.bind(this),this.onStateRemoved=this.onStateRemoved.bind(this)}},addEventListeners:{value:function(e){var t=this.el,i=this;v.splitString(e.begin).forEach(function(e){t.addEventListener(e,i.start)}),v.splitString(e.end).forEach(function(e){t.addEventListener(e,i.stop)}),""===e.begin&&t.addEventListener("play",this.start),t.addEventListener("pause",this.stop),t.addEventListener("stateadded",this.onStateAdded),t.addEventListener("stateremoved",this.onStateRemoved)}},removeEventListeners:{value:function(e){var t=this.el,i=this.start,r=this.stop;v.splitString(e.begin).forEach(function(e){t.removeEventListener(e,i)}),v.splitString(e.end).forEach(function(e){t.removeEventListener(e,r)}),t.removeEventListener("stateadded",this.onStateAdded),t.removeEventListener("stateremoved",this.onStateRemoved)}},onStateAdded:{value:function(e){e.detail.state===this.data.begin&&this.start()},writable:!0},onStateRemoved:{value:function(e){e.detail.state===this.data.begin&&this.stop()},writable:!0},handleMixinUpdate:{value:function(){var e,t,i,r={};i=document.querySelector("#"+this.getAttribute("mixin")),t=i?v.getElData(i,M):{},e=v.getElData(this,M),v.extend(r,M,t,e),this.data=r}}})}),t.exports.getAnimationValues=n},{"../constants/animation":50,"../lib/three":103,"../utils/":120,"./a-node":57,"./a-register-element":58,"./schema":66,"tween.js":18}],53:[function(e,t,i){function r(e){if(e.hasAttribute("autoplay")||"auto"===e.getAttribute("preload"))return new Promise(function(t,i){function r(){for(var i=0,r=0;r<e.buffered.length;r++)i+=e.buffered.end(r)-e.buffered.start(r);i>=e.duration&&t()}return 4===e.readyState?t():e.error?i():(e.addEventListener("loadeddata",r,!1),e.addEventListener("progress",r,!1),void e.addEventListener("error",i,!1))})}function n(e){var t,i;return e.hasAttribute("crossorigin")?e:(i=e.getAttribute("src"),i.indexOf("://")===-1?e:o(i)===window.location.host?e:(h("Cross-origin element was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set.",i),e.crossOrigin="anonymous",t=e.cloneNode(!0),e.parentNode.appendChild(t),e.parentNode.removeChild(e),t))}function o(e){var t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0];return t.split(":")[0]}var a=e("./a-node"),s=e("../utils/debug"),c=e("./a-register-element").registerElement,u=e("../lib/three"),l=new u.XHRLoader,h=s("core:a-assets:warn");t.exports=c("a-assets",{prototype:Object.create(a.prototype,{createdCallback:{value:function(){this.isAssets=!0}},attachedCallback:{value:function(){var e,t,i,o,a,s,c=this,u=[];if(!this.parentNode.isScene)throw new Error("<a-assets> must be a child of a <a-scene>.");for(a=this.querySelectorAll("img"),e=0;e<a.length;e++)o=n(a[e]),u.push(new Promise(function(e,t){o.onload=e,o.onerror=t}));for(i=this.querySelectorAll("audio, video"),e=0;e<i.length;e++)t=n(i[e]),u.push(r(t));Promise.all(u).then(this.load.bind(this)),s=parseInt(this.getAttribute("timeout"),10)||3e3,setTimeout(function(){c.hasLoaded||(h("Asset loading timed out in ",s,"ms"),c.emit("timeout"),c.load())},s)}},load:{value:function(){a.prototype.load.call(this,null,function(e){return e.isAssetItem&&e.hasAttribute("src")})}}})}),c("a-asset-item",{prototype:Object.create(a.prototype,{createdCallback:{value:function(){this.data=null,this.isAssetItem=!0}},attachedCallback:{value:function(){var e=this,t=t=this.getAttribute("src");l.load(t,function(i){u.Cache.files[t]=i,e.data=i,setTimeout(function(){a.prototype.load.call(e)})})}}})})},{"../lib/three":103,"../utils/debug":117,"./a-node":57,"./a-register-element":58}],54:[function(e,t,i){var r=e("../utils/debug"),n=e("./a-register-element").registerElement,o=r("core:cubemap:warn");t.exports=n("a-cubemap",{prototype:Object.create(HTMLElement.prototype,{attachedCallback:{value:function(){this.srcs=this.validate()},writable:window.debug},validate:{value:function(){var e,t=this.querySelectorAll("[src]"),i=[];if(6===t.length){for(e=0;e<t.length;e++)i.push(t[e].getAttribute("src"));return i}o("<a-cubemap> did not contain exactly six elements each with a `src` attribute.")},writable:window.debug}})})},{"../utils/debug":117,"./a-register-element":58}],55:[function(e,t,i){function r(e,t){return void 0!==e.defaultComponents[t]||(!(!e.components[t]||!e.components[t].attrValue)||o(t,e.mixinEls))}function n(e){var t=[];return e.mixinEls.forEach(function(e){function i(e){t.push(e)}Object.keys(e.componentCache).forEach(i)}),t}function o(e,t){var i,r=!1;for(i=0;i<t.length&&!(r=t[i].hasAttribute(e));++i);return r}var a,s=e("./a-node"),c=e("./component").components,u=e("./a-register-element").registerElement,l=e("../lib/three"),h=e("../utils/"),d=h.debug("core:a-entity:debug"),p="__",f=Object.create(s.prototype,{defaultComponents:{value:{position:"",rotation:"",scale:"",visible:""}},createdCallback:{value:function(){this.components={},this.isEntity=!0,this.isPlaying=!1,this.object3D=new l.Group,this.object3D.el=this,this.object3DMap={},this.parentEl=null,this.states=[]}},attributeChangedCallback:{value:function(e,t,i){var r=this.components[e];return r&&r.justInitialized&&""===i?void delete r.justInitialized:void((r||null!==i)&&this.setEntityAttribute(e,t,i))}},attachedCallback:{value:function(){var e,t=this.sceneEl,i=this;if(this.addToParent(),!this.isScene)return t?(e=t.querySelector("a-assets"),e&&!e.hasLoaded?void e.addEventListener("loaded",function(){i.load()}):void this.load()):void this.load()}},detachedCallback:{value:function(){this.parentEl&&!this.isScene&&(Object.keys(this.components).forEach(this.removeComponent.bind(this)),this.parentEl.remove(this))}},handleMixinUpdate:{value:function(e){return e?void this.updateComponent(e,this.getAttribute(e)):void this.updateComponents()}},mapStateMixins:{value:function(e,t){var i,r=this.getAttribute("mixin");r&&(i=r.split(" "),i.forEach(function(i){var r=i+"-"+e;t(r)}),this.updateComponents())}},updateStateMixins:{value:function(e,t){var i=this;t=t||"";var r=e.split(" "),n=t?t.split(" "):[],o=n.filter(function(e){return r.indexOf(e)<0});o.forEach(function(e){var t=Array.prototype.forEach,r=document.querySelectorAll("[id^="+e+"-]");t.call(r,function(e){i.unregisterMixin(e.id)})}),this.states.forEach(function(e){r.forEach(function(t){var r=t+"-"+e;i.registerMixin(r)})})}},getObject3D:{value:function(e){return this.object3DMap[e]}},setObject3D:{value:function(e,t){var i=this,r=this.object3DMap[e];r&&this.object3D.remove(r),t instanceof l.Object3D&&(t.el=i,this.object3D.add(t),t.children.length&&t.traverse(function(e){e.el=i})),this.object3DMap[e]=t}},removeObject3D:{value:function(e){this.setObject3D(e,null)}},getOrCreateObject3D:{value:function(e,t){var i=this.getObject3D(e);return!i&&t&&(i=new t,this.setObject3D(e,i)),i}},add:{value:function(e){if(!e.object3D)throw new Error("Trying to add an element that doesn't have an `object3D`");this.object3D.add(e.object3D),this.emit("child-attached",{el:e})}},addToParent:{value:function(){var e=this.parentEl=this.parentNode;e&&e.add&&!this.attachedToParent&&(e.add(this),this.attachedToParent=!0)}},load:{value:function(){function e(){t.updateComponents(),(t.isScene||t.parentEl.isPlaying)&&t.play()}var t=this;this.hasLoaded||s.prototype.load.call(this,e)},writable:window.debug},remove:{value:function(e){this.object3D.remove(e.object3D)}},getChildEntities:{value:function(){for(var e=this.children,t=[],i=0;i<e.length;i++){var r=e[i];r instanceof a&&t.push(r)}return t}},initComponent:{value:function(e,t,i){var n,o=e.split(p),a=o[1],s=o[0],u=r(this,e)||void 0!==t;if(c[s]&&(u||i)&&!(e in this.components)){if(this.initComponentDependencies(s),a&&!c[s].multiple)throw new Error("Trying to initialize multiple components of type `"+s+"`. There can only be one component of this type per entity.");n=this.components[e]=new c[s].Component(this,t,a),this.isPlaying&&n.play(),this.hasAttribute(e)||(n.justInitialized=!0,HTMLElement.prototype.setAttribute.call(this,e,"")),d("Component initialized: %s",e)}},writable:window.debug},initComponentDependencies:{value:function(e){var t,i=this,r=c[e];r&&(t=c[e].dependencies,t&&t.forEach(function(e){i.initComponent(e,void 0,!0)}))}},removeComponent:{value:function(e){var t=this.components[e],i=e in this.defaultComponents,r=o(e,this.mixinEls);i||r||(t.pause(),t.remove(),delete this.components[e],this.emit("componentremoved",{name:e}))}},updateComponents:{value:function(){function e(e){var t=e.split(p)[0];c[t]&&(r[e]=!0)}function t(e){var t=o.getAttribute(e);delete r[e],o.updateComponent(e,t)}var i,r={},o=this;if(this.hasLoaded){var a=this.attributes;for(i=0;i<a.length;++i)e(a[i].name);n(this).forEach(e),Object.keys(this.defaultComponents).forEach(t),Object.keys(r).forEach(t)}}},updateComponent:{value:function(e,t){var i=this.components[e],r=e in this.defaultComponents;return i?null!==t||r?void i.updateProperties(t):void this.removeComponent(e):void this.initComponent(e,t,!1)}},updateComponentProperty:{value:function(e,t,i){var r=this.components[e],n=r&&r.attrValue,o=n?h.extend({},n):{};o[t]=i,this.updateComponent(e,o)}},removeAttribute:{value:function(e){var t=this.components[e];t&&(this.setEntityAttribute(e,void 0,null),this.components[e])||HTMLElement.prototype.removeAttribute.call(this,e)}},play:{value:function(){var e=this.components,t=Object.keys(e);!this.isPlaying&&this.hasLoaded&&(this.isPlaying=!0,t.forEach(function(t){e[t].play()}),this.getChildEntities().forEach(function(e){e.play()}),this.emit("play"))},writable:!0},pause:{value:function(){var e=this.components,t=Object.keys(e);this.isPlaying&&(this.isPlaying=!1,t.forEach(function(t){e[t].pause()}),this.getChildEntities().forEach(function(e){e.pause()}),this.emit("pause"))},writable:!0},setEntityAttribute:{value:function(e,t,i){return c[e]||this.components[e]?void this.updateComponent(e,i):"mixin"===e?void this.mixinUpdate(i,t):void 0}},mixinUpdate:{value:function(e,t){t=t||this.getAttribute("mixin"),this.updateStateMixins(e,t),this.updateComponents()}},setAttribute:{value:function(e,t,i){var r=this.sceneEl&&this.sceneEl.getAttribute("debug"),n=e.split(p)[0];return c[n]?("string"==typeof t&&void 0!==i?this.updateComponentProperty(e,t,i):this.updateComponent(e,t),void(r&&this.components[e].flushToDOM())):(s.prototype.setAttribute.call(this,e,t),void("mixin"===e&&this.mixinUpdate(t)))},writable:window.debug},flushToDOM:{value:function(e){function t(e){n[e].flushToDOM()}var i,r,n=this.components,o=this.children;if(Object.keys(n).forEach(t),e)for(r=0;r<o.length;++r)i=o[r],i.flushToDOM&&i.flushToDOM(e)}},getAttribute:{value:function(e){var t=this.components[e];return t?t.attrValue:HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},getComputedAttribute:{value:function(e){var t=this.components[e];return t?t.getData():HTMLElement.prototype.getAttribute.call(this,e)}},addState:{value:function(e){this.is(e)||(this.states.push(e),this.mapStateMixins(e,this.registerMixin.bind(this)),this.emit("stateadded",{state:e}))}},removeState:{value:function(e){var t=this.states.indexOf(e);t!==-1&&(this.states.splice(t,1),this.mapStateMixins(e,this.unregisterMixin.bind(this)),this.emit("stateremoved",{state:e}))}},is:{value:function(e){return this.states.indexOf(e)!==-1}}});a=u("a-entity",{prototype:f}),t.exports=a},{"../lib/three":103,"../utils/":120,"./a-node":57,"./a-register-element":58,"./component":59}],56:[function(e,t,i){var r=e("./a-node"),n=e("./a-register-element").registerElement,o=e("./component").components;t.exports=n("a-mixin",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.componentCache={},this.id=this.getAttribute("id")}},attributeChangedCallback:{value:function(e,t,i){this.cacheAttribute(e,i)}},attachedCallback:{value:function(){this.sceneEl=this.closest("a-scene"),this.cacheAttributes(),this.updateEntities(),this.load()}},setAttribute:{value:function(e,t){this.cacheAttribute(e,t),HTMLElement.prototype.setAttribute.call(this,e,t)}},cacheAttribute:{value:function(e,t){var i=o[e];i&&(void 0===t&&(t=HTMLElement.prototype.getAttribute.call(this,e)),this.componentCache[e]=i.parseAttrValueForCache(t))}},getAttribute:{value:function(e){return this.componentCache[e]||HTMLElement.prototype.getAttribute.call(this,e)}},cacheAttributes:{value:function(){var e,t,i=this.attributes;for(t=0;t<i.length;t++)e=i[t].name,this.cacheAttribute(e)}},updateEntities:{value:function(){if(this.sceneEl)for(var e=this.sceneEl.querySelectorAll("[mixin~="+this.id+"]"),t=0;t<e.length;t++){var i=e[t];i.hasLoaded&&(i.registerMixin(this.id),Object.keys(this.componentCache).forEach(function(e){i.updateComponent(e)}))}}}})})},{"./a-node":57,"./a-register-element":58,"./component":59}],57:[function(e,t,i){var r=e("./a-register-element").registerElement,n=e("../utils/");t.exports=r("a-node",{prototype:Object.create(HTMLElement.prototype,{createdCallback:{value:function(){this.hasLoaded=!1,this.isNode=!0,this.mixinEls=[],this.mixinObservers={}},writable:window.debug},attachedCallback:{value:function(){var e=this.getAttribute("mixin");this.sceneEl=this.closestScene(),this.emit("nodeready",{},!1),e&&this.updateMixins(e)},writable:window.debug},attributeChangedCallback:{value:function(e,t,i){"mixin"===e&&this.updateMixins(i,t)}},closestScene:{value:function(){for(var e=this;e&&!e.isScene;)e=e.parentElement;return e}},closest:{value:function(e){for(var t=this.matches||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector,i=this;i&&!t.call(i,e);)i=i.parentElement;return i}},detachedCallback:{value:function(){}},load:{value:function(e,t){var i,r,n=this;this.hasLoaded||(t=t||function(e){return e.isNode},i=this.getChildren(),r=i.filter(t).map(function(e){return new Promise(function(t){return e.hasLoaded?t():void e.addEventListener("loaded",t)})}),Promise.all(r).then(function(){n.hasLoaded=!0,e&&e(),n.emit("loaded",{},!1)}))},writable:!0},getChildren:{value:function(){return Array.prototype.slice.call(this.children,0)}},updateMixins:{value:function(e,t){var i=e.split(" "),r=t?t.split(" "):[],n=r.filter(function(e){return i.indexOf(e)<0});this.mixinEls=[],n.forEach(this.unregisterMixin.bind(this)),i.forEach(this.registerMixin.bind(this))}},registerMixin:{value:function(e){if(this.sceneEl){var t=this.sceneEl.querySelector("a-mixin#"+e);t&&(this.attachMixinListener(t),this.mixinEls.push(t))}}},setAttribute:{value:function(e,t){"mixin"===e&&this.updateMixins(t),HTMLElement.prototype.setAttribute.call(this,e,t)}},unregisterMixin:{value:function(e){var t,i,r=this.mixinEls;for(i=0;i<r.length;++i)if(t=r[i],e===t.id){r.splice(i,1);break}this.removeMixinListener(e)}},removeMixinListener:{value:function(e){var t=this.mixinObservers[e];t&&(t.disconnect(),this.mixinObservers[e]=null)}},attachMixinListener:{value:function(e){var t=this,i=e.id,r=this.mixinObservers[i];if(e&&!r){var n=new MutationObserver(function(e){var i=e[0].attributeName;t.handleMixinUpdate(i)}),o={attributes:!0};n.observe(e,o),this.mixinObservers[i]=n}}},handleMixinUpdate:{value:function(){}},emit:{value:function(e,t,i){var r=this;t=t||{},void 0===i&&(i=!0);var o={bubbles:!!i,detail:t};return e.split(" ").map(function(e){return n.fireEvent(r,e,o)})}},emitter:{value:function(e,t,i){var r=this;return function(){r.emit(e,t,i)}}}})})},{"../utils/":120,"./a-register-element":58}],58:[function(e,t,i){function r(e){h[e.toLowerCase()]=!0}function n(e){var t={},i=["attachedCallback","attributeChangedCallback","createdCallback"];return a(t,i,e,u.prototype),c(e,t),t}function o(e){var t={},i=["attachedCallback","attributeChangedCallback","createdCallback"],r=["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"];return a(t,i,e,u.prototype),a(t,r,e,l.prototype),c(e,t),t}function a(e,t,i,r){t.forEach(function(t){s(e,t,i,r)})}function s(e,t,i,r){var n=i[t],o=r[t];n&&o&&n!==o&&(e[t]={value:function(){return o.apply(this,arguments),n.apply(this,arguments)},writable:window.debug})}function c(e,t){var i=Object.getOwnPropertyNames(e);i.forEach(function(i){var r;t[i]||(r=Object.getOwnPropertyDescriptor(e,i),t[i]={value:e[i],writable:r.writable})})}e("document-register-element");var u,l,h=t.exports.knownTags={};t.exports.isNode=function(e){return e.tagName.toLowerCase()in h||e.isNode},t.exports.registerElement=function(e,t){var i=Object.getPrototypeOf(t.prototype),a=t,s=u&&i===u.prototype,c=l&&i===l.prototype;return(s||c)&&r(e),s&&(a=n(t.prototype),a={prototype:Object.create(i,a)}),c&&(a=o(t.prototype),a={prototype:Object.create(i,a)}),document.registerElement(e,a)},t.exports.wrapMethods=a,u=e("./a-node"),l=e("./a-entity")},{"./a-entity":55,"./a-node":57,"document-register-element":8}],59:[function(e,t,i){function r(e,t,i,r,o){function a(e){var i=e.getAttribute(t);i&&(s=n(s,i,u))}var s,c=void 0!==r&&null!==r,u=f(i),l=e.mixinEls;return u?s=i["default"]:(s={},Object.keys(i).forEach(function(e){s[e]=i[e]["default"]})),l.forEach(a),c?u?d(r,i):(s=n(s,r,u),h(s,i,void 0,t,o)):u?d(s,i):h(s,i,void 0,t,o)}function n(e,t,i){return i?t:u.extend(e,t)}function o(e){return function(){var t=this.el.sceneEl;this.isPlaying&&(e.call(this),this.isPlaying=!1,this.tick&&t.removeBehavior(this))}}function a(e){return function(){var t=this.el.sceneEl,i=this.el.isPlaying&&!this.isPlaying;this.initialized&&i&&(e.call(this),this.isPlaying=!0,this.tick&&t.addBehavior(this))}}var s=e("./schema"),c=e("./system"),u=e("../utils/"),l=t.exports.components={},h=s.parseProperties,d=s.parseProperty,p=s.process,f=s.isSingleProperty,m=s.stringifyProperties,g=s.stringifyProperty,v=u.styleParser,y=t.exports.Component=function(e,t,i){this.el=e,this.id=i,this.attrName=this.name+(i?"__"+i:""), this.updateCachedAttrValue(t)};y.prototype={schema:{},init:function(){},update:function(e){},updateSchema:void 0,tick:void 0,play:function(){},pause:function(){},remove:function(){},parse:function(e,t){var i=this.schema;return f(i)?d(e,i):h(v.parse(e),i,!0,this.name,t)},stringify:function(e){var t=this.schema;return"string"==typeof e?e:f(t)?g(e,t):(e=m(e,t),v.stringify(e))},getData:function(){var e=this.data;return"object"!=typeof e?e:u.extend({},e)},updateCachedAttrValue:function(e){var t=f(this.schema),i=this.parseAttrValueForCache(e);this.attrValue=n({},i,t)},parseAttrValueForCache:function(e){var t;return"string"!=typeof e?e:(f(this.schema)?(t=this.schema.parse(e),"string"==typeof t&&(t=e)):t=v.parse(e),t)},flushToDOM:function(){var e=this.attrValue;e&&HTMLElement.prototype.setAttribute.call(this.el,this.attrName,this.stringify(e))},updateProperties:function(e){var t=this.el,i=f(this.schema),o=n({},this.data,i);void 0!==e&&this.updateCachedAttrValue(e),this.updateSchema&&this.updateSchema(r(t,this.name,this.schema,this.attrValue,!0)),this.data=r(t,this.name,this.schema,this.attrValue),!i&&u.deepEqual(o,this.data)||(this.initialized?this.update(o):(this.init(),this.initialized=!0,this.update(o),t.isPlaying&&this.play()),t.emit("componentchanged",{id:this.id,name:this.name,newData:this.getData(),oldData:o},!1))},extendSchema:function(e){var t=u.extend({},l[this.name].schema);u.extend(t,e),this.schema=p(t),this.el.emit("schemachanged",{component:this.name})}},t.exports.registerComponent=function(e,t){var i,r={};if(e.indexOf("__")!==-1)throw new Error("The component name `"+e+"` is not allowed. The sequence __ (double underscore) is reserved to specify an id for multiple components of the same type");if(Object.keys(t).forEach(function(e){r[e]={value:t[e],writable:!0}}),l[e])throw new Error("The component `"+e+"` has been already registered. Check that you are not loading two versions of the same component or two different components of the same name.");return i=function(e,t,i){y.call(this,e,t,i),e.hasLoaded&&this.updateProperties(this.attrValue)},i.prototype=Object.create(y.prototype,r),i.prototype.name=e,i.prototype.constructor=i,i.prototype.system=c&&c.systems[e],i.prototype.play=a(i.prototype.play),i.prototype.pause=o(i.prototype.pause),l[e]={Component:i,dependencies:i.prototype.dependencies,multiple:i.prototype.multiple,parse:i.prototype.parse,parseAttrValueForCache:i.prototype.parseAttrValueForCache,schema:u.extend(p(i.prototype.schema)),stringify:i.prototype.stringify,type:i.prototype.type},i},t.exports.buildData=r},{"../utils/":120,"./schema":66,"./system":68}],60:[function(e,t,i){var r=e("./schema"),n=r.process,o=t.exports.geometries={},a=t.exports.geometryNames=[],s=e("../lib/three"),c=t.exports.Geometry=function(){};c.prototype={schema:{},init:function(e){return this.geometry=new s.Geometry,this.geometry},update:function(e){}},t.exports.registerGeometry=function(e,t){var i,r={};if(Object.keys(t).forEach(function(e){r[e]={value:t[e],writable:!0}}),o[e])throw new Error("The geometry `"+e+"` has been already registered");return i=function(){c.call(this)},i.prototype=Object.create(c.prototype,r),i.prototype.name=e,i.prototype.constructor=i,o[e]={Geometry:i,schema:n(i.prototype.schema)},a.push(e),i}},{"../lib/three":103,"./schema":66}],61:[function(e,t,i){function r(e,t,i,r){return"type"in A?void M("Property type "+e+" is already registered."):void(A[e]={"default":t,parse:i||a,stringify:r||s})}function n(e){function t(e){return e.trim()}return Array.isArray(e)?e:e&&"string"==typeof e?e.split(",").map(t):[]}function o(e){return e.join(", ")}function a(e){return e}function s(e){return null===e?"null":e.toString()}function c(e){return"false"!==e&&e!==!1}function u(e){return parseInt(e,10)}function l(e){return parseFloat(e,10)}function h(e){return e?"string"!=typeof e?e:document.querySelector(e):null}function d(e){return e?"string"!=typeof e?e:Array.prototype.slice.call(document.querySelectorAll(e),0):null}function p(e){return e.getAttribute?"#"+e.getAttribute("id"):s(e)}function f(e){return e instanceof Array?e.map(function(e){return"#"+e.getAttribute("id")}).join(", "):s(e)}function m(e){var t=e.match(/\url\((.+)\)/);if(t)return t[1];var i=h(e);return i?i.getAttribute("src"):""}function g(e){return v.parse(e,this["default"])}var v=e("../utils/coordinates"),y=e("debug"),M=y("core:propertyTypes:warn"),A=t.exports.propertyTypes={};r("array",[],n,o),r("boolean",!1,c),r("color","#FFF",a,s),r("int",0,u),r("number",0,l),r("selector","",h,p),r("selectorAll","",d,f),r("src","",m),r("string","",a,s),r("time",0,u),r("vec2",{x:0,y:0},g,v.stringify),r("vec3",{x:0,y:0,z:0},g,v.stringify),r("vec4",{x:0,y:0,z:0,w:0},g,v.stringify),t.exports.registerPropertyType=r},{"../utils/coordinates":116,debug:3}],62:[function(e,t,i){function r(e,t){return t?{height:e.parentElement.offsetHeight,width:e.parentElement.offsetWidth}:{height:window.innerHeight,width:window.innerWidth}}function n(e){var t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen;t.apply(e)}var o=e("./metaTags").inject,a=e("./wakelock"),s=e("../a-register-element"),c=e("../system").systems,u=e("../../lib/three"),l=e("tween.js"),h=e("../../utils/"),d=e("../a-entity"),p=e("../a-node"),f=e("./postMessage"),m=h.checkHeadsetConnected,g=s.registerElement,v=h.isIOS(),y=h.isMobile();t.exports=g("a-scene",{prototype:Object.create(d.prototype,{defaultComponents:{value:{canvas:"",inspector:"","keyboard-shortcuts":"","vr-mode-ui":""}},createdCallback:{value:function(){this.isIOS=v,this.isMobile=y,this.isScene=!0,this.object3D=new u.Scene,this.render=this.render.bind(this),this.systems={},this.time=0,this.init()}},init:{value:function(){this.behaviors=[],this.hasLoaded=!1,this.isPlaying=!1,this.originalHTML=this.innerHTML,this.addEventListener("render-target-loaded",function(){this.setupRenderer(),this.resize()}),this.addFullScreenStyles(),f(this)},writable:!0},addFullScreenStyles:{value:function(){var e=document.documentElement;e.classList.add("a-html"),document.body.classList.add("a-body"),this.classList.add("fullscreen")}},removeFullScreenStyles:{value:function(){var e=document.documentElement;e.classList.remove("a-html"),document.body.classList.remove("a-body"),this.classList.remove("fullscreen")}},attachedCallback:{value:function(){var e=this.resize.bind(this);o(this),a(this),this.initSystems(),window.addEventListener("load",e),window.addEventListener("resize",e),this.play()},writable:window.debug},initSystems:{value:function(){Object.keys(c).forEach(this.initSystem.bind(this))}},initSystem:{value:function(e){var t;this.systems[e]||(t=this.systems[e]=new c[e](this),t.init())}},detachedCallback:{value:function(){window.cancelAnimationFrame(this.animationFrameID),this.animationFrameID=null}},addBehavior:{value:function(e){var t=this.behaviors;t.indexOf(e)===-1&&t.push(e)}},enterVR:{value:function(e){function t(){r.addState("vr-mode"),r.emit("enter-vr",e),r.isMobile&&screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape"),r.addFullScreenStyles(),r.isMobile||m()||n(r.canvas),r.resize()}function i(e){throw e&&e.message?new Error("Failed to enter VR mode (`requestPresent`): "+e.message):new Error("Failed to enter VR mode (`requestPresent`).")}var r=this;if(!this.is("vr-mode"))return m()||this.isMobile?this.effect.requestPresent().then(t,i):void t()}},exitVR:{value:function(){function e(){var e=i.getAttribute("embedded");i.removeState("vr-mode"),i.isMobile&&screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),e&&i.removeFullScreenStyles(),i.resize(),i.isIOS&&h.forceCanvasResizeSafariMobile(this.canvas),i.emit("exit-vr",{target:i})}function t(e){throw e&&e.message?new Error("Failed to exit VR mode (`exitPresent`): "+e.message):new Error("Failed to exit VR mode (`exitPresent`).")}var i=this;return this.is("vr-mode")?m()||this.isMobile?this.effect.exitPresent().then(e,t):void e():Promise.resolve()}},getAttribute:{value:function(e){var t=this.systems[e];return t?t.data:d.prototype.getAttribute.call(this,e)}},getComputedAttribute:{value:function(e){var t=this.systems[e];return t?t.data:d.prototype.getComputedAttribute.call(this,e)}},setAttribute:{value:function(e,t,i){var r=this.systems[e];return r?void p.prototype.setAttribute.call(this,e,t):void d.prototype.setAttribute.call(this,e,t,i)}},removeBehavior:{value:function(e){var t=this.behaviors,i=t.indexOf(e);i!==-1&&t.splice(i,1)}},resize:{value:function(){var e,t=this.camera,i=this.canvas,n=this.getAttribute("embedded")&&!this.is("vr-mode");!t||!i||this.is("vr-mode")&&y||(e=r(i,n),t.aspect=e.width/e.height,t.updateProjectionMatrix(),this.renderer.setSize(e.width,e.height))},writable:window.debug},setupRenderer:{value:function(){var e=this.canvas,t="true"===this.getAttribute("antialias"),i=this.renderer=new u.WebGLRenderer({canvas:e,antialias:t||window.hasNativeWebVRImplementation,alpha:!0});i.setPixelRatio(window.devicePixelRatio),i.sortObjects=!1,this.effect=new u.VREffect(i)},writable:window.debug},play:{value:function(){var e=this;return this.renderStarted?void d.prototype.play.call(this):(this.addEventListener("loaded",function(){function e(e){e.renderStarted||(e.resize(),e.renderer&&(window.performance&&window.performance.mark("render-started"),e.render(0),e.renderStarted=!0,e.emit("renderstart")))}return d.prototype.play.call(this),this.camera?void e(this):void this.addEventListener("camera-set-active",function(){e(this)})}),void setTimeout(function(){d.prototype.load.call(e)}))}},reload:{value:function(e){function t(){i.isPlaying&&d.prototype.play.call(i)}var i=this;e&&this.pause(),this.innerHTML=this.originalHTML,this.init(),p.prototype.load.call(this,t)}},tick:{value:function(e,t){var i=this.systems;l.update(e),this.behaviors.forEach(function(i){i.el.isPlaying&&i.tick(e,t)}),Object.keys(i).forEach(function(r){i[r].tick&&i[r].tick(e,t)})}},render:{value:function(e){var t=e-this.time;this.isPlaying&&this.tick(e,t),this.effect.render(this.object3D,this.camera),this.time=e,this.animationFrameID=window.requestAnimationFrame(this.render)},writable:!0}})})},{"../../lib/three":103,"../../utils/":120,"../a-entity":55,"../a-node":57,"../a-register-element":58,"../system":68,"./metaTags":63,"./postMessage":64,"./wakelock":65,"tween.js":18}],63:[function(e,t,i){function r(e){return{tagName:"meta",attributes:e,exists:function(){return document.querySelector('meta[name="'+e.name+'"]')}}}function n(e){return{tagName:"link",attributes:e,exists:function(){return document.querySelector('link[rel="'+e.rel+'"]')}}}function o(e){if(e&&e.tagName){var t=document.createElement(e.tagName);return t.setAttribute(a.AFRAME_INJECTED,""),s(t,e.attributes)}}var a=e("../../constants/"),s=e("../../utils").extend,c=t.exports.MOBILE_HEAD_TAGS=[r({name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui"}),r({name:"mobile-web-app-capable",content:"yes"}),r({name:"theme-color",content:"black"})],u=[r({name:"apple-mobile-web-app-capable",content:"yes"}),r({name:"apple-mobile-web-app-status-bar-style",content:"black"}),n({rel:"apple-touch-icon",href:"path_to_url"})];t.exports.inject=function(e){function t(e){e&&!e.exists()&&(i=o(e),i&&(n?n.parentNode.insertBefore(i,n):r.appendChild(i),a.push(i)))}var i,r=document.head,n=r.querySelector("script"),a=[];return c.forEach(t),e.isIOS&&u.forEach(t),a}},{"../../constants/":51,"../../utils":120}],64:[function(e,t,i){function r(e){var t=this;if(e.data)switch(e.data.type){case"vr":switch(e.data.data){case"enter":t.enterVR();break;case"exit":t.exitVR()}}}var n=e("../../utils/").isIframed;t.exports=function(e){n()&&window.addEventListener("message",r.bind(e))}},{"../../utils/":120}],65:[function(e,t,i){var r=e("../../../vendor/wakelock/wakelock");t.exports=function(e){if(e.isMobile){var t=e.wakelock=new r;e.addEventListener("enter-vr",function(){t.request()}),e.addEventListener("exit-vr",function(){t.release()})}}},{"../../../vendor/wakelock/wakelock":129}],66:[function(e,t,i){function r(e){return"type"in e?"string"==typeof e.type:"default"in e}function n(e){var t,i=e["default"],r=e.type;return e.type?"bool"===e.type?r="boolean":"float"===e.type&&(r="number"):r=void 0!==i&&["boolean","number"].indexOf(typeof i)!==-1?typeof i:Array.isArray(i)?"array":"string",t=c[r],t||u("Unknown property type: "+r),e.parse=e.parse||t.parse,e.stringify=e.stringify||t.stringify,e.type=r,"default"in e||(e["default"]=t["default"]),e}function o(e,t){return e=void 0===e||null===e?t["default"]:e,t.parse(e)}function a(e,t){return"object"!=typeof e?e:t?t.stringify(e):JSON.stringify(e)}var s=e("../utils/debug"),c=e("./propertyTypes").propertyTypes,u=s("core:schema:warn");t.exports.isSingleProperty=r,t.exports.process=function(e){return r(e)?n(e):(Object.keys(e).forEach(function(t){e[t]=n(e[t])}),e)},t.exports.processPropertyDefinition=n,t.exports.parseProperties=function(e,t,i,r,n){var a=Object.keys(i?e:t);return null===e||"object"!=typeof e?e:(Object.keys(e).forEach(function(e){t[e]||n||u("Unknown property `"+e+"` for component/system `"+r+"`.")}),a.forEach(function(i){var r=t[i],n=e[i];t[i]&&(e[i]=o(n,r))}),e)},t.exports.parseProperty=o,t.exports.stringifyProperties=function(e,t){var i={};return Object.keys(e).forEach(function(r){var n=t[r],o=e[r],s=o;"object"==typeof s&&(s=a(o,n),n||u("Unknown component property: "+r)),i[r]=s}),i},t.exports.stringifyProperty=a},{"../utils/debug":117,"./propertyTypes":61}],67:[function(e,t,i){var r=e("./schema"),n=r.process,o=t.exports.shaders={},a=t.exports.shaderNames=[],s=e("../lib/three"),c={number:"f",time:"f",vec4:"v4",vec3:"v3",vec2:"v2",color:"v3"},u=t.exports.Shader=function(){};u.prototype={schema:{},vertexShader:"void main() {gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);}",fragmentShader:"void main() {gl_FragColor = vec4(1.0,0.0,1.0,1.0);}",init:function(e){return this.attributes=this.initVariables(e,"attribute"),this.uniforms=this.initVariables(e,"uniform"),this.material=new s.ShaderMaterial({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader}),this.material},initVariables:function(e,t){function i(i){if(o[i].is===t){var a=c[o[i].type],s=o[i].parse(e[i]||o[i]["default"]);n[i]={type:a,value:r.parseValue(o[i].type,s)}}}var r=this,n={},o=this.schema,a=Object.keys(o);return a.forEach(i),n},update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform")},updateVariables:function(e,t){function i(i){a[i]&&a[i].is===t&&n[i].value!==e[i]&&(n[i].value=r.parseValue(a[i].type,e[i]),n[i].needsUpdate=!0)}var r=this,n="uniform"===t?this.uniforms:this.attributes,o=Object.keys(e),a=this.schema;o.forEach(i)},parseValue:function(e,t){var i;switch(e){case"vec2":return new s.Vector2(t.x,t.y);case"vec3":return new s.Vector3(t.x,t.y,t.z);case"vec4":return new s.Vector4(t.x,t.y,t.z,t.w);case"color":return i=new s.Color(t),new s.Vector3(i.r,i.g,i.b);default:return t}}},t.exports.registerShader=function(e,t){var i,r={};if(Object.keys(t).forEach(function(e){r[e]={value:t[e],writable:!0}}),o[e])throw new Error("The shader "+e+" has been already registered");return i=function(){u.call(this)},i.prototype=Object.create(u.prototype,r),i.prototype.name=e,i.prototype.constructor=i,o[e]={Shader:i,schema:n(i.prototype.schema)},a.push(e),i}},{"../lib/three":103,"./schema":66}],68:[function(e,t,i){var r=e("./component"),n=e("./schema"),o=e("../utils/"),a=n.parseProperties,s=n.parseProperty,c=n.process,u=n.isSingleProperty,l=o.styleParser,h=t.exports.systems={},d=t.exports.System=function(e){var t,i=r&&r.components[this.name],n=this.schema;if(this.sceneEl=e,i&&(i.Component.prototype.system=this),Object.keys(n).length)return t=HTMLElement.prototype.getAttribute.call(e,this.name),u(n)?void(this.data=s(t,n)):void(this.data=a(l.parse(t)||{},n,!1,this.name))};d.prototype={schema:{},init:function(){},tick:void 0,play:function(){},pause:function(){}},t.exports.registerSystem=function(e,t){var i,r,n={},a=o.findAllScenes(document);if(Object.keys(t).forEach(function(e){n[e]={value:t[e],writable:!0}}),h[e])throw new Error("The system `"+e+"` has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name.");for(r=function(e){d.call(this,e)},r.prototype=Object.create(d.prototype,n),r.prototype.name=e,r.prototype.constructor=r,r.prototype.schema=o.extend(c(r.prototype.schema)),h[e]=r,i=0;i<a.length;i++)a[i].initSystem(e)}},{"../utils/":120,"./component":59,"./schema":66}],69:[function(e,t,i){e("./pivot")},{"./pivot":70}],70:[function(e,t,i){var r=e("../../core/component").registerComponent,n=e("../../lib/three"),o=new n.Vector3,a=new n.Vector3;r("pivot",{dependencies:["position"],schema:{type:"vec3"},init:function(){var e=this.data,t=this.el,i=t.object3D.parent,r=t.object3D,s=new n.Group;o.copy(r.position),a.copy(r.rotation),i.remove(r),s.add(r),i.add(s),t.object3D=s,r.position.set(-1*e.x,-1*e.y,-1*e.z),s.position.set(e.x+o.x,e.y+o.y,e.z+o.z),s.rotation.copy(r.rotation),r.rotation.set(0,0,0)}})},{"../../core/component":59,"../../lib/three":103}],71:[function(e,t,i){var r=e("../../core/a-node"),n=e("../../core/a-register-element").registerElement,o=e("../../utils/"),a=o.entity.setComponentProperty;t.exports=n("a-event",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.el=null,this.isAEvent=!0,this.name="",this.targetEls=[]}},attachedCallback:{value:function(){var e=this.getAttribute("target");this.el=this.parentNode,this.name=this.getAttribute("name")||this.getAttribute("type"),console.log("<a-event> has been DEPRECATED. Use path_to_url instead."),e?this.targetEls=this.el.sceneEl.querySelectorAll(e):this.targetEls=[this.el],this.deprecated&&console.warn("<"+this.tagName.toLowerCase()+'> has been DEPRECATED. Use <a-event name="'+this.name+'"> instead.'),this.hasAttribute("type")&&console.log("<a-event type> has been DEPRECATED. Use <a-event name> instead."),this.listener=this.attachEventListener(),this.load()}},detachedCallback:{value:function(){var e=this.listener;e&&this.removeEventListener(this.name,e)}},attachEventListener:{value:function(){var e=this.attributes,t=this.el,i=this.name,r=this.targetEls;return t.addEventListener(i,function(){for(var t,i,n,o,s=0;s<r.length;s++)for(var c=0;c<e.length;c++)t=e[c],i=t.name,n=t.value,o=r[s],"target"!==i&&a(o,i,n)})}}})})},{"../../core/a-node":57,"../../core/a-register-element":58,"../../utils/":120}],72:[function(e,t,i){t.exports=function(){return{defaultComponents:{material:{}},mappings:{color:"material.color",metalness:"material.metalness",opacity:"material.opacity",repeat:"material.repeat",roughness:"material.roughness",shader:"material.shader",side:"material.side",src:"material.src",transparent:"material.transparent"},transforms:{src:function(e){return"#"===e[0]?e:"url("+e+")"}}}}},{}],73:[function(e,t,i){e("./primitives/a-camera"),e("./primitives/a-collada-model"),e("./primitives/a-cursor"),e("./primitives/a-curvedimage"),e("./primitives/a-image"),e("./primitives/a-light"),e("./primitives/a-obj-model"),e("./primitives/a-sky"),e("./primitives/a-sound"),e("./primitives/a-video"),e("./primitives/a-videosphere"),e("./primitives/meshPrimitives")},{"./primitives/a-camera":75,"./primitives/a-collada-model":76,"./primitives/a-cursor":77,"./primitives/a-curvedimage":78,"./primitives/a-image":79,"./primitives/a-light":80,"./primitives/a-obj-model":81,"./primitives/a-sky":82,"./primitives/a-sound":83,"./primitives/a-video":84,"./primitives/a-videosphere":85,"./primitives/meshPrimitives":86}],74:[function(e,t,i){var r=e("../../core/a-entity"),n=e("../../core/component").components,o=e("../../core/a-register-element").registerElement,a=e("../../utils/"),s=a.debug,c=a.entity.setComponentProperty,u=s("extras:primitives:debug"),l=t.exports.primitives={};t.exports.registerPrimitive=function(e,t){e=e.toLowerCase(),u("Registering <%s>",e),t.defaultAttributes&&console.warn("The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.");var i=o(e,{prototype:Object.create(r.prototype,{defaultComponentsFromPrimitive:{value:t.defaultComponents||t.defaultAttributes||{}},deprecated:{value:t.deprecated||null},deprecatedMappings:{value:t.deprecatedMappings||{}},mappings:{value:t.mappings||{}},transforms:{value:t.transforms||{}},createdCallback:{value:function(){this.componentData={},t.deprecated&&console.warn(t.deprecated)}},attachedCallback:{value:function(){var e=this,t=this.attributes;this.applyDefaultComponents(),Object.keys(t).forEach(function(i){var r=t[i];e.syncAttributeToComponent(r.name,r.value)})}},attributeChangedCallback:{value:function(e,t,i){this.syncAttributeToComponent(e,i)}},applyDefaultComponents:{value:function(){var e=this,t=this.defaultComponentsFromPrimitive;Object.keys(t).forEach(function(i){var r=t[i];if(r instanceof Object){var o=n[i],a=e.getAttribute(i)||{},s=o.parse(a);return Object.keys(r).forEach(function(e){s[e]||(s[e]=r[e])}),void e.setAttribute(i,s)}e.setAttribute(i,r)})}},syncAttributeToComponent:{value:function(e,t){var i=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&i&&(t=this.getTransformedValue(e,t),c(this,i,t))}},getTransformedValue:{value:function(e,t){return this.transforms&&this.transforms[e]?this.transforms[e].bind(this)(t):t}}})});return l[e]=i,i}},{"../../core/a-entity":55,"../../core/a-register-element":58,"../../core/component":59,"../../utils/":120}],75:[function(e,t,i){var r=e("../primitives").registerPrimitive;r("a-camera",{defaultComponents:{camera:{userHeight:1.6},"look-controls":{},"wasd-controls":{}},mappings:{active:"camera.active",far:"camera.far",fov:"camera.fov","look-controls-enabled":"look-controls.enabled",near:"camera.near","wasd-controls-enabled":"wasd-controls.enabled","user-height":"camera.userHeight",zoom:"camera.zoom"},deprecatedMappings:{"cursor-color":"a-camera[cursor-color] has been removed. Use a-cursor[color] instead.","cursor-maxdistance":"a-camera[cursor-maxdistance] has been removed. Use a-cursor[max-distance] instead.","cursor-offset":"a-camera[cursor-offset] has been removed. Use a-cursor[position] instead.","cursor-opacity":"a-camera[cursor-offset] has been removed. Use a-cursor[opacity] instead.","cursor-scale":"a-camera[cursor-scale] has been removed. Use a-cursor[scale] instead.","cursor-visible":"a-camera[cursor-visible] has been removed. Use a-cursor[visible] instead."}})},{"../primitives":74}],76:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-collada-model",o.extendDeep({},r(),{mappings:{src:"collada-model"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],77:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-cursor",o.extendDeep({},r(),{defaultComponents:{cursor:{},geometry:{primitive:"ring",radiusOuter:.016,radiusInner:.01,segmentsTheta:64},material:{color:"#000",shader:"flat",opacity:.8},position:{x:0,y:0,z:-1},raycaster:{far:1e3}},mappings:{far:"raycaster.far",fuse:"cursor.fuse",interval:"raycaster.interval",objects:"raycaster.objects","fuse-timeout":"cursor.fuseTimeout"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],78:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-curvedimage",o.extendDeep({},r(),{defaultComponents:{geometry:{height:1,primitive:"cylinder",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0,repeat:"-1 1"}},mappings:{height:"geometry.height","open-ended":"geometry.openEnded",radius:"geometry.radius",segments:"geometry.segmentsRadial",start:"geometry.thetaStart","theta-length":"geometry.thetaLength","theta-start":"geometry.thetaStart",width:"geometry.thetaLength"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],79:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-image",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],80:[function(e,t,i){var r=e("../primitives").registerPrimitive;r("a-light",{defaultComponents:{light:{}},mappings:{angle:"light.angle",color:"light.color","ground-color":"light.groundColor",decay:"light.decay",distance:"light.distance",intensity:"light.intensity",penumbra:"light.penumbra",type:"light.type",target:"light.target"}})},{"../primitives":74}],81:[function(e,t,i){var r=e("../getMeshMixin")(),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-obj-model",o.extendDeep({},r,{mappings:{src:"obj-model.obj",mtl:"obj-model.mtl"},transforms:{mtl:r.transforms.src}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],82:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-sky",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:5e3,segmentsWidth:64,segmentsHeight:20},material:{color:"#FFF",shader:"flat"},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-width":"geometry.segmentsWidth","segments-height":"geometry.segmentsHeight"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],83:[function(e,t,i){var r=e("../primitives").registerPrimitive;r("a-sound",{defaultComponents:{sound:{}},mappings:{src:"sound.src",on:"sound.on",autoplay:"sound.autoplay",loop:"sound.loop",volume:"sound.volume"}})},{"../primitives":74}],84:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-video",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],85:[function(e,t,i){var r=e("../getMeshMixin"),n=e("../primitives").registerPrimitive,o=e("../../../utils/");n("a-videosphere",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:5e3,segmentsWidth:64,segmentsHeight:20},material:{color:"#FFF",shader:"flat"},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-height":"geometry.segmentsHeight","segments-width":"geometry.segmentsWidth"}}))},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],86:[function(e,t,i){function r(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var n=e("../getMeshMixin"),o=e("../../../core/geometry").geometries,a=e("../../../core/geometry").geometryNames,s=e("../primitives").registerPrimitive,c=e("../../../utils/"),u=t.exports={};a.forEach(function(e){var t=o[e],i=r(e),a={};Object.keys(t.schema).forEach(function(e){a[r(e)]="geometry."+e});var l="a-"+i,h=s(l,c.extendDeep({},n(),{defaultComponents:{geometry:{primitive:e}},mappings:a}));u[l]=h})},{"../../../core/geometry":60,"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],87:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("box",{schema:{depth:{"default":1,min:0},height:{"default":1,min:0},width:{"default":1,min:0},segmentsHeight:{"default":1,min:1,max:20,type:"int"},segmentsWidth:{"default":1,min:1,max:20,type:"int"},segmentsDepth:{"default":1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new n.BoxGeometry(e.width,e.height,e.depth)}})},{"../core/geometry":60,"../lib/three":103}],88:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("circle",{schema:{radius:{"default":1,min:0},segments:{"default":32,min:3,type:"int"},thetaLength:{"default":360,min:0},thetaStart:{"default":0}},init:function(e){this.geometry=new n.CircleGeometry(e.radius,e.segments,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":60,"../lib/three":103}],89:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("cone",{schema:{height:{"default":1,min:0},openEnded:{"default":!1},radiusBottom:{"default":1,min:0},radiusTop:{"default":.8,min:0},segmentsHeight:{"default":18,min:1,type:"int"},segmentsRadial:{"default":36,min:3,type:"int"},thetaLength:{"default":360,min:0},thetaStart:{"default":0}},init:function(e){this.geometry=new n.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":60,"../lib/three":103}],90:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("cylinder",{schema:{height:{"default":1,min:0},openEnded:{"default":!1},radius:{"default":1,min:0},segmentsHeight:{"default":18,min:1,type:"int"},segmentsRadial:{"default":36,min:3,type:"int"},thetaLength:{"default":360,min:0},thetaStart:{"default":0}},init:function(e){this.geometry=new n.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":60,"../lib/three":103}],91:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("dodecahedron",{schema:{detail:{"default":0,min:0,max:5,type:"int"},radius:{"default":1,min:0}},init:function(e){this.geometry=new n.DodecahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":60,"../lib/three":103}],92:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("icosahedron",{schema:{detail:{"default":0,min:0,max:5,type:"int"},radius:{"default":1,min:0}},init:function(e){this.geometry=new n.IcosahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":60,"../lib/three":103}],93:[function(e,t,i){e("./box.js"),e("./circle.js"),e("./cone.js"),e("./cylinder.js"),e("./dodecahedron.js"),e("./icosahedron.js"),e("./octahedron.js"),e("./plane.js"),e("./ring.js"),e("./sphere.js"),e("./tetrahedron.js"),e("./torus.js"),e("./torusKnot.js")},{"./box.js":87,"./circle.js":88,"./cone.js":89,"./cylinder.js":90,"./dodecahedron.js":91,"./icosahedron.js":92,"./octahedron.js":94,"./plane.js":95,"./ring.js":96,"./sphere.js":97,"./tetrahedron.js":98,"./torus.js":99,"./torusKnot.js":100}],94:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("octahedron",{schema:{detail:{"default":0,min:0,max:5,type:"int"},radius:{"default":1,min:0}},init:function(e){this.geometry=new n.OctahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":60,"../lib/three":103}],95:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("plane",{schema:{height:{"default":1,min:0},width:{"default":1,min:0},segmentsHeight:{"default":1,min:1,max:20,type:"int"},segmentsWidth:{"default":1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new n.PlaneGeometry(e.width,e.height)}})},{"../core/geometry":60,"../lib/three":103}],96:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("ring",{schema:{radiusInner:{"default":.8,min:0},radiusOuter:{"default":1.2,min:0},segmentsPhi:{"default":10,min:1,type:"int"},segmentsTheta:{"default":32,min:3,type:"int"},thetaLength:{"default":360,min:0},thetaStart:{"default":0}},init:function(e){this.geometry=new n.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":60,"../lib/three":103}],97:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("sphere",{schema:{radius:{"default":1,min:0},phiLength:{"default":360},phiStart:{"default":0,min:0},thetaLength:{"default":180,min:0},thetaStart:{"default":0},segmentsHeight:{"default":18,min:2,type:"int"},segmentsWidth:{"default":36,min:3,type:"int"}},init:function(e){this.geometry=new n.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,o(e.phiStart),o(e.phiLength),o(e.thetaStart),o(e.thetaLength)); }})},{"../core/geometry":60,"../lib/three":103}],98:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("tetrahedron",{schema:{detail:{"default":0,min:0,max:5,type:"int"},radius:{"default":1,min:0}},init:function(e){this.geometry=new n.TetrahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":60,"../lib/three":103}],99:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three"),o=n.Math.degToRad;r("torus",{schema:{arc:{"default":360},radius:{"default":1,min:0},radiusTubular:{"default":.2,min:0},segmentsRadial:{"default":36,min:2,type:"int"},segmentsTubular:{"default":32,min:3,type:"int"}},init:function(e){this.geometry=new n.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,o(e.arc))}})},{"../core/geometry":60,"../lib/three":103}],100:[function(e,t,i){var r=e("../core/geometry").registerGeometry,n=e("../lib/three");r("torusKnot",{schema:{p:{"default":2,min:1},q:{"default":3,min:1},radius:{"default":1,min:0},radiusTubular:{"default":.2,min:0},segmentsRadial:{"default":8,min:3,type:"int"},segmentsTubular:{"default":100,min:3,type:"int"}},init:function(e){this.geometry=new n.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}})},{"../core/geometry":60,"../lib/three":103}],101:[function(e,t,i){window.Promise=window.Promise||e("promise-polyfill"),window.hasNativeWebVRImplementation=!!navigator.getVRDisplays||!!navigator.getVRDevices,window.WebVRConfig=window.WebVRConfig||{BUFFER_SCALE:1,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,TOUCH_PANNER_DISABLED:!0,MOUSE_KEYBOARD_CONTROLS_DISABLED:!0},/(iphone|ipod|ipad).*os.*(7|8|9)/i.test(navigator.userAgent)&&(window.WebVRConfig.BUFFER_SCALE=1/window.devicePixelRatio),e("webvr-polyfill"),e("present"),e("./style/aframe.css"),e("./style/rStats.css");var r=e("./core/scene/a-scene"),n=e("./core/component").components,o=e("./core/component").registerComponent,a=e("./core/geometry").registerGeometry,s=e("./extras/primitives/primitives").registerPrimitive,c=e("./core/shader").registerShader,u=e("./core/system").registerSystem,l=e("./core/shader").shaders,h=e("./core/system").systems,d=window.THREE=e("./lib/three"),p=window.TWEEN=e("tween.js"),f=e("../package"),m=e("./utils/");e("./components/index"),e("./geometries/index"),e("./shaders/index"),e("./systems/index");var g=e("./core/a-node"),v=e("./core/a-entity");e("./core/a-animation"),e("./core/a-assets"),e("./core/a-cubemap"),e("./core/a-mixin"),e("./extras/components/"),e("./extras/declarative-events/"),e("./extras/primitives/"),console.log("A-Frame Version:",f.version),console.log("three Version:",f.dependencies.three),console.log("WebVR Polyfill Version:",f.dependencies["webvr-polyfill"]),t.exports=window.AFRAME={AEntity:v,ANode:g,AScene:r,components:n,geometries:e("./core/geometry").geometries,registerComponent:o,registerElement:e("./core/a-register-element").registerElement,registerGeometry:a,registerPrimitive:s,registerShader:c,registerSystem:u,primitives:{getMeshMixin:e("./extras/primitives/getMeshMixin"),primitives:e("./extras/primitives/primitives").primitives},schema:e("./core/schema"),shaders:l,systems:h,THREE:d,TWEEN:p,utils:m,version:f.version}},{"../package":20,"./components/index":27,"./core/a-animation":52,"./core/a-assets":53,"./core/a-cubemap":54,"./core/a-entity":55,"./core/a-mixin":56,"./core/a-node":57,"./core/a-register-element":58,"./core/component":59,"./core/geometry":60,"./core/scene/a-scene":62,"./core/schema":66,"./core/shader":67,"./core/system":68,"./extras/components/":69,"./extras/declarative-events/":71,"./extras/primitives/":73,"./extras/primitives/getMeshMixin":72,"./extras/primitives/primitives":74,"./geometries/index":93,"./lib/three":103,"./shaders/index":105,"./style/aframe.css":107,"./style/rStats.css":108,"./systems/index":111,"./utils/":120,present:10,"promise-polyfill":11,"tween.js":18,"webvr-polyfill":19}],102:[function(e,t,i){window.aframeStats=function(e){function t(){a("te").set(i()),a("lt").set(window.performance.getEntriesByName("render-started")[0].startTime.toFixed(0))}function i(){var e=s.querySelectorAll("*");return Array.prototype.slice.call(e).filter(function(e){return e.isEntity}),e.length}function r(){}function n(){}function o(e){a=e}var a=null,s=e,c={te:{caption:"Entities"},lt:{caption:"Load Time"}},u=[{caption:"A-Frame",values:["te","lt"]}];return{update:t,start:r,end:n,attach:o,values:c,groups:u,fractions:[]}},"object"==typeof t&&(t.exports={aframeStats:window.aframeStats})},{}],103:[function(e,t,r){(function(i){var r=i.THREE=e("three");r.TextureLoader&&(r.TextureLoader.prototype.crossOrigin="anonymous"),r.ImageLoader&&(r.ImageLoader.prototype.crossOrigin="anonymous"),r.Cache&&(r.Cache.enabled=!0),e("three/examples/js/loaders/OBJLoader"),e("three/examples/js/loaders/MTLLoader"),e("three/examples/js/BlendCharacter"),e("three/examples/js/loaders/ColladaLoader"),e("../../vendor/VRControls"),e("../../vendor/VREffect"),r.ColladaLoader.prototype.crossOrigin="anonymous",r.MTLLoader.prototype.crossOrigin="anonymous",r.OBJLoader.prototype.crossOrigin="anonymous",t.exports=r}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../vendor/VRControls":124,"../../vendor/VREffect":125,three:17,"three/examples/js/BlendCharacter":13,"three/examples/js/loaders/ColladaLoader":14,"three/examples/js/loaders/MTLLoader":15,"three/examples/js/loaders/OBJLoader":16}],104:[function(e,t,i){function r(e){return{fog:e.fog,color:new o.Color(e.color)}}var n=e("../core/shader").registerShader,o=e("../lib/three"),a=e("../utils/");t.exports.Component=n("flat",{schema:{color:{type:"color"},fog:{"default":!0},height:{"default":256},repeat:{"default":""},src:{"default":""},width:{"default":512}},init:function(e){this.textureSrc=null,this.material=new o.MeshBasicMaterial(r(e)),a.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),a.material.updateMap(this,e)},updateMaterial:function(e){var t=this.material;e=r(e),Object.keys(e).forEach(function(i){t[i]=e[i]})}})},{"../core/shader":67,"../lib/three":103,"../utils/":120}],105:[function(e,t,i){e("./flat"),e("./standard")},{"./flat":104,"./standard":106}],106:[function(e,t,i){function r(e){return{color:new o.Color(e.color),fog:e.fog,metalness:e.metalness,roughness:e.roughness}}var n=e("../core/shader").registerShader,o=e("../lib/three"),a=e("../utils/"),s=new o.CubeTextureLoader,c={};t.exports.Component=n("standard",{schema:{color:{type:"color"},envMap:{"default":""},fog:{"default":!0},height:{"default":256},metalness:{"default":0,min:0,max:1},repeat:{"default":""},roughness:{"default":.5,min:0,max:1},src:{"default":""},width:{"default":512}},init:function(e){this.material=new o.MeshStandardMaterial(r(e)),a.material.updateMap(this,e),this.updateEnvMap(e)},update:function(e){this.updateMaterial(e),a.material.updateMap(this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t=this.material;e=r(e),Object.keys(e).forEach(function(i){t[i]=e[i]})},updateEnvMap:function(e){var t=this,i=this.material,r=e.envMap;return!r||this.isLoadingEnvMap?(i.envMap=null,void(i.needsUpdate=!0)):(this.isLoadingEnvMap=!0,c[r]?void c[r].then(function(e){t.isLoadingEnvMap=!1,i.envMap=e,i.needsUpdate=!0}):void(c[r]=new Promise(function(e){a.srcLoader.validateCubemapSrc(r,function(r){s.load(r,function(r){t.isLoadingEnvMap=!1,i.envMap=r,e(r)})})})))}})},{"../core/shader":67,"../lib/three":103,"../utils/":120}],107:[function(e,t,i){var r=".a-html{bottom:0;left:0;position:fixed;right:0;top:0}.a-body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grabbing;cursor:-webkit-grab}.a-canvas.a-grab-cursor:active,.a-grabbing{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}// Class is removed when doing <a-scene embedded>. .a-canvas.fullscreen{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:999999!important;position:fixed!important}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;height:10%;position:absolute;right:20px;bottom:20px}.a-enter-vr.embedded{right:5px;bottom:5px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff}.a-enter-vr-button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20245.82%20141.73%22%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill%3A%23fff%3Bfill-rule%3Aevenodd%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Ctitle%3Emask%3C%2Ftitle%3E%3Cpath%20class%3D%22a%22%20d%3D%22M175.56%2C111.37c-22.52%2C0-40.77-18.84-40.77-42.07S153%2C27.24%2C175.56%2C27.24s40.77%2C18.84%2C40.77%2C42.07S198.08%2C111.37%2C175.56%2C111.37ZM26.84%2C69.31c0-23.23%2C18.25-42.07%2C40.77-42.07s40.77%2C18.84%2C40.77%2C42.07-18.26%2C42.07-40.77%2C42.07S26.84%2C92.54%2C26.84%2C69.31ZM27.27%2C0C11.54%2C0%2C0%2C12.34%2C0%2C28.58V110.9c0%2C16.24%2C11.54%2C30.83%2C27.27%2C30.83H99.57c2.17%2C0%2C4.19-1.83%2C5.4-3.7L116.47%2C118a8%2C8%2C0%2C0%2C1%2C12.52-.18l11.51%2C20.34c1.2%2C1.86%2C3.22%2C3.61%2C5.39%2C3.61h72.29c15.74%2C0%2C27.63-14.6%2C27.63-30.83V28.58C245.82%2C12.34%2C233.93%2C0%2C218.19%2C0H27.27Z%22%2F%3E%3C%2Fsvg%3E) 50% 50%/70% 70% no-repeat rgba(0,0,0,.35);border:0;bottom:0;cursor:pointer;min-width:50px;min-height:30px;padding-right:5%;padding-top:4%;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999}.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#666}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\"Insert phone into Cardboard holder.\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}";e("browserify-css").createStyle(r,{href:"src/style/aframe.css"}),t.exports=r},{"browserify-css":1}],108:[function(e,t,i){var r=".rs-base{background-color:#333;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}";e("browserify-css").createStyle(r,{href:"src/style/rStats.css"}),t.exports=r},{"browserify-css":1}],109:[function(e,t,i){function r(e){var t,i=e.camera;i&&(t=e.querySelector("["+a+"]"),t&&e.removeChild(t))}var n=e("../constants/"),o=e("../core/system").registerSystem,a="data-aframe-default-camera",s=1.6;t.exports.System=o("camera",{init:function(){this.activeCameraEl=null,this.sceneEl.addEventListener("loaded",this.setupDefaultCamera.bind(this))},setupDefaultCamera:function(){var e,t=this.sceneEl;return t.camera?void t.emit("camera-ready",{cameraEl:t.camera.el}):(e=document.createElement("a-entity"),e.setAttribute("position","0 0 0"),e.setAttribute(a,""),e.setAttribute("camera",{active:!0,userHeight:s}),e.setAttribute("wasd-controls",""),e.setAttribute("look-controls",""),e.setAttribute(n.AFRAME_INJECTED,""),t.appendChild(e),t.addEventListener("enter-vr",this.removeDefaultOffset),t.addEventListener("exit-vr",this.addDefaultOffset),void t.emit("camera-ready",{cameraEl:e}))},disableActiveCamera:function(){var e=this.sceneEl.querySelectorAll("[camera]"),t=e[e.length-1];t.setAttribute("camera","active",!0)},setActiveCamera:function(e){var t,i,n,o,s=this.activeCameraEl,c=this.sceneEl;if(o=e.getObject3D("camera"),o&&e!==this.activeCameraEl){var u=c.querySelector("["+a+"]"),l=u&&u.querySelector("[camera]");for(e!==l&&r(c),this.activeCameraEl=e,this.activeCameraEl.play(),c.camera=o,s&&s.setAttribute("camera","active",!1),i=c.querySelectorAll("[camera]"),n=0;n<i.length;n++)t=i[n],e!==t&&(t.setAttribute("camera","active",!1),t.pause());c.emit("camera-set-active",{cameraEl:e})}}})},{"../constants/":51,"../core/system":68}],110:[function(e,t,i){function r(e){var t=e.primitive,i=s[t]&&s[t].Geometry,r=new i;if(!i)throw new Error("Unknown geometry `"+t+"`");return r.init(e),a(r.geometry,e.buffer)}function n(e,t){e[t]--}function o(e,t){e[t]=void 0===e[t]?1:e[t]+1}function a(e,t){var i;return t?(i=(new u.BufferGeometry).fromGeometry(e),i.metadata={type:e.type,parameters:e.parameters||{}},e.dispose(),i):e}var s=e("../core/geometry").geometries,c=e("../core/system").registerSystem,u=e("../lib/three");t.exports.System=c("geometry",{init:function(){this.cache={},this.cacheCount={}},clearCache:function(){this.cache={},this.cacheCount={}},getOrCreateGeometry:function(e){var t,i,n=this.cache;return e.skipCache?r(e):(i=this.hash(e),t=n[i],o(this.cacheCount,i),t?t:(t=r(e),n[i]=t,t))},unuseGeometry:function(e){var t,i,r=this.cache,o=this.cacheCount;e.skipCache||(i=this.hash(e),r[i]&&(n(o,i),o[i]>0||(t=r[i],t.dispose(),delete r[i],delete o[i])))},hash:function(e){return JSON.stringify(e)}})},{"../core/geometry":60,"../core/system":68,"../lib/three":103}],111:[function(e,t,i){e("./camera"),e("./geometry"),e("./light"),e("./material"),e("./tracked-controls")},{"./camera":109,"./geometry":110,"./light":112,"./material":113,"./tracked-controls":114}],112:[function(e,t,i){var r=e("../core/system").registerSystem,n=e("../constants/"),o="data-aframe-default-light";t.exports.System=r("light",{init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener("loaded",this.setupDefaultLights.bind(this))},registerLight:function(e){e.hasAttribute(o)||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var e,t=this.sceneEl;if(this.defaultLights){e=document.querySelectorAll("["+o+"]");for(var i=0;i<e.length;i++)t.removeChild(e[i]);this.defaultLights=!1}},setupDefaultLights:function(){var e,t,i=this.sceneEl;this.userDefinedLights||this.defaultLights||(e=document.createElement("a-entity"),t=document.createElement("a-entity"),e.setAttribute("light",{color:"#BBB",type:"ambient"}),e.setAttribute(o,""),e.setAttribute(n.AFRAME_INJECTED,""),i.appendChild(e),t.setAttribute("light",{color:"#FFF",intensity:.6}),t.setAttribute("position",{x:-.5,y:1,z:1}),t.setAttribute(o,""),t.setAttribute(n.AFRAME_INJECTED,""),i.appendChild(t),this.defaultLights=!0)}})},{"../constants/":51,"../core/system":68}],113:[function(e,t,i){function r(e,t){var i,r,n,o=t.getAttribute("id");if(o)return o;for(r="",n=e||{},i=0;i<t.attributes.length;i++)n[t.attributes[i].name]=t.attributes[i].value;return Object.keys(n).sort().forEach(function(e){r+=e+":"+n[e]+";"}),r}function n(e,t){function i(i,r){function n(e){o(e,t),e.needsUpdate=!0,i(e)}var a="string"!=typeof e;return a?void n(new u.Texture(e)):void p.load(e,n,function(){},function(e){d("`$s` could not be fetched (Error code: %s; Response: %s)",e.status,e.statusText)})}return new Promise(i)}function o(e,t){var i=t.repeat||"1 1",r=i.split(" ");"1 1"!==i&&2===r.length&&(e.wrapS=u.RepeatWrapping,e.wrapT=u.RepeatWrapping,e.repeat.set(parseFloat(r[0]),parseFloat(r[1])))}function a(e,t,i){var r=document.createElement("video");return r.width=t,r.height=i,r.setAttribute("webkit-playsinline",""),r.autoplay=!0,r.loop=!0,r.crossOrigin="anonymous",r.addEventListener("error",function(){f("`$s` is not a valid video",e)},!0),r.src=e,r}function s(e){return e.autoplay="false"!==e.getAttribute("autoplay"),e.controls="false"!==e.getAttribute("controls"),"false"===e.getAttribute("loop")&&e.removeAttribute("loop"),"false"===e.getAttribute("preload")&&(e.preload="none"),e.crossOrigin=e.crossOrigin||"anonymous",e.setAttribute("webkit-playsinline",""),e}var c=e("../core/system").registerSystem,u=e("../lib/three"),l=e("../utils/"),h=l.debug,d=h("components:texture:error"),p=new u.TextureLoader,f=h("components:texture:warn");t.exports.System=c("material",{init:function(){this.materials={},this.textureCache={}},clearTextureCache:function(){this.textureCache={}},loadTexture:function(e,t,i){function r(e){a.loadImage(e,t,i)}function n(e){a.loadVideo(e,t,i)}function o(e){a.loadCanvas(e,t,i)}var a=this;l.srcLoader.validateSrc(e,r,n,o)},loadImage:function(e,t,i){var r=this.hash(t),o=i,a=this.textureCache;return a[r]?void a[r].then(o):(a[r]=n(e,t),void a[r].then(o))},loadCanvas:function(e,t,i){e.readyState=2,e.HAVE_CURRENT_DATA=2,this.loadVideo(e,t,i)},loadVideo:function(e,t,i){function r(e){e.texture.needsUpdate=!0,i(e.texture,e.videoEl)}var n,c,l,h,d=this.textureCache;if("string"!=typeof e){if(l=e,n=this.hashVideo(t,l),d[n])return void d[n].then(r);s(l)}return l=l||a(e,t.width,t.height),n=this.hashVideo(t,l),d[n]?void d[n].then(r):(c=new u.VideoTexture(l),c.minFilter=u.LinearFilter,o(c,t),h={texture:c,videoEl:l},d[n]=Promise.resolve(h),void r(h))},hash:function(e){return JSON.stringify(e)},hashVideo:function(e,t){return r(e,t)},registerMaterial:function(e){this.materials[e.uuid]=e},unregisterMaterial:function(e){delete this.materials[e.uuid]},updateMaterials:function(e){var t=this.materials;Object.keys(t).forEach(function(e){t[e].needsUpdate=!0})}})},{"../core/system":68,"../lib/three":103,"../utils/":120}],114:[function(e,t,i){var r=e("../core/system").registerSystem;t.exports.System=r("tracked-controls",{init:function(){var e=this;this.controllers=[],navigator.getVRDisplays&&navigator.getVRDisplays().then(function(t){t.length>0&&(e.vrDisplay=t[0])})},tick:function(){var e,t,i=navigator.getGamepads&&navigator.getGamepads(),r=this.controllers=[];if(i)for(t=0;t<i.length;++t)e=i[t],e&&e.pose&&r.push(e)}})},{"../core/system":68}],115:[function(e,t,i){var r=e("../lib/three"),n=new r.Object3D,o=new r.VRControls(n);t.exports=function(){var e;if(o.update(),e=n.quaternion,0!==e._x||0!==e._y||0!==e._z)return!0}},{"../lib/three":103}],116:[function(e,t,i){function r(e,t){var i,r={};return e&&"object"==typeof e?o(e):"string"!=typeof e||null===e?t:(i=e.trim().replace(/\s+/g," ").split(" "),r.x=i[0]||t&&t.x,r.y=i[1]||t&&t.y,r.z=i[2]||t&&t.z,r.w=i[3]||t&&t.w,o(r))}function n(e){return"object"!=typeof e?e:[e.x,e.y,e.z,e.w].join(" ").trim()}function o(e){return Object.keys(e).forEach(function(t){return void 0===e[t]?void delete e[t]:void(e[t]=parseFloat(e[t],10))}),e}var a=/\s*(-?\d*\.{0,1}\d+)\s+(-?\d*\.{0,1}\d+)\s+(-?\d*\.{0,1}\d+)\s*/;t.exports.regex=a,t.exports.parse=r,t.exports.stringify=n,t.exports.isCoordinate=function(e){return a.test(e)},t.exports.toVector3=function(e){return new THREE.Vector3(e.x,e.y,e.z)}},{}],117:[function(e,t,i){(function(i){function r(e){var t=e.split(":");return t[t.length-1]}function n(e){var t=r(e),i=c.colors&&c.colors[t];return i||null}function o(){try{return window.localStorage}catch(e){}}var a=e("debug"),s=e("object-assign"),c={colors:{debug:"gray",error:"red",info:"gray",warn:"orange"}},u=function(e){var t=a(e);return t.color=n(e),t};s(u,a);var l=o();l&&(parseInt(l.logs,10)||"true"===l.logs)?u.enable("*"):u.enable("*:error,*:info,*:warn"),i.browser&&(window.logs=u),t.exports=u}).call(this,e("_process"))},{_process:2,debug:3,"object-assign":9}],118:[function(e,t,i){t.exports.getComponentProperty=function(e,t,i){var r;return i=i||".",t.indexOf(i)!==-1?(r=t.split(i),e.getComputedAttribute(r[0])[r[1]]):e.getComputedAttribute(t)},t.exports.setComponentProperty=function(e,t,i,r){var n;return r=r||".",t.indexOf(r)!==-1?(n=t.split(r),void e.setAttribute(n[0],n[1],i)):void e.setAttribute(t,i)}},{}],119:[function(e,t,i){t.exports=function(e){var t=e.style.width,i=e.style.height;e.style.width=parseInt(t,10)+1+"px",e.style.height=parseInt(i,10)+1+"px",setTimeout(function(){e.style.width=t,e.style.height=i},200)}},{}],120:[function(e,t,i){function r(e,t){var i,r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(0===r.length)return e===t;for(i=0;i<r.length;++i)if(e[r[i]]!==t[r[i]])return!1;return!0}var n=e("deep-assign"),o=e("object-assign");t.exports.coordinates=e("./coordinates"),t.exports.checkHeadsetConnected=e("./checkHeadsetConnected"),t.exports.debug=e("./debug"),t.exports.entity=e("./entity"),t.exports.forceCanvasResizeSafariMobile=e("./forceCanvasResizeSafariMobile"),t.exports.material=e("./material"),t.exports.styleParser=e("./styleParser"),t.exports.fireEvent=function(e,t,i){i=i||{},i.detail=i.detail||{},i.detail.target=i.detail.target||e;var r=new CustomEvent(t,i);e.dispatchEvent(r)},t.exports.extend=o,t.exports.extendDeep=n,t.exports.deepEqual=r,t.exports.diff=function(e,t){var i={},n=Object.keys(e);return Object.keys(t).forEach(function(e){n.indexOf(e)===-1&&n.push(e)}),n.forEach(function(n){var o=e[n],a=t[n],s=o&&a&&o.constructor===Object&&a.constructor===Object;(s&&!r(o,a)||!s&&o!==a)&&(i[n]=a)}),i},t.exports.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),a()&&(e=!0),s()&&(e=!1)}(navigator.userAgent||navigator.vendor||window.opera),e};var a=t.exports.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},s=t.exports.isGearVR=function(){return/SamsungBrowser.+Mobile VR/i.test(navigator.userAgent)};t.exports.isLandscape=function(){return 90===window.orientation||window.orientation===-90},t.exports.shouldCaptureKeyEvent=function(e){return!(e.shiftKey||e.metaKey||e.altKey||e.ctrlKey)&&document.activeElement===document.body},t.exports.splitString=function(e,t){"undefined"==typeof t&&(t=" ");var i=new RegExp(t,"g");return e=(e||"").replace(i,t),e.split(t)},t.exports.getElData=function(e,t){function i(t){e.hasAttribute(t)&&(r[t]=e.getAttribute(t))}t=t||{};var r={};return Object.keys(t).forEach(i),r},t.exports.getUrlParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),i=t.exec(location.search);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))},t.exports.isIframed=function(){return window.top!==window.self},t.exports.findAllScenes=function(e){for(var t=[],i=e.getElementsByTagName("*"),r=0,n=i.length;r<n;r++)i[r].isScene&&t.push(i[r]);return t},t.exports.srcLoader=e("./src-loader")},{"./checkHeadsetConnected":115,"./coordinates":116,"./debug":117,"./entity":118,"./forceCanvasResizeSafariMobile":119,"./material":121,"./src-loader":122,"./styleParser":123,"deep-assign":6,"object-assign":9}],121:[function(e,t,i){function r(e,t){t&&(e.emit("materialtextureloaded",{src:t.image,texture:t}),"VIDEO"===t.image.tagName&&(t.image.addEventListener("loadeddata",function(){e.emit("materialvideoloadeddata",{src:t.image,texture:t})}),t.image.addEventListener("ended",function(){e.emit("materialvideoended",{src:t.image,texture:t})})))}t.exports.updateMap=function(e,t){function i(e){o.map=e,o.needsUpdate=!0,r(n,e)}var n=e.el,o=e.material,a=t.src;if(a){if(a===e.textureSrc)return;return e.textureSrc=a,void n.sceneEl.systems.material.loadTexture(a,{src:a,repeat:t.repeat},i)}o.map&&i(null)},t.exports.handleTextureEvents=r},{}],122:[function(e,t,i){function r(e,t,i,r){var n,c,l,h,d=o(e);return d?void a(d,function(e){return e?void t(d):void i(d)}):(n=s(e))?(c=n&&"IMG"===n.tagName,l=n&&"VIDEO"===n.tagName,h=n&&"CANVAS"===n.tagName,c?t(n):l?i(n):h?r(n):void u('"%s" does not point to a valid <img>, <video>, or <canvas> element',e)):void 0}function n(e,t){function i(e){l.push(e),6===l.length&&t(l)}var n,o,a,c="",l=[];for(o=0;o<6;o++)c+="url((.+))s*,s*";if(a=e.match(c))for(o=1;o<7;o++)r(a[o],i);else if(n=s(e))return"A-CUBEMAP"===n.tagName&&n.srcs?t(n.srcs):void u('Selector "%s" does not point to <a-cubemap>',e)}function o(e){var t=e.match(/\url\((.+)\)/);if(t)return t[1]}function a(e,t){function i(){t(!0)}function r(){t(!1)}var n=new Image;n.addEventListener("load",i),n.addEventListener("error",r),n.src=e}function s(e){try{var t=document.querySelector(e);return t||u('No element was found matching the selector: "%s"',e),t}catch(i){return void u('"%s" is not a valid selector',e)}}var c=e("./debug"),u=c("utils:src-loader:warn");t.exports={parseUrl:o,validateSrc:r,validateCubemapSrc:n}},{"./debug":117}],123:[function(e,t,i){function r(e){function t(e){return e[1].toUpperCase()}return e.replace(/-([a-z])/g,t)}function n(e){var t=Object.keys(e),i={};return t.forEach(function(t){var n=r(t);i[n]=e[t]}),i}var o=e("style-attr");t.exports.parse=function(e){var t;return"string"!=typeof e?e:(t=o.parse(e), t[""]?e:n(t))},t.exports.stringify=function(e){return"string"==typeof e?e:o.stringify(e)},t.exports.toCamelCase=r,t.exports.transformKeysToCamelCase=n},{"style-attr":12}],124:[function(e,t,i){THREE.VRControls=function(e,t){function i(e){for(var i=0;i<e.length;i++)if("VRDisplay"in window&&e[i]instanceof VRDisplay||"PositionSensorVRDevice"in window&&e[i]instanceof PositionSensorVRDevice){r=e[i];break}r||t&&t("VR input not available.")}var r,n=this,o=new THREE.Matrix4;navigator.getVRDisplays?navigator.getVRDisplays().then(i):navigator.getVRDevices&&navigator.getVRDevices().then(i),this.scale=1,this.standing=!1,this.userHeight=1.6,this.update=function(){if(r){if(r.getPose){var t=r.getPose();null!==t.orientation&&e.quaternion.fromArray(t.orientation),null!==t.position?e.position.fromArray(t.position):e.position.set(0,0,0)}else{var i=r.getState();null!==i.orientation&&e.quaternion.copy(i.orientation),null!==i.position?e.position.copy(i.position):e.position.set(0,0,0)}this.standing&&(r.stageParameters?(e.updateMatrix(),o.fromArray(r.stageParameters.sittingToStandingTransform),e.applyMatrix(o)):e.position.setY(e.position.y+this.userHeight)),e.position.multiplyScalar(n.scale)}},this.resetPose=function(){r&&(void 0!==r.resetPose?r.resetPose():void 0!==r.resetSensor?r.resetSensor():void 0!==r.zeroSensor&&r.zeroSensor())},this.resetSensor=function(){console.warn("THREE.VRControls: .resetSensor() is now .resetPose()."),this.resetPose()},this.zeroSensor=function(){console.warn("THREE.VRControls: .zeroSensor() is now .resetPose()."),this.resetPose()},this.dispose=function(){r=null}}},{}],125:[function(e,t,i){THREE.VREffect=function(e,t){function i(e){c=e;for(var i=0;i<e.length;i++){if("VRDisplay"in window&&e[i]instanceof VRDisplay){s=e[i],p=!0;break}if("HMDVRDevice"in window&&e[i]instanceof HMDVRDevice){s=e[i],p=!1;break}}void 0===s&&t&&t("HMD not available")}function r(){var t=g.isPresenting;if(g.isPresenting=void 0!==s&&(s.isPresenting||!p&&document[x]instanceof window.HTMLElement),g.isPresenting){var i,r,n=s.getEyeParameters("left");if(p){if(i=n.renderWidth,r=n.renderHeight,s.getLayers){var o=s.getLayers();o.length&&(E=o[0].leftBounds||[0,0,.5,1],b=o[0].rightBounds||[.5,0,.5,1])}}else i=n.renderRect.width,r=n.renderRect.height;t||(y=e.getPixelRatio(),v=e.getSize(),e.setPixelRatio(1),e.setSize(2*i,r,!1))}else t&&(e.setPixelRatio(y),e.setSize(v.width,v.height))}function n(e){var t=2/(e.leftTan+e.rightTan),i=(e.leftTan-e.rightTan)*t*.5,r=2/(e.upTan+e.downTan),n=(e.upTan-e.downTan)*r*.5;return{scale:[t,r],offset:[i,n]}}function o(e,t,i,r){t=void 0===t||t,i=void 0===i?.01:i,r=void 0===r?1e4:r;var o=t?-1:1,a=new THREE.Matrix4,s=a.elements,c=n(e);return s[0]=c.scale[0],s[1]=0,s[2]=c.offset[0]*o,s[3]=0,s[4]=0,s[5]=c.scale[1],s[6]=-c.offset[1]*o,s[7]=0,s[8]=0,s[9]=0,s[10]=r/(i-r)*-o,s[11]=r*i/(i-r),s[12]=0,s[13]=0,s[14]=o,s[15]=0,a.transpose(),a}function a(e,t,i,r){var n=Math.PI/180,a={upTan:Math.tan(e.upDegrees*n),downTan:Math.tan(e.downDegrees*n),leftTan:Math.tan(e.leftDegrees*n),rightTan:Math.tan(e.rightDegrees*n)};return o(a,t,i,r)}var s,c,u,l,h,d,p=!0,f=new THREE.Vector3,m=new THREE.Vector3;navigator.getVRDisplays?navigator.getVRDisplays().then(i):navigator.getVRDevices&&navigator.getVRDevices().then(i),this.isPresenting=!1,this.scale=1;var g=this,v=e.getSize(),y=e.getPixelRatio();this.getVRDisplay=function(){return s},this.getVRDisplays=function(){return c},this.setSize=function(t,i){if(v={width:t,height:i},g.isPresenting){var r=s.getEyeParameters("left");e.setPixelRatio(1),p?e.setSize(2*r.renderWidth,r.renderHeight,!1):e.setSize(2*r.renderRect.width,r.renderRect.height,!1)}else e.setPixelRatio(y),e.setSize(t,i)};var M,A,x,w=e.domElement,E=[0,0,.5,1],b=[.5,0,.5,1];w.requestFullscreen?(M="requestFullscreen",x="fullscreenElement",A="exitFullscreen",document.addEventListener("fullscreenchange",r,!1)):w.mozRequestFullScreen?(M="mozRequestFullScreen",x="mozFullScreenElement",A="mozCancelFullScreen",document.addEventListener("mozfullscreenchange",r,!1)):(M="webkitRequestFullscreen",x="webkitFullscreenElement",A="webkitExitFullscreen",document.addEventListener("webkitfullscreenchange",r,!1)),window.addEventListener("vrdisplaypresentchange",r,!1),this.setFullScreen=function(e){return new Promise(function(t,i){return void 0===s?void i(new Error("No VR hardware found.")):g.isPresenting===e?void t():void(p?t(e?s.requestPresent([{source:w}]):s.exitPresent()):w[M]?(w[e?M:A]({vrDisplay:s}),t()):(console.error("No compatible requestFullscreen method found."),i(new Error("No compatible requestFullscreen method found."))))})},this.requestPresent=function(){return this.setFullScreen(!0)},this.exitPresent=function(){return this.setFullScreen(!1)},this.requestAnimationFrame=function(e){return p&&void 0!==s?s.requestAnimationFrame(e):window.requestAnimationFrame(e)},this.cancelAnimationFrame=function(e){p&&void 0!==s?s.cancelAnimationFrame(e):window.cancelAnimationFrame(e)},this.submitFrame=function(){p&&void 0!==s&&g.isPresenting&&s.submitFrame()},this.autoSubmitFrame=!0;var T=new THREE.PerspectiveCamera;T.layers.enable(1);var L=new THREE.PerspectiveCamera;L.layers.enable(2),this.render=function(t,i,r,n){if(s&&g.isPresenting){var o=t.autoUpdate;o&&(t.updateMatrixWorld(),t.autoUpdate=!1);var c=s.getEyeParameters("left"),v=s.getEyeParameters("right");p?(f.fromArray(c.offset),m.fromArray(v.offset),h=c.fieldOfView,d=v.fieldOfView):(f.copy(c.eyeTranslation),m.copy(v.eyeTranslation),h=c.recommendedFieldOfView,d=v.recommendedFieldOfView),Array.isArray(t)&&(console.warn("THREE.VREffect.render() no longer supports arrays. Use object.layers instead."),t=t[0]);var y=e.getSize();u={x:Math.round(y.width*E[0]),y:Math.round(y.height*E[1]),width:Math.round(y.width*E[2]),height:Math.round(y.height*E[3])},l={x:Math.round(y.width*b[0]),y:Math.round(y.height*b[1]),width:Math.round(y.width*b[2]),height:Math.round(y.height*b[3])},r?(e.setRenderTarget(r),r.scissorTest=!0):e.setScissorTest(!0),(e.autoClear||n)&&e.clear(),null===i.parent&&i.updateMatrixWorld(),T.projectionMatrix=a(h,!0,i.near,i.far),L.projectionMatrix=a(d,!0,i.near,i.far),i.matrixWorld.decompose(T.position,T.quaternion,T.scale),i.matrixWorld.decompose(L.position,L.quaternion,L.scale);var M=this.scale;return T.translateOnAxis(f,M),L.translateOnAxis(m,M),r?(r.viewport.set(u.x,u.y,u.width,u.height),r.scissor.set(u.x,u.y,u.width,u.height)):(e.setViewport(u.x,u.y,u.width,u.height),e.setScissor(u.x,u.y,u.width,u.height)),e.render(t,T,r,n),r?(r.viewport.set(l.x,l.y,l.width,l.height),r.scissor.set(l.x,l.y,l.width,l.height)):(e.setViewport(l.x,l.y,l.width,l.height),e.setScissor(l.x,l.y,l.width,l.height)),e.render(t,L,r,n),r?(r.viewport.set(0,0,y.width,y.height),r.scissor.set(0,0,y.width,y.height),r.scissorTest=!1,e.setRenderTarget(null)):e.setScissorTest(!1),o&&(t.autoUpdate=!0),void(g.autoSubmitFrame&&g.submitFrame())}e.render(t,i,r,n)}}},{}],126:[function(e,t,i){window.glStats=function(){function e(e,t){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function t(){o("allcalls").set(a+s),o("drawElements").set(s),o("drawArrays").set(a),o("bindTexture").set(d),o("useProgram").set(c),o("glfaces").set(u),o("glvertices").set(l),o("glpoints").set(h)}function i(){a=0,s=0,c=0,u=0,l=0,h=0,d=0}function r(){}function n(e){o=e}var o=null,a=0,s=0,c=0,u=0,l=0,h=0,d=0;WebGLRenderingContext.prototype.drawArrays=e(WebGLRenderingContext.prototype.drawArrays,function(){a++,arguments[0]==this.POINTS?h+=arguments[2]:l+=arguments[2]}),WebGLRenderingContext.prototype.drawElements=e(WebGLRenderingContext.prototype.drawElements,function(){s++,u+=arguments[1]/3,l+=arguments[1]}),WebGLRenderingContext.prototype.useProgram=e(WebGLRenderingContext.prototype.useProgram,function(){c++}),WebGLRenderingContext.prototype.bindTexture=e(WebGLRenderingContext.prototype.bindTexture,function(){d++});var p={allcalls:{over:3e3,caption:"Calls (hook)"},drawelements:{caption:"drawElements (hook)"},drawarrays:{caption:"drawArrays (hook)"}},f=[{caption:"WebGL",values:["allcalls","drawelements","drawarrays","useprogram","bindtexture","glfaces","glvertices","glpoints"]}],m=[{base:"allcalls",steps:["drawelements","drawarrays"]}];return{update:t,start:i,end:r,attach:n,values:p,groups:f,fractions:m}},window.threeStats=function(e){function t(){o("renderer.info.memory.geometries").set(e.info.memory.geometries),o("renderer.info.programs").set(e.info.programs.length),o("renderer.info.memory.textures").set(e.info.memory.textures),o("renderer.info.render.calls").set(e.info.render.calls),o("renderer.info.render.faces").set(e.info.render.faces),o("renderer.info.render.points").set(e.info.render.points),o("renderer.info.render.vertices").set(e.info.render.vertices)}function i(){}function r(){}function n(e){o=e}var o=null,a={"renderer.info.memory.geometries":{caption:"Geometries"},"renderer.info.memory.textures":{caption:"Textures"},"renderer.info.programs":{caption:"Programs"},"renderer.info.render.calls":{caption:"Calls"},"renderer.info.render.faces":{caption:"Faces",over:1e3},"renderer.info.render.points":{caption:"Points"},"renderer.info.render.vertices":{caption:"Vertices"}},s=[{caption:"Three.js - Memory",values:["renderer.info.memory.geometries","renderer.info.programs","renderer.info.memory.textures"]},{caption:"Three.js - Render",values:["renderer.info.render.calls","renderer.info.render.faces","renderer.info.render.points","renderer.info.render.vertices"]}],c=[];return{update:t,start:i,end:r,attach:n,values:a,groups:s,fractions:c}},window.BrowserStats=function(){function e(e){var t=100,i=Math.floor(Math.log(e)/h);return Math.round(e*t/Math.pow(1024,i))/t}function t(){a=e(performance.memory.usedJSHeapSize),s=e(performance.memory.totalJSHeapSize),o("memory").set(a),o("total").set(s)}function i(){a=0}function r(){}function n(e){o=e}var o=null,a=0,s=0;window.performance&&!performance.memory&&(performance.memory={usedJSHeapSize:0,totalJSHeapSize:0}),0===performance.memory.totalJSHeapSize&&console.warn("totalJSHeapSize === 0... performance.memory is only available in Chrome .");var c={memory:{caption:"Used Memory",average:!0,avgMs:1e3,over:22},total:{caption:"Total Memory"}},u=[{caption:"Browser",values:["memory","total"]}],l=[{base:"total",steps:["memory"]}],h=Math.log(1024);return{update:t,start:i,end:r,attach:n,values:c,groups:u,fractions:l}},"object"==typeof t&&(t.exports={glStats:window.glStats,threeStats:window.threeStats,BrowserStats:window.BrowserStats})},{}],127:[function(e,t,i){"use strict";!function(){if("undefined"==typeof window.performance&&(window.performance={}),!window.performance.now){var e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-e}}window.performance.mark||(window.performance.mark=function(){}),window.performance.measure||(window.performance.measure=function(){})}(),window.rStats=function(e){function t(e,t){for(var i=Object.keys(e),r=0,n=i.length;r<n;r++)t(i[r])}function i(e){var t=document.createElement("link");t.href=e,t.rel="stylesheet",t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t)}function r(e,t,i){function r(){a.width=v,a.height=g,a.style.width=a.width+"px",a.style.height=a.height+"px",a.className="rs-canvas",e.appendChild(a),s.fillStyle="#444444",s.fillRect(0,0,a.width,a.height)}function n(e,t){u+=.1*(e-u),c*=.99,u>c&&(c=u),s.drawImage(a,1,0,a.width-1,a.height,0,0,a.width-1,a.height),t?s.drawImage(p,a.width-1,a.height-u*a.height/c-g):s.drawImage(h,a.width-1,a.height-u*a.height/c-g)}var o=i||{},a=document.createElement("canvas"),s=a.getContext("2d"),c=0,u=0,l=o.color?o.color:"#666666",h=document.createElement("canvas"),d=h.getContext("2d");h.width=1,h.height=2*g,d.fillStyle="#444444",d.fillRect(0,0,1,2*g),d.fillStyle=l,d.fillRect(0,g,1,g),d.fillStyle="#ffffff",d.globalAlpha=.5,d.fillRect(0,g,1,1),d.globalAlpha=1;var p=document.createElement("canvas"),f=p.getContext("2d");return p.width=1,p.height=2*g,f.fillStyle="#444444",f.fillRect(0,0,1,2*g),f.fillStyle="#b70000",f.fillRect(0,g,1,g),f.globalAlpha=.5,f.fillStyle="#ffffff",f.fillRect(0,g,1,1),f.globalAlpha=1,r(),{draw:n}}function n(e,i){function r(){o.width=v,o.height=g*i,o.style.width=o.width+"px",o.style.height=o.height+"px",o.className="rs-canvas",e.appendChild(o),a.fillStyle="#444444",a.fillRect(0,0,o.width,o.height)}function n(e){a.drawImage(o,1,0,o.width-1,o.height,0,0,o.width-1,o.height);var i=0;t(e,function(t){var r=e[t]*o.height;a.fillStyle=l[t],a.fillRect(o.width-1,i,1,r),i+=r})}var o=document.createElement("canvas"),a=o.getContext("2d");return r(),{draw:n}}function o(e,t){function i(e){if(b&&b.average){v+=e,M++;var t=performance.now();t-y>=(b.avgMs||1e3)&&(g=v/M,v=0,y=t,M=0)}}function n(){h=performance.now(),u.userTimingAPI&&performance.mark(d+"-start"),L=!0}function o(){p=performance.now()-h,u.userTimingAPI&&(performance.mark(d+"-end"),L&&performance.measure(d,d+"-start",d+"-end")),i(p)}function a(){o(),n()}function s(){var e=b&&b.average?g:p;E.nodeValue=Math.round(100*e)/100;var t=b&&(b.below&&p<b.below||b.over&&p>b.over);T.draw(p,t),A.style.color=t?"#b70000":"#ffffff"}function c(){var e=performance.now(),t=e-h;f++,t>1e3&&(p=b&&b.interpolate===!1?f:1e3*f/t,f=0,h=e,i(p))}function l(e){p=e,i(p)}var h,d=e,p=0,f=0,g=0,v=0,y=performance.now(),M=0,A=document.createElement("div"),x=document.createElement("span"),w=document.createElement("div"),E=document.createTextNode(""),b=u?u.values[d.toLowerCase()]:null,T=new r(A,d,b),L=!1;return A.className="rs-counter-base",x.className="rs-counter-id",x.textContent=b&&b.caption?b.caption:d,w.className="rs-counter-value",w.appendChild(E),A.appendChild(x),A.appendChild(w),t?t.div.appendChild(A):m.appendChild(A),h=performance.now(),{set:l,start:n,tick:a,end:o,frame:c,value:function(){return p},draw:s}}function a(e){var i=e.toLowerCase();if(void 0===i&&(i="default"),y[i])return y[i];var r=null;u&&u.groups&&t(u.groups,function(e){var t=u.groups[parseInt(e,10)];r||t.values.indexOf(i.toLowerCase())===-1||(r=t)});var n=new o(i,r);return y[i]=n,n}function s(){if(u.plugins){u.values||(u.values={}),u.groups||(u.groups=[]),u.fractions||(u.fractions=[]);for(var e=0;e<u.plugins.length;e++)u.plugins[e].attach(a),t(u.plugins[e].values,function(t){u.values[t]=u.plugins[e].values[t]}),u.groups=u.groups.concat(u.plugins[e].groups),u.fractions=u.fractions.concat(u.plugins[e].fractions)}else u.plugins={};f=document.createElement("div"),f.className="rs-base",m=document.createElement("div"),m.className="rs-container",m.style.height="auto",f.appendChild(m),document.body.appendChild(f),u&&(u.groups&&t(u.groups,function(e){var t=u.groups[parseInt(e,10)],i=document.createElement("div");i.className="rs-group",t.div=i;var r=document.createElement("h1");r.textContent=t.caption,r.addEventListener("click",function(e){this.classList.toggle("hidden"),e.preventDefault()}.bind(i)),m.appendChild(r),m.appendChild(i)}),u.fractions&&t(u.fractions,function(e){var i=u.fractions[parseInt(e,10)],r=document.createElement("div");r.className="rs-fraction";var o=document.createElement("div");o.className="rs-legend";var a=0;t(u.fractions[e].steps,function(t){var i=document.createElement("p");i.textContent=u.fractions[e].steps[t],i.style.color=l[a],o.appendChild(i),a++}),r.appendChild(o),r.style.height=a*g+"px",i.div=r;var s=new n(r,a);i.graph=s,m.appendChild(r)}))}function c(){t(u.plugins,function(e){u.plugins[e].update()}),t(y,function(e){y[e].draw()}),u&&u.fractions&&t(u.fractions,function(e){var i=u.fractions[parseInt(e,10)],r=[],n=y[i.base.toLowerCase()];n&&(n=n.value(),t(u.fractions[e].steps,function(t){var i=u.fractions[e].steps[parseInt(t,10)].toLowerCase(),o=y[i];o&&r.push(o.value()/n)})),i.graph.draw(r)})}var u=e||{},l=u.colours||["#850700","#c74900","#fcb300","#284280","#4c7c0c"],h="path_to_url",d=(u.CSSPath?u.CSSPath:"")+"rStats.css",p=u.css||[h,d];p.forEach(function(e){i(e)}),u.values||(u.values={});var f,m,g=10,v=200,y={};return s(),function(e){return e?a(e):{element:f,update:c}}},"object"==typeof t&&(t.exports=window.rStats)},{}],128:[function(e,t,i){var r={};r.base64=function(e,t){return"data:"+e+";base64,"+t},r.isMobile=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},r.isIOS=function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},r.isIFrame=function(){try{return window.self!==window.top}catch(e){return!0}},r.appendQueryParameter=function(e,t,i){var r=e.indexOf("?")<0?"?":"&";return e+=r+t+"="+i},r.getQueryParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),i=t.exec(location.search);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))},r.isLandscapeMode=function(){return 90==window.orientation||window.orientation==-90},t.exports=r},{}],129:[function(e,t,i){function r(){var e=document.createElement("video");e.addEventListener("ended",function(){e.play()}),this.request=function(){e.paused&&(e.src=a.base64("video/webm",your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbsLpDt/your_sha256_hashyour_sha256_hashAAAAAo+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAA2AAAFotKrqAo5aBA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtKrqAo5aBA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashtKrqAo5aBA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashNgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw=="),e.play())},this.release=function(){e.pause(),e.src=""}}function n(){var e=null;this.request=function(){e||(e=setInterval(function(){window.location=window.location,setTimeout(window.stop,0)},3e4))},this.release=function(){e&&(clearInterval(e),e=null)}}function o(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?n:r}var a=e("./util.js");t.exports=o()},{"./util.js":128}]},{},[101])(101)})}).call(i,function(){return this}(),r(2).setImmediate)},161:function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("random-color",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:1,y:1,z:1},type:"vec3"}},update:function(){var e=this.data,t=e.max,i=e.min;this.el.setAttribute("material","color","#"+new THREE.Color(Math.random()*t.x+i.x,Math.random()*t.y+i.y,Math.random()*t.z+i.z).getHexString())}}),AFRAME.registerComponent("random-position",{schema:{min:{"default":{x:-10,y:-10,z:-10},type:"vec3"},max:{"default":{x:10,y:10,z:10},type:"vec3"}},update:function(){var e=this.data,t=e.max,i=e.min;this.el.setAttribute("position",{x:Math.random()*(t.x-i.x)+i.x,y:Math.random()*(t.y-i.y)+i.y,z:Math.random()*(t.z-i.z)+i.z})}}),AFRAME.registerComponent("random-spherical-position",{schema:{radius:{"default":10},startX:{"default":0},lengthX:{"default":360},startY:{"default":0},lengthY:{"default":360}},update:function(){var e=this.data,t=THREE.Math.degToRad(Math.random()*e.lengthX+e.startX),i=THREE.Math.degToRad(Math.random()*e.lengthY+e.startY);this.el.setAttribute("position",{x:e.radius*Math.cos(t)*Math.sin(i),y:e.radius*Math.sin(t)*Math.sin(i),z:e.radius*Math.cos(i)})}}),AFRAME.registerComponent("random-rotation",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:360,y:360,z:360},type:"vec3"}},update:function(){var e=this.data,t=e.max,i=e.min;this.el.setAttribute("rotation",{x:Math.random()*t.x+i.x,y:Math.random()*t.y+i.y,z:Math.random()*t.z+i.z})}}),AFRAME.registerComponent("random-scale",{schema:{min:{"default":{x:0,y:0,z:0},type:"vec3"},max:{"default":{x:2,y:2,z:2},type:"vec3"}},update:function(){var e=this.data,t=e.max,i=e.min;this.el.setAttribute("scale",{x:Math.random()*t.x+i.x,y:Math.random()*t.y+i.y,z:Math.random()*t.z+i.z})}})}}); ```
Twinkle is a free and open-source application for voice communications over Voice over IP (VoIP) protocol. Architecture It is designed for Linux operating systems and uses the Qt toolkit for its graphical user interface. For call signaling it employs the Session Initiation Protocol (SIP). It also features direct IP-to-IP calls. Media streams are transmitted via the Real-time Transport Protocol (RTP) which may be encrypted with the Secure Real-time Transport Protocol (SRTP) and the ZRTP security protocols. Since version 1.3.2 (September 2008), Twinkle supports message exchange and a buddy-list feature for presence notification, showing the online-status of predefined communications partners (provider-support needed). Supported audio formats G.711 A-law: 64 kbit/s payload, 8 kHz sampling rate G.711 μ-law: 64 kbit/s payload, 8 kHz sampling rate G.726: 16, 24, 32 or 40 kbit/s payload, 8 kHz sampling rate GSM: 13 kbit/s payload, 8 kHz sampling rate G.729: 8 kbit/s payload, 8 kHz sampling rate iLBC: 13.3 or 15.2 kbit/s payload, 8 kHz sampling rate Speex narrow band: 15.2 kbit/s payload, 8 kHz sampling rate Speex wide band: 28 kbit/s payload, 16 kHz sampling rate Speex ultra wide band: 36 kbit/s payload, 32 kHz sampling rate See also Comparison of VoIP software List of SIP software List of free and open-source software packages Opportunistic encryption References Free VoIP software Cryptographic software Internet privacy software Secure communication Software that uses Qt KDE software
Michalina Olszańska (born 29 June 1992) is a Polish actress and writer. She is a daughter of actors Agnieszka Fatyga and Wojciech Olszański. She has published two novels as a teenager. For her role in I, Olga Hepnarová she received the Minsk International Film Festival Award for best leading actress in 2016 and the Czech Film Critics' Award for best actress in 2017. Michalina has starred in the Netflix original Polish-language series 1983, playing the role of Ofelia "Effy" Ibrom. The series premiered worldwide on 30 November 2018. Films (partial list) The Occupation (2019) - Nadya Sobibor (2018) - Hanna Clash of Futures (German: Krieg der Träume) (2018) - Pola Negri Carga (2018) - Viktoriya / Alanna Matilda (2017) - Mathilde Kschessinska I, Olga Hepnarová (2016) - Olga Hepnarová Anatomia Zla (2015) - Halina The Lure (2015) - Golden Warsaw 44 (2014) - dancer Jack Strong (2014) - Iza Series Books References External links Netflix first Polish original series launches November 30th, 2018. Olszańska 1992 births Polish film actresses Polish television actresses Living people Actresses from Warsaw Czech Lion Awards winners
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; var zeros = require( '@stdlib/array/zeros' ); var zeroTo = require( '@stdlib/array/base/zero-to' ); var logEach = require( '@stdlib/console/log-each' ); var cosine = require( './../lib' ); // Specify a PRNG seed: var opts = { 'seed': 1234 }; // Create an array: var x1 = zeros( 10, 'float64' ); // Create a list of indices: var idx = zeroTo( x1.length ); // Fill the array with pseudorandom numbers: cosine( x1.length, [ 2.0 ], 0, [ 5.0 ], 0, x1, 1, opts ); // Create a second array: var x2 = zeros( 10, 'generic' ); // Fill the array with the same pseudorandom numbers: cosine( x2.length, [ 2.0 ], 0, [ 5.0 ], 0, x2, 1, opts ); // Print the array contents: logEach( 'x1[%d] = %.2f; x2[%d] = %.2f', idx, x1, idx, x2 ); ```
Görwel Christina Carlsdotter Gyllenstierna (1646-1708) was a Swedish noblewoman duellist and landowner. Görwel was the daughter of Lieutenant Colonel Carl Nilsson Gyllenstierna of Fågelvik and Hässelby (1621-1650) and Sidonia Mannersköld (1620-1656). She was famous among her contemporaries for her great learning as well as for her interest and skill in sports normally reserved for males. She was referred to as "A Minerva and an Amazon in one" and was a student of not only chemistry, theology, natural science and other subjects but also active within hunting, fencing and other "Knightly practises" rather than "feminine tasks", something which attracted a lot of attention. She made herself widely known when in 1661 she challenged Lieutenant Colonel David Kohl to a duel for marrying her cousin Görwel Nilsdotter Gyllenstierna against the consent of her family. Görwel Christina married Lieutenant Colonel Leonard Schulman (1644-1677) in 1670. After his death, she managed his estate Leonardsbergs gård during the minority of her son. References Wilhelmina Stålberg: Anteckningar om svenska qvinnor (Notes on Swedish women) http://www.gyllenstierna.org/pdf/attatavla.pdf Nordisk tidskrift för bok- och biblioteksväsen / Årgång VIII. 1921 / http://norrkopingprojekt.wordpress.com/historia/fran-forntid-och-medeltid-till-1900-tal-under-bearbetning/leonardsberg-hallristningar/ 1646 births 1708 deaths 17th-century Swedish nobility 17th-century Swedish landowners Female duellists People from the Swedish Empire Swedish duellists 17th-century women landowners
Adroit may refer to: Adroit class minesweeper, a U.S. Navy minesweeper class Adroitness, a personality trait related to agreeableness HMAS Adroit (P 82), an Attack-class patrol boat L'Adroit class destroyer, a group of fourteen French navy destroyers USS Adroit (AM-82), an Adroit-class minesweeper USS Adroit (MSO-509), an Acme-class minesweeper USS Adroit (SP-248), a steam yacht
```xml <!-- or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file path_to_url Unless required by applicable law or agreed to in writing, "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY specific language governing permissions and limitations --> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-io</artifactId> <version>4.0.0-SNAPSHOT</version> </parent> <artifactId>pulsar-io-kinesis</artifactId> <name>Pulsar IO :: Kinesis</name> <properties> <amazon-kinesis-client.version>2.2.8</amazon-kinesis-client.version> <amazon-kinesis-producer.version>0.14.13</amazon-kinesis-producer.version> <json-flattener.version>0.13.0</json-flattener.version> <flatbuffers-java.version>1.9.0</flatbuffers-java.version> <jaxb-api.version>2.3.0</jaxb-api.version> </properties> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>pulsar-io-common</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>pulsar-io-core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>pulsar-io-aws</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.pulsar</groupId> <artifactId>pulsar-functions-instance</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-yaml</artifactId> </dependency> <!-- add cbor for kinesis-client to fix dep conflict --> <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-cbor</artifactId> </dependency> <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro</artifactId> <version>${avro.version}</version> </dependency> <dependency> <groupId>com.github.wnameless.json</groupId> <artifactId>json-flattener</artifactId> <version>${json-flattener.version}</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> </dependency> <!-- kinesis dependencies --> <dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk-core</artifactId> </dependency> <dependency> <groupId>software.amazon.kinesis</groupId> <artifactId>amazon-kinesis-client</artifactId> <version>${amazon-kinesis-client.version}</version> </dependency> <dependency> <groupId>com.amazonaws</groupId> <artifactId>amazon-kinesis-producer</artifactId> <version>${amazon-kinesis-producer.version}</version> </dependency> <!-- /kinesis dependencies --> <dependency> <groupId>com.google.flatbuffers</groupId> <artifactId>flatbuffers-java</artifactId> <version>${flatbuffers-java.version}</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>${jaxb-api.version}</version> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>localstack</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.awaitility</groupId> <artifactId>awaitility</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.nifi</groupId> <artifactId>nifi-nar-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ```
```c++ // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #include "paddle/fluid/framework/ir/onednn/self_attention_fuse_pass.h" #include <string> #include "paddle/fluid/framework/lod_tensor.h" #include "paddle/fluid/framework/op_version_registry.h" #include "paddle/phi/backends/cpu/cpu_info.h" #include "paddle/phi/kernels/funcs/blas/blas.h" #include "paddle/utils/string/pretty_log.h" #define GET_IR_NODE(node__) GET_IR_NODE_FROM_SUBGRAPH(node__, node__, pattern); #define GET_NODES \ GET_IR_NODE(transpose2_0_op); \ GET_IR_NODE(transpose2_0_out); \ GET_IR_NODE(slice_0_op); \ GET_IR_NODE(slice_0_out); \ GET_IR_NODE(slice_1_op); \ GET_IR_NODE(slice_1_out); \ GET_IR_NODE(slice_2_op); \ GET_IR_NODE(slice_2_out); \ GET_IR_NODE(matmul_0_op); \ GET_IR_NODE(matmul_0_out); \ GET_IR_NODE(matmul_1_op); \ GET_IR_NODE(matmul_1_out); \ GET_IR_NODE(transpose2_1_op); \ GET_IR_NODE(transpose2_1_out); \ GET_IR_NODE(softmax_op); \ GET_IR_NODE(softmax_out); \ GET_IR_NODE(transpose2_2_op); \ GET_IR_NODE(transpose2_2_out); namespace paddle::framework::ir { using string::PrettyLogDetail; void SelfAttentionFusePass::ApplyImpl(ir::Graph* graph) const { #if !defined(__AVX512F__) || !defined(PADDLE_WITH_MKLML) || \ !defined(PADDLE_WITH_DNNL) LOG(WARNING) << "No-avx512 or MKL supported!"; return; #endif if (!phi::backends::cpu::MayIUse(phi::backends::cpu::cpu_isa_t::avx512f)) { return; } // do something; GraphPatternDetector gpd; const std::string pattern_name = "self_attention_fuse"; FusePassBase::Init(pattern_name, graph); // pattern PDNode* x = gpd.mutable_pattern() ->NewNode("x") ->assert_is_op_input("transpose2", "X") ->AsInput(); patterns::SelfAttention pattern(gpd.mutable_pattern(), pattern_name); pattern(x); int fusion_count = 0; auto handler = [&](const GraphPatternDetector::subgraph_t& subgraph, Graph* g) { GET_NODES; // do something; OpDesc desc(transpose2_0_op->Op()->Block()); desc.SetType("self_dp_attention"); desc.SetInput("X", {subgraph.at(x)->Name()}); desc.SetOutput("Out", {transpose2_2_out->Name()}); std::vector<int64_t> in_shape = subgraph.at(x)->Var()->GetShape(); std::vector<int64_t> shape = transpose2_0_out->Var()->GetShape(); // in shape should be [batch_size, seq_len, 3, num_heads, head_size] if (in_shape.size() != 5 || in_shape[2] != 3 || shape.size() != 5 || shape[0] != 3 || shape[2] != in_shape[3]) { LOG(WARNING) << "Self-attention shape mismatch!"; return; } desc.SetAttr("head_number", static_cast<int>(shape[2])); float alpha = 1.0; if (matmul_1_op->Op()->HasAttr("alpha")) alpha = PADDLE_GET_CONST(float, matmul_1_op->Op()->GetAttr("alpha")); desc.SetAttr("alpha", alpha); // Create a new node for the fused op. auto self_attention_node = graph->CreateOpNode(&desc); // Link inputs and outputs. PADDLE_ENFORCE_NE(subgraph.count(x), 0, common::errors::NotFound( "Detector did not find input x of self attention.")); IR_NODE_LINK_TO(subgraph.at(x), self_attention_node); // Input IR_NODE_LINK_TO(self_attention_node, transpose2_2_out); // Output // Delete the unneeded nodes. std::unordered_set<const Node*> marked_nodes({transpose2_0_op, transpose2_0_out, slice_0_op, slice_0_out, slice_1_op, slice_1_out, slice_2_op, slice_2_out, matmul_0_op, matmul_0_out, matmul_1_op, matmul_1_out, transpose2_1_op, transpose2_1_out, softmax_op, softmax_out, transpose2_2_op}); GraphSafeRemoveNodes(graph, marked_nodes); ++fusion_count; }; gpd(graph, handler); AddStatis(fusion_count); if (!Has("disable_logs") || !Get<bool>("disable_logs")) { PrettyLogDetail( "--- fused %d self attention (of scaled_dp_attention) with %s", fusion_count, pattern_name); } } } // namespace paddle::framework::ir REGISTER_PASS(self_attention_fuse_pass, paddle::framework::ir::SelfAttentionFusePass); REGISTER_PASS_CAPABILITY(self_attention_fuse_pass) .AddCombination( paddle::framework::compatible::OpVersionComparatorCombination() .EQ("transpose2", 0) .EQ("slice", 0) .EQ("scale", 0) .EQ("softmax", 0) .EQ("matmul_v2", 0)); ```
Steen Spore (born 27 April 1938) is a Danish official who was the second High Commissioner of Greenland, holding this position from 1 August 1992 to 1 July 1995. After his departure, he became a 1st order knight of the Order of the Dannebrog. References Living people 1938 births Place of birth missing (living people) 20th-century Danish politicians High Commissioners of Greenland
Pérez Pérez also known as La Pérez Pérez is a hamlet in the Camagüey Province of Cuba within the consejo popular (i.e. "ward") of Rolando Valdivia and the municipality of Florida, with an estimated population is 76. Overview The village lies on the western portion of the province, located between Florida and Camaguey along the national highway "Carretera Central" (CC). Economy The economy is primarily agricultural. Education The rural school "Escuela Rural Eduardo Panizo Bustos" is the only school in the area. References Florida, Cuba Populated places in Camagüey Province
Dolmabahçe Palace (, ) located in the Beşiktaş district of Istanbul, Turkey, on the European coast of the Bosporus strait, served as the main administrative center of the Ottoman Empire from 1856 to 1887 and from 1909 to 1922 (Yıldız Palace was used in the interim period). History Dolmabahçe Palace was ordered by the Empire's 31st Sultan, Abdülmecid I, and built between the years 1843 and 1856. Previously, the Sultan and his family had lived at the Topkapı Palace, but as the medieval Topkapı was lacking in contemporary style, luxury, and comfort, as compared to the palaces of the European monarchs, Abdülmecid decided to build a new modern palace near the site of the former Beşiktaş Sahil Palace, which was demolished. Hacı Said Ağa was responsible for the construction works, while the project was realized by architects Garabet Balyan, his son Nigoğayos Balyan and Evanis Kalfa (members of the Armenian Balyan family of Ottoman court architects). The construction cost five million Ottoman gold lira, or 35 tonnes of gold, the equivalent of ca. $1.9 billion in today's (2021) gold values. This sum corresponded to approximately a quarter of the yearly tax revenue. Actually, the construction was financed through debasement, by massive issue of paper money, as well as by foreign loans. The huge expenses placed an enormous burden on the state purse and contributed to the deteriorating financial situation of the Ottoman Empire, which eventually defaulted on its public debt in October 1875, with the subsequent establishment in 1881 of financial control over the "sick man of Europe" by the European powers. The palace was home to six Sultans from 1856, when it was first inhabited, up until the abolition of the Caliphate in 1924: The last royal to live here was Caliph Abdülmecid Efendi. A law that went into effect on March 3, 1924, transferred the ownership of the palace to the national heritage of the new Turkish Republic. Mustafa Kemal Atatürk, the founder and first President of the Republic of Turkey, used the palace as a presidential residence during the summers and enacted some of his most important works here. Atatürk spent the last days of his medical treatment in this palace, where he died on November 10, 1938. Today, the palace is managed by Milli Saraylar Daire Başkanlığı (Directorate of National Palaces) responsible to the Grand National Assembly of Turkey. Location The site of Dolmabahçe was originally a bay on the Bosporus which was used for the anchorage of the Ottoman fleet. The area was reclaimed gradually during the 18th century to become an imperial garden, much appreciated by the Ottoman sultans; it is from this garden that the name Dolmabahçe (Filled-in Garden) comes from the Turkish dolma meaning "filled" and bahçe meaning "garden." Various small summer palaces and wooden pavilions were built here during the 18th and 19th centuries ultimately forming a palace complex named Beşiktaş Waterfront Palace. The area of 110,000 m2 is confined by Bosporus on the east side, while a steep precipice bounds it on the west side, such that after the building of the new 45,000 m2 monoblock Dolmabahçe Palace a relatively limited space has remained for a garden complex which would normally surround such a palace. Design and layout Dolmabahçe is the largest palace in Turkey. It has an area of , and contains 285 rooms, 46 halls, 6 baths (hamam) and 68 toilets. The design contains eclectic elements from the Baroque, Rococo and Neoclassical styles, blended with traditional Ottoman architecture to create a new synthesis. The palace layout and décor reflect the increasing influence of European styles and standards on Ottoman culture and art during the Tanzimat period. The exterior, in particular the view from the Bosporus, shows a classical European two-wing arrangement which is divided by a big avant-corps with two side avant-corps. Functionally, on the other hand, the palace retains elements of traditional Ottoman palace life, and also features of traditional Turkish homes. It is strictly separated structurally in a southern wing (Mabeyn-i Hümâyûn, or Selamlık, the quarters reserved for the men) which contains the public representation rooms, and a northern wing (Harem-i Hümâyûn, the Harem) serving as the private residential area for the Sultan and his family. The two functional areas are separated by the big Ceremonial Hall (Muayede Salonu) with a floor area of and a high dome. Since the harem had to be completely isolated from the outside world, the main entrance for the visitors is located on the narrow southern side. There, the representation rooms are arranged for receptions of visitors and of foreign diplomats. The harem area includes eight interconnected apartments for the wives of the sultan, for his favourites and concubines, and for his mother, each with its own bathroom. Décor and equipment Whereas the Topkapı Palace has exquisite examples of Iznik tiles and Ottoman carving, the Dolmabahçe palace is extensively decorated with gold and crystal. Fourteen tonnes of gold were used to gild the ceilings. Over 100 kg of gold was used to decorate the palace, this weight today costs US$6 million. The world's largest Bohemian crystal chandelier is in the Ceremonial Hall. It has 750 lamps and weighs 4.5 tonnes. The chandelier was originally assumed to have been a gift from Queen Victoria; in 2006, however, a receipt was discovered showing it had been paid for in full by the Sultan. Dolmabahçe has the largest collection of Bohemian and Baccarat crystal chandeliers in the world. The famous Crystal Staircase has the shape of a double horseshoe and is built of Baccarat crystal, brass and mahogany. Expensive stones such as Marmara (Proconnesian) marble, Egyptian alabaster (calcite, also known as onyx-marble), and Porphyry from Pergamon were used for the decoration. The palace includes a large number of Hereke palace carpets made by the Hereke Imperial Factory. The Hereke carpet featured in the main hall happens to be the largest Hereke rug in the world. Also featured are 150-year-old bearskin rugs originally presented to the Sultan as a gift by Tsar Nicholas I. A collection of 202 oil paintings is on display in the palace. A highlight of the collection are 23 paintings by Ivan Aivazovsky which he created as a court painter during his stays in Istanbul. The collection also includes paintings by Gustave Boulanger, Jean-Léon Gérôme, Eugène Fromentin, Stanisław Chlebowski, Félix Ziem, Karl Joseph Kuwasseg, Fausto Zonaro, Théo van Rysselberghe and Alexander Sandor Svoboda. There are also paintings by Turkish painters such as Osman Hamdi Bey, Halil Pasha and Osman Nuri Pasha in this art museum. From the very beginning, the palace's equipment implemented the highest technical standards. Gas lighting and water-closets were imported from Great Britain, whereas the palaces in continental Europe were still lacking these features at that time. Later, electricity, a central heating system and an elevator were installed. Rooms Medhal (Main Entrance) Hall A visit to the Dolmabahçe Palace begins at the Medhal Hall. Rooms leading off the Medhal are towards the sea and the land. The rooms facing the sea were used by the leading Ottoman officials, the Grand Vizier and the other state ministers, while the rooms facing the land were used by various administrators of the palace and the state, such as the Palace Marshall, Şeyhülislam, and members of the House of Representatives (Meclis-i Mebusan) and the Senate (Meclis-i Ayan). Guests would first wait in this hall and then would be led inside at the proper time by a palace protocol officer. On entering the Medhal, one sees Boulle tables on both sides of the room, which bear the monogram of Sultan Abdülmecid on top. The royal monogram of the sultan is also on the fireplace. The English chandelier hanging in the middle of this room has sixty arms. The Hereke fabrics used as upholstery for the furniture and as draperies are in the royal shade of red. The secretariat's rooms The second room after the Medhal to the right is the Clerk's Hall, also referred to as the Tiled Room. The largest painting in the palace collection, a depiction of the Surre Procession by Stefano Ussi, hangs on the left wall of this hall. Surre was used to refer to the caravans which travelled from Istanbul to Mecca during the religious month of Recep, bearing the monetary aid used to support the maintenance and the decoration of the Kaaba and to provide financial assistance to the local population of Hejaz. On the wall to the right is a painting signed by Rudolf Ernst depicting the fire at the Paris Municipal Theater and another painting of a Dutch Village Girl by Delandre. Decorated with French style furniture, this room also contains very valuable porcelain vases. Atatürk's room Mustafa Kemal Atatürk spent the last days of his life in the palace as his health deteriorated. He died at 9:05 A.M. on November 10, 1938, in a bedroom located in the former harem area of the palace. All the clocks in the palace were stopped and set to 9:05 after his death. The clocks outside of his room now are set to the actual time in Turkey, but the clock in the room in which he died still points to 9:05. Harem The harem was a traditional feature of many Middle Eastern architectural structures throughout history. The point of Abdulmecid's construction of the harem was to ensure there were separate quarters built for the Royal family and their leisure. It was common practice for the Sultan's personal concubines to reside within the harem. Rooms meant to house and educate the children of the Sultan as well as the Sultan's own living quarters are included in what would be considered the harem. Usually most Sultans beforehand had restricted their wives and concubines from being in the public, however Abdulmecid unprecedentedly allowed them to leave the palace to shops and bazaars under supervision. Gates Gate of the Sultan Gate of the Treasury Gate to the Bosporus Adjacent buildings A number of further residential buildings are located near the palace including the palace of the Crown Prince (Veliaht Dairesi), the quarters of the gentlemen-in-waiting (Musahiban Dairesi), the dormitories of the servants (Agavat Dairesi, Bendegan Dairesi) and of the guards (Baltacılar Dairesi), the quarters of the Chief Eunuch (Kızlarağası Dairesi). Further buildings include imperial kitchens (Matbah-i Amire), stables, an aviary (Kusluk), a plant nursery (Fidelik), a flour mill, a greenhouse (Sera), a Hereke carpet workshop (Hereke dökümhanesi), a glass manufactory, a foundry, a pharmacy etc. A baroque style mosque designed by Garabet Balyan was built near the palace in 1853–1855. It was commissioned by queen mother Bezm-i Âlem Valide Sultan. Since 1948 the building housed the Naval Museum, but the museum was moved to another location in 1960 after the coup d'état of May, 27th. In 1967, the mosque was returned for worship. A clock tower (Dolmabahçe Saat Kulesi) was erected in front of the Imperial Gate (Saltanat Kapisi) on a square along the European waterfront of Bosporus next to the mosque. The tower was ordered by Sultan Abdülhamid II and designed by the court architect Sarkis Balyan between 1890 and 1895. Its clock was manufactured by the French clockmaker house of Jean-Paul Garnier, and installed by the court clock master Johann Mayer. See also List of Baroque residences Literature İskender Pala. The Jewel on the Bosphorus; Dolmabahçe Palace. TBMM Milli Saraylar Yayınları, Istanbul, 2006. İhsan Yücel, Sema Öner, F. Yaşar Yılmaz, Cengiz Göncü, Hakan Gülsün. Dolmabahçe Palace. TBMM Milli Saraylar Yayınları, Istanbul, 2005. İpek Fitöz. European Lights In Dolmabahçe Palace. TBMM Milli Saraylar Yayınları, Istanbul, 2007. References External links National Palaces in Turkey official site Ottoman palaces in Istanbul Museums in Istanbul Garabet Amira Balyan buildings Nigoğayos Balyan buildings Houses completed in 1856 Bosphorus Government of the Ottoman Empire Mustafa Kemal Atatürk Baroque Revival architecture in Turkey Landmarks in Turkey Beşiktaş Presidential palaces in Turkey Historic house museums in Turkey
```go // Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the specified attribute of the specified AMI. You can specify only one // attribute at a time. // // To specify the attribute, you can use the Attribute parameter, or one of the // following parameters: Description , ImdsSupport , or LaunchPermission . // // Images with an Amazon Web Services Marketplace product code cannot be made // public. // // To enable the SriovNetSupport enhanced networking attribute of an image, enable // SriovNetSupport on an instance and create an AMI from the instance. func (c *Client) ModifyImageAttribute(ctx context.Context, params *ModifyImageAttributeInput, optFns ...func(*Options)) (*ModifyImageAttributeOutput, error) { if params == nil { params = &ModifyImageAttributeInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyImageAttribute", params, optFns, c.addOperationModifyImageAttributeMiddlewares) if err != nil { return nil, err } out := result.(*ModifyImageAttributeOutput) out.ResultMetadata = metadata return out, nil } // Contains the parameters for ModifyImageAttribute. type ModifyImageAttributeInput struct { // The ID of the AMI. // // This member is required. ImageId *string // The name of the attribute to modify. // // Valid values: description | imdsSupport | launchPermission Attribute *string // A new description for the AMI. Description *types.AttributeValue // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . DryRun *bool // Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched // from this AMI will have HttpTokens automatically set to required so that, by // default, the instance requires that IMDSv2 is used when requesting instance // metadata. In addition, HttpPutResponseHopLimit is set to 2 . For more // information, see [Configure the AMI]in the Amazon EC2 User Guide. // // Do not use this parameter unless your AMI software supports IMDSv2. After you // set the value to v2.0 , you can't undo it. The only way to reset your AMI is // to create a new AMI from the underlying snapshot. // // [Configure the AMI]: path_to_url#configure-IMDS-new-instances-ami-configuration ImdsSupport *types.AttributeValue // A new launch permission for the AMI. LaunchPermission *types.LaunchPermissionModifications // The operation type. This parameter can be used only when the Attribute // parameter is launchPermission . OperationType types.OperationType // The Amazon Resource Name (ARN) of an organization. This parameter can be used // only when the Attribute parameter is launchPermission . OrganizationArns []string // The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter // can be used only when the Attribute parameter is launchPermission . OrganizationalUnitArns []string // Not supported. ProductCodes []string // The user groups. This parameter can be used only when the Attribute parameter // is launchPermission . UserGroups []string // The Amazon Web Services account IDs. This parameter can be used only when the // Attribute parameter is launchPermission . UserIds []string // The value of the attribute being modified. This parameter can be used only when // the Attribute parameter is description or imdsSupport . Value *string noSmithyDocumentSerde } type ModifyImageAttributeOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { return err } err = stack.Serialize.Add(&awsEc2query_serializeOpModifyImageAttribute{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyImageAttribute{}, middleware.After) if err != nil { return err } if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyImageAttribute"); err != nil { return fmt.Errorf("add protocol finalizers: %v", err) } if err = addlegacyEndpointContextSetter(stack, options); err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = addClientRequestID(stack); err != nil { return err } if err = addComputeContentLength(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } if err = addRetry(stack, options); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { return err } if err = addRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } if err = addTimeOffsetBuild(stack, c); err != nil { return err } if err = addUserAgentRetryMode(stack, options); err != nil { return err } if err = addOpModifyImageAttributeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyImageAttribute(options.Region), middleware.Before); err != nil { return err } if err = addRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opModifyImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, OperationName: "ModifyImageAttribute", } } ```
I17 may also refer to: Interstate 17, an Interstate Highway located entirely within the state of Arizona, United States Japanese submarine I-17, a B1 type submarine of the Imperial Japanese Navy Polikarpov I-17, a Soviet single-seat fighter prototype Bohuslän Regiment (I 17), a Swedish Army regiment
```html <!-- (See accompanying file LICENSE.md or copy at path_to_url --> <!-- boost-no-inspect --> <!-- HTML header for doxygen 1.8.9.1--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url"> <html xmlns="path_to_url"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>Boost.Hana: Monad</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); // (See accompanying file LICENSE.md or copy at path_to_url MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true, width: "75% container" } } }); </script><script type="text/javascript" src="path_to_url"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <!-- Additional javascript for drawing charts. --> <script type="text/javascript" src="highcharts.js"></script> <script type="text/javascript" src="highcharts-data.js"></script> <script type="text/javascript" src="highcharts-exporting.js"></script> <script type="text/javascript" src="chart.js"></script> <script type="text/javascript" src="hana.js"></script> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="Boost.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">Boost.Hana &#160;<span id="projectnumber">1.3.0</span> </div> <div id="projectbrief">Your standard library for metaprogramming</div> </td> <td> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('group__group-Monad.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#var-members">Variables</a> </div> <div class="headertitle"> <div class="title">Monad<div class="ingroups"><a class="el" href="group__group-concepts.html">Concepts</a></div></div> </div> </div><!--header--> <div class="contents"> <a name="details" id="details"></a><h2 class="groupheader">Description</h2> <p>The <code>Monad</code> concept represents <code>Applicative</code>s with the ability to flatten nested levels of structure. </p> <p>Historically, Monads are a construction coming from category theory, an abstract branch of mathematics. The functional programming community eventually discovered how Monads could be used to formalize several useful things like side effects, which led to the wide adoption of Monads in that community. However, even in a multi-paradigm language like C++, there are several constructs which turn out to be Monads, like <code>std::optional</code>, <code>std::vector</code> and others.</p> <p>Everybody tries to introduce <code>Monad</code>s with a different analogy, and most people fail. This is called the <a href="path_to_url">Monad tutorial fallacy</a>. We will try to avoid this trap by not presenting a specific intuition, and we will instead present what monads are mathematically. For specific intuitions, we will let readers who are new to this concept read one of the many excellent tutorials available online. Understanding Monads might take time at first, but once you get it, a lot of patterns will become obvious Monads; this enlightening will be your reward for the hard work.</p> <p>There are different ways of defining a Monad; Haskell uses a function called <code>bind</code> (<code>&gt;&gt;=</code>) and another one called <code>return</code> (it has nothing to do with C++'s <code>return</code> statement). They then introduce relationships that must be satisfied for a type to be a Monad with those functions. Mathematicians sometimes use a function called <code>join</code> and another one called <code>unit</code>, or they also sometimes use other category theoretic constructions like functor adjunctions and the Kleisli category.</p> <p>This library uses a composite approach. First, we use the <code>flatten</code> function (equivalent to <code>join</code>) along with the <code>lift</code> function from <code>Applicative</code> (equivalent to <code>unit</code>) to introduce the notion of monadic function composition. We then write the properties that must be satisfied by a Monad using this monadic composition operator, because we feel it shows the link between Monads and Monoids more clearly than other approaches.</p> <p>Roughly speaking, we will say that a <code>Monad</code> is an <code>Applicative</code> which also defines a way to compose functions returning a monadic result, as opposed to only being able to compose functions returning a normal result. We will then ask for this composition to be associative and to have a neutral element, just like normal function composition. For usual composition, the neutral element is the identity function <code>id</code>. For monadic composition, the neutral element is the <code>lift</code> function defined by <code>Applicative</code>. This construction is made clearer in the laws below.</p> <dl class="section note"><dt>Note</dt><dd>Monads are known to be a big chunk to swallow. However, it is out of the scope of this documentation to provide a full-blown explanation of the concept. The <a href="path_to_url#Monad">Typeclassopedia</a> is a nice Haskell-oriented resource where more information about Monads can be found.</dd></dl> <h2>Minimal complete definitions </h2> <p>First, a <code>Monad</code> must be both a <code>Functor</code> and an <code>Applicative</code>. Also, an implementation of <code>flatten</code> or <code>chain</code> satisfying the laws below for monadic composition must be provided.</p> <dl class="section note"><dt>Note</dt><dd>The <code>ap</code> method for <code>Applicatives</code> may be derived from the minimal complete definition of <code>Monad</code> and <code>Functor</code>; see below for more information.</dd></dl> <h2>Laws </h2> <p>To simplify writing the laws, we use the comparison between functions. For two functions <code>f</code> and <code>g</code>, we define </p><div class="fragment"><div class="line">f == g <span class="keywordflow">if</span> and only <span class="keywordflow">if</span> f(x) == g(x) for <a class="code" href="group__group-Searchable.html#ga81ae9764dd7818ad36270c6419fb1082">all</a> x</div></div><!-- fragment --><p>With the usual composition of functions, we are given two functions \( f : A \to B \) and \( g : B \to C \), and we must produce a new function \( compose(g, f) : A \to C \). This composition of functions is associative, which means that </p><div class="fragment"><div class="line"><a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(h, <a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(g, f)) == <a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(<a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(h, g), f)</div></div><!-- fragment --><p>Also, this composition has an identity element, which is the identity function. This simply means that </p><div class="fragment"><div class="line"><a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(f, <span class="keywordtype">id</span>) == <a class="code" href="group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b">compose</a>(<span class="keywordtype">id</span>, f) == f</div></div><!-- fragment --><p>This is probably nothing new if you are reading the <code>Monad</code> laws. Now, we can observe that the above is equivalent to saying that functions with the composition operator form a <code>Monoid</code>, where the neutral element is the identity function.</p> <p>Given an <code>Applicative</code> <code>F</code>, what if we wanted to compose two functions \( f : A \to F(B) \) and \( g : B \to F(C) \)? When the <code>Applicative</code> <code>F</code> is also a <code>Monad</code>, such functions taking normal values but returning monadic values are called <em>monadic functions</em>. To compose them, we obviously can't use normal function composition, since the domains and codomains of <code>f</code> and <code>g</code> do not match properly. Instead, we'll need a new operator &ndash; let's call it <code>monadic_compose</code>: </p><p class="formulaDsp"> \[ \mathtt{monadic\_compose} : (B \to F(C)) \times (A \to F(B)) \to (A \to F(C)) \] </p> <p>How could we go about implementing this function? Well, since we know <code>F</code> is an <code>Applicative</code>, the only functions we have are <code>transform</code> (from <code>Functor</code>), and <code>lift</code> and <code>ap</code> (from <code>Applicative</code>). Hence, the only thing we can do at this point while respecting the signatures of <code>f</code> and <code>g</code> is to set (for <code>x</code> of type <code>A</code>) </p><div class="fragment"><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(g, f)(x) = <a class="code" href="group__group-Functor.html#ga5a8975f6e55375d5b6038a9c36ee63e7">transform</a>(f(x), g)</div></div><!-- fragment --><p>Indeed, <code>f(x)</code> is of type <code>F(B)</code>, so we can map <code>g</code> (which takes <code>B</code>'s) on it. Doing so will leave us with a result of type <code>F(F(C))</code>, but what we wanted was a result of type <code>F(C)</code> to respect the signature of <code>monadic_compose</code>. If we had a joker of type \( F(F(C)) \to F(C) \), we could simply set </p><div class="fragment"><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(g, f)(x) = joker(<a class="code" href="group__group-Functor.html#ga5a8975f6e55375d5b6038a9c36ee63e7">transform</a>(f(x), g))</div></div><!-- fragment --><p>and we would be happy. It turns out that <code>flatten</code> is precisely this joker. Now, we'll want our joker to satisfy some properties to make sure this composition is associative, just like our normal composition was. These properties are slightly cumbersome to specify, so we won't do it here. Also, we'll need some kind of neutral element for the composition. This neutral element can't be the usual identity function, because it does not have the right type: our neutral element needs to be a function of type \( X \to F(X) \) but the identity function has type \( X \to X \). It is now the right time to observe that <code>lift</code> from <code>Applicative</code> has exactly the right signature, and so we'll take this for our neutral element.</p> <p>We are now ready to formulate the <code>Monad</code> laws using this composition operator. For a <code>Monad</code> <code>M</code> and functions \( f : A \to M(B) \), \( g : B \to M(C) \) and \( h : C \to M(D) \), the following must be satisfied: </p><div class="fragment"><div class="line"><span class="comment">// associativity</span></div><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(h, <a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(g, f)) == <a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(<a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(h, g), f)</div><div class="line"></div><div class="line"><span class="comment">// right identity</span></div><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(f, <a class="code" href="group__group-Applicative.html#ga712038d7abbc7159f8792788f7cd0c73">lift</a>&lt;M(A)&gt;) == f</div><div class="line"></div><div class="line"><span class="comment">// left identity</span></div><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(<a class="code" href="group__group-Applicative.html#ga712038d7abbc7159f8792788f7cd0c73">lift</a>&lt;M(B)&gt;, f) == f</div></div><!-- fragment --><p>which is to say that <code>M</code> along with monadic composition is a Monoid where the neutral element is <code>lift</code>.</p> <h2>Refined concepts </h2> <ol type="1"> <li><code>Functor</code></li> <li><code>Applicative</code> (free implementation of <code>ap</code>)<br /> When the minimal complete definition for <code>Monad</code> and <code>Functor</code> are both satisfied, it is possible to implement <code>ap</code> by setting <div class="fragment"><div class="line"><a class="code" href="group__group-Applicative.html#ga6176a32953dbbdee96e3ab3c73e4c890">ap</a>(fs, xs) = <a class="code" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">chain</a>(fs, [](<span class="keyword">auto</span> f) {</div><div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__group-Functor.html#ga5a8975f6e55375d5b6038a9c36ee63e7">transform</a>(xs, f);</div><div class="line">})</div></div><!-- fragment --></li> </ol> <h2>Concrete models </h2> <p><code><a class="el" href="structboost_1_1hana_1_1lazy.html" title="hana::lazy implements superficial laziness via a monadic interface. ">hana::lazy</a></code>, <code><a class="el" href="structboost_1_1hana_1_1optional.html" title="Optional value whose optional-ness is known at compile-time. ">hana::optional</a></code>, <code><a class="el" href="structboost_1_1hana_1_1tuple.html" title="General purpose index-based heterogeneous sequence with a fixed length. ">hana::tuple</a></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> Variables</h2></td></tr> <tr class="memitem:ga05fdc2f887cb9967357487a432ace98b"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">boost::hana::chain</a></td></tr> <tr class="memdesc:ga05fdc2f887cb9967357487a432ace98b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Feed a monadic value into a monadic computation.Given a monadic value and a monadic function, <code>chain</code> feeds the monadic value into the function, thus performing some Monad-specific effects, and returns the result. An implementation of <code>chain</code> must satisfy. <a href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">More...</a><br /></td></tr> <tr class="separator:ga05fdc2f887cb9967357487a432ace98b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:gaa5fec6fb418de5da3ecb500fd6cc54dd"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monad.html#gaa5fec6fb418de5da3ecb500fd6cc54dd">boost::hana::flatten</a></td></tr> <tr class="memdesc:gaa5fec6fb418de5da3ecb500fd6cc54dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Collapse two levels of monadic structure into a single level.Given a monadic value wrapped into two levels of monad, <code>flatten</code> removes one such level. An implementation of <code>flatten</code> must satisfy. <a href="group__group-Monad.html#gaa5fec6fb418de5da3ecb500fd6cc54dd">More...</a><br /></td></tr> <tr class="separator:gaa5fec6fb418de5da3ecb500fd6cc54dd"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:gaec3fe26c7378fd3057af83e03bd9b104"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">boost::hana::monadic_compose</a></td></tr> <tr class="memdesc:gaec3fe26c7378fd3057af83e03bd9b104"><td class="mdescLeft">&#160;</td><td class="mdescRight">Composition of monadic functions.Given two monadic functions <code>f</code> and <code>g</code>, <code>monadic_compose</code> returns a new function equivalent to the composition of <code>f</code> with <code>g</code>, except the result of <code>g</code> is <code>chain</code>ed into <code>f</code> instead of simply passed to it, as with normal composition. <code>monadic_compose</code> satisfies. <a href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">More...</a><br /></td></tr> <tr class="separator:gaec3fe26c7378fd3057af83e03bd9b104"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ga5e0735de01a24f681c55aedfeb6d13bf"><td class="memTemplParams" colspan="2">template&lt;typename M &gt; </td></tr> <tr class="memitem:ga5e0735de01a24f681c55aedfeb6d13bf"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__group-Monad.html#ga5e0735de01a24f681c55aedfeb6d13bf">boost::hana::tap</a></td></tr> <tr class="memdesc:ga5e0735de01a24f681c55aedfeb6d13bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tap inside a monadic chain.Given a function <code>f</code>, <code>tap&lt;M&gt;</code> returns a new function which performs <code>f</code> on its argument and then returns the argument lifted in the <code>M</code> <code>Monad</code>. Combined with the property that <code>chain(m, lift&lt;M&gt;) == m</code>, this provides a way of executing an action inside a monadic chain without influencing its overall result. This is useful to e.g. insert debug statements or perform actions that are not tied to the chain but that need to be executed inside of it. <a href="group__group-Monad.html#ga5e0735de01a24f681c55aedfeb6d13bf">More...</a><br /></td></tr> <tr class="separator:ga5e0735de01a24f681c55aedfeb6d13bf"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:gaaddd3789de43cf989babb10cdc0b447a"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-Monad.html#gaaddd3789de43cf989babb10cdc0b447a">boost::hana::then</a></td></tr> <tr class="memdesc:gaaddd3789de43cf989babb10cdc0b447a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sequentially compose two monadic actions, discarding any value produced by the first but not its effects. <a href="group__group-Monad.html#gaaddd3789de43cf989babb10cdc0b447a">More...</a><br /></td></tr> <tr class="separator:gaaddd3789de43cf989babb10cdc0b447a"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <h2 class="groupheader">Variable Documentation</h2> <a class="anchor" id="ga05fdc2f887cb9967357487a432ace98b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">constexpr auto boost::hana::chain</td> </tr> </table> </div><div class="memdoc"> <p><code>#include &lt;<a class="el" href="fwd_2chain_8hpp.html">boost/hana/fwd/chain.hpp</a>&gt;</code></p> <b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; xs, <span class="keyword">auto</span>&amp;&amp; f) -&gt; decltype(<span class="keyword">auto</span>) {</div><div class="line"> <span class="keywordflow">return</span> tag-dispatched;</div><div class="line"> }</div></div><!-- fragment --> <p>Feed a monadic value into a monadic computation.Given a monadic value and a monadic function, <code>chain</code> feeds the monadic value into the function, thus performing some Monad-specific effects, and returns the result. An implementation of <code>chain</code> must satisfy. </p> <div class="fragment"><div class="line"><a class="code" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">chain</a>(xs, f) == <a class="code" href="group__group-Monad.html#gaa5fec6fb418de5da3ecb500fd6cc54dd">flatten</a>(<a class="code" href="group__group-Functor.html#ga5a8975f6e55375d5b6038a9c36ee63e7">transform</a>(xs, f))</div></div><!-- fragment --><h2>Signature </h2> <p>For a monad <code>M</code>, given a monadic value of type <code>M(A)</code> and a monadic function \( f : A \to M(B) \), <code>chain</code> has the signature \( \mathtt{chain} : M(A) \times (A \to M(B)) \to M(B) \).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">xs</td><td>A monadic value to be fed to the function <code>f</code>.</td></tr> <tr><td class="paramname">f</td><td>A function taking a normal value in the <code>xs</code> structure, and returning a monadic value. This function is called as <code>f(x)</code>, where <code>x</code> is an element of the structure <code>xs</code>.</td></tr> </table> </dd> </dl> <h2>Example </h2> </div> </div> <a class="anchor" id="gaa5fec6fb418de5da3ecb500fd6cc54dd"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">constexpr auto boost::hana::flatten</td> </tr> </table> </div><div class="memdoc"> <p><code>#include &lt;<a class="el" href="fwd_2flatten_8hpp.html">boost/hana/fwd/flatten.hpp</a>&gt;</code></p> <b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; xs) {</div><div class="line"> <span class="keywordflow">return</span> tag-dispatched;</div><div class="line"> }</div></div><!-- fragment --> <p>Collapse two levels of monadic structure into a single level.Given a monadic value wrapped into two levels of monad, <code>flatten</code> removes one such level. An implementation of <code>flatten</code> must satisfy. </p> <div class="fragment"><div class="line"><a class="code" href="group__group-Monad.html#gaa5fec6fb418de5da3ecb500fd6cc54dd">flatten</a>(xs) == <a class="code" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">chain</a>(xs, <span class="keywordtype">id</span>)</div></div><!-- fragment --><p>For <code>Sequence</code>s, this simply takes a <code>Sequence</code> of <code>Sequence</code>s, and returns a (non-recursively) flattened <code>Sequence</code>.</p> <h2>Signature </h2> <p>For a <code>Monad</code> <code>M</code>, the signature of <code>flatten</code> is \( \mathtt{flatten} : M(M(T)) \to M(T) \)</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">xs</td><td>A value with two levels of monadic structure, which should be collapsed into a single level of structure.</td></tr> </table> </dd> </dl> <h2>Example </h2> </div> </div> <a class="anchor" id="gaec3fe26c7378fd3057af83e03bd9b104"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">constexpr auto boost::hana::monadic_compose</td> </tr> </table> </div><div class="memdoc"> <p><code>#include &lt;<a class="el" href="fwd_2monadic__compose_8hpp.html">boost/hana/fwd/monadic_compose.hpp</a>&gt;</code></p> <b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; f, <span class="keyword">auto</span>&amp;&amp; g) {</div><div class="line"> <span class="keywordflow">return</span> [perfect-<a class="code" href="group__group-functional.html#ga41ada6b336e9d5bcb101ff0c737acbd0">capture</a>](<span class="keyword">auto</span>&amp;&amp; x) -&gt; decltype(<span class="keyword">auto</span>) {</div><div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">hana::chain</a>(forwarded(g)(forwarded(x)), forwarded(f));</div><div class="line"> };</div><div class="line"> }</div><div class="ttc" id="group__group-Monad_html_ga05fdc2f887cb9967357487a432ace98b"><div class="ttname"><a href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">boost::hana::chain</a></div><div class="ttdeci">constexpr auto chain</div><div class="ttdoc">Feed a monadic value into a monadic computation.Given a monadic value and a monadic function...</div><div class="ttdef"><b>Definition:</b> chain.hpp:51</div></div> <div class="ttc" id="group__group-functional_html_ga41ada6b336e9d5bcb101ff0c737acbd0"><div class="ttname"><a href="group__group-functional.html#ga41ada6b336e9d5bcb101ff0c737acbd0">boost::hana::capture</a></div><div class="ttdeci">constexpr auto capture</div><div class="ttdoc">Create a function capturing the given variables. </div><div class="ttdef"><b>Definition:</b> capture.hpp:45</div></div> </div><!-- fragment --> <p>Composition of monadic functions.Given two monadic functions <code>f</code> and <code>g</code>, <code>monadic_compose</code> returns a new function equivalent to the composition of <code>f</code> with <code>g</code>, except the result of <code>g</code> is <code>chain</code>ed into <code>f</code> instead of simply passed to it, as with normal composition. <code>monadic_compose</code> satisfies. </p> <div class="fragment"><div class="line"><a class="code" href="group__group-Monad.html#gaec3fe26c7378fd3057af83e03bd9b104">monadic_compose</a>(f, g)(x) == <a class="code" href="group__group-Monad.html#ga05fdc2f887cb9967357487a432ace98b">chain</a>(g(x), f)</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Unlike <code>compose</code>, <code>monadic_compose</code> does not generalize nicely to arities higher than one. Hence, only unary functions may be used with <code>monadic_compose</code>.</dd></dl> <h2>Signature </h2> <p>Given a <code>Monad</code> <code>M</code> and two functions \( f : B \to M(C) \) and \( g : A \to M(B) \), the signature is \( \mathtt{monadic\_compose} : (B \to M(C)) \times (A \to M(B)) \to (A \to M(C)) \).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">f</td><td>A monadic function with signature \( B \to M(C) \).</td></tr> <tr><td class="paramname">g</td><td>A monadic function with signature \( A \to M(B) \).</td></tr> </table> </dd> </dl> <dl class="section note"><dt>Note</dt><dd>This method is not tag-dispatched, so it can't be customized directly.</dd></dl> <h2>Example </h2> </div> </div> <a class="anchor" id="ga5e0735de01a24f681c55aedfeb6d13bf"></a> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template&lt;typename M &gt; </div> <table class="memname"> <tr> <td class="memname">constexpr auto boost::hana::tap</td> </tr> </table> </div><div class="memdoc"> <p><code>#include &lt;<a class="el" href="fwd_2tap_8hpp.html">boost/hana/fwd/tap.hpp</a>&gt;</code></p> <b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; f) {</div><div class="line"> <span class="keywordflow">return</span> tag-dispatched;</div><div class="line"> }</div></div><!-- fragment --> <p>Tap inside a monadic chain.Given a function <code>f</code>, <code>tap&lt;M&gt;</code> returns a new function which performs <code>f</code> on its argument and then returns the argument lifted in the <code>M</code> <code>Monad</code>. Combined with the property that <code>chain(m, lift&lt;M&gt;) == m</code>, this provides a way of executing an action inside a monadic chain without influencing its overall result. This is useful to e.g. insert debug statements or perform actions that are not tied to the chain but that need to be executed inside of it. </p> <dl class="section note"><dt>Note</dt><dd>Since C++ is not a pure language, it is possible to perform side effects inside the <code>f</code> function. Actually, side effects are the only reason why one might want to use <code>tap</code>. However, one should not rely on the side effects being done in any specific order.</dd></dl> <dl class="tparams"><dt>Template Parameters</dt><dd> <table class="tparams"> <tr><td class="paramname">M</td><td>The tag (a <code>Monad</code>) of the monads in the tapped monadic chain.</td></tr> </table> </dd> </dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">f</td><td>A function to be executed inside a monadic chain. It will be called as <code>f(x)</code>, where <code>x</code> is a value inside the previous monad in the chain. The result of <code>f</code> is always discarded.</td></tr> </table> </dd> </dl> <h2>Example </h2> </div> </div> <a class="anchor" id="gaaddd3789de43cf989babb10cdc0b447a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">constexpr auto boost::hana::then</td> </tr> </table> </div><div class="memdoc"> <p><code>#include &lt;<a class="el" href="fwd_2then_8hpp.html">boost/hana/fwd/then.hpp</a>&gt;</code></p> <b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; before, <span class="keyword">auto</span>&amp;&amp; xs) -&gt; decltype(<span class="keyword">auto</span>) {</div><div class="line"> <span class="keywordflow">return</span> tag-dispatched;</div><div class="line"> }</div></div><!-- fragment --> <p>Sequentially compose two monadic actions, discarding any value produced by the first but not its effects. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">before</td><td>The first <code>Monad</code> in the monadic composition chain. The result of this monad is ignored, but its effects are combined with that of the second monad.</td></tr> <tr><td class="paramname">xs</td><td>The second <code>Monad</code> in the monadic composition chain.</td></tr> </table> </dd> </dl> <h2>Example </h2> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- (See accompanying file LICENSE.md or copy at path_to_url --> <!-- boost-no-inspect --> <!-- HTML footer for doxygen 1.8.9.1--> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> </ul> </div> </body> </html> ```
Pleasant Valley is an unincorporated community in Buckingham County, in the U.S. state of Virginia. References Unincorporated communities in Virginia Unincorporated communities in Buckingham County, Virginia
```glsl precision highp float; varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform mediump float hueAdjust; const highp vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0); const highp vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0); const highp vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0); const highp vec4 kYIQToR = vec4 (1.0, 0.9563, 0.6210, 0.0); const highp vec4 kYIQToG = vec4 (1.0, -0.2721, -0.6474, 0.0); const highp vec4 kYIQToB = vec4 (1.0, -1.1070, 1.7046, 0.0); void main () { // Sample the input pixel highp vec4 color = texture2D(inputImageTexture, textureCoordinate); // Convert to YIQ highp float YPrime = dot (color, kRGBToYPrime); highp float I = dot (color, kRGBToI); highp float Q = dot (color, kRGBToQ); // Calculate the hue and chroma highp float hue = atan (Q, I); highp float chroma = sqrt (I * I + Q * Q); // Make the user's adjustments hue += (-hueAdjust); //why negative rotation? // Convert back to YIQ Q = chroma * sin (hue); I = chroma * cos (hue); // Convert back to RGB highp vec4 yIQ = vec4 (YPrime, I, Q, 0.0); color.r = dot (yIQ, kYIQToR); color.g = dot (yIQ, kYIQToG); color.b = dot (yIQ, kYIQToB); // Save the result gl_FragColor = color; } ```
Issam Yacoub Bagdi is a Syrian politician and a member of the Syrian Social Nationalist Party. References Syrian Social Nationalist Party politicians 1955 births Living people
Mark Nicholas Davies (born 18 February 1988) is an English former professional footballer who played as a midfielder. Club career Wolverhampton Wanderers Born in Willenhall, West Midlands, Davies was a former student of Pool Hayes Community School in Willenhall. He joined Wolverhampton Wanderers Youth Academy at the age of nine. He signed his first professional contract at Wolves in February 2005, aged 17. In the 2005–06 season, Davies broke into the Wolves first team under then manager Glenn Hoddle, making his league debut as a substitute against Leeds United on 20 August 2005, losing the game 2–0 at Elland Road. He made his first league start for Wolves against Watford on 20 September 2005, losing the game 2–1. Davies scored his first professional league goal against Luton Town on 13 January 2006, winning the game 2–1 at Molineux. He went on to frequently feature for Wolves throughout the season, and becoming a vital member of the team, making 20 appearances for Wolves in his first season. Former Wolves Academy manager Chris Evans said Davies was the best prospect to come out the youth system since players Robbie Keane and Joleon Lescott. The start of the 2006–07 season was a blow to Davies as he suffered a cartilage problem in pre-season. However, he returned to fitness in January 2007, making 10 substitute appearances for Wolves, and also went on to feature for the England U-19's. In the 2007–08 season, Davies picked up a shoulder injury and other niggling injuries which kept him out for the whole season, limiting him to only a few reserve outings. The 2008–09 season started brightly for Davies as he had a successful pre-season for Wolves. His first and final game for Wolves ended with him coming off the bench to assist and score the winning goal against Accrington Stanley in the League Cup, winning the game 3–2 at Molineux. This was Davies last appearance for Wolves as on 27 November 2008 he joined League One club Leicester City on a one-month loan deal. In late January 2009, Davies handed in a transfer request at Wolves. Wolves did offer him a new three-and-a-half-year contract, but he declined the offer. Wolves went on to receive a bid from League One side Leicester City, for around £650,000, but this was declined by the club. Wolves then later received another bid from Premier League side Bolton Wanderers, believed to be in the region of £1m, rising to £2m, and accepted the offer, with Wolves adding a hefty sell on clause in part of the deal. Davies went on to sign for Bolton Wanderers on 26 January 2009, ending his ten-year stay with the club. Loan spell at Leicester City On 27 November 2008, Davies joined League One side Leicester City on a one-month loan deal in order to gain full match fitness after almost two years on the sidelines. He made his debut for Leicester as a substitute against Southend United on 6 December 2008, winning the game 3–0 at the Walkers Stadium. He made his first start for Leicester against Peterborough United on 20 December 2008, thrashing them 4–0 at the Walkers Stadium. He scored his only goal for the club against Leyton Orient on 10 January 2009, as Leicester won 3–0 at the Walkers Stadium. Davies impressed during his short loan spell, causing Leicester to extend it to 1 February 2009. Bolton Wanderers On 26 January 2009, Davies joined Premier League side Bolton Wanderers on a four-and-a-half-year contract, for an undisclosed fee. He extended his contract by another year on 15 February 2011. He made his debut two days after signing when he came on as a substitute in the 2–2 draw with local rivals Blackburn Rovers at Ewood Park. He made his first start for his new club three days later against Tottenham Hotspur on 31 January 2009, winning the game 3–2 at the Reebok Stadium. He scored his first goal for Bolton at the start of the 2009–10 season, in the League Cup against Tranmere Rovers on 25 August 2009, winning the game 1–0. He scored his second goal for the club in the FA Cup against Lincoln City on 2 January 2010, winning the game 4–0 at the Reebok Stadium. Davies scored his first league goal for Bolton against Blackpool on 27 November 2010, earning his side a 2–2 draw at the Reebok Stadium. This goal was voted the club's goal of the 2010–11 season at the official Player of the Year dinner, beating Johan Elmander's individual effort against Wolverhampton Wanderers. Davies his first goal of the 2011–12 season at Blackburn Rovers on 20 December as Bolton won 2–1. His second came in a 3–1 home win against Liverpool on 21 January 2012. He also scored on 11 February in the 2–1 loss to Wigan Athletic with a half volley from twenty yards out. He scored on the final day of the 2011–12 season, 13 May, in a 2–2 draw against Stoke City but the result wasn't enough to keep Bolton in the Premier League as they needed a win to stay up. On 23 October 2012, in a Championship match against Wolverhampton Wanderers at Molineux, Davies scored a 90th-minute equaliser against his former club with a left-foot volley from the edge of the box into the far top corner to earn Bolton a 2–2 draw. On 27 February 2013, Davies signed a new contract with Bolton, keeping at the club until 2017. Two days later Davies was ruled out with injury for up to ten months. His return came as he came on as a late substitute against Wigan ten months later in December 2013. He missed the final two months of that season with injury, as well as all of pre season and the first month of the following season. In November 2014, Davies was again injured, this time for up to four months. On 19 May 2017, the club confirmed that Davies would be leaving when his contract expired on 30 June. According to former teammate Robbie Blake Davies had agreed a transfer to Chelsea before his injury troubles. As of May 2020 Davies is working in property development in the Midlands. International career Youth teams Davies represented England U17's in the UEFA European Under-17 Football Championship in 2004. He scored two goals for his country, his first against Portugal U17's in the group stages, and his second against Portugal in the Third-Place Play-Off, drawing the game 4–4, but losing on penalties. Davies captained the England U17's team in the UEFA European Under-17 Football Championship Qualifier against Northern Ireland U17's at Molineux in March 2005. He also went on to represent the England U17's in the UEFA European Under-17 Football Championship in May 2005, but they did not make it out of the group stages. Davies was called up to the England U21s squad to face Ecuador U21s on 16 February 2010, but had to pull out due to the ankle injury he picked up against Arsenal. On 14 March 2011, Davies received his second call up to the England Under 21s, but pulled out due to injury. He received a third call up, for the England Under-21 Championships provisional squad, but once again pulled out due to the same injury from his second call up and was replaced by Liverpool's Jay Spearing. Personal life His younger brother Richard Davies is a professional footballer and currently plays for Northern Premier League Division One South side Chasetown. Career statistics References External links Official club profile – Bolton Wanderers 1988 births Living people People from Willenhall Sportspeople from the Metropolitan Borough of Walsall Men's association football midfielders English men's footballers English Football League players Premier League players Wolverhampton Wanderers F.C. players Leicester City F.C. players Bolton Wanderers F.C. players England men's youth international footballers
```go package packp import ( "bytes" "fmt" "io" "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/format/pktline" "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability" ) // UploadPackRequest represents a upload-pack request. // Zero-value is not safe, use NewUploadPackRequest instead. type UploadPackRequest struct { UploadRequest UploadHaves } // NewUploadPackRequest creates a new UploadPackRequest and returns a pointer. func NewUploadPackRequest() *UploadPackRequest { ur := NewUploadRequest() return &UploadPackRequest{ UploadHaves: UploadHaves{}, UploadRequest: *ur, } } // NewUploadPackRequestFromCapabilities creates a new UploadPackRequest and // returns a pointer. The request capabilities are filled with the most optiomal // ones, based on the adv value (advertaised capabilities), the UploadPackRequest // it has no wants, haves or shallows and an infinite depth func NewUploadPackRequestFromCapabilities(adv *capability.List) *UploadPackRequest { ur := NewUploadRequestFromCapabilities(adv) return &UploadPackRequest{ UploadHaves: UploadHaves{}, UploadRequest: *ur, } } // IsEmpty a request if empty if Haves are contained in the Wants, or if Wants // length is zero func (r *UploadPackRequest) IsEmpty() bool { return isSubset(r.Wants, r.Haves) } func isSubset(needle []plumbing.Hash, haystack []plumbing.Hash) bool { for _, h := range needle { found := false for _, oh := range haystack { if h == oh { found = true break } } if !found { return false } } return true } // UploadHaves is a message to signal the references that a client has in a // upload-pack. Do not use this directly. Use UploadPackRequest request instead. type UploadHaves struct { Haves []plumbing.Hash } // Encode encodes the UploadHaves into the Writer. If flush is true, a flush // command will be encoded at the end of the writer content. func (u *UploadHaves) Encode(w io.Writer, flush bool) error { e := pktline.NewEncoder(w) plumbing.HashesSort(u.Haves) var last plumbing.Hash for _, have := range u.Haves { if bytes.Equal(last[:], have[:]) { continue } if err := e.Encodef("have %s\n", have); err != nil { return fmt.Errorf("sending haves for %q: %s", have, err) } last = have } if flush && len(u.Haves) != 0 { if err := e.Flush(); err != nil { return fmt.Errorf("sending flush-pkt after haves: %s", err) } } return nil } ```
The Silliman University College of Nursing (SUCN) is one of the constituent colleges of Silliman University, a private university in Dumaguete, Philippines. Established in 1947, the college was attached as a four-year program under the College of Arts and Sciences. In 1958, it implemented a five-year curriculum but reverted to its four-year baccalaureate program in 1976 when required to do so by the Department of Education and Culture (now the Department of Education). The College of Nursing provides instruction in both the undergraduate and graduate levels. A Center of Excellence in Nursing Education, it is on Level IV accreditation status and one of the country's top nursing schools. In 2009, it ranked 1st in the Philippines based on licensure examination results. It has a total of 108 board topnotchers since 1951. As one of the biggest academic units in the university, the college is housed in four buildings. These buildings are: Roble Hall which also houses the Office of the Dean; Mary Marquis Smith Hall; Olivia Villaflores-Yanson Hall and Ethel Chapman Hall. A fifth building named the William Barry Thompson Learning Resources Center is under construction. Its base hospital is the Silliman University Medical Center, but student nurses also get to be assigned in other hospitals in Dumaguete. Academic programs Undergraduate B.S. in Nursing Graduate Pictures Notable alumni Cynthia Cipres-Klein, Member, California Board of Registered Nursing (BRN). Luz Sobong Porter, Professor Emerita, Florida University Jean S. Yan, Chief Scientist, World Health Organization (Nursing and Midwifery) Footnotes External links Silliman University official website Nursing Nursing schools in the Philippines
```python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # along with this program. If not, see <path_to_url try: from PySide6.QtCore import Qt, QSize, QPoint, QThread, QTranslator, QCoreApplication, QLocale from PySide6.QtWidgets import QLineEdit, QInputDialog from PySide6.QtGui import QIcon except: from PyQt5.QtCore import Qt, QSize, QPoint, QThread, QTranslator, QCoreApplication, QLocale from PyQt5.QtWidgets import QLineEdit, QInputDialog from PyQt5.QtGui import QIcon from persepolis.constants import OS from persepolis.gui.video_finder_progress_ui import VideoFinderProgressWindow_Ui from persepolis.scripts.shutdown import shutDown from persepolis.scripts.bubble import notifySend from persepolis.scripts import download import subprocess import platform os_type = platform.system() class ShutDownThread(QThread): def __init__(self, parent, category, password=None): QThread.__init__(self) self.category = category self.password = password self.parent = parent def run(self): shutDown(self.parent, category=self.category, password=self.password) class VideoFinderProgressWindow(VideoFinderProgressWindow_Ui): def __init__(self, parent, gid_list, persepolis_setting): super().__init__(persepolis_setting) self.persepolis_setting = persepolis_setting self.parent = parent # first item in the gid_list is related to video's link and second item is related to audio's link. self.gid_list = gid_list # this variable can be changed by checkDownloadInfo method in mainwindow.py # self.gid defines that which gid is downloaded. self.gid = gid_list[0] # this variable used as category name in ShutDownThread self.video_finder_plus_gid = 'video_finder_' + str(gid_list[0]) # connect signals and sluts self.resume_pushButton.clicked.connect(self.resumePushButtonPressed) self.stop_pushButton.clicked.connect(self.stopPushButtonPressed) self.pause_pushButton.clicked.connect(self.pausePushButtonPressed) self.download_progressBar.setValue(0) self.limit_pushButton.clicked.connect(self.limitPushButtonPressed) self.limit_frame.setEnabled(False) self.limit_checkBox.toggled.connect(self.limitCheckBoxToggled) self.after_frame.setEnabled(False) self.after_checkBox.toggled.connect(self.afterCheckBoxToggled) self.after_pushButton.clicked.connect(self.afterPushButtonPressed) # add support for other languages locale = str(self.persepolis_setting.value('settings/locale')) QLocale.setDefault(QLocale(locale)) self.translator = QTranslator() if self.translator.load(':/translations/locales/ui_' + locale, 'ts'): QCoreApplication.installTranslator(self.translator) # check if limit speed is activated by user or not add_link_dictionary = self.parent.persepolis_db.searchGidInAddLinkTable(gid_list[0]) limit = str(add_link_dictionary['limit_value']) if limit != '0': limit_number = limit[:-1] limit_unit = limit[-1] self.limit_spinBox.setValue(float(limit_number)) if limit_unit == 'K': self.after_comboBox.setCurrentIndex(0) else: self.after_comboBox.setCurrentIndex(1) self.limit_checkBox.setChecked(True) self.after_comboBox.currentIndexChanged.connect(self.afterComboBoxChanged) self.limit_comboBox.currentIndexChanged.connect(self.limitComboBoxChanged) self.limit_spinBox.valueChanged.connect(self.limitComboBoxChanged) # set window size and position size = self.persepolis_setting.value( 'ProgressWindow/size', QSize(595, 274)) position = self.persepolis_setting.value( 'ProgressWindow/position', QPoint(300, 300)) self.resize(size) self.move(position) # close window with ESC key def keyPressEvent(self, event): if event.key() == Qt.Key_Escape: self.close() def closeEvent(self, event): # save window size and position self.persepolis_setting.setValue('ProgressWindow/size', self.size()) self.persepolis_setting.setValue('ProgressWindow/position', self.pos()) self.persepolis_setting.sync() self.hide() def resumePushButtonPressed(self, button): if self.status == "paused": answer = download.downloadUnpause(self.gid) # if aria2 did not respond , then this function is checking for aria2 # availability , and if aria2 disconnected then aria2Disconnected is # executed if not (answer): version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate("progress_src_ui_tr", "Persepolis is trying to connect! be patient!"), 10000, 'warning', parent=self.parent) else: notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 did not respond!"), QCoreApplication.translate("progress_src_ui_tr", "Please try again."), 10000, 'warning', parent=self.parent) def pausePushButtonPressed(self, button): if self.status == "downloading": answer = download.downloadPause(self.gid, self.parent) # if aria2 did not respond , then this function is checking for aria2 # availability , and if aria2 disconnected then aria2Disconnected is # executed if not (answer): version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() download.downloadStop(self.gid, self.parent) notifySend("Aria2 disconnected!", "Persepolis is trying to connect! be patient!", 10000, 'warning', parent=self.parent) else: notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 did not respond!"), QCoreApplication.translate("progress_src_ui_tr", "Try again!"), 10000, 'critical', parent=self.parent) def stopPushButtonPressed(self, button): # cancel shut down progress dictionary = {'category': self.video_finder_plus_gid, 'shutdown': 'canceled'} self.parent.temp_db.updateQueueTable(dictionary) answer = download.downloadStop(self.gid, self.parent) # if aria2 did not respond , then this function is checking for aria2 # availability , and if aria2 disconnected then aria2Disconnected is # executed if answer == 'None': version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate("progress_src_ui_tr", "Persepolis is trying to connect! be patient!"), 10000, 'warning', parent=self.parent) def limitCheckBoxToggled(self, checkBoxes): # user checked limit_checkBox if self.limit_checkBox.isChecked() is True: self.limit_frame.setEnabled(True) self.limit_pushButton.setEnabled(True) # user unchecked limit_checkBox else: self.limit_frame.setEnabled(False) # check download status is "scheduled" or not! for i in [0, 1]: gid = self.gid_list[i] dictionary = self.parent.persepolis_db.searchGidInDownloadTable(gid) status = dictionary['status'] if status != 'scheduled': # tell aria2 for unlimited speed download.limitSpeed(gid, "0") else: # update limit value in data_base add_link_dictionary = {'gid': gid, 'limit_value': '0'} self.parent.persepolis_db.updateAddLinkTable([add_link_dictionary]) def limitComboBoxChanged(self, connect): self.limit_pushButton.setEnabled(True) def afterComboBoxChanged(self, connect): self.after_pushButton.setEnabled(True) def afterCheckBoxToggled(self, checkBoxes): if self.after_checkBox.isChecked(): self.after_frame.setEnabled(True) else: # so user canceled shutdown after download # write cancel value in data_base for this gid dictionary = {'category': self.video_finder_plus_gid, 'shutdown': 'canceled'} self.parent.temp_db.updateQueueTable(dictionary) def afterPushButtonPressed(self, button): self.after_pushButton.setEnabled(False) # For Linux and Mac OSX and FreeBSD and OpenBSD if os_type != OS.WINDOWS: # get root password passwd, ok = QInputDialog.getText( self, 'PassWord', 'Please enter root password:', QLineEdit.Password) if ok: # check password is true or not! pipe = subprocess.Popen(['sudo', '-S', 'echo', 'hello'], stdout=subprocess.DEVNULL, stdin=subprocess.PIPE, stderr=subprocess.DEVNULL, shell=False) pipe.communicate(passwd.encode()) answer = pipe.wait() # Wrong password while answer != 0: passwd, ok = QInputDialog.getText( self, 'PassWord', 'Wrong Password!\nPlease try again.', QLineEdit.Password) if ok: pipe = subprocess.Popen(['sudo', '-S', 'echo', 'hello'], stdout=subprocess.DEVNULL, stdin=subprocess.PIPE, stderr=subprocess.DEVNULL, shell=False) pipe.communicate(passwd.encode()) answer = pipe.wait() else: ok = False break if ok is not False: # if user selects shutdown option after download progress, # value of 'shutdown' will changed in temp_db for this progress # and "wait" word will be written for this value. # (see ShutDownThread and shutdown.py for more information) # shutDown method will check that value in a loop . # when "wait" changes to "shutdown" then shutdown.py script # will shut down the system. shutdown_enable = ShutDownThread(self.parent, self.video_finder_plus_gid, passwd) self.parent.threadPool.append(shutdown_enable) self.parent.threadPool[-1].start() else: self.after_checkBox.setChecked(False) else: self.after_checkBox.setChecked(False) else: # for Windows for gid in self.gid_list: shutdown_enable = ShutDownThread(self.parent, self.video_finder_plus_gid) self.parent.threadPool.append(shutdown_enable) self.parent.threadPool[-1].start() def limitPushButtonPressed(self, button): self.limit_pushButton.setEnabled(False) if self.limit_comboBox.currentText() == "KiB/s": limit_value = str(self.limit_spinBox.value()) + str("K") else: limit_value = str(self.limit_spinBox.value()) + str("M") # if download was started before , send the limit_speed request to aria2 . # else save the request in data_base for i in [0, 1]: gid = self.gid_list[i] dictionary = self.parent.persepolis_db.searchGidInDownloadTable(gid) status = dictionary['status'] if status != 'scheduled': download.limitSpeed(self.gid, limit_value) else: # update limit value in data_base add_link_dictionary = {'gid': gid, 'limit_value': limit_value} self.parent.persepolis_db.updateAddLinkTable([add_link_dictionary]) def changeIcon(self, icons): icons = ':/' + str(icons) + '/' self.resume_pushButton.setIcon(QIcon(icons + 'play')) self.pause_pushButton.setIcon(QIcon(icons + 'pause')) self.stop_pushButton.setIcon(QIcon(icons + 'stop')) ```
```yaml title: LiquidJS subtitle: "A simple, expressive and safe template engine." description: "LiquidJS is a simple, expressive and safe Shopify / GitHub Pages compatible template engine in pure JavaScript." author: Harttle language: - en - zh-cn timezone: UTC url: path_to_url root: / permalink: news/:year/:month/:day/:title/ relative_link: true new_post_name: :year-:month-:day-:title.md # File name of new posts post_asset_folder: true per_page: 0 pretty_urls: trailing_index: false trailing_html: false theme: navy skip_render: "api/**" ignore: "api/**" include: "api/**" syntax_highlighter: prismjs prismjs: preprocess: true line_number: true line_threshold: 0 tab_replace: "" algolia: applicationID: 0X19J927JZ apiKey: 533161d821384919672e4ce8a39451b3 indexName: liquidjs twitter: harttleharttle github: harttle/liquidjs oc: liquidjs ```
Mariano Brull Caballero (February 24, 1891 – June 8, 1956) was a Cuban poet usually associated with the French Symbolist movement. Two Symbolists who strongly influenced him were Stéphane Mallarmé and Paul Valéry. Among Cuban poets of the first half of the 20th century he was the most outstanding of those who wrote poetry for poetry's sake, as opposed to poetry that addressed social issues or poetry that was inspired by the culture of Cubans of African descent. Because of his interest in the sounds of words, he is known for a type of poetry called "jitanjáfora" in which the words are virtually meaningless, their sounds all-important. A diplomat by profession, he lived many years in various countries of Europe and the Americas. Biography Brull was born in Camagüey, in eastern Cuba, where his father, Miguel Brull, a Spanish army officer, was stationed. His mother, Celia Caballero, was descended from a family that had resided in Cuba for many generations. Early life As a child he lived in Ceuta and Málaga in Spain. It was during his teenage years, as a student in Camagüey, that he discovered his passion for poetry. He and other students founded a short-lived magazine for which they wrote poems and essays. Eagerly reading all the poetry he could, young Brull was especially struck by the work of the French Symbolist poets. In 1908 he moved to Havana where he attended the university, graduating with a Doctor of Law degree at age 22. He worked in a law office but also wrote poetry for the magazine El Fígaro. During 1914 and 1915 he was a member of the small group that formed around the Dominican literary critic, Pedro Henríquez Ureña. Henríquez, believing Brull had a future as a poet, became his mentor, introducing him to editors and suggesting he read poets whom Brull was not familiar with. In 1916 Brull published his first book of poetry, La casa del silencio. Shortly afterwards he married Adela Baralt and, switching careers, entered the Cuban diplomatic service. Brull was determined to leave Cuba where, exhausted by years fighting for independence and preoccupied by problems facing any new country, the arts were confused and anemic, uninterested in the great experiments (Cubism, futurism, etc.) taking place in Europe. Diplomatic life Though impatient to reach Europe, the first two countries he was sent to as a diplomat were the United States and Peru. In the mid 20s he was stationed in Madrid. There he had the good fortune to participate in the reunions of the literary cafés frequented by many of the best poets Spain was to produce in the 20th century: Federico García Lorca, Rafael Alberti, Jorge Guillén, Vicente Aleixandre, and many others. While in Madrid, some of Brull's early poetry was published in Paris in a French translation. In 1923 Brull joined about 60 young professionals of Havana who decided to take a public stance against the reigning passivity and mediocrity in politics and culture. Called El Grupo Minorista (the Minority Group), they demanded an end to years of cultural backwardness and an aggressive affirmation of the new artistic tendencies coming out of Europe. In politics, they denounced dictatorships and called for the formation of a Cuban government more responsive to the people. In 1928 he published his second book of poetry, Poemas en menguante. Though also published in Paris, where he was now living, it was written in Spanish. All of his books were small editions for friends and family, paid for out of his pocket. The Brulls lived in Paris from 1927 to 1934 with only two interruptions: a year, each, in Berne and Havana. The return of the Brulls to Havana coincided with numerous riots and demonstrations as students clashed with the police of the government of President Gerardo Machado, an increasingly ruthless dictator. Brull spent the Great Depression back in Paris. Two or three times a year found him traveling. He frequently visited Havana, on business; southern Spain, the land of his childhood; and Mexico City where he called on his friends Gabriela Mistral, the Chilean poet, Alfonso Reyes, the Mexican man-of-letters, and others. In 1934 his third book of poetry, Canto redondo, was brought out in Paris. He was stationed in Rome between 1934 and 1937 where fascism was alive and thriving. After moving to Brussels (for the second time) at the end of the 1930s, Brull was in charge of attending to the many German Jews who, seeking visas to emigrate, had lined up before the legations and embassies of numerous countries. During these years he was Cuba's delegate to the XVII Reunion of the Assembly of the League of Nations and, also, Commissioner for the repatriation of Cubans fleeing the Spanish Civil War. Brull had decided that an all-European war was imminent—though most of his colleagues and friends disagreed—and pressured the Ministry to be sent back to Havana. He left in June, 1939. The ship carrying all of the Brull's household effects to Cuba, a year later, was torpedoed by the Germans and sank. In 1939, a bilingual (French-Spanish) book, Poëmes, came out in Paris, with a preface written by one of the greatest literary figures of France at the time, Paul Valéry. Brull worked for many years on a translation into Spanish of Valéry's most famous, and difficult, poems: "Le Cimetiére Marin" (The Graveyard by the Sea) and "La Jeune Parque" (The Young Fate). In Cuba, Brull was one of the principal organizers of a conference of the International Institute of Intellectual Cooperation, held in 1941. This organization was made up of major intellectuals who believed that the interchange of ideas would help lead to a solution to the tension of the 1930s and the violence of the Second World War. Brull admired people who were capable of both action and thought. He had no use for the static attitude of Rodin´s famous statue, "The Thinker". Brull's hero was the Cuban journalist and poet, José Martí, who was responsible for organizing the Cuban resistance to Spain and died in a skirmish with Spanish soldiers during the War of Independence. His fifth book of poetry, Solo de rosa, appeared. His poems also were printed in the foremost literary publications: Social, Gaceta del Caribe, Espuela de Plata, Clavileño, Orígenes and El Fígaro. He had long conversations with the exiled Spanish poet, Juan Ramón Jiménez, who wrote a similar type of poetry. During the Second World War, Brull was stationed in Washington, D.C., and in 1945 was sent to Ottawa to establish the first Cuban diplomatic mission in Canada. In Brussels, once more, in 1950, he published Temps en peine. Tiempo en pena, a bilingual edition. Here, too, his wife died after many years of fighting cancer. His last post was as Cuban ambassador to Uruguay. However, he refused to comply with an order from the Cuban dictator, Fulgencio Batista, and he resigned abruptly, ending a career of 47 years in the Cuban diplomatic service. That same year (1954) the final book of poems he would publish, Rien que... (Nada más que...), came out in Paris. Final years Back in Havana, he turned to modernizing the cattle ranch he had inherited from his mother. But a growing brain tumor weakened him bit by bit and eventually left him in a coma. He died at the age of 65 in 1956. Literary characteristics Beginnings Brull's first book, La casa del silencio, is a good example of Hispanic modernismo, though it has its share of intimate, Symbolist influence and a touch of tropical romanticism. Already one finds themes that would stay with him always: the ideal of beauty and the exploration of the interior world of one's heart as an escape from the ungrateful reality of the world, of time and of history. Evident is the influence of the Spaniard, Juan Ramón Jiménez, and the Mexican, Enrique González Martínez. But these poems are the works of an apprentice. Nine years pass between the publication of his first and second collections of poetry, years in which he matured, especially after he arrived in Europe. In his second book, Poemas en menguante, Brull embraces Symbolism (pure poetry) though the poems show him still struggling to assimilate the new style completely. He finds himself immersed in the heated discussion of the poets of his generation as to whether Symbolism, art as pure abstraction, meant the dehumanization of art. Brull made clear that poetry was the purification of thought and form, but never abstraction. Nevertheless, Symbolism and dehumanization were firmly linked in the minds of many. Harsh criticism of Symbolism was heard frequently, including in Cuba. Sound A cornerstone of Brull's poetry is the word as sound material. This interest in sound can be found in the efforts of Mallarmé and Valéry to achieve pure poetry but also in the neo-popular romances of the Spanish poetic tradition—a source that attracted other poets writing in Spanish, most famously García Lorca. Similar experiments involving playing with the sounds of words were to be found in Italian, German and English literature of the 1920s and before. Brull's creativity involving the use of sounds, through tongue-twisters and various phonetic experiments, could create a world of “magical enchantment.” These sounds and lexicological permutations combined, at times, to reach a level of senselessness which resulted in poetry that has come to be known as “jitanjáfora” after the use of this word in Brull's poem “Filiflama…”, a poem entirely made up of invented words. Filiflama alabe cundre ala olalúnea alífera alveola jitanjáfora liris salumba salífera. Olivia oleo olorife alalai cánfora sandra milingítara girófora zumbra ulalindre calandra. Yet such an extreme interest in sound was but one strand in Brull's poetry. The “jitanjáfora” was “a verbal joke, created by Brull at the margin of the main body of his work, but as an extreme consequence of this work’s development”. Childhood Brull revealed an interest in childhood in a number of his poems through the subject matter or through the use of language and rhythms associated with children's verses or both. The verses he learned in southern Spain, as a boy, had a lasting impact on him. These verses were part of the traditional, popular poetry that was so appreciated by his generation of poets. Typical features Though he used alliteration and metaphors abundantly, there are features of his work that differentiate it from the work of others. These include: rare word associations using a word twice in the same line but in totally different ways punning combining or coupling words that mean the opposite or clash in their meanings (“the melody of the perfume”), usually placed within dashes, and illogical sound games and onomatopoeia where one sees the influence of futurism and Dadaism. Brull favored free verse, followed by blank verse, though he occasionally turned to the sonnet and other poetic forms. His poems are usually short, and the total number of poems he wrote was rather limited, both rare attributes in comparison with most Hispanic poets. The rose The rose is the principal motif in Brull's poetry, his preferred symbol for “a standard of perfection and permanence in a transitory world.” Mallarmé had defined a flower as the absence of the stem and leaves, his way of stating that the finality of art is the concentration on the essence. No other Cuban poet went as far as Brull in immersing himself in this conception of poetry. But his Latin American origin do not allow him to forget the stems and leaves altogether. Brull's contribution to the poetry of Cuba is this counterpoint between the concrete and the ideal. An equilibrium between the sensual and the abstract is most fully reached in Solo de rosas, a collection of poems in which the poet praises the rose in its pure essence, fragile and wondrous, and not corrupted by the passage of time. Epitafio de la Rosa (Epitaph For a Rose) Rompo una rosa y no te encuentro. Al viento, así, columnas deshojadas, palacio de la rosa en ruinas. Ahora—rosa imposible—empiezas: por agujas de aire entretejida al mar de la delicia intacta, donde todas las rosas --antes que rosa— belleza son sin cárcel de belleza. (I take apart a rose and I don't find you. To the wind, thus, columns of floating petals, the palace of the rose in ruins. Now—impossible rose—you begin: by needles of interwoven air to the sea of the intact delight, where all the roses of the world --before they were a rose— are beautiful without the prison of beauty.) Nothingness In his last works, Tiempo en pena and Nada más que…, Brull's poetry takes on a melancholy, somber and reflective tone, that of a journey toward the black hole of existentialism, possibly intensified by personal tragedy (the death of his wife) and the world around him seemingly falling apart (the Spanish Civil War followed by the Second World War). Throughout the years one can find, beneath the formal and expressive clarity, Brull's increasing concern of what he saw as a world in permanent deterioration. The roots of this desolation are evident in his first poems in which absence and silence—often depicted as quietness—are present yet any discomfort is dispelled by the vision of ideal beauty. By the 1950s, absence is no longer a friendly notion as it veers into nothingness. Brull is consumed by a tragic vision of life in which all things, including beauty, are conceived of as subject to destruction or, a word he often chose, ruin. Once time has done its task, only nothingness remains. “Never had Cuban poetry reached so far into desperation with such discreteness and solitude.” Quotes "La prosa es escrita con el tesoro del conocimiento mientras que la poesía es escrita con el tesoro de la ignorancia." “Prose is written with the treasure of knowledge whereas poetry is written with the treasure of ignorance.” References Books of poetry La casa del silencio (1916) Poemas en menguante (1928) Canto redondo (1934) Poëmes (1939) (Bilingual anthology: Spanish-French) Solo de rosa (1941) Temps en peine/Tiempo en pena (1950) Rien que ... (Nada más que ...) (1954) Further reading (sources not mentioned in references) Gastón Baquero. Mariano Brull. La casa del silencio (Antología de su obra:1916-1954) (1976). Diego García Elio. Una antología de poesía cubana (1984). Ricardo Larraga. Mariano Brull y la poesía pura en Cuba (1994). External links Brull at CubaLiteraria.com 1891 births 1956 deaths Cuban male poets Cuban people of Catalan descent Cuban diplomats Ambassadors of Cuba to Uruguay 20th-century Cuban poets University of Havana alumni 20th-century male writers Cuban expatriates in Spain
```javascript import { hardline, indent, join } from "../../document/builders.js"; import { escapeTemplateCharacters, printTemplateExpressions, } from "../print/template-literal.js"; import { hasLanguageComment } from "./utils.js"; async function printEmbedGraphQL(textToDoc, print, path /*, options*/) { const { node } = path; const numQuasis = node.quasis.length; const expressionDocs = printTemplateExpressions(path, print); const parts = []; for (let i = 0; i < numQuasis; i++) { const templateElement = node.quasis[i]; const isFirst = i === 0; const isLast = i === numQuasis - 1; const text = templateElement.value.cooked; const lines = text.split("\n"); const numLines = lines.length; const expressionDoc = expressionDocs[i]; const startsWithBlankLine = numLines > 2 && lines[0].trim() === "" && lines[1].trim() === ""; const endsWithBlankLine = numLines > 2 && lines[numLines - 1].trim() === "" && lines[numLines - 2].trim() === ""; const commentsAndWhitespaceOnly = lines.every((line) => /^\s*(?:#[^\n\r]*)?$/u.test(line), ); // Bail out if an interpolation occurs within a comment. if (!isLast && /#[^\n\r]*$/u.test(lines[numLines - 1])) { return null; } let doc = null; if (commentsAndWhitespaceOnly) { doc = printGraphqlComments(lines); } else { doc = await textToDoc(text, { parser: "graphql" }); } if (doc) { doc = escapeTemplateCharacters(doc, false); if (!isFirst && startsWithBlankLine) { parts.push(""); } parts.push(doc); if (!isLast && endsWithBlankLine) { parts.push(""); } } else if (!isFirst && !isLast && startsWithBlankLine) { parts.push(""); } if (expressionDoc) { parts.push(expressionDoc); } } return ["`", indent([hardline, join(hardline, parts)]), hardline, "`"]; } function printGraphqlComments(lines) { const parts = []; let seenComment = false; const array = lines.map((textLine) => textLine.trim()); for (const [i, textLine] of array.entries()) { // Lines are either whitespace only, or a comment (with potential whitespace // around it). Drop whitespace-only lines. if (textLine === "") { continue; } if (array[i - 1] === "" && seenComment) { // If a non-first comment is preceded by a blank (whitespace only) line, // add in a blank line. parts.push([hardline, textLine]); } else { parts.push(textLine); } seenComment = true; } // If `lines` was whitespace only, return `null`. return parts.length === 0 ? null : join(hardline, parts); } /* * react-relay and graphql-tag * graphql`...` * graphql.experimental`...` * gql`...` * GraphQL comment block * * This intentionally excludes Relay Classic tags, as Prettier does not * support Relay Classic formatting. */ function isGraphQL({ node, parent }) { return ( hasLanguageComment({ node, parent }, "GraphQL") || (parent && ((parent.type === "TaggedTemplateExpression" && ((parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental") || (parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")))) || (parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql"))) ); } function printGraphql(path /*, options*/) { if (isGraphQL(path)) { return printEmbedGraphQL; } } export default printGraphql; ```
The historic Town of Jamestown is a Statutory Town in Boulder County, Colorado, United States. The population was 256 at the 2020 United States Census, down from 274 in 2010. It was named for James Smith, an early discoverer of gold. Jamestown was hit hard by the September 2013 Colorado floods when the town was isolated due to road damage from the rains and the flooding of James Creek. Under a mandatory evacuation order, most residents were airlifted to safety under the direction of the Colorado National Guard to nearby Boulder. Geography Jamestown is in central Boulder County at (40.115485, −105.387531). It lies along James Creek within the Front Range of the Colorado Rockies, with access via James Canyon Drive, which leads east to U.S. Highway 36 in Altona and west to State Highway 72 (the Peak to Peak Highway) near Peaceful Valley. Jamestown's elevation is above sea level. According to the United States Census Bureau, the town has an area of , all of it land. Demographics As of the census of 2000, there were 205 people, 96 households, and 52 families residing in the town. The population density was . There were 102 housing units at an average density of . The racial makeup of the town was 97.56% White, 0.98% Asian, 0.49% Pacific Islander, and 0.98% from two or more races. Hispanic or Latino of any race were 0.49% of the population. There are now (2010) a couple of French people representing 0.98% of the people. There were 96 households, out of which 26.0% had children under the age of 18 living with them, 47.9% were married couples living together, 3.1% had a female householder with no husband present, and 44.8% were non-families. 30.2% of all households were made up of individuals, and 5.2% had someone living alone who was 65 years of age or older. The average household size was 2.14 and the average family size was 2.74. In the town, the population was spread out, with 19.0% under the age of 18, 2.0% from 18 to 24, 46.3% from 25 to 44, 26.8% from 45 to 64, and 5.9% who were 65 years of age or older. The median age was 39 years. For every 100 females, there were 101.0 males. For every 100 females age 18 and over, there were 100.0 males. The median income for a household in the town was $67,500, and the median income for a family was $73,250. Males had a median income of $46,042 versus $31,875 for females. The per capita income for the town was $29,904. About 5.9% of families and 5.4% of the population were below the poverty line, including none of those under the age of eighteen and 46.7% of those 65 or over. See also North Central Colorado Urban Area Denver-Aurora-Boulder, CO Combined Statistical Area Boulder, CO Metropolitan Statistical Area Roosevelt National Forest References External links Town of Jamestown official website CDOT map of Jamestown Towns in Boulder County, Colorado Towns in Colorado
Stara Jamka is a village in the administrative district of Gmina Korfantów, within Nysa County, Opole Voivodeship, in south-western Poland. References Villages in Nysa County
John Moyle was a 17th-century Cornish parliamentarian. John Moyle may also refer to: John Moyle (British Army officer) (died 1738), major-general John Rowe Moyle (1808–1889), Mormon pioneer John Moyle (1908-1960), editor of Radio Television & Hobbies and Australian radio pioneer See also Moyle (disambiguation) Moyle (surname)
James Shaver may refer to: James L. Shaver (1902–1985), lieutenant governor of Arkansas, 1943–1947 James L. Shaver Jr. (born 1927), member of the Arkansas House of Representatives, 1961–1994 James W. Shaver, steam boat captain and founder of the Shaver Transportation Company
```c /* origin: FreeBSD /usr/src/lib/msun/src/s_cbrtf.c */ /* * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. * Debugged and optimized by Bruce D. Evans. */ /* * ==================================================== * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* cbrtf(x) * Return cube root of x */ #include <math.h> #include <stdint.h> static const unsigned B1 = 709958130, /* B1 = (127-127.0/3-0.03306235651)*2**23 */ B2 = 642849266; /* B2 = (127-127.0/3-24/3-0.03306235651)*2**23 */ float cbrtf(float x) { double_t r,T; union {float f; uint32_t i;} u = {x}; uint32_t hx = u.i & 0x7fffffff; if (hx >= 0x7f800000) /* cbrt(NaN,INF) is itself */ return x + x; /* rough cbrt to 5 bits */ if (hx < 0x00800000) { /* zero or subnormal? */ if (hx == 0) return x; /* cbrt(+-0) is itself */ u.f = x*0x1p24f; hx = u.i & 0x7fffffff; hx = hx/3 + B2; } else hx = hx/3 + B1; u.i &= 0x80000000; u.i |= hx; /* * First step Newton iteration (solving t*t-x/t == 0) to 16 bits. In * double precision so that its terms can be arranged for efficiency * without causing overflow or underflow. */ T = u.f; r = T*T*T; T = T*((double_t)x+x+r)/(x+r+r); /* * Second step Newton iteration to 47 bits. In double precision for * efficiency and accuracy. */ r = T*T*T; T = T*((double_t)x+x+r)/(x+r+r); /* rounding to 24 bits is perfect in round-to-nearest mode */ return T; } ```
Padre is a village in Manjeshwaram Taluk of Kasaragod district in Kerala, India. Demographics As of 2011 Census, Padre village had population of 5,092 which constitutes 2,586 males and 2,506 females. The male female sex ratio was 969 lower than state average of 1084. Padre village has an area of with 970 families residing in it. Population in the age group 0-6 was 417 (8.2%) where 215 are males and 202 are females. Padre had overall literacy of 84.6% lower than state average of 94%. Male literacy stands at 90.9% and Female literacy was 78%. Administration Padre village is part of Enmakaje Grama Panchayat. Politically it comes under Manjeshwar (State Assembly constituency) which is part of Kasaragod (Lok Sabha constituency). References External links https://www.youtube.com/watch?v=LIHNNH3T5G0 Manjeshwar area Villages in Kasaragod district
Erik Adrián Pedroza Guerrero (born April 11, 1994) is a Mexican professional footballer who currently plays for Correcaminos UAT. References 1994 births Living people Men's association football defenders Correcaminos UAT footballers Cimarrones de Sonora players Ascenso MX players Liga Premier de México players Tercera División de México players Footballers from Nuevo León Footballers from Monterrey Mexican men's footballers
"Free Planet" is a song by Japanese musical act Superfly. Released as one of the songs on "Wildflower" & Cover Songs: Complete Best 'Track 3', a four-song extended play featuring a cover album as a bonus disc in September 2010, it was used in a high-profile commercial campaign for Sony Ericsson cellphones. Background and development In September 2009, Superfly released the act's second studio album Box Emotions, their second release in a row to reach number one on Oricon's album chart. This was followed by a single, "Dancing on the Fire", Superfly's second upbeat dance song to be used in commercials for Canon's Digital IXUS range of cameras. On June 18, Superfly released the song "Tamashii Revolution", a song used as the theme song of the NHK broadcast of the 2010 FIFA World Cup, played during relay clips and highlight shows. It became one of Superfly's biggest commercial successes, eventually becoming certified platinum twice by the RIAJ. In July, Superfly's song "Wildflower" started airing as the theme song for the drama Boss. The single's jacket features vocalist Shiho Ochi holding a different object representing each song on the single: a dahlia flower for "Wildflower", a djembe drum for "Tamashii Revolution", a globe for "Free Planet" and on the back cover a rainbow for "Roll Over the Rainbow". The song was written as a message song by vocalist Shiho Ochi, about how if a person does not make any barriers, they can go anywhere. It was recorded in a live take, with musicians such as drummer Tatsuya Nakamura and former Tokyo Jihen member Mikio Hirama. Promotion and release "Free Planet" was one of the four tracks found on the "Wildflower" single, a special release commemorating Superfly's 10th single since their debut. Each song featured a different style of rock, and a different commercial tie-up. The single came packaged with Cover Songs: Best 'Track 3''', a compilation album compiling Superfly's English language cover songs that were featured on the B-sides of her singles. The song was used in commercials for Sony Ericsson phones in 2010, including the Bravia Phone S004, and was specifically written for the commercial. As one of the four A-sides of the "Wildflower" single and Cover Songs: Complete Best 'Track 3' set, it reached number one on the Oricon albums chart in 2010. The song was later featured on the album Mind Travel (2011). It was first performed live during Rock'N'Roll Muncher, a special live with a group called the Lemon Bats formed by Superfly in November 2010. The performance was featured on the DVD of the "Beep!!" / "Sunshine Sunshine" single in March 2011. The song was performed again during the Mind Travel Release Commemorative Free Live at the Yokohama Red Brick Warehouse on June 15, 2011, footage of which was shown on the "Ai o Kurae" (2011) single's DVD. The song was performed during Superfly's 2011 arena tour Shout in the Rainbow!!, and during the Live Force tour in 2012. Music video A music video was released for the song, directed by Shuichi Banba. It is made up of recording studio footage, altered to look like a video taken in the 1960s, with additional effects such as lasers, pencil-drawn triangle art and space imagery. Critical reception CDJournal reviewers felt the song's simple beat created a "striking" rock'n' roll-style song. They praised Ochi's "refreshing", "attacking" and varying vocals, in particular the chorus. Many of the instruments were also praised, including the "dancing" guitars and hammond organ, however Tatsuya Nakamura's drums were singled out as "wild and tight", and what pull the song together. The reviewers further noted the contrasting of long tone melodies were a fun part of the song. Track listing Personnel Personnel details were sourced from the liner notes booklet of Mind Travel''. Mikio Hirama – electric guitar Tatsuya Nakamura – drums Shiho Ochi – lead and background vocals Takeshi Taneda – bass Shunsuke Tsuri – additional arrangement Kōichi Tsutaya – hammond B-3 Yoshiyuki Yatsuhashi – electric guitar Release history References 2010 songs Japanese-language songs Songs used as jingles Superfly (band) songs
Jawani is a Bollywood film released in 1942. References External links 1942 films 1940s Hindi-language films Indian black-and-white films
```sqlpl -- -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- -- path_to_url -- -- Unless required by applicable law or agreed to in writing, -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -- specific language governing permissions and limitations -- -- -- Add new system-level permission -- ALTER TYPE guacamole_system_permission_type ADD VALUE 'CREATE_USER_GROUP' AFTER 'CREATE_USER'; -- -- Entity types -- CREATE TYPE guacamole_entity_type AS ENUM( 'USER', 'USER_GROUP' ); -- -- Table of base entities which may each be either a user or user group. Other -- tables which represent qualities shared by both users and groups will point -- to guacamole_entity, while tables which represent qualities specific to -- users or groups will point to guacamole_user or guacamole_user_group. -- CREATE TABLE guacamole_entity ( entity_id serial NOT NULL, name varchar(128) NOT NULL, type guacamole_entity_type NOT NULL, PRIMARY KEY (entity_id), CONSTRAINT guacamole_entity_name_scope UNIQUE (type, name) ); -- -- Table of user groups. Each user group may have an arbitrary set of member -- users and member groups, with those members inheriting the permissions -- granted to that group. -- CREATE TABLE guacamole_user_group ( user_group_id serial NOT NULL, entity_id integer NOT NULL, -- Group disabled status disabled boolean NOT NULL DEFAULT FALSE, PRIMARY KEY (user_group_id), CONSTRAINT guacamole_user_group_single_entity UNIQUE (entity_id), CONSTRAINT guacamole_user_group_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE ); -- -- Table of users which are members of given user groups. -- CREATE TABLE guacamole_user_group_member ( user_group_id integer NOT NULL, member_entity_id integer NOT NULL, PRIMARY KEY (user_group_id, member_entity_id), -- Parent must be a user group CONSTRAINT guacamole_user_group_member_parent FOREIGN KEY (user_group_id) REFERENCES guacamole_user_group (user_group_id) ON DELETE CASCADE, -- Member may be either a user or a user group (any entity) CONSTRAINT guacamole_user_group_member_entity FOREIGN KEY (member_entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE ); -- -- Table of user group permissions. Each user group permission grants a user -- access to a particular user group for a specific type of operation. -- CREATE TABLE guacamole_user_group_permission ( entity_id integer NOT NULL, affected_user_group_id integer NOT NULL, permission guacamole_object_permission_type NOT NULL, PRIMARY KEY (entity_id, affected_user_group_id, permission), CONSTRAINT guacamole_user_group_permission_affected_user_group FOREIGN KEY (affected_user_group_id) REFERENCES guacamole_user_group (user_group_id) ON DELETE CASCADE, CONSTRAINT guacamole_user_group_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE ); CREATE INDEX guacamole_user_group_permission_affected_user_group_id ON guacamole_user_group_permission(affected_user_group_id); CREATE INDEX guacamole_user_group_permission_entity_id ON guacamole_user_group_permission(entity_id); -- -- Modify guacamole_user table to use guacamole_entity as a base -- -- Add new entity_id column ALTER TABLE guacamole_user ADD COLUMN entity_id integer; -- Create user entities for each guacamole_user entry INSERT INTO guacamole_entity (name, type) SELECT username, 'USER' FROM guacamole_user; -- Update guacamole_user to point to corresponding guacamole_entity UPDATE guacamole_user SET entity_id = ( SELECT entity_id FROM guacamole_entity WHERE username = guacamole_entity.name AND type = 'USER' ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_user ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now be unique for each user ALTER TABLE guacamole_user ADD CONSTRAINT guacamole_user_single_entity UNIQUE (entity_id); -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_user ADD CONSTRAINT guacamole_user_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; -- The username column can now safely be removed ALTER TABLE guacamole_user DROP COLUMN username; -- -- Modify guacamole_connection_permission to use guacamole_entity instead of -- guacamole_user -- -- Add new entity_id column ALTER TABLE guacamole_connection_permission ADD COLUMN entity_id integer; -- Update guacamole_connection_permission to point to the guacamole_entity -- that has been granted the permission UPDATE guacamole_connection_permission SET entity_id = ( SELECT entity_id FROM guacamole_user WHERE guacamole_user.user_id = guacamole_connection_permission.user_id ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_connection_permission ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_connection_permission ADD CONSTRAINT guacamole_connection_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; CREATE INDEX guacamole_connection_permission_entity_id ON guacamole_connection_permission(entity_id); -- Remove user_id column (implicitly drops associated contraints/keys) ALTER TABLE guacamole_connection_permission DROP COLUMN user_id; -- Add new primary key which uses entity_id ALTER TABLE guacamole_connection_permission ADD PRIMARY KEY (entity_id, connection_id, permission); -- -- Modify guacamole_connection_group_permission to use guacamole_entity instead -- of guacamole_user -- -- Add new entity_id column ALTER TABLE guacamole_connection_group_permission ADD COLUMN entity_id integer; -- Update guacamole_connection_group_permission to point to the guacamole_entity -- that has been granted the permission UPDATE guacamole_connection_group_permission SET entity_id = ( SELECT entity_id FROM guacamole_user WHERE guacamole_user.user_id = guacamole_connection_group_permission.user_id ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_connection_group_permission ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_connection_group_permission ADD CONSTRAINT guacamole_connection_group_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; CREATE INDEX guacamole_connection_group_permission_entity_id ON guacamole_connection_group_permission(entity_id); -- Remove user_id column (implicitly drops associated contraints/keys) ALTER TABLE guacamole_connection_group_permission DROP COLUMN user_id; -- Add new primary key which uses entity_id ALTER TABLE guacamole_connection_group_permission ADD PRIMARY KEY (entity_id, connection_group_id, permission); -- -- Modify guacamole_sharing_profile_permission to use guacamole_entity instead -- of guacamole_user -- -- Add new entity_id column ALTER TABLE guacamole_sharing_profile_permission ADD COLUMN entity_id integer; -- Update guacamole_sharing_profile_permission to point to the guacamole_entity -- that has been granted the permission UPDATE guacamole_sharing_profile_permission SET entity_id = ( SELECT entity_id FROM guacamole_user WHERE guacamole_user.user_id = guacamole_sharing_profile_permission.user_id ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_sharing_profile_permission ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_sharing_profile_permission ADD CONSTRAINT guacamole_sharing_profile_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; CREATE INDEX guacamole_sharing_profile_permission_entity_id ON guacamole_sharing_profile_permission(entity_id); -- Remove user_id column (implicitly drops associated contraints/keys) ALTER TABLE guacamole_sharing_profile_permission DROP COLUMN user_id; -- Add new primary key which uses entity_id ALTER TABLE guacamole_sharing_profile_permission ADD PRIMARY KEY (entity_id, sharing_profile_id, permission); -- -- Modify guacamole_user_permission to use guacamole_entity instead of -- guacamole_user -- -- Add new entity_id column ALTER TABLE guacamole_user_permission ADD COLUMN entity_id integer; -- Update guacamole_user_permission to point to the guacamole_entity -- that has been granted the permission UPDATE guacamole_user_permission SET entity_id = ( SELECT entity_id FROM guacamole_user WHERE guacamole_user.user_id = guacamole_user_permission.user_id ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_user_permission ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_user_permission ADD CONSTRAINT guacamole_user_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; CREATE INDEX guacamole_user_permission_entity_id ON guacamole_user_permission(entity_id); -- Remove user_id column (implicitly drops associated contraints/keys) ALTER TABLE guacamole_user_permission DROP COLUMN user_id; -- Add new primary key which uses entity_id ALTER TABLE guacamole_user_permission ADD PRIMARY KEY (entity_id, affected_user_id, permission); -- -- Modify guacamole_system_permission to use guacamole_entity instead of -- guacamole_user -- -- Add new entity_id column ALTER TABLE guacamole_system_permission ADD COLUMN entity_id integer; -- Update guacamole_system_permission to point to the guacamole_entity -- that has been granted the permission UPDATE guacamole_system_permission SET entity_id = ( SELECT entity_id FROM guacamole_user WHERE guacamole_user.user_id = guacamole_system_permission.user_id ); -- The entity_id column should now be safely non-NULL ALTER TABLE guacamole_system_permission ALTER COLUMN entity_id SET NOT NULL; -- The entity_id column should now safely point to guacamole_entity entries ALTER TABLE guacamole_system_permission ADD CONSTRAINT guacamole_system_permission_entity FOREIGN KEY (entity_id) REFERENCES guacamole_entity (entity_id) ON DELETE CASCADE; CREATE INDEX guacamole_system_permission_entity_id ON guacamole_system_permission(entity_id); -- Remove user_id column (implicitly drops associated contraints/keys) ALTER TABLE guacamole_system_permission DROP COLUMN user_id; -- Add new primary key which uses entity_id ALTER TABLE guacamole_system_permission ADD PRIMARY KEY (entity_id, permission); -- -- Table of arbitrary user attributes. Each attribute is simply a name/value -- pair associated with a user. Arbitrary attributes are defined by other -- extensions. Attributes defined by this extension will be mapped to -- properly-typed columns of a specific table. -- CREATE TABLE guacamole_user_attribute ( user_id integer NOT NULL, attribute_name varchar(128) NOT NULL, attribute_value varchar(4096) NOT NULL, PRIMARY KEY (user_id, attribute_name), CONSTRAINT guacamole_user_attribute_ibfk_1 FOREIGN KEY (user_id) REFERENCES guacamole_user (user_id) ON DELETE CASCADE ); CREATE INDEX guacamole_user_attribute_user_id ON guacamole_user_attribute(user_id); -- -- Table of arbitrary user group attributes. Each attribute is simply a -- name/value pair associated with a user group. Arbitrary attributes are -- defined by other extensions. Attributes defined by this extension will be -- mapped to properly-typed columns of a specific table. -- CREATE TABLE guacamole_user_group_attribute ( user_group_id integer NOT NULL, attribute_name varchar(128) NOT NULL, attribute_value varchar(4096) NOT NULL, PRIMARY KEY (user_group_id, attribute_name), CONSTRAINT guacamole_user_group_attribute_ibfk_1 FOREIGN KEY (user_group_id) REFERENCES guacamole_user_group (user_group_id) ON DELETE CASCADE ); CREATE INDEX guacamole_user_group_attribute_user_group_id ON guacamole_user_group_attribute(user_group_id); -- -- Table of arbitrary connection attributes. Each attribute is simply a -- name/value pair associated with a connection. Arbitrary attributes are -- defined by other extensions. Attributes defined by this extension will be -- mapped to properly-typed columns of a specific table. -- CREATE TABLE guacamole_connection_attribute ( connection_id integer NOT NULL, attribute_name varchar(128) NOT NULL, attribute_value varchar(4096) NOT NULL, PRIMARY KEY (connection_id, attribute_name), CONSTRAINT guacamole_connection_attribute_ibfk_1 FOREIGN KEY (connection_id) REFERENCES guacamole_connection (connection_id) ON DELETE CASCADE ); CREATE INDEX guacamole_connection_attribute_connection_id ON guacamole_connection_attribute(connection_id); -- -- Table of arbitrary connection group attributes. Each attribute is simply a -- name/value pair associated with a connection group. Arbitrary attributes are -- defined by other extensions. Attributes defined by this extension will be -- mapped to properly-typed columns of a specific table. -- CREATE TABLE guacamole_connection_group_attribute ( connection_group_id integer NOT NULL, attribute_name varchar(128) NOT NULL, attribute_value varchar(4096) NOT NULL, PRIMARY KEY (connection_group_id, attribute_name), CONSTRAINT guacamole_connection_group_attribute_ibfk_1 FOREIGN KEY (connection_group_id) REFERENCES guacamole_connection_group (connection_group_id) ON DELETE CASCADE ); CREATE INDEX guacamole_connection_group_attribute_connection_group_id ON guacamole_connection_group_attribute(connection_group_id); -- -- Table of arbitrary sharing profile attributes. Each attribute is simply a -- name/value pair associated with a sharing profile. Arbitrary attributes are -- defined by other extensions. Attributes defined by this extension will be -- mapped to properly-typed columns of a specific table. -- CREATE TABLE guacamole_sharing_profile_attribute ( sharing_profile_id integer NOT NULL, attribute_name varchar(128) NOT NULL, attribute_value varchar(4096) NOT NULL, PRIMARY KEY (sharing_profile_id, attribute_name), CONSTRAINT guacamole_sharing_profile_attribute_ibfk_1 FOREIGN KEY (sharing_profile_id) REFERENCES guacamole_sharing_profile (sharing_profile_id) ON DELETE CASCADE ); CREATE INDEX guacamole_sharing_profile_attribute_sharing_profile_id ON guacamole_sharing_profile_attribute(sharing_profile_id); ```
Henry Noble Couden (November 21, 1842 – August 22, 1922) was a Universalist minister who was the 54th Chaplain of the United States House of Representatives from December 2, 1895, to February 21, 1921. He was the second blind religious leader to serve in this position, the other is William Henry Milburn. Birth He was born on November 21, 1842, in Plymouth, Indiana, the nephew of Noah Noble, governor of Indiana. Civil War Days after the outbreak of the American Civil War, on 16 April 1861, he enlisted in the 6th Regiment, Ohio Volunteer Infantry, serving in Company K, with the rank of corporal upon entering and the rank of sergeant upon leaving. He was also a corporal in Company D, 1st Cavalry Battalion, Mississippi Marine Brigade. He was wounded at the Battle of Beaver Dam Lake on May 24, 1863, losing his sight. He described his activity during this battle in a 24 January 1903 letter to Warren D. Crandall, author of History of the Ram Fleet and Mississippi Marine Brigade. Education and ordination He studied at the State School for the Blind in Columbus, Ohio, and the Divinity School of St. Lawrence University. He graduated from St. Lawrence in 1878 and was ordained to the Universalist ministry that same year. Career Universalist minister After his ordination, he served churches in Madrid, New York; Willoughby, Ohio; Chatham, Massachusetts; and Port Huron, Michigan. Chaplain of the U.S. House of Representatives He became chaplain of the U.S. House of Representatives in 1895 and served in that post for 25 years, until February 21, 1921. A collection of his daily opening prayers for the 62nd Congress was issued in 1913. In his foreword, Rep. Champ Clark praised Couden's "prayers of excellent character, in both form and matter ... full of piety, sympathy, and philanthropy ... voiced in choice English". Other service He was a member of the board of directors of the Aid Association for the Blind of the District of Columbia. He served in post and departmental chaplaincies for the Grand Army of the Republic and as the chaplain for the Society of Marine Brigade Survivors. Death He died on August 22, 1922, at his residence at Fort Myer, Virginia, of bronchial pneumonia, after a nine-month illness. He was buried at Arlington National Cemetery, in Arlington, Virginia. along with his second wife, Harriet Dunbar Couden, and one of his two sons, Henry N. Couden, Jr. References External links 1842 births 1922 deaths 19th-century Christian universalists 20th-century Christian universalists Theological School of St. Lawrence University alumni Chaplains of the United States House of Representatives Clergy of the Universalist Church of America People from Plymouth, Indiana Blind clergy American blind people Burials at Arlington National Cemetery Grand Army of the Republic officials
Il domestico is a 1974 Italian comedy film directed by Luigi Filippo D'Amico. It was shown as part of a retrospective on Italian comedy at the 67th Venice International Film Festival. Cast Lando Buzzanca as Rosario Cabaduni, called 'Sasa' Martine Brochard as Rita Arnoldo Foà as Engineer Ambrogio Perigatti Femi Benussi as Lola Mandragali Leonora Fani as Martina Perigatti Paolo Carlini as Andrea Donati Enzo Cannavale as Salvatore Sperato Erika Blanc as Silvana Malisa Longo as Esther Silvia Monti as The Lesbian Wife Renzo Marignano as The Gay Husband Luciano Salce as The Film Director Gordon Mitchell as General Von Werner Antonino Faà di Bruno as The Old Nobleman Camillo Milli as The Prison Governor Nanda Primavera as The Owner of the Brothel References External links 1974 films 1974 comedy films Italian comedy films 1970s Italian-language films Films scored by Piero Umiliani Films set in Rome Films set in Tuscany Films directed by Luigi Filippo D'Amico 1970s Italian films
```shell Security news delivered via DNS Extracting the `public key` from the `private key` Disabling **USB** storage devices Keeping `/boot` read-only Private key encryption with `OpenSSL` ```
Jonathan Maman (; born September 29, 1978), better known by his stage name John Mamann (), is a French singer, songwriter and composer who is signed to AZ, part of Universal Music. He has released three albums, Mister Joe in 2010, self-titled Joe Mamann in 2012 and Love Life in 2013. The title track from the last album "Love \ Life", a duo with Portuguese singer Kika, has charted on French Singles Chart. Career At age 18, John Mamann left for Canada and later on to the States (Miami, Florida) to pursue a musical career. His father, a musician and relatively successful singer, with Moroccan descent, had great impact on him. Returning to France, his debut single was "Pas jaloux". He was more successful with composing particularly after his success in 2008 with writing and producing Louisy Joseph and finding chart success with the latter's song "Assis par terre". He released his own album Mister Joe with all materials composed by him with lyrics from Elodie Hesme, François Welgryn, Lionel Florence et Florian Gazan. Mamann has also written to a number of artists including Johnny Hallyday (in two songs "Autoportrait" and "Devant toi"), for Florent Pagny, Natasha St-Pier, Luce, Jean-Roch, Havana Brown and others. He has collaborated with producer RedOne. In 2011, he co-wrote and co-produced "Il nous faut", a big hit for French singer Elisa Tovati and Belgian The X Factor runner-up Tom Dice. The single reached number 1 on both Belgian Flanders and Wallonia Singles Charts. He also co-composed with David Hallyday, Fred Château, Mathieu Mendès, Corneille, Shaka Ponk, Coyle Girelli and Stanislas, music for the 2013 French musical production Robin des Bois. In popular culture He was part of Collectif Paris-Africa, and contributed to the album Paris-Africa and one of the artists featured on "Des Ricochets", the main charity single for UNICEF from the album. In 2012, he also took in the 8th edition of the annual event Concert pour la tolérance in Agadir, Morocco. In 2012, in season 1 of the French singing competition The Voice: la plus belle voix, Florent Pagny one of the four judges and mentors in the series chose John Mamann to help him mentor his team of contestants during the "Musical Battles" round. Personal life His father, Maurice Mamann is a musician and singer who performed under the stage name Maurice Mann. Discography Albums Singles *Did not appear in the official Belgian Ultratop 50 charts, but rather in the bubbling under Ultratip charts. Others 2009: "Pas jaloux" 2009: "Donnez-moi le sens" 2010: "On est tous comme ça" 2012: "Fais pas la gueule John" 2012: "Allez viens" Compositions and music productions (Selective listing. Contains individual as well as co-composing and co-producing) 2008: Louisy Joseph – La Saison des amours (album production) + singles "Mes insomnies" and "Assis par terre" 2008: Natasha St-Pier – Natasha St-Pier (6 tracks including single "Embrasse-moi") 2010: Florent Pagny – "8e merveille", "J'ai arrêté de rêver" 2011: Johnny Hallyday – "Autoportrait" 2011: Luce feat. Orelsan – "La Machine" 2011: Elisa Tovati & Tom Dice – "Il nous faut" 2012: Love Generation – "Just a Little Bit" 2012: Jean-Roch featuring Pitbull and Nayer – "Name of Love" 2012: Johnny Hallyday – "Devant toi" 2012: Far East Movement featuring Justin Bieber – "Live My Life" 2013: Khaled – "Laila" 2013: Havana Brown – "Flashing Lights" 2013: Havana Brown feat. Pitbull – "We Run the Night" 2013: Robin des Bois'' (a French musical) 2014: Ayumi Hamasaki - "XOXO" References External links Official website Universal Music France: John Mamann page French composers French male composers 1978 births Living people 21st-century French singers 21st-century French male singers French male singer-songwriters French singer-songwriters
Bradina xanthalis is a moth in the family Crambidae. It was described by George Hampson in 1917. It is found in Papua New Guinea, where it has been recorded from the Louisiade Islands. References Moths described in 1917 Bradina
The Delaware Constitution of 1831 was the third governing document for the U.S. state of Delaware, replacing the Delaware Constitution of 1792, and was in effect from its adoption on December 2, 1831 until replaced on June 4, 1897 by the present state Constitution. The Convention convened on November 8, 1831 and adjourned December 2, 1831. Members of the Delaware Constitutional Convention of 1831 included: Charles Polk Jr. (President) Thomas Adams John Caulk John M. Clayton Peter L. Cooper Thomas Deakyne Edward Dingle William Dunning John Elliott James Fisher Willard Hall Thomas W. Handy John Harlan Charles H. Haughey Hughitt Layton James C. Lynch James B. Macomb Joseph Maull Elias Naudain Wiliam Nicholls Samuel Ratcliff John Raymond George Read Jr. Henry F. Rodney James Rodgers William Seal Pressley Spruance, Jr. William D. Waples References See also Delaware Constitution of 1776 Constitution of 1831 Defunct state constitutions of the United States 1831 in Delaware 1831 in American law
The American Eagle A-129 was an American biplane first flown in 1929. Design and development The preceding American Eagle A-101 of 1926 had achieved some success, but its fierce spin characteristics had resulted in several crashes during training flights. Giuseppe Bellanca redesigned the biplane with a longer fuselage and narrower cowling to accommodate the five-cylinder Kinner K-5 100 h.p. radial engine, which had its cylinder heads exposed. To mark the year of its first appearance, the designation A-129 was applied. Operational history Initially designed to replace the Porterfield Flying Schools A-101s, the new biplane proved to have good flying characteristics and more than 400 were built. The aircraft were also flown by "barnstormers" and sports pilots. Several A-129s remain airworthy and examples are preserved at the Rhinebeck Aerodrome Museum at Old Rhinebeck in New York state and in the Kansas Aviation Museum Wichita, Kansas. Variants A range of engines was fitted to the A-129 without changing the type designation. They included the Curtiss OX-5 straight engine and others up to the 200 h.p. Wright J-4. The American Eagle A-229 was a two seat trainer version with a Curtiss OX-5 engine. Specifications (100 h.p. Kinner K-5) References Notes Bibliography External links Aerofiles American Eagle page 1920s United States civil utility aircraft Biplanes Single-engined tractor aircraft Aircraft first flown in 1929
```javascript (function() { Batman.extend(Batman.DOM, { querySelectorAll: function(node, selector) { return jQuery(selector, node); }, querySelector: function(node, selector) { return jQuery(selector, node)[0]; }, setInnerHTML: function(node, html) { var child, childNodes, result, _i, _j, _len, _len1; childNodes = (function() { var _i, _len, _ref, _results; _ref = node.childNodes; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { child = _ref[_i]; _results.push(child); } return _results; })(); for (_i = 0, _len = childNodes.length; _i < _len; _i++) { child = childNodes[_i]; Batman.DOM.willRemoveNode(child); } result = jQuery(node).html(html); for (_j = 0, _len1 = childNodes.length; _j < _len1; _j++) { child = childNodes[_j]; Batman.DOM.didRemoveNode(child); } return result; }, removeNode: function(node) { var _ref; Batman.DOM.willRemoveNode(node); if ((_ref = node.parentNode) != null) { _ref.removeChild(node); } return Batman.DOM.didRemoveNode(node); }, destroyNode: function(node) { Batman.DOM.willDestroyNode(node); Batman.DOM.willRemoveNode(node); jQuery(node).remove(); Batman.DOM.didRemoveNode(node); return Batman.DOM.didDestroyNode(node); }, appendChild: function(parent, child) { Batman.DOM.willInsertNode(child); jQuery(parent).append(child); return Batman.DOM.didInsertNode(child); }, innerText: function(node) { return jQuery(node).text(); } }); Batman.Request.prototype._parseResponseHeaders = function(xhr) { var headers; return headers = xhr.getAllResponseHeaders().split('\n').reduce(function(acc, header) { var key, matches, value; if (matches = header.match(/([^:]*):\s*(.*)/)) { key = matches[1]; value = matches[2]; acc[key] = value; } return acc; }, {}); }; Batman.Request.prototype._prepareOptions = function(data) { var options, _ref, _this = this; options = { url: this.get('url'), type: this.get('method'), dataType: this.get('type'), data: data || this.get('data'), username: this.get('username'), password: this.get('password'), headers: this.get('headers'), beforeSend: function() { return _this.fire('loading'); }, success: function(response, textStatus, xhr) { _this.mixin({ xhr: xhr, status: xhr.status, response: response, responseHeaders: _this._parseResponseHeaders(xhr) }); return _this.fire('success', response); }, error: function(xhr, status, error) { _this.mixin({ xhr: xhr, status: xhr.status, response: xhr.responseText, responseHeaders: _this._parseResponseHeaders(xhr) }); xhr.request = _this; return _this.fire('error', xhr); }, complete: function() { return _this.fire('loaded'); } }; if ((_ref = this.get('method')) === 'PUT' || _ref === 'POST') { if (!this.hasFileUploads()) { options.contentType = this.get('contentType'); if (typeof options.data === 'object') { options.processData = false; options.data = Batman.URI.queryFromParams(options.data); } } else { options.contentType = false; options.processData = false; options.data = this.constructor.objectToFormData(options.data); } } return options; }; Batman.Request.prototype.send = function(data) { return jQuery.ajax(this._prepareOptions(data)); }; Batman.mixins.animation = { show: function(addToParent) { var jq, show, _ref, _ref1; jq = $(this); show = function() { return jq.show(600); }; if (addToParent) { if ((_ref = addToParent.append) != null) { _ref.appendChild(this); } if ((_ref1 = addToParent.before) != null) { _ref1.parentNode.insertBefore(this, addToParent.before); } jq.hide(); setTimeout(show, 0); } else { show(); } return this; }, hide: function(removeFromParent) { var _this = this; $(this).hide(600, function() { var _ref; if (removeFromParent) { if ((_ref = _this.parentNode) != null) { _ref.removeChild(_this); } } return Batman.DOM.didRemoveNode(_this); }); return this; } }; }).call(this); ```
Machete Bomb is a Brazilian samba-rock band, hailing from Curitiba, Paraná. The group's leader, Otávio "Madu" Madureira, plays cavaquinho over a samba and rock and roll sound, creating a mixture influenced by Mundo Livre S/A and with which he intends to "break prejudices" and "show people" that "in Brazil, sabam did what rock contributed to abroad, (it's about) contesting, confronting, facing", with "protest songs, which speak truths and discuss sensitive topics". Besides samba-rock, the group's sound also features elements of hip hop. History In 2013, they released the EP O Samba do Sul. In 2015, they released their first studio album, O Samba do Sul, a three-part effort containing a total of 23 tracks. It featured Duayer, Papo Reto, DJ Ploc, Alvaro Larsen, Hurakán, Cabes MC, Rodrigo Ribeiro, Andó, J. Velloso, Alienação Afrofuturista and Xandão Menezes. In 2017, they released their sophomore studio album, A Saga do Cavaco Profano, featuring Alessandro Ramos (Alienação Afrofuturista), Dow Raiz, Reacción Ekis, Slick the Misfit and MC Bing Man. In 2018, they took part in a Brazilian Nirvana's In Utero tribute album titled A Soulful Tribute to Nirvana's in Utero, performing a cover of "Dumb". In 2020, they released their third album, MXT Comvida, featuring several artists such as Fred Zero Quatro (Mundo Livre S/A), Lemoskine, Lobato and Xandão (both from O Rappa), Mateo Piracés-Ugarte (Francisco, el Hombre), Mulamba, Nave, Odair José, TUYO, BNegão, Dedé Paraízo (Demônios da Garoa), Egypcio (Tihuana), Thestrow, Pete Mcee, Pecaos, Alienação Afrofuturista, Rodrigo Samsara, El Efecto, Caio MacBeserra (Project46), DowRaiz, Andó and Janine Mathias. The album was created after Madu lost his wife and quit music in order to focus on his two children, and the effort resulted from his decision to keep going in a musical career, counting with support from the featured musicians. He performed all instruments alone and the tracks are intercalated with jingles containing audio snippets of the featured musicians commenting on the production of the songs. Members Current line-up according to a March 2018 and the band's official website: Vitor Salmazo — vocals Otávio "Madu" Madureira — cavaquinho Rodrigo Suspiro — bass Daniel Perim — drums Rodrigo Spinardi — percussion Discography Studio albums O Samba do Sul (2015) A Saga do Cavaco Profano (2017) Mxt Comvida Remix albums Vendendo a Alma ao Diabo – Vol. I (2018) Vendendo a Alma ao Diabo – Vol. II (2018) Live albums Psicodália 2018 ao Vivo (2018) EPs O Samba do Sul (2013) References External links Official website Brazilian rap rock groups
The Glacier Strait () is a natural waterway through the Canadian Arctic Archipelago within Qikiqtaaluk Region, Nunavut, Canada. It separates Ellesmere Island (to the north) from Coburg Island (to the south). To the north-east it opens into Baffin Bay, and to the south-west into the Jones Sound. Straits of Qikiqtaaluk Region
Ana Montenegro (April 13, 1915 – March 30, 2006) was a Brazilian author, journalist, activist, editor, and poet. She was a militant communist and lived in exile for more than 15 years after the 1964 coup. She was a lawyer who advised on human rights and women's rights issues and actively fought against racism. She wrote extensively on women's issues, from their health to their socio-economic rights; the legal-cultural struggle of blacks against racism; and the struggles of urban and rural workers to gain their rights under the Constitution. After returning from exile, she was honored by her local bar association, her state, and the nation of Brazil for her human rights work. In 2005, she was one of the 1000 women nominated for the Nobel Peace Prize. Biography Ana Lima Vaughness was born 13 April 1915 in Quixeramobim, Ceará, Brazil to Paul Elpídio Vaughnesse and Lila Vaughnesse Correia Lima. A communist militant from a young age, she moved to Rio de Janeiro for her university studies and majored in Law and Literature at the Federal University of Rio de Janeiro. During this period, she married Alberto Carmo, adopted the name Ana Lima Carmo, and had two children, Sonia and Miguel. She participated in several leftist movements around the country in 1945, and joined the Partido Comunista Brasileiro (PCB) (Brazilian Communist Party) in July of that year. She began working for communist publications and mainstream newspapers, publishing hundreds of articles in such papers as Classe Operária, Tribuna Popular, Correio da Manhã, Imprensa Popular, Novos Rumos about party ideology from 1944 onward. Between 1945 and 1947, she worked at the newspapers O Momento and Seiva, both published in Salvador de Bahia, Brazil, where she had moved. She was active in the Women's Movement and in 1945, founded the Democratic Union of Women of Bahia, where she served until 1964 when she went into exile. She attended meetings of the PCB's women's organization called the Foundation of the Federation of Women of Brazil; the Women's League of the State of Guanabara, created in 1959; and the Committee for Female Pro-Democracy. Montenegro, at this time called Carmo, actively participated in the Women's Exchange and Friendship Commission and the League of National Defense Against Fascism. She was active in the creation of the journal MomentoFeminino and she edited it from 1947 for around a decade. The magazine was later censored and banned. From 1959 to 1963, she was a chronicler for the magazine Problemas e Estudos Sociais and was a broadcaster on Rádio Mayrink Veiga. When the 1964 Brazilian coup d'état occurred, Carmo became the first woman to be exiled. She went into exile in 1964, initially moving to Mexico. From Mexico, she went to Cuba and met Fidel Castro along with other members of his revolutionary allies. After leaving Cuba, she moved to Europe and settled in East Germany, where she spent most of her years of exile. From East Germany, she became a member of the Latin American section of the Women's International Democratic Federation, taking over as editor of their Journal de Mulheres do Mundo inteiro (Worldwide Women's Magazine), published in Arabic, English, French, German, Russian and Spanish. Because of her exile, Carmo signed her articles with the pseudonym Ana Montenegro, and then adopted the name. She also began to work with the United Nations and UNESCO on women's and human rights issues, participating in several international conferences. She did not return to Brazil until amnesty was granted in 1979 and the country began heading towards re-democratization. She went to live in Salvador de Bahia again and actively returned to feminism. Montenegro was invited to participate in the National Council of Women's Rights management from 1985 to 1989. She also served as adviser to the Order of Attorneys of Brazil on human rights issues in Bahia and for the Women's Forum of Salvador. During this period, she intensified her fight for human rights for women and against racism. She wrote extensively on women's health issues, their socio-economic rights, legal-cultural struggle of blacks against racism, and the struggles of urban and rural workers to gain their rights under the Constitution. Beginning in the 1980s, Montenegro published several books, including Tempo de Exílio, Uma história de lutas, Ser ou não ser feminista and Mulheres - Participação nas lutas populares, as well as many journalism pieces and poems. She also worked with the compilers of Carlos Marighela: O homem por trás do mito, who collected poems, essays and memoirs of Marighela's life from those who knew him and she wrote about his death in Tempo de Exílio. She was honored in a national congress of the Brazilian Bar Association and received several honors from national institutions. In 2005, she was one of the 1000 women nominated for the Nobel Peace Prize. Montenegro died 30 March 2006 in Salvador de Bahia. In 2011, he posthumously received the Chico Mendes Medal of Resistance awarded by the human rights group Tortura Nunca Mais. Awards Medal Tomé de Sousa, 1995 National Human Rights Award, 2002 Nobel Peace Prize nominee, 2005 Selected works Ser ou não ser feminista Guararapes: Recife, Brazil (1981) Mulheres, participação nas lutas populares M & S Gráfica e Editora: Salvador de Bahia, Brazil (1985) Tempo de exílio Edições Novos Rumos: Aracaju, Brazil (1988) Memória popular--a participação das mulheres nas lutas populares em Salvador Câmara Municipal de Salvador: Salvador de Bahia, Brazil (199?) Poèmes philosophiques (1999) Carlos Ghosn : del milagro de Nissan al relanzamiento de Renault (2000) References Bibliography 1915 births 2006 deaths Brazilian feminists Brazilian women poets Brazilian communists Brazilian exiles Brazilian women journalists Brazilian journalists Brazilian women lawyers 20th-century Brazilian lawyers Brazilian magazine editors People from Quixeramobim Brazilian socialist feminists 20th-century Brazilian poets 20th-century Brazilian women writers Women magazine editors 20th-century women lawyers
Bob Zany (born Robert Earl Tetreault; September 11, 1961) is an American stand-up comedian and actor. He is known for performing with his trademark cigar on stage. Career In 1976, he appeared as a contestant on The Gong Show. Between that time and a 1986 appearance on the TV special George Schlatter's Comedy Club, he had gained a significant amount of weight, which he was able to lose by the time he appeared as a contestant on To Tell the Truth in 1990. In the 1980s Zany was a frequent guest on Frazer Smith's morning show on 95.5 KLOS in Los Angeles. Zany is an occasional guest on the nationally syndicated radio program The Bob & Tom Show, and has his own segment called The Zany Report. In recent years, he has also guest-hosted portions of Jerry Lewis' Labor Day Telethon. Zany also had a small role in the film Joe Dirt as the guy at the radio station who pushes Joe down at the beginning of the movie. On September 16, 2006, he appeared on the Comedy Central special, The Friends of the Bob and Tom Show. In June, 2007, he appeared on Last Comic Standing. He passed the initial interview, but was not advanced to the next round. Zany appeared in the Steven Soderbergh film The Informant, released September 18, 2009. The movie is a dark comedy about a Decatur, Illinois, agri-business giant's price-fixing scandal, and the bipolar whistleblower, Mark Whitacre, who is portrayed by Matt Damon. Zany plays Whitacre's lawyer, John Dowd, in the comedian-rich cast. In June 2010 Zany toured Israel with the Comedy for Koby show, hosted by the Koby Mandell Foundation. Zany performed in Jerusalem, Tel Aviv, Raanana, Beit Shemesh, Haifa, Modi'in and Gush Etzion. Zany is slated to star in the documentary film Close But No Cigar, directed by Jay Kanzler, which chronicles his thirty-plus years in show business. The documentary has not yet been released, but is expected to contain interviews with Ralphie May, Jimmy Pardo, Andy Kindler, Nia Peeples, Carrot Top, Rick Messina, and others. Zany is a 1979 graduate of West Covina High School and lives in Los Angeles. He is a three-time nominee for Annual American Comedy Awards Best Male Standup Comic. Filmography References External links Official website 1961 births American radio personalities Living people Place of birth missing (living people) American male comedians 21st-century American comedians People from West Covina, California
Joseph Labitzky (; 4 July 1802 in Krásno – 18 August 1881 in Karlovy Vary) was a Bohemian composer, violinist, and conductor. He studied with Karl Veit in his youth. Labitzky joined a traveling orchestra at age 14, and in 1820 took a position in an orchestra in Marienbad. In 1823-24 he was in Munich, and following this he toured Germany as a concert violinist. He put together his own orchestra in 1825, touring Vienna and Warsaw. He took a conducting position in Karlsbad in 1835, and his dance pieces became quite popular throughout Europe, including England. He was involved in "Cocks vs Purday", a British court case concerning copyright. He was the father of August Labitzky. Labitzky composed 300 dance pieces. He was overshadowed by Johann Strauss later in his life. Selected works L'adieu: Romance sans paroles for viola and piano, Op.286 (1872) References Andrew Lamb, "Joseph Labitzky". The New Grove Dictionary of Music and Musicians. London: Macmillan, 2001. Web sources External links 1802 births 1881 deaths People from Krásno (Sokolov District) German Bohemian people Czech male classical composers Austrian classical composers Austrian male classical composers Czech Romantic composers 19th-century classical composers 19th-century conductors (music) 19th-century violinists Male violinists
```javascript import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; export default (function () { if (!ExecutionEnvironment.canUseDOM) { return null; } return { onRouteUpdate({location}) { if (location) { setTimeout(() => { window.dataLayer.push({ event: 'route-update', }); }, 50); } }, }; })(); ```
Wilson State Park is a state park located within the city limits of Harrison in the U.S. state of Michigan. The park occupies along the shores of Budd Lake. History The Michigan Department of Natural Resources lists the park among thirteen state parks established in 1920 following creation of the Michigan State Parks Commission in 1919. Land for the park was donated to the city of Harrison in 1900 by a lumber company, then transferred to the state in 1922. The state park was dedicated in 1927. The Civilian Conservation Corps was active in the park from 1939 to 1941. Activities and amenities The state park offers swimming, picnicking, fishing for muskellunge, bass, panfish, perch and walleye, camping, and lodge. References External links Wilson State Park Michigan Department of Natural Resources Wilson State Park Map Michigan Department of Natural Resources Protected areas of Clare County, Michigan State parks of Michigan Civilian Conservation Corps in Michigan Protected areas established in 1920 1920 establishments in Michigan
The Oil Fields and Santa Fe Railway ("Oil Fields") was an Atchison, Topeka and Santa Fe Railway ("AT&SF") subsidiary. It owned trackage in and about the Cushing-Drumright Oil Field in Oklahoma, and was leased to and operated by the AT&SF from its inception in the 1915-1916 timeframe until its merger into the AT&SF in 1941. All of its tracks were abandoned by 1963. History To take advantage of possible traffic in the promising oil and gas area known as the Cushing-Drumright Field, two predecessor rail lines were created. The Cushing Traction Company was incorporated under the General Laws of Oklahoma on May 23, 1914. It was an electrified interurban with pretentions of joining the towns of Cushing, Oilton, and Drumright in Oklahoma, but only managed by 1915 to build 10 miles of track east-northeast from Cushing to the ephemeral town of Pemeta, Oklahoma, just to the northwest of Drumright, although it purchased additional right-of-way elsewhere. Meanwhile, the Oil Belt Terminal Railway Company was incorporated under the General Laws of Oklahoma on September 23, 1914, and built 8 miles of track in 1915 from Jennings, Oklahoma south to Oilton. The AT&SF was interested in getting in on trade in the field, and incorporated the Oil Fields and Santa Fe Railway Company as a wholly-owned subsidiary under the General Laws of Oklahoma on April 7, 1915. Oil Fields then purchased the assets of the other two companies on May 7, 1915, and completed building additional trackage in 1915 from Pemeta east and north to Oilton, 5.9 miles, and from a junction on that line around Frey, Oklahoma (just southeast of Pemeta) going south to Drumright. The completed system, from Cushing to Jennings with a branch to Drumright, was leased to the AT&SF effective January 1, 1916 and operated as a standard-gauge steam railway. The primary traffic on the approximately 28.4 mile system was petroleum and agricultural products, though passengers were also carried. The line interchanged with the Missouri–Kansas–Texas Railroad ("Katy") and the St. Louis–San Francisco Railway ("Frisco") at Jennings, the Frisco at Drumright, and the AT&SF and Katy at Cushing. As the field depleted and pipelines began carrying the petroleum, the AT&SF began abandonments. On March 1, 1934, the ICC approved abandonment of the line from Oilton to Jennings, about 7.4 miles. Passenger service was discontinued May 15, 1939. On January 16, 1942, based on an application filed the previous February, the ICC approved abandonment from the Frey junction to Oilton, about 4.2 miles, leaving the latter town without rail service. About this same time, Oil Fields was officially merged into the AT&SF, the ICC approval occurring June 28, 1941. In subsequent history, the remaining line from Cushing to Drumright was abandoned with ICC approval dated February 15, 1963. References Oklahoma railroads Defunct Oklahoma railroads
Celestine Cook (1924-1985, New Orleans) was an African American businesswoman, and community and political activist. She was the first African American to serve on the National Business Committee of the Arts. Early life and education Celestine Strode Cook was born in 1924 in Teague, Texas. Her father worked for the Rock Island Railroad as a machinist and her mother was a housewife. Cook graduated from Jack Yates High School in Houston and went on to receive her undergraduate degree in physical education in 1944 from the Tuskegee Institute in Alabama. Career Cook was a teacher for Houston public schools until her first husband, Bethel J. Strode, died in 1947. Cook was 24 with two children, Bethel Strode, Jr., and Bethelynn Strode. She took over the properties and investments that her husband had in Illinois and Texas, serving as the president of his estate. From 1949 to 1953, she was a member of the board for the City of Galveston Recreation and Park. In the mid-1950s, she married her second husband, Jessie W. Cook, a Good Citizen’s Life Insurance company executive, and they moved to New Orleans. In New Orleans, Cook worked as the executive secretary for the Good Citizens Life Insurance Company and Good Citizens Funeral Systems Inc. In 1972, she was elected to serve on the Board of Directors for the Liberty Bank and Trust Company, making her the only African American woman serving on the board of a New Orleans bank at the time. Cook was politically active and worked on several campaigns. She was involved with the campaigns for Dorothy Mae Taylor, Mayor Moon Landrieu, Rose Loving, and Congresswoman Lindy Boggs. Mayor Moon Landrieu appointed her to the Cultural Resources Committee in 1971 and she was also appointed by Governor John McKeithen to the Committee on Employment of the Physically Handicapped. In 1982, she worked with Mayor Dutch Morial’s re-election campaign, serving as the chairwoman of the Women’s Committee. Cook was the first African American and second woman to serve on the National Business Committee of the Arts. She was president of the New Orleans Links. Community involvement Cook was heavily involved in the New Orleans community, and active in the cultural, political, social, and economic realms of the city. Cook was committed to providing assistance to young artists. She served on the board of several different organizations including the 1984 World’s Fair in New Orleans, the New Orleans Museum of Art, the Business Arts Council, the Bayou Classic, and the Louisiana Division of the Arts. Cook encouraged other African American women to be involved in the community and introduced them to African American artists. She urged Leah Chase to consider joining the New Orleans Museum of Art’s (NOMA) board of trustees. Chase joined and was later invited to become a trustee for life. Her civic activities also involved serving as a trustee for Loyola University, Amistad Research Center, and NOMA. She was involved with organizations such as the Methodist Church, New Orleans Museum of Art (NOMA), Zeta Phi Beta Sorority, Friends of the Free Southern Theater, the Arts Council of New Orleans, the Women’s Auxiliary of Flint-Goodridge Hospital, New Orleans chapter of the Links, and the Tuskegee Alumni Association. Awards and honors In 1955, Cook was awarded the Tuskegee Institute Alumni Merit Award and Zeta Phi Beta’s Woman of the Year. References 1924 births 1985 deaths Businesspeople from New Orleans 20th-century African-American businesspeople African-American women in business American community activists American political activists Tuskegee Institute alumni
Gennadiy Grigoryevich Onishchenko (, born 20 November 1950) is a Russian government official who was the Chief Sanitary Inspector of Russia from 1996 to 2013. He has the federal state civilian service rank of 1st class Active State Councillor of the Russian Federation. Early life Gennady Onishchenko was born on 20 November 1950 in Changyr-Tash village, modern Kyrgyzstan. In 1973 he graduated from the M. Gorky Donetsk State Medical Institute. He is a Candidate Master of Sports in weightlifting. From 1973 to 1987 he worked in the Ministry of Railways of the USSR as a doctor-epidemiologist. In 1982 he became the chief sanitary doctor of the Moscow metro, in 1983 — the head of the central sanitary and epidemiological station of the Ministry of Railways. In 1988 he was appointed Deputy Head of the Main Directorate of Quarantine Infections of the USSR Ministry of Health. Onishchenko participated in the liquidation of the Chernobyl disaster. In the fall of 1995, during the First Chechen War, Onishchenko was kidnapped on the way from Mozdok to Grozny, and was held captive by Chechen separatists. From 1993 to 2002 he was a member of the Constructive-Ecological Movement of Russia "Kedr", transformed into the Russian Ecological Party "The Greens" in 2002. On June 24, 2009, Eduard Kokoity granted Onishchenko honorary citizenship of South Ossetia. Chief Sanitary Inspector From 1996 to 2013 Onishchenko was the Chief State Sanitary Doctor of Russia and ex officio First Deputy Minister of Health. Since 2004 he was the head of newly established Federal Service for Supervision of Consumer Rights Protection (Rospotrebnadzor). During Onishchenko's 17-year-long tenure his department made numerous radical and controversial actions: In March 2006, Rospotrebnadzor completely banned the import of Georgian and Moldovan wines to Russia, motivating this step with the non-compliance of a significant part of them with sanitary standards. The Georgian government recognized the presence of a large mass of counterfeits on the Georgian wine market and initiated criminal cases against the management of a number of wineries. According to a VCIOM poll, 71% of the Russians supported the restrictions imposed by Onishchenko. Since June 2009, Rospotrebnadzor has banned the import of almost 500 types of dairy products from Belarus, and then another 800 due to the fact that Belarusian producers did not re-register documents in accordance with Russian technical regulations for milk. The Belarusian delegation did not attend the CSTO summit in Moscow on June 15, explaining their move by "economic discrimination" from one of the CSTO countries. In October 2012, speaking on the draft of a new anti-smoking legislation, Onishchenko said: "If our Duma would not accept the law that was introduced, I will raise the issue of its dissolution. As a voter, I have the right to say so." In response, member of the Duma from United Russia Andrey Makarov suggested "sending Mr. Onishchenko for a psychiatric examination." In July 2013, the head of Rospotrebnadzor announced a ban on the Ukrainian Roshen confectionery products to Russia. On July 29, Onishchenko said that the agency's suspicions were "justified", that the Roshen's products "did not correspond to the declared parameters", and there was also a complaint about the quality and safety of the goods. On 22 October 2013, Deputy Prime Minister of Russia Olga Golodets, commenting on rumors about Onishchenko's resignation, said: "Gennady Onishchenko's term as head of Rospotrebnadzor has expired, so he is leaving this post. Deputy Head of Rospotrebnadzor Anna Popova will be appointed the new head of the department." Later that day, Onishchenko refused to confirm information about his resignation, calling Golodets "a strange person" who "does not belong to the number of decision-makers." On the evening of October 23, Gennady Onishchenko was officially dismissed from his post as head of Rospotrebnadzor and appointed assistant to the Prime Minister of Russia Dmitry Medvedev. The reason for the resignation of Onishchenko, according to one of the government officials, was the "problem of controlling him." Member of parliament On 22 May 2016, Onishchenko won United Russia's primaries in Tushino constituency No. 206 in Moscow. Two days later, the prime minister Dmitry Medvedev removed the reprimand imposed on Onishchenko in February "for violating the requirements of article 18 of the Law on the state civil service." When submitting the declaration, Onishchenko did not mention the residential building in Moscow Oblast. On 18 September 2016 he was elected member of the 7th State Duma He became first deputy Chairman of the Committee on Education and Science in the new Duma convocation. In July 2017, Onishchenko proposed to ban fidget spinners in Russia. In April 2018 he became one of the initiators of the bill "On measures of counteraction on unfriendly actions of the USA and (or) other foreign states" in the article 2 of which it was proposed to ban or restrict the import of drugs produced in the United States or other foreign countries. The project law was criticized by a number of public organizations, the Federation Council committee on social policy and State Duma committee on foreign affairs. Personal life Onishchenko has three children, one daughter and two sons. References External links Biography (in Russian) 1950 births Living people Russian people of Ukrainian descent 1st class Active State Councillors of the Russian Federation Academicians of the Russian Academy of Medical Sciences Recipients of the Order of Honour (Russia) Recipients of the Medal of the Order "For Merit to the Fatherland" I class State Prize of the Russian Federation laureates Russian public health doctors United Russia politicians Communist Party of the Soviet Union members Seventh convocation members of the State Duma (Russian Federation) 21st-century Russian politicians Soviet public health doctors
Shanghai Circus World () is a large, permanent indoor circus in the city of Shanghai, China. Shanghai Circus World covers an area of 22,500 square meters. Its main facility is the Acrobatics Field, in which there are 1,638 seats. The 100-minute performance show 'ERA Intersection of Time' has been performed since its debut at Shanghai Circus World in September 2005. The show is aided by multimedia including vision, original live music, sound effects, smell effect, air conditioning and lighting. It is unique and comparable to the tradition of the Broadway Musical, a stunning acrobatic show (which has elements performed in the Han Dynasty (206BC–220AD)) combining traditional Chinese arts and modern technologies. The performers present Chinese acrobatics, martial arts and dance in harmony with the music, sound, lighting, and other special effects, which include a water screen. It tells the story of China's evolution from its ancient past to the future is told. The performance provides an insight into China's ancient culture and civilization, with sections about Sinan, an ancient Chinese invention for telling directions, soothsaying and conjuring. With porcelain jars and vats as their stage properties the performers give an overview of Chinese porcelain culture and greater understand of the country's name of 'China'. Modern achievements that are also showcased include Shanghai Donghai Cross-Sea Bridge, Maglev Train, and Shenzhou 5, China's first crewed space mission. Transportation Shanghai Circus World is on Shanghai Metro Line 1 close to Shanghai Circus World station. References Year of establishment missing Circuses Performing arts venues in Shanghai nl:Shanghai Circus World
The phonology of second languages is different from the phonology of first languages in various ways. The differences are considered to come from general characteristics of second languages, such as slower speech rate, lower proficiency than native speakers, and from the interaction between non-native speakers' first and second languages. Research on second-language phonology has been done not only on segments, but also on prosody. Second-language prosody, like second-language segments, has been studied in terms of both its global characteristics and the interactions between first languages and second languages. First language to second language Global second-language prosody characteristics Speech rate L2 speech rate is typically slower than native speech. For example, Mandarin Chinese speakers’ speech rate in an English utterance is slower than native English speakers’ speech rate (Derwing and Munro, 1995), and speech rates in a sentence by highly experienced Italian and Korean nonnative speakers of English are slower than that of native English speakers' (Guion et al., 2000). In this study, the main factor of the slower speech rate for the Italian and Korean accented English was the durations of the vowels and sonorant consonants (Guion et al., 2000). Another source of the slower speech rate in L2 speech is that L2 speakers tend to not reduce function words, such as "the" or "and," as much as native speakers (Aoyama and Guion, 2007). The generally slower speech rate in L2 speech is correlated with the degree of perceived foreign accent by native listeners (Derwing and Munro, 1997). Interaction between first- and second-language prosody L2 speech is influenced by the speaker's L1 background. Such influences have been explored in relation to many prosodic features, such as pitch perception and pitch excursion (Beckman, 1986; Aoyama and Guion, 2007), stress placement (Archibald, 1995, 1998a, 1998b; Flege and Bohn, 1989; Archibald, 1997), syllable structure (Broselow and Park, 1995; Broslow, 1988; Eckman, 1991), and tone (Sereno and Wang, 2007; Guion and Pederson, 2007). Pitch perception and pitch excursions When perceiving accented syllables in English, Japanese nonnative speakers of English tend to rely only on F0, or pitch of the accented syllables, while native speakers use F0, duration, and amplitude (Beckman, 1986). This finding was confirmed in production, by showing that the excursions of F0 of English content words were larger for Japanese nonnative speakers of English than for native English speakers (Aoyama and Guion, 2007). In both studies, the reason for this phenomenon was proposed to be related to the characteristics of the nonnative speakers’ L1, Japanese. Japanese is a mora-timed language, and because of this, longer syllable duration makes a phonological difference in Japanese. Therefore, when expressing stress in Japanese, Japanese speakers may rely more on F0 than duration, which is a critical cue for a different phonological distinction. This L1 characteristic might interfere with Japanese speakers’ perception and production of English, which is a stress-timed language and might be free of such durational restrictions. Stress placement on words Influence from L1 to L2 was also found in stress placement on words. Hungarian learners of English tend to place initial stress on English words that do not have initial stress, because Hungarian has fixed initial stress and this is transferred to Hungarian speakers' L2 English prosody (Archibald, 1995; 1998a; 1998b). Spanish speakers of English were found not to stress target stressed syllables in English, and this might be due to the lack of stress in Spanish cognates and the lexical similarity between Spanish and English words (Flege and Bohn, 1989). In addition, it is suggested that speakers of tone languages (e.g., Chinese) and pitch-accent languages (e.g., Japanese), both of which use pitch as a phonologically meaningful item, do not compute stress placement in English, but rather store the stress information lexically (Archibald, 1997). Syllable structure L2 speakers can also perceive some innate characteristics of the L2, which lead to different repair strategies for different phonological patterns. Korean L2 speakers of English add an extra final vowel to some English words but not to all (Broslow and Park, 1995), as in (1). (1) Korean pronunciations of English words The problem is that modern Korean does not have a phonological vowel length difference, and Korean speakers show their own repair mechanism for English minimal pairs that have tense/lax difference, by adding an extra final vowel to English words with tense vowels. This might be because Korean learners of English attempt to preserve the mora count of the original English word, by adding an extra final vowel to words that have two moras (Broslow and Park, 1995). The syllable structure of such a word might look like in (2) (2) Syllable structure of English “beat” by Korean nonnative speakers of English (adapted from Broslow and Park, 1995). Tone: second-language perception, production, and learning L2 listeners show different patterns of tone perception in tone languages, such as Mandarin Chinese. In Guion and Pederson (2007), native listeners of Mandarin judged the similarity of synthesized Mandarin tones on the basis of both F0 and F0 slope, while English and Japanese listeners used only F0, not F0 slope. However, it was also observed that late learners of Mandarin showed similar patterns of tone perception as native listeners of Mandarin, focusing on both F0 and F0 slope of the tones. This suggests that L2 learners can learn to attend to the cues that L1 speakers use for the tone distinction. The possibility of learning new L2 prosodic distinction was further explored in a training study on Mandarin tones (Sereno and Wang, 2007). English L2 listeners’ perception and production of Mandarin tones improved after perceptual training, and this was observed both behaviorally and cortically: L2 listeners’ accuracy of tone perception and production improved, and increased activity of language areas in the left hemisphere (superior temporal gyrus) and neighboring effects on relevant neural areas were observed. Intonation Dutch English Willems (1982): size and direction of pitch movements Korean and Mandarin Englishes McGory (1997): nonnatives put pitch accents both on prominent and less prominent words, f0 patterns of statements and questions indistinct, different L1 backgrounds showed different error patterns Second language to first language Phonetic Realization of Phonological Intonation Dutch Greek Ineke Mennen (2004): Both L1 and L2 influence each other in terms of phonetic realization of phonological intonation. Teaching second language pronunciation Before the popularity of communicative teaching methods in the late 70s, pronunciation teaching through audio-lingual method (ALM) had a central place in language education. This emphasis shifted in the late 70's when the prevalent obsession with aural-oral drills, native-like accuracy, consonant pair repetition and the centrality of pronunciation was replaced by a concern for meaningful communication. For nearly a decade, it was assumed that listening to language was enough to develop pronunciation. This concern again saw a shift in the late 80's when pronunciation again found a place in desired language teaching outcomes due to an increased need to develop L2 learners' pronunciation of the second language. In the 80's and 90's seminal pedagogical texts written by Judy Gilbert and Celce-Murcia paved the path for a more interactive and meaningful way of teaching pronunciation in the 21st century. These approaches are a combination of audio-lingual and communicative methods, have still retained the minimum pair drill format, but there is increased emphasis on interaction and also suprasegmental features such as stress, intonation and rhythm. References Notes Bibliography Aoyama, K. & Guion, S. G. (2007). Prosody in second language acquisition: Acoustic Analyses of duration and F0 range. In * * * Bohn, O.-S. & Munro, M. J. (Eds.), Language experience in second language speech learning: In honor of James Emil Flege (pp. 282–297). Amsterdam: John Benjamins. Archibald, J. (1995). The acquisition of stress. In J. Archibald (Ed.), Phonological acquisition and phonological theory (pp. 81–109). Hillsdale, NJ: Lawrence Erlbaum. Archibald, J. (1997). The acquisition of English stress by speakers of tone languages: Lexical storage versus computation. Linguistics, 35, 167–181. Archibald, J. (1998a). Metrical parameters and lexical dependency: Acquiring L2 stress. In S. Flynn & G. Martohardjono (eds.), The generative study of second language acquisition (Vol. 14, pp. 279–301). Mahwah, NJ: Lawrence Erlbaum. Archibald, L. (1998b) Second language phonology. Amsterdam: John Benjamins. Beckman, M. E. (1986). Stress and non-stress accent. Dordrecht, Holland: Foris. Best, C. T. (1995). A direct realist view of cross-language speech perception. In W. Strange (Ed.), Speech perception and linguistic experience: Issues in cross-language research (pp. 171–204). Timonium, MD: York Press. Broselow, E., & Park, H.-B. (1995). Mora conservation in second language prosody. In J. Archibald (Ed.), Phonological acquisition and phonological theory (pp. 81–109). Hillsdale, NJ: Lawrence Erlbaum.* Derwing, T. M., & Munro, M. J. (1997). Accent, intelligibility, and comprehensibility: Evidence from four L1s. Studies in Second Language Acquisition, 19, 1-16. Eckman, F. (1991). The structural conformity hypothesis and the acquisition of consonant clusters in the interlanguage of ESL learners. Studies in Second Language Acquisition, 13, 23–41. Flege, J. E. (1991). Age of learning affects the authenticity of voice-onset time (VOT) in stop consonants produced in a second language. Journal of the Acoustical society of America, 89, 395–411. Flege, J. E., & Bohn, O.-S. (1989). An instrumental study of vowel reduction and stress placement in Spanish-accented English. Studies in Second Language Acquisition, 11, 35–62. Guion, S. G. & Pederson, E. (2007). Investigating the role of attention in phonetic learning. In Bohn, O.-S. & Munro, M. J. (Eds.), Language experience in second language speech learning: In honor of James Emil Flege (pp. 57–78). Amsterdam: John Benjamins. Guion, S. G., Flege, J. E., Liu, S. H., & Yeni-Komshian, G. H. (2000). Age of learning effects on the duration of sentences produced in a second language. Applied Psycholinguistics, 21, 205–228. Kuhl, P. K. (1991). Human adults and human infants show a “perceptual magnet effect” for the prototypes of speech categories, monkeys do not. perception & Psychophysics, 50, 93-107. Magen, I. (1998). The perception of foreign-accented speech. Journal of Phonetics, 26, 381–400. McGory, J. T. (1997). Acquisition of intonational prominence in English by Seoul Korean and Mandarin Chinese speakers. Unpublished Ph.D., Ohio State University. Mennen, I. (2004). Bi-directional interference in the intonation of Dutch speakers of Greek. Journal of Phonetics, 32, 543–563. Munro, M. J., & Derwing, T. M. (1995). Processing time, accent, and comprehensibility in the perception of native and foreign-accented speech. Language and Speech, 38, 289–306. Sereno, J. A. & Wang, Y. (2007). Behavioral and cortical effects of learning a second language: The acquisition of tone. In Bohn, O.-S. & Munro, M. J. (Eds.), Language experience in second language speech learning: In honor of James Emil Flege (pp. 241–258). Amsterdam: John Benjamins. Phonology Second-language acquisition