xrblocks 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -9
- package/build/addons/ai/AudioCaptureProcessorCode.d.ts +1 -0
- package/build/addons/ai/AudioCaptureProcessorCode.js +27 -0
- package/build/addons/ai/GeminiManager.d.ts +7 -3
- package/build/addons/ai/GeminiManager.js +48 -23
- package/build/addons/objects/SimpleDecalGeometry.js +9 -5
- package/build/addons/simulator/instructions/CustomInstruction.js +8 -9
- package/build/addons/simulator/instructions/HandsInstructions.js +17 -10
- package/build/addons/simulator/instructions/NavigationInstructions.js +10 -9
- package/build/addons/simulator/instructions/SimulatorInstructions.js +17 -18
- package/build/addons/simulator/instructions/SimulatorInstructionsCard.js +69 -75
- package/build/addons/simulator/instructions/SimulatorInstructionsEvents.js +4 -1
- package/build/addons/simulator/instructions/UserInstructions.js +18 -15
- package/build/addons/simulator/ui/EnterXRButton.js +17 -17
- package/build/addons/simulator/ui/GeminiLiveApiKeyInput.js +45 -39
- package/build/addons/simulator/ui/HandPosePanel.js +20 -10
- package/build/addons/simulator/ui/MicButton.js +23 -18
- package/build/addons/simulator/ui/ModeIndicator.js +17 -17
- package/build/addons/ui/TextBillboard.js +1 -1
- package/build/addons/utils/Palette.js +3 -15
- package/build/addons/virtualkeyboard/Keyboard.js +24 -21
- package/build/addons/volumes/VolumetricCloud.glsl.js +1 -1
- package/build/addons/volumes/VolumetricCloud.js +8 -5
- package/build/agent/Tool.d.ts +3 -1
- package/build/ai/AI.d.ts +2 -2
- package/build/ai/Gemini.d.ts +1 -5
- package/build/camera/XRDeviceCamera.d.ts +1 -1
- package/build/core/Core.d.ts +3 -1
- package/build/core/Options.d.ts +7 -0
- package/build/core/components/ScreenshotSynthesizer.d.ts +2 -2
- package/build/core/components/XRTransition.d.ts +1 -1
- package/build/depth/DepthMesh.d.ts +1 -1
- package/build/input/Hands.d.ts +1 -1
- package/build/input/Input.d.ts +1 -1
- package/build/input/gestures/GestureEvents.d.ts +23 -0
- package/build/input/gestures/GestureRecognition.d.ts +43 -0
- package/build/input/gestures/GestureRecognitionOptions.d.ts +43 -0
- package/build/input/gestures/GestureTypes.d.ts +16 -0
- package/build/input/gestures/providers/HeuristicGestureDetectors.d.ts +2 -0
- package/build/simulator/Simulator.d.ts +2 -0
- package/build/simulator/SimulatorControls.d.ts +1 -1
- package/build/simulator/controlModes/SimulatorControlMode.d.ts +1 -1
- package/build/simulator/handPoses/HandPoseJoints.d.ts +2 -2
- package/build/simulator/userActions/PinchOnButtonAction.d.ts +2 -2
- package/build/simulator/userActions/WalkTowardsPanelAction.d.ts +1 -1
- package/build/singletons.d.ts +2 -2
- package/build/sound/CoreSound.d.ts +1 -1
- package/build/stereo/utils.d.ts +1 -1
- package/build/ui/components/MaterialSymbolsView.d.ts +1 -1
- package/build/ui/components/ScrollingTroikaTextView.d.ts +1 -1
- package/build/ui/interaction/ModelViewer.d.ts +6 -2
- package/build/utils/ModelLoader.d.ts +1 -1
- package/build/utils/SparkRendererHolder.d.ts +5 -0
- package/build/utils/Types.d.ts +2 -2
- package/build/video/VideoStream.d.ts +1 -1
- package/build/world/World.d.ts +1 -1
- package/build/world/objects/ObjectDetector.d.ts +1 -1
- package/build/world/planes/PlaneDetector.d.ts +1 -1
- package/build/xrblocks.d.ts +3 -0
- package/build/xrblocks.js +6782 -6020
- package/build/xrblocks.js.map +1 -1
- package/build/xrblocks.min.js +1 -1
- package/build/xrblocks.min.js.map +1 -1
- package/package.json +13 -8
|
@@ -5,75 +5,75 @@ import { SimulatorInstructionsNextEvent, SimulatorInstructionsCloseEvent } from
|
|
|
5
5
|
|
|
6
6
|
let SimulatorInstructionsCard = class SimulatorInstructionsCard extends LitElement {
|
|
7
7
|
static { this.styles = css `
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
:host {
|
|
9
|
+
position: relative;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
background: #ffffff;
|
|
12
|
+
display: flex;
|
|
13
|
+
max-height: 100%;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
height: 40rem;
|
|
16
|
+
width: min-content;
|
|
17
|
+
min-width: 30rem;
|
|
18
|
+
border-radius: 1.6rem;
|
|
19
|
+
color: #000000;
|
|
20
|
+
padding: 1.5rem;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
h1 {
|
|
25
|
+
margin-top: 0px;
|
|
26
|
+
font-size: 1.375rem;
|
|
27
|
+
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
h2 {
|
|
30
|
+
margin-top: 0px;
|
|
31
|
+
margin-bottom: 0px;
|
|
32
|
+
font-size: 1.125rem;
|
|
33
|
+
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
ul {
|
|
36
|
+
margin-top: 0px;
|
|
37
|
+
margin-bottom: 0px;
|
|
38
|
+
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
.image-div {
|
|
41
|
+
margin-top: 0.5rem;
|
|
42
|
+
margin-bottom: 0.5rem;
|
|
43
|
+
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
.description-div {
|
|
46
|
+
flex-grow: 1;
|
|
47
|
+
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
.close-button {
|
|
50
|
+
position: absolute;
|
|
51
|
+
right: 1.3rem;
|
|
52
|
+
top: 1.3rem;
|
|
53
|
+
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
button {
|
|
56
|
+
align-self: flex-end;
|
|
57
|
+
width: min-content;
|
|
58
|
+
height: min-content;
|
|
59
|
+
font-size: 0.75rem;
|
|
60
|
+
background: rgb(48, 40, 34);
|
|
61
|
+
color: white;
|
|
62
|
+
border-radius: 1rem;
|
|
63
|
+
padding: 0.5rem 0.7rem;
|
|
64
|
+
border: none;
|
|
65
|
+
}
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
video {
|
|
68
|
+
max-width: 100%;
|
|
69
|
+
aspect-ratio: 16/9;
|
|
70
|
+
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
p {
|
|
73
|
+
margin-top: 0px;
|
|
74
|
+
margin-bottom: 0px;
|
|
75
|
+
}
|
|
76
|
+
`; }
|
|
77
77
|
continueButtonClicked() {
|
|
78
78
|
this.dispatchEvent(new SimulatorInstructionsNextEvent());
|
|
79
79
|
}
|
|
@@ -81,9 +81,7 @@ let SimulatorInstructionsCard = class SimulatorInstructionsCard extends LitEleme
|
|
|
81
81
|
this.dispatchEvent(new SimulatorInstructionsCloseEvent());
|
|
82
82
|
}
|
|
83
83
|
getHeaderContents() {
|
|
84
|
-
return html `
|
|
85
|
-
<h1>Welcome to XR Blocks!</h1>
|
|
86
|
-
`;
|
|
84
|
+
return html ` <h1>Welcome to XR Blocks!</h1> `;
|
|
87
85
|
}
|
|
88
86
|
getImageContents() {
|
|
89
87
|
return html ``;
|
|
@@ -93,18 +91,14 @@ let SimulatorInstructionsCard = class SimulatorInstructionsCard extends LitEleme
|
|
|
93
91
|
}
|
|
94
92
|
render() {
|
|
95
93
|
return html `
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
${this.getDescriptionContents()}
|
|
105
|
-
</div>
|
|
106
|
-
<button type="button" @click=${this.continueButtonClicked}>Continue</button>
|
|
107
|
-
`;
|
|
94
|
+
<button class="close-button" @click=${this.closeButtonClicked}>X</button>
|
|
95
|
+
<div class="header-div">${this.getHeaderContents()}</div>
|
|
96
|
+
<div class="image-div">${this.getImageContents()}</div>
|
|
97
|
+
<div class="description-div">${this.getDescriptionContents()}</div>
|
|
98
|
+
<button type="button" @click=${this.continueButtonClicked}>
|
|
99
|
+
Continue
|
|
100
|
+
</button>
|
|
101
|
+
`;
|
|
108
102
|
}
|
|
109
103
|
};
|
|
110
104
|
SimulatorInstructionsCard = __decorate([
|
|
@@ -7,7 +7,10 @@ class SimulatorInstructionsNextEvent extends Event {
|
|
|
7
7
|
class SimulatorInstructionsCloseEvent extends Event {
|
|
8
8
|
static { this.type = 'simulatorInstructionsCloseEvent'; }
|
|
9
9
|
constructor() {
|
|
10
|
-
super(SimulatorInstructionsCloseEvent.type, {
|
|
10
|
+
super(SimulatorInstructionsCloseEvent.type, {
|
|
11
|
+
bubbles: true,
|
|
12
|
+
composed: true,
|
|
13
|
+
});
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -11,26 +11,29 @@ let UserInstructions = class UserInstructions extends SimulatorInstructionsCard
|
|
|
11
11
|
getImageContents() {
|
|
12
12
|
return html `
|
|
13
13
|
<video playsinline autoplay muted loop>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type="video/webm">
|
|
17
|
-
Your browser does not support the video tag.
|
|
14
|
+
<source src=${SIMULATOR_USER_VIDEO_PATH} type="video/webm" />
|
|
15
|
+
Your browser does not support the video tag.
|
|
18
16
|
</video>
|
|
19
17
|
`;
|
|
20
18
|
}
|
|
21
19
|
getDescriptionContents() {
|
|
22
20
|
return html `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
<h2>User Mode</h2>
|
|
22
|
+
<p>
|
|
23
|
+
The simulator starts in <strong>User Mode</strong> by default. This mode
|
|
24
|
+
is for moving the camera and interacting directly with scene objects.
|
|
25
|
+
</p>
|
|
26
|
+
<ul>
|
|
27
|
+
<li>
|
|
28
|
+
<strong>Move Forward/Backward/Sideways:</strong> Use the W, A, S, D
|
|
29
|
+
keys.
|
|
30
|
+
</li>
|
|
31
|
+
<li><strong>Move Up/Down:</strong> Use the Q and E keys.</li>
|
|
32
|
+
<li>
|
|
33
|
+
<strong>Rotate Camera:</strong> Hold the right mouse button and drag.
|
|
34
|
+
</li>
|
|
35
|
+
<li><strong>Select Object:</strong> Left-click the mouse.</li>
|
|
36
|
+
</ul>
|
|
34
37
|
`;
|
|
35
38
|
}
|
|
36
39
|
};
|
|
@@ -11,23 +11,23 @@ let EnterXRButton = class EnterXRButton extends LitElement {
|
|
|
11
11
|
}
|
|
12
12
|
static { this.styles = css `
|
|
13
13
|
:host {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
left: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.mode-name-container {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
border: none;
|
|
21
|
+
margin: 1rem;
|
|
22
|
+
border-radius: 5rem;
|
|
23
|
+
background: rgba(0, 0, 0, 0.5);
|
|
24
|
+
color: #fff;
|
|
25
|
+
width: 10rem;
|
|
26
|
+
height: 3rem;
|
|
27
|
+
text-align: center;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
line-height: 3rem;
|
|
30
|
+
font-size: 1.2em;
|
|
31
31
|
}
|
|
32
32
|
`; }
|
|
33
33
|
setSimulatorMode(newMode) {
|
|
@@ -39,9 +39,9 @@ let EnterXRButton = class EnterXRButton extends LitElement {
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
return html `
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
<button class="mode-name-container" @click=${this.onClick.bind(this)}>
|
|
43
|
+
Enter XR
|
|
44
|
+
</button>
|
|
45
45
|
`;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -11,53 +11,53 @@ let GeminiLiveApiKeyInput = class GeminiLiveApiKeyInput extends LitElement {
|
|
|
11
11
|
}
|
|
12
12
|
static { this.styles = css `
|
|
13
13
|
:host {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 10%;
|
|
16
|
+
left: 50%;
|
|
17
|
+
-webkit-transform: translate(-50%, -50%);
|
|
18
|
+
transform: translate(-50%, -50%);
|
|
19
|
+
z-index: 1000;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.info-prompt {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
width: 50rem;
|
|
24
|
+
display: flex;
|
|
25
|
+
background: #00000088;
|
|
26
|
+
margin: 1rem auto;
|
|
27
|
+
padding: 1rem;
|
|
28
|
+
border-radius: 1rem;
|
|
29
|
+
color: white;
|
|
30
|
+
font-size: 0.9rem;
|
|
31
|
+
line-height: 1.4;
|
|
32
|
+
text-align: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
border: 1px solid #333;
|
|
36
|
+
box-sizing: border-box;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.text-input {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
display: block;
|
|
41
|
+
width: 20rem;
|
|
42
|
+
height: 3rem;
|
|
43
|
+
border-radius: 3rem;
|
|
44
|
+
background: #00000088;
|
|
45
|
+
border: none;
|
|
46
|
+
color: white;
|
|
47
|
+
padding: 0rem 1rem;
|
|
48
|
+
margin: 0 auto;
|
|
49
|
+
font-size: 0.9rem;
|
|
50
|
+
box-sizing: border-box;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.text-input::placeholder {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
color: #aaa;
|
|
55
|
+
opacity: 1;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.text-input:focus {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
outline: none;
|
|
60
|
+
border: 1px solid #555;
|
|
61
61
|
}
|
|
62
62
|
`; }
|
|
63
63
|
firstUpdated() {
|
|
@@ -71,10 +71,16 @@ let GeminiLiveApiKeyInput = class GeminiLiveApiKeyInput extends LitElement {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
return html `
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
<p class="info-prompt">
|
|
75
|
+
Gemini Key Required: Please paste your key from Google AI Studio below.
|
|
76
|
+
</p>
|
|
77
|
+
<input
|
|
78
|
+
type="password"
|
|
79
|
+
type="text"
|
|
80
|
+
class="text-input"
|
|
81
|
+
placeholder="Gemini Key"
|
|
82
|
+
${ref(this.textInputRef)}
|
|
83
|
+
/>
|
|
78
84
|
`;
|
|
79
85
|
}
|
|
80
86
|
};
|
|
@@ -30,8 +30,8 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
30
30
|
border: none;
|
|
31
31
|
margin: 1rem 0px;
|
|
32
32
|
border-radius: 5rem;
|
|
33
|
-
background:rgba(0, 0, 0, 0.5);
|
|
34
|
-
color: #
|
|
33
|
+
background: rgba(0, 0, 0, 0.5);
|
|
34
|
+
color: #fff;
|
|
35
35
|
max-width: 100%;
|
|
36
36
|
width: fit-content;
|
|
37
37
|
height: 3rem;
|
|
@@ -49,7 +49,7 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.hand-pose-button {
|
|
52
|
-
color: #
|
|
52
|
+
color: #ffffff44;
|
|
53
53
|
font-size: 1.2em;
|
|
54
54
|
line-height: 3rem;
|
|
55
55
|
background: transparent;
|
|
@@ -59,7 +59,7 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.hand-pose-button.selected {
|
|
62
|
-
color: #
|
|
62
|
+
color: #ffffffff;
|
|
63
63
|
}
|
|
64
64
|
`; }
|
|
65
65
|
update(changedProperties) {
|
|
@@ -80,11 +80,17 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
80
80
|
const poseName = xb.SIMULATOR_HAND_POSE_NAMES[pose];
|
|
81
81
|
const classes = {
|
|
82
82
|
'hand-pose-button': true,
|
|
83
|
-
|
|
83
|
+
selected: this.handPose === pose,
|
|
84
84
|
};
|
|
85
85
|
const clickCall = () => this.sendHandPoseRequest(pose);
|
|
86
86
|
buttons.push(html `
|
|
87
|
-
<button
|
|
87
|
+
<button
|
|
88
|
+
class=${classMap(classes)}
|
|
89
|
+
@click=${clickCall}
|
|
90
|
+
data-pose=${pose}
|
|
91
|
+
>
|
|
92
|
+
${poseName}
|
|
93
|
+
</button>
|
|
88
94
|
`);
|
|
89
95
|
}
|
|
90
96
|
return buttons;
|
|
@@ -98,7 +104,11 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
98
104
|
return;
|
|
99
105
|
const selectedButton = handPosePanel.querySelector(`.hand-pose-button[data-pose=${this.handPose}]`);
|
|
100
106
|
if (selectedButton) {
|
|
101
|
-
selectedButton.scrollIntoView({
|
|
107
|
+
selectedButton.scrollIntoView({
|
|
108
|
+
behavior: 'smooth',
|
|
109
|
+
inline: 'center',
|
|
110
|
+
block: 'nearest',
|
|
111
|
+
});
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
114
|
render() {
|
|
@@ -107,9 +117,9 @@ let HandPosePanel = class HandPosePanel extends LitElement {
|
|
|
107
117
|
}
|
|
108
118
|
const handPoseButtons = this.getHandPoseButtons();
|
|
109
119
|
return html `
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
<div class="hand-pose-panel" ${ref(this.posePanelRef)}>
|
|
121
|
+
${handPoseButtons}
|
|
122
|
+
</div>
|
|
113
123
|
`;
|
|
114
124
|
}
|
|
115
125
|
};
|
|
@@ -11,27 +11,27 @@ let MicButton = class MicButton extends LitElement {
|
|
|
11
11
|
}
|
|
12
12
|
static { this.styles = css `
|
|
13
13
|
.mic-input {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
flex-grow: 0;
|
|
15
|
+
border-radius: 3rem;
|
|
16
|
+
width: 3rem;
|
|
17
|
+
height: 100%;
|
|
18
|
+
background: #00000088;
|
|
19
|
+
color: white;
|
|
20
|
+
border: none;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.mic-input-icon {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
text-align: center;
|
|
25
|
+
line-height: 3rem;
|
|
26
|
+
width: 100%;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.material-symbols-outlined {
|
|
30
|
-
|
|
30
|
+
font-variation-settings:
|
|
31
31
|
'FILL' 0,
|
|
32
32
|
'wght' 400,
|
|
33
33
|
'GRAD' 0,
|
|
34
|
-
'opsz' 24
|
|
34
|
+
'opsz' 24;
|
|
35
35
|
}
|
|
36
36
|
`; }
|
|
37
37
|
onMicButtonClicked() {
|
|
@@ -50,12 +50,17 @@ let MicButton = class MicButton extends LitElement {
|
|
|
50
50
|
micInputStyle = this.getHaloCss();
|
|
51
51
|
}
|
|
52
52
|
return html `
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
<link
|
|
54
|
+
rel="stylesheet"
|
|
55
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=mic"
|
|
56
|
+
/>
|
|
57
|
+
<button
|
|
58
|
+
class="mic-input"
|
|
59
|
+
style=${micInputStyle}
|
|
60
|
+
@click=${this.onMicButtonClicked.bind(this)}
|
|
61
|
+
>
|
|
62
|
+
<span class="material-symbols-outlined mic-input-icon"> mic </span>
|
|
63
|
+
</button>
|
|
59
64
|
`;
|
|
60
65
|
}
|
|
61
66
|
};
|
|
@@ -11,23 +11,23 @@ let SimulatorModeIndicator = class SimulatorModeIndicator extends LitElement {
|
|
|
11
11
|
}
|
|
12
12
|
static { this.styles = css `
|
|
13
13
|
:host {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
right: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.mode-name-container {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
border: none;
|
|
21
|
+
margin: 1rem;
|
|
22
|
+
border-radius: 5rem;
|
|
23
|
+
background: rgba(0, 0, 0, 0.5);
|
|
24
|
+
color: #fff;
|
|
25
|
+
width: 10rem;
|
|
26
|
+
height: 3rem;
|
|
27
|
+
text-align: center;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
line-height: 3rem;
|
|
30
|
+
font-size: 1.2em;
|
|
31
31
|
}
|
|
32
32
|
`; }
|
|
33
33
|
getModeName() {
|
|
@@ -42,9 +42,9 @@ let SimulatorModeIndicator = class SimulatorModeIndicator extends LitElement {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
return html `
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
<button class="mode-name-container" @click=${this.onClick.bind(this)}>
|
|
46
|
+
${this.getModeName()}
|
|
47
|
+
</button>
|
|
48
48
|
`;
|
|
49
49
|
}
|
|
50
50
|
};
|
|
@@ -15,7 +15,7 @@ class TextBillboard extends THREE.Object3D {
|
|
|
15
15
|
this.text = text;
|
|
16
16
|
this.font = font;
|
|
17
17
|
this.textMaterial =
|
|
18
|
-
material ?? new THREE.MeshBasicMaterial({ color:
|
|
18
|
+
material ?? new THREE.MeshBasicMaterial({ color: 0xffffff });
|
|
19
19
|
if (!font) {
|
|
20
20
|
new FontLoader().load(DEFAULT_FONT_PATH, (font) => {
|
|
21
21
|
this.font = font;
|
|
@@ -10,23 +10,11 @@ class XRPalette {
|
|
|
10
10
|
*/
|
|
11
11
|
constructor() {
|
|
12
12
|
this.fullGColors_ = [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
0xE37400,
|
|
16
|
-
0x0D652D,
|
|
17
|
-
0x4285F4,
|
|
18
|
-
0xEA4335,
|
|
19
|
-
0xFBBC04,
|
|
20
|
-
0x34A853,
|
|
21
|
-
0xD2E3FC,
|
|
22
|
-
0xFAD2CF,
|
|
23
|
-
0xFEEFC3,
|
|
24
|
-
0xCEEAD6,
|
|
25
|
-
0xF1F3F4,
|
|
26
|
-
0x9AA0A6,
|
|
13
|
+
0x174ea6, 0xa50e0e, 0xe37400, 0x0d652d, 0x4285f4, 0xea4335, 0xfbbc04,
|
|
14
|
+
0x34a853, 0xd2e3fc, 0xfad2cf, 0xfeefc3, 0xceead6, 0xf1f3f4, 0x9aa0a6,
|
|
27
15
|
0x202124,
|
|
28
16
|
];
|
|
29
|
-
this.liteGColors_ = [
|
|
17
|
+
this.liteGColors_ = [0xea4335, 0x4285f4, 0x34ab53, 0xfbbc04];
|
|
30
18
|
this.lastRandomColor_ = null;
|
|
31
19
|
if (XRPalette.instance) {
|
|
32
20
|
return XRPalette.instance;
|