Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:28:35+00:00 2026-06-06T18:28:35+00:00

We have a design we need to implement where the concept is the user

  • 0

We have a design we need to implement where the concept is the user is shining a flashlight on an object and anything within the flashlight’ beam (a circle around the cursor) should show the background image instead of the foreground image.

I’m looking on suggestions for how to implement ideally using jQuery and HTML5 techniques. I’m quite sure we could achieve this with Flash but we want it to be iOS friendly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:28:37+00:00Added an answer on June 6, 2026 at 6:28 pm

    You could use two html canvases.

    The foreground would be a canvas with a higher z-index than the background and they would both be position:absolute and be contained by a container element.

    Then you would find the location of a circle centered around the mouse (see resources)

    You would get it’s position by using the mouse move event and subtracting half the height and width of the circle from the location of the mouse to center it around the mouse.

    Then you could manipulate the pixels on the canvas that have the same coordinates as the circle to have an alpha value of 0 (or a number between 0 and 1 if you don’t want it to be completely transparent)

    Hopefully that explains it thoroughly enough. Feel free to ask any questions. I’m not going to just hand out code though because that’s not the point of this forum really.

    Resources:

    Basics:
    http://www.html5canvastutorials.com/tutorials/html5-canvas-tutorials-introduction/

    Get coordinates of a circle:
    Calculate circle coordinates in a sequential fashion

    Manipulate Pixels:
    http://tutorials.jenkov.com/html5-canvas/pixels.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some advice for a design which I have to implement in application.
In SQL Server, I need to design a User table. It should have a
I have a design issue. I need to implement a listener. I saw the
I have a design question. We need to put some default, system defined content
I have a page that I need to design in PhP/Html/Java/CSS that has to
I have existing java code and need to create Design Document based on that.
I have a need to swap between different DB instances of the same design.
I have a class which is going to need to use the strategy design
I am in need of some guidance for the following design. I have a
I need to implement the following in the asp.net Gridview. I have the excel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.