UNPKG

1.42 kBPlain TextView Raw
1/*
2 * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5 * the License. A copy of the License is located at
6 *
7 * http://aws.amazon.com/apache2.0/
8 *
9 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11 * and limitations under the License.
12 */
13
14import { SceneOptions } from './XR';
15
16export interface XRProvider {
17 // configure your provider
18 configure(config: object): object;
19
20 // return 'XR';
21 getCategory(): string;
22
23 // return the name of you provider
24 getProviderName(): string;
25
26 loadScene(
27 sceneName: string,
28 domElementId: string,
29 sceneOptions: SceneOptions
30 );
31 isSceneLoaded(sceneName): boolean;
32 getSceneController(sceneName: string): any;
33 isVRCapable(sceneName: string): boolean;
34 isVRPresentationActive(sceneName: string): boolean;
35 start(sceneName: string): void;
36 enterVR(sceneName: string): void;
37 exitVR(sceneName: string): void;
38 isMuted(sceneName: string): boolean;
39 setMuted(sceneName: string, muted: boolean): void;
40 onSceneEvent(
41 sceneName: string,
42 eventName: string,
43 eventHandler: Function
44 ): void;
45 enableAudio(sceneName: string): void;
46}