Skip to main content
100%

Forced Perspective

✓ Published0🌍 Public
Aalexmacy
Last edited Feb 2, 2017
Created on Jan 25, 2017

A hallway constructed from four gradient-filled polygons shifts its vanishing point to follow the mouse. The D3 v4 code uses `d3.scaleLinear` and polygon `attr` transitions to animate the perspective. A second mode uses the WebGazer.js library with `clmtrackr` facial tracking, mapping averaged eye coordinates through `scaleX` and `scaleY` to control the viewpoint via a webcam canvas overlay.

AI-generated description

Move the mouse over the screen and the 'hallway' will move along with it.

I made another version of this that uses your camera and facial recognition to controlled the perspective. It only works over https, so it's hosted directly on GitHub: Prespective Tests

mit Licensed

Similar vizzes