brilliantsole 0.0.26 → 0.0.28
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 +16 -10
- package/assets/3d/anchor.glb +0 -0
- package/assets/3d/coin.glb +0 -0
- package/assets/3d/glasses.glb +0 -0
- package/assets/3d/rightHand.glb +0 -0
- package/assets/audio/bounceMedium.wav +0 -0
- package/assets/audio/bounceStrong.wav +0 -0
- package/assets/audio/bounceWeak.wav +0 -0
- package/assets/audio/coin.wav +0 -0
- package/assets/audio/getUp.wav +0 -0
- package/assets/audio/grab.wav +0 -0
- package/assets/audio/kick.wav +0 -0
- package/assets/audio/platterFadeIn old.wav +0 -0
- package/assets/audio/platterFadeIn.wav +0 -0
- package/assets/audio/platterFadeOut.wav +0 -0
- package/assets/audio/punch.wav +0 -0
- package/assets/audio/punchSqueak.wav +0 -0
- package/assets/audio/purr.wav +0 -0
- package/assets/audio/purrFadeOut.wav +0 -0
- package/assets/audio/release.wav +0 -0
- package/assets/audio/splat.wav +0 -0
- package/assets/audio/stomp.wav +0 -0
- package/assets/images/ukaton-pressure-0.svg +9 -0
- package/assets/images/ukaton-pressure-1.svg +9 -0
- package/assets/images/ukaton-pressure-10.svg +9 -0
- package/assets/images/ukaton-pressure-11.svg +9 -0
- package/assets/images/ukaton-pressure-12.svg +9 -0
- package/assets/images/ukaton-pressure-13.svg +9 -0
- package/assets/images/ukaton-pressure-14.svg +9 -0
- package/assets/images/ukaton-pressure-15.svg +9 -0
- package/assets/images/ukaton-pressure-2.svg +9 -0
- package/assets/images/ukaton-pressure-3.svg +9 -0
- package/assets/images/ukaton-pressure-4.svg +9 -0
- package/assets/images/ukaton-pressure-5.svg +9 -0
- package/assets/images/ukaton-pressure-6.svg +9 -0
- package/assets/images/ukaton-pressure-7.svg +9 -0
- package/assets/images/ukaton-pressure-8.svg +9 -0
- package/assets/images/ukaton-pressure-9.svg +9 -0
- package/assets/images/ukaton-right-insole.svg +798 -0
- package/build/brilliantsole.cjs +2870 -882
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.js +2477 -782
- package/build/brilliantsole.js.map +1 -1
- package/build/brilliantsole.ls.js +2260 -592
- package/build/brilliantsole.ls.js.map +1 -1
- package/build/brilliantsole.min.js +1 -1
- package/build/brilliantsole.min.js.map +1 -1
- package/build/brilliantsole.module.d.ts +302 -116
- package/build/brilliantsole.module.js +2468 -782
- package/build/brilliantsole.module.js.map +1 -1
- package/build/brilliantsole.module.min.d.ts +302 -116
- package/build/brilliantsole.module.min.js +1 -1
- package/build/brilliantsole.module.min.js.map +1 -1
- package/build/brilliantsole.node.module.d.ts +295 -113
- package/build/brilliantsole.node.module.js +2860 -882
- package/build/brilliantsole.node.module.js.map +1 -1
- package/build/dts/BS-output.d.ts +10 -0
- package/build/dts/BS.d.ts +21 -9
- package/build/dts/CameraManager.d.ts +72 -0
- package/build/dts/Device.d.ts +53 -16
- package/build/dts/DeviceInformationManager.d.ts +4 -4
- package/build/dts/DeviceManager.d.ts +3 -0
- package/build/dts/FileTransferManager.d.ts +18 -8
- package/build/dts/InformationManager.d.ts +8 -5
- package/build/dts/TfliteManager.d.ts +22 -2
- package/build/dts/WifiManager.d.ts +61 -0
- package/build/dts/connection/BaseConnectionManager.d.ts +37 -3
- package/build/dts/connection/ClientConnectionManager.d.ts +11 -2
- package/build/dts/connection/bluetooth/BluetoothConnectionManager.d.ts +1 -0
- package/build/dts/connection/bluetooth/NobleConnectionManager.d.ts +3 -1
- package/build/dts/connection/bluetooth/WebBluetoothConnectionManager.d.ts +2 -0
- package/build/dts/connection/bluetooth/bluetoothUUIDs.d.ts +2 -2
- package/build/dts/connection/udp/UDPConnectionManager.d.ts +28 -0
- package/build/dts/connection/webSocket/WebSocketConnectionManager.d.ts +25 -0
- package/build/dts/devicePair/DevicePair.d.ts +14 -10
- package/build/dts/devicePair/DevicePairPressureSensorDataManager.d.ts +8 -4
- package/build/dts/devicePair/DevicePairSensorDataManager.d.ts +2 -2
- package/build/dts/scanner/BaseScanner.d.ts +4 -1
- package/build/dts/scanner/NobleScanner.d.ts +2 -1
- package/build/dts/sensor/MotionSensorDataManager.d.ts +5 -2
- package/build/dts/sensor/SensorDataManager.d.ts +5 -4
- package/build/dts/server/BaseClient.d.ts +6 -3
- package/build/dts/server/ServerUtils.d.ts +1 -1
- package/build/dts/server/websocket/WebSocketUtils.d.ts +1 -1
- package/build/dts/utils/CenterOfPressureHelper.d.ts +2 -2
- package/build/dts/utils/Console.d.ts +2 -0
- package/build/dts/utils/MathUtils.d.ts +2 -0
- package/build/dts/utils/ThrottleUtils.d.ts +2 -0
- package/build/dts/vibration/VibrationManager.d.ts +19 -2
- package/build/index.d.ts +299 -113
- package/build/index.node.d.ts +292 -110
- package/examples/3d/scene.html +19 -5
- package/examples/3d/script.js +90 -17
- package/examples/3d-generic/index.html +144 -0
- package/examples/3d-generic/script.js +266 -0
- package/examples/balance/script.js +2 -1
- package/examples/basic/index.html +232 -18
- package/examples/basic/script.js +746 -106
- package/examples/bottango/index.html +11 -1
- package/examples/bottango/script.js +2 -2
- package/examples/center-of-pressure/index.html +114 -114
- package/examples/center-of-pressure/script.js +1 -1
- package/examples/device-pair/index.html +58 -58
- package/examples/device-pair/script.js +12 -8
- package/examples/edge-impulse/script.js +135 -44
- package/examples/edge-impulse-test/README.md +11 -0
- package/examples/edge-impulse-test/edge-impulse-standalone.js +7228 -0
- package/examples/edge-impulse-test/edge-impulse-standalone.wasm +0 -0
- package/examples/edge-impulse-test/index.html +75 -0
- package/examples/edge-impulse-test/run-impulse.js +135 -0
- package/examples/edge-impulse-test/script.js +200 -0
- package/examples/gloves/edge-impulse-standalone.js +7228 -0
- package/examples/gloves/edge-impulse-standalone.wasm +0 -0
- package/examples/gloves/index.html +119 -0
- package/examples/gloves/run-impulse.js +135 -0
- package/examples/gloves/scene.html +124 -0
- package/examples/gloves/script.js +931 -0
- package/examples/graph/index.html +11 -1
- package/examples/graph/script.js +94 -37
- package/examples/pressure/index.html +180 -12
- package/examples/pressure/script.js +144 -7
- package/examples/punch/index.html +135 -0
- package/examples/punch/punch.tflite +0 -0
- package/examples/punch/script.js +169 -0
- package/examples/recording/index.html +191 -183
- package/examples/server/index.html +109 -23
- package/examples/server/script.js +322 -111
- package/examples/ukaton-firmware-update/index.html +20 -0
- package/examples/ukaton-firmware-update/manifest.json +11 -0
- package/examples/ukaton-firmware-update/merged-firmware.bin +0 -0
- package/examples/utils/aframe/aframe-master.min.js +2 -0
- package/examples/utils/aframe/bs-vibration.js +150 -0
- package/examples/utils/aframe/force-pushable.js +80 -0
- package/examples/utils/aframe/grabbable-anchor.js +46 -0
- package/examples/utils/aframe/grabbable-listener.js +31 -0
- package/examples/utils/aframe/grabbable-physics-body.js +190 -0
- package/examples/utils/aframe/grow-shrink.js +25 -0
- package/examples/utils/aframe/hand-punch.js +119 -0
- package/examples/utils/aframe/my-obb-collider.js +293 -0
- package/examples/utils/aframe/occlude-hand-tracking-controls.js +47 -0
- package/examples/utils/aframe/occlude-mesh.js +42 -0
- package/examples/utils/aframe/palm-up-detector.js +47 -0
- package/examples/utils/aframe/shadow-material.js +20 -0
- package/examples/utils/aframe/soft-shadow-light.js +9 -0
- package/examples/webxr/script.js +3 -3
- package/examples/webxr-2/assets/3d/soccerBall.glb +0 -0
- package/examples/webxr-2/assets/audio/shellBounce.wav +0 -0
- package/examples/webxr-2/assets/audio/shellHit.wav +0 -0
- package/examples/webxr-2/assets/audio/shellKick.wav +0 -0
- package/examples/webxr-2/assets/audio/soccerBounce.wav +0 -0
- package/examples/webxr-2/assets/audio/soccerKick.mp3 +0 -0
- package/examples/webxr-2/assets/images/shellTexture.png +0 -0
- package/examples/webxr-2/components/bs-ankle.js +337 -0
- package/examples/webxr-2/components/coin.js +84 -0
- package/examples/webxr-2/components/custom-wrap.js +17 -0
- package/examples/webxr-2/components/goomba.js +3250 -0
- package/examples/webxr-2/components/init-shell-material.js +215 -0
- package/examples/webxr-2/components/platter.js +172 -0
- package/examples/webxr-2/components/shell.js +374 -0
- package/examples/webxr-2/components/soccer-ball.js +250 -0
- package/examples/webxr-2/components/squashed-goomba.js +249 -0
- package/examples/webxr-2/edge-impulse-standalone.js +7228 -0
- package/examples/webxr-2/edge-impulse-standalone.wasm +0 -0
- package/examples/webxr-2/index.html +996 -0
- package/examples/webxr-2/kick.tflite +0 -0
- package/examples/webxr-2/kick2.tflite +0 -0
- package/examples/webxr-2/run-impulse.js +135 -0
- package/examples/webxr-2/script.js +384 -0
- package/package.json +2 -1
- package/src/.prettierrc +4 -0
- package/src/BS.ts +66 -9
- package/src/CameraManager.ts +499 -0
- package/src/Device.ts +620 -92
- package/src/DeviceInformationManager.ts +22 -11
- package/src/DeviceManager.ts +94 -25
- package/src/FileTransferManager.ts +146 -21
- package/src/FirmwareManager.ts +1 -1
- package/src/InformationManager.ts +62 -20
- package/src/TfliteManager.ts +172 -26
- package/src/WifiManager.ts +323 -0
- package/src/connection/BaseConnectionManager.ts +145 -30
- package/src/connection/ClientConnectionManager.ts +47 -11
- package/src/connection/bluetooth/BluetoothConnectionManager.ts +14 -3
- package/src/connection/bluetooth/NobleConnectionManager.ts +155 -42
- package/src/connection/bluetooth/WebBluetoothConnectionManager.ts +104 -35
- package/src/connection/bluetooth/bluetoothUUIDs.ts +40 -13
- package/src/connection/udp/UDPConnectionManager.ts +356 -0
- package/src/connection/websocket/WebSocketConnectionManager.ts +282 -0
- package/src/devicePair/DevicePair.ts +145 -49
- package/src/devicePair/DevicePairPressureSensorDataManager.ts +72 -24
- package/src/devicePair/DevicePairSensorDataManager.ts +5 -5
- package/src/scanner/BaseScanner.ts +49 -11
- package/src/scanner/NobleScanner.ts +81 -17
- package/src/sensor/BarometerSensorDataManager.ts +1 -1
- package/src/sensor/MotionSensorDataManager.ts +22 -7
- package/src/sensor/PressureSensorDataManager.ts +47 -13
- package/src/sensor/SensorConfigurationManager.ts +75 -24
- package/src/sensor/SensorDataManager.ts +107 -26
- package/src/server/BaseClient.ts +192 -37
- package/src/server/BaseServer.ts +201 -43
- package/src/server/ServerUtils.ts +39 -9
- package/src/server/udp/UDPServer.ts +74 -23
- package/src/server/udp/UDPUtils.ts +9 -2
- package/src/server/websocket/WebSocketClient.ts +30 -9
- package/src/server/websocket/WebSocketServer.ts +1 -1
- package/src/server/websocket/WebSocketUtils.ts +4 -2
- package/src/utils/CenterOfPressureHelper.ts +5 -5
- package/src/utils/Console.ts +62 -9
- package/src/utils/MathUtils.ts +31 -1
- package/src/utils/ParseUtils.ts +25 -6
- package/src/utils/ThrottleUtils.ts +62 -0
- package/src/utils/Timer.ts +1 -1
- package/src/utils/checksum.ts +1 -1
- package/src/utils/mcumgr.js +1 -1
- package/src/vibration/VibrationManager.ts +166 -40
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
AFRAME.registerComponent("squashed-goomba", {
|
|
2
|
+
schema: {
|
|
3
|
+
template: { default: "#squashedGoombaTemplate", type: "selector" },
|
|
4
|
+
duration: { default: 1000 },
|
|
5
|
+
originalScale: { default: 1 },
|
|
6
|
+
amplitude: { default: 0.8 },
|
|
7
|
+
frequency: { default: 5 },
|
|
8
|
+
damping: { default: 4 },
|
|
9
|
+
lifetime: { default: 1000 },
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
bodyScaleRange: {
|
|
13
|
+
x: { min: 0.7, max: 1.2 },
|
|
14
|
+
y: { min: 0.7, max: 1.2 },
|
|
15
|
+
},
|
|
16
|
+
bodyRotationRange: {
|
|
17
|
+
z: { min: -0.7, max: 0.7 },
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
eyeRotationRange: {
|
|
21
|
+
z: { min: -1.0, max: 1.0 },
|
|
22
|
+
},
|
|
23
|
+
eyePositionRange: {
|
|
24
|
+
x: { min: 0, max: 0.04 },
|
|
25
|
+
y: { min: 0, max: 0.06 },
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
footRotationRange: {
|
|
29
|
+
z: { min: -1.0, max: 1.0 },
|
|
30
|
+
},
|
|
31
|
+
footPositionRange: {
|
|
32
|
+
x: { min: 0, max: 0.04 },
|
|
33
|
+
y: { min: -0.01, max: 0.06 },
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
sides: ["left", "right"],
|
|
37
|
+
|
|
38
|
+
valueInRange: function (value, range) {
|
|
39
|
+
return THREE.MathUtils.lerp(range.min, range.max, value);
|
|
40
|
+
},
|
|
41
|
+
randomRange: function (range) {
|
|
42
|
+
return THREE.MathUtils.lerp(range.min, range.max, Math.random());
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
init: function () {
|
|
46
|
+
this.camera = document.querySelector("a-camera");
|
|
47
|
+
|
|
48
|
+
this.eyes = [];
|
|
49
|
+
this.feet = [];
|
|
50
|
+
|
|
51
|
+
this.el.addEventListener("loaded", () => {
|
|
52
|
+
const template = this.data.template.content
|
|
53
|
+
.querySelector("a-entity")
|
|
54
|
+
.cloneNode(true);
|
|
55
|
+
template.classList.forEach((_class) => {
|
|
56
|
+
// console.log(`adding class ${_class}`);
|
|
57
|
+
this.el.classList.add(_class);
|
|
58
|
+
});
|
|
59
|
+
Array.from(template.children).forEach((entity) => {
|
|
60
|
+
this.el.appendChild(entity);
|
|
61
|
+
});
|
|
62
|
+
this.template = template;
|
|
63
|
+
|
|
64
|
+
this.body = this.el.querySelector(".body");
|
|
65
|
+
|
|
66
|
+
this.el.querySelectorAll(".left").forEach((entity) => {
|
|
67
|
+
const duplicate = entity.cloneNode(true);
|
|
68
|
+
duplicate.addEventListener("loaded", () => {
|
|
69
|
+
this.flip(duplicate);
|
|
70
|
+
duplicate.classList.remove("left");
|
|
71
|
+
duplicate.classList.add("right");
|
|
72
|
+
duplicate
|
|
73
|
+
.querySelectorAll("[position], [rotation]")
|
|
74
|
+
.forEach((entity) => this.flip(entity));
|
|
75
|
+
|
|
76
|
+
if (entity.classList.contains("eye")) {
|
|
77
|
+
this.eyes.push(entity, duplicate);
|
|
78
|
+
this.eyePositions = this.eyes.map((entity) =>
|
|
79
|
+
entity.object3D.position.clone()
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
if (entity.classList.contains("foot")) {
|
|
83
|
+
this.feet.push(entity, duplicate);
|
|
84
|
+
this.feetPositions = this.feet.map((entity) =>
|
|
85
|
+
entity.object3D.position.clone()
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
entity.parentEl.appendChild(duplicate);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
randomize: function () {
|
|
95
|
+
this.el.object3D.rotation.z = this.randomRange(this.bodyRotationRange.z);
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
const value = Math.random();
|
|
99
|
+
this.body.object3D.scale.x = this.valueInRange(
|
|
100
|
+
value,
|
|
101
|
+
this.bodyScaleRange.x
|
|
102
|
+
);
|
|
103
|
+
this.body.object3D.scale.y = this.valueInRange(
|
|
104
|
+
1 - value,
|
|
105
|
+
this.bodyScaleRange.y
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
{
|
|
110
|
+
const value = Math.random();
|
|
111
|
+
this.eyes.forEach((entity, index) => {
|
|
112
|
+
entity.object3D.rotation.z = this.randomRange(this.eyeRotationRange.z);
|
|
113
|
+
entity.object3D.position.copy(this.eyePositions[index]);
|
|
114
|
+
if (true) {
|
|
115
|
+
entity.object3D.position.y += this.randomRange(
|
|
116
|
+
this.eyePositionRange.y
|
|
117
|
+
);
|
|
118
|
+
} else {
|
|
119
|
+
entity.object3D.position.y += this.valueInRange(
|
|
120
|
+
index == 0 ? value : 1 - value,
|
|
121
|
+
this.eyePositionRange.y
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
this.eyes[0].object3D.position.x -= this.randomRange(
|
|
127
|
+
this.eyePositionRange.x
|
|
128
|
+
);
|
|
129
|
+
this.eyes[1].object3D.position.x += this.randomRange(
|
|
130
|
+
this.eyePositionRange.x
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
{
|
|
135
|
+
const value = Math.random();
|
|
136
|
+
this.feet.forEach((entity, index) => {
|
|
137
|
+
entity.object3D.position.copy(this.feetPositions[index]);
|
|
138
|
+
entity.object3D.rotation.z = this.randomRange(this.footRotationRange.z);
|
|
139
|
+
if (true) {
|
|
140
|
+
entity.object3D.position.y += this.randomRange(
|
|
141
|
+
this.footPositionRange.y
|
|
142
|
+
);
|
|
143
|
+
} else {
|
|
144
|
+
entity.object3D.position.y += this.valueInRange(
|
|
145
|
+
index == 0 ? value : 1 - value,
|
|
146
|
+
this.footPositionRange.y
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
this.feet[0].object3D.position.x -= this.randomRange(
|
|
152
|
+
this.footPositionRange.x
|
|
153
|
+
);
|
|
154
|
+
this.feet[1].object3D.position.x += this.randomRange(
|
|
155
|
+
this.footPositionRange.x
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
flip: function (entity) {
|
|
161
|
+
const position = entity.getAttribute("position");
|
|
162
|
+
position.x *= -1;
|
|
163
|
+
entity.setAttribute("position", position);
|
|
164
|
+
const rotation = entity.getAttribute("rotation");
|
|
165
|
+
rotation.y *= -1;
|
|
166
|
+
rotation.z *= -1;
|
|
167
|
+
entity.setAttribute("rotation", rotation);
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
tick: function (time, timeDelta) {
|
|
171
|
+
if (this.startTime == undefined) {
|
|
172
|
+
this.startTime = time;
|
|
173
|
+
}
|
|
174
|
+
if (this.isDone) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const t = (time - this.startTime) / 1000; // seconds
|
|
178
|
+
const dampingFactor = Math.exp(-this.data.damping * t);
|
|
179
|
+
const scaleY =
|
|
180
|
+
this.data.originalScale +
|
|
181
|
+
this.data.amplitude *
|
|
182
|
+
Math.sin(this.data.frequency * t * Math.PI * 2) *
|
|
183
|
+
dampingFactor;
|
|
184
|
+
this.el.object3D.scale.z = scaleY;
|
|
185
|
+
if (dampingFactor < 0.01) {
|
|
186
|
+
this.isDone = true;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
start: function () {
|
|
191
|
+
this.randomize();
|
|
192
|
+
|
|
193
|
+
this.startTime = undefined;
|
|
194
|
+
this.isDone = false;
|
|
195
|
+
|
|
196
|
+
this.sound = this.el.sceneEl.components["pool__splatsound"].requestEntity();
|
|
197
|
+
this.sound.object3D.position.copy(this.el.object3D.position);
|
|
198
|
+
this.sound.play();
|
|
199
|
+
this.sound.components.sound.playSound();
|
|
200
|
+
|
|
201
|
+
setTimeout(() => {
|
|
202
|
+
const coin = this.el.sceneEl.components["pool__coin"].requestEntity();
|
|
203
|
+
coin.play();
|
|
204
|
+
let pitch = this.el.object3D.rotation.reorder("YXZ").x;
|
|
205
|
+
let flip = false;
|
|
206
|
+
{
|
|
207
|
+
const { x, y, z } = this.el.object3D.position;
|
|
208
|
+
const position = new THREE.Vector3(x, y - 0.04, z);
|
|
209
|
+
if (pitch < THREE.MathUtils.degToRad(-80)) {
|
|
210
|
+
position.y += 0.1;
|
|
211
|
+
} else if (pitch > THREE.MathUtils.degToRad(80)) {
|
|
212
|
+
if (false) {
|
|
213
|
+
position.y -= 0.15;
|
|
214
|
+
} else {
|
|
215
|
+
flip = true;
|
|
216
|
+
position.y += 0.05;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
coin.object3D.position.copy(position);
|
|
220
|
+
}
|
|
221
|
+
{
|
|
222
|
+
if (true) {
|
|
223
|
+
const { x, y, z } = this.camera.object3D.rotation;
|
|
224
|
+
const cameraToCoin = new THREE.Vector3().subVectors(
|
|
225
|
+
this.camera.object3D.position,
|
|
226
|
+
this.el.object3D.position
|
|
227
|
+
);
|
|
228
|
+
const yaw = Math.atan2(cameraToCoin.x, cameraToCoin.z);
|
|
229
|
+
coin.object3D.rotation.set(flip ? Math.PI : 0, yaw, 0, "YXZ");
|
|
230
|
+
} else {
|
|
231
|
+
const { x, y, z } = this.el.getAttribute("rotation");
|
|
232
|
+
coin.setAttribute("rotation", [0, y, 0].join(" "));
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
coin.components.coin.start();
|
|
236
|
+
|
|
237
|
+
this.removeSelf();
|
|
238
|
+
}, this.data.lifetime);
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
remove: function () {
|
|
242
|
+
this.removeSelf();
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
removeSelf: function () {
|
|
246
|
+
this.el.sceneEl.components["pool__squashedgoomba"].returnEntity(this.el);
|
|
247
|
+
this.el.sceneEl.components["pool__splatsound"].returnEntity(this.sound);
|
|
248
|
+
},
|
|
249
|
+
});
|