Skip to content

Commit 6a4e0bd

Browse files
committed
fixes for lint; update pen gltf
1 parent 36d5dd2 commit 6a4e0bd

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

src/components/super-spawner.js

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -108,38 +108,35 @@ AFRAME.registerComponent("super-spawner", {
108108
this.heldEntities.clear();
109109
},
110110

111-
onSpawnEvent: (() => {
112-
const spawnOffset = new THREE.Vector3();
113-
return async function() {
114-
const controllerCount = this.el.sceneEl.components["input-configurator"].controllerQueue.length;
115-
const using6DOF = controllerCount > 1 && this.el.sceneEl.is("vr-mode");
116-
const hand = using6DOF ? this.data.superHand : this.data.cursorSuperHand;
117-
118-
if (this.cooldownTimeout || !hand) {
119-
return;
120-
}
111+
async onSpawnEvent() {
112+
const controllerCount = this.el.sceneEl.components["input-configurator"].controllerQueue.length;
113+
const using6DOF = controllerCount > 1 && this.el.sceneEl.is("vr-mode");
114+
const hand = using6DOF ? this.data.superHand : this.data.cursorSuperHand;
121115

122-
const entity = addMedia(this.data.src, this.data.template, ObjectContentOrigins.SPAWNER).entity;
116+
if (this.cooldownTimeout || !hand) {
117+
return;
118+
}
123119

124-
hand.object3D.getWorldPosition(entity.object3D.position);
125-
hand.object3D.getWorldQuaternion(entity.object3D.quaternion);
126-
if (this.data.useCustomSpawnScale) {
127-
entity.object3D.scale.copy(this.data.spawnScale);
128-
}
120+
const entity = addMedia(this.data.src, this.data.template, ObjectContentOrigins.SPAWNER).entity;
129121

130-
this.activateCooldown();
122+
hand.object3D.getWorldPosition(entity.object3D.position);
123+
hand.object3D.getWorldQuaternion(entity.object3D.quaternion);
124+
if (this.data.useCustomSpawnScale) {
125+
entity.object3D.scale.copy(this.data.spawnScale);
126+
}
131127

132-
await waitForEvent("body-loaded", entity);
128+
this.activateCooldown();
133129

134-
hand.object3D.getWorldPosition(entity.object3D.position);
130+
await waitForEvent("body-loaded", entity);
131+
132+
hand.object3D.getWorldPosition(entity.object3D.position);
135133

136-
if (!using6DOF) {
137-
for (let i = 0; i < this.data.grabEvents.length; i++) {
138-
hand.emit(this.data.grabEvents[i], { targetEntity: entity });
139-
}
134+
if (!using6DOF) {
135+
for (let i = 0; i < this.data.grabEvents.length; i++) {
136+
hand.emit(this.data.grabEvents[i], { targetEntity: entity });
140137
}
141-
};
142-
})(),
138+
}
139+
},
143140

144141
async onGrabStart(e) {
145142
if (this.cooldownTimeout) {

src/hub.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
<a-entity
440440
super-spawner="
441441
template: #pen-interactable;
442-
src: https://asset-bundles-prod.reticulum.io/interactables/DrawingPen/DrawingPen-484ae5682f.gltf;
442+
src: https://asset-bundles-prod.reticulum.io/interactables/DrawingPen/DrawingPen-34fb4aee27.gltf;
443443
spawnEvent: spawn_pen;
444444
superHand: #player-right-controller;
445445
cursorSuperHand: #cursor;"

0 commit comments

Comments
 (0)