Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/stations/Graffiti.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export function setup(ctx, hall) {
drawContext.strokeStyle = "#0f0";
var dist = lastPosition.distanceTo(aux2);
var angle = angleBetween(lastPosition, aux2);
let alpha = THREE.Math.clamp(1 - distance, 0, 1);
let alpha = THREE.MathUtils.clamp(1 - distance, 0, 1);

drawContext.globalAlpha = alpha;

Expand All @@ -221,7 +221,7 @@ export function setup(ctx, hall) {
var _y = lastPosition.y + Math.cos(angle) * i;
drawContext.save();
drawContext.translate(_x, _y);
let r = THREE.Math.lerp(0.001, 0.2, distance);
let r = THREE.MathUtils.lerp(0.001, 0.2, distance);
drawContext.scale(r, r);

drawContext.rotate((Math.PI * 180) / getRandomInt(0, 180));
Expand Down
1 change: 0 additions & 1 deletion src/stations/Paintings.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ function refreshZoomUV(hit) {
zoom.widget.position.copy(hit.point);
zoom.widget.position.x -= 0.5 * zoom.animation;

const uvs = zoom.widget.geometry.faceVertexUvs[0];
zoom.widget.material.uniforms.zoomPos.value.copy(hit.uv);
zoom.widget.material.uniforms.zoomAmount.value = ZOOMS[hit.object.userData.paintingId];
}
4 changes: 2 additions & 2 deletions src/systems/AreaCheckerSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export class AreaCheckerSystem extends System {
const checker = checkers[j];
const obj3D = checker.getComponent(Object3D).value;
if (obj3D.boundingBox.intersectsBox(bboxArea)) {
checker.addComponent(AreaInside);
if(!checker.hasComponent(AreaInside)) checker.addComponent(AreaInside);
} else {
checker.removeComponent(AreaInside);
if(checker.hasComponent(AreaInside)) checker.removeComponent(AreaInside);
}
}
}
Expand Down