W3C home > Mailing lists > Public > public-canvas-api@w3.org > April to June 2011

Re: hit testing and retained graphics

From: Charles Pritchard <chuck@jumis.com>
Date: Wed, 22 Jun 2011 14:54:47 -0700
Message-ID: <4E0264A7.1050506@jumis.com>
To: Charles McCathieNevile <chaals@opera.com>
CC: Richard Schwerdtfeger <schwer@us.ibm.com>, Paul Bakaus <pbakaus@zynga.com>, Frank Olivier <Frank.Olivier@microsoft.com>, Cynthia Shelly <cyns@microsoft.com>, "david.bolter@gmail.com" <david.bolter@gmail.com>, "Mike@w3.org" <Mike@w3.org>, "public-canvas-api@w3.org" <public-canvas-api@w3.org>, "public-html@w3.org" <public-html@w3.org>, "public-html-a11y@w3.org" <public-html-a11y@w3.org>, "public-html-request@w3.org" <public-html-request@w3.org>
On 6/22/2011 5:16 AM, Charles McCathieNevile wrote:
> On Wed, 22 Jun 2011 13:06:08 +0200, Paul Bakaus <pbakaus@zynga.com> 
> wrote:
>
>> Hi everyone,
>>
>> We at Zynga use hit testing to a great extend in our isometric games 
>> and have long searched for a solution that removes some of the 
>> processing burden from us. I therefore very much disagree that hit 
>> testing should be up to the js developer. If possible, this is a 
>> perfect candidate for a job the browser can help us with. And by 
>> "us", I am probably talking about almost every JS game developer.
>
> What about placing a transparent image over the top of your canvas, 
> and using an image map in it. Things that need to be clickable can be 
> updated according to whatever you're drawing, things that don't remain 
> purely immediate mode.
>
> I haven't tried it, but I've been thinking about it (and about how the 
> whole discussion reminds me of ISSUE-105 [1]) and I ran across 
> something that demonstrates the technique [2] (although I think the 
> purpose of that demo was something else, and whatever it was trying to 
> do seems horribly complex to me).
>
> [1] http://www.w3.org/html/wg/tracker/issues/105
> [2] http://zreference.com/image-map-canvas/
>
I want to point out that, apart from the difficulty of translating 
curves into polygons, image maps are not suitable for animated content.

The proposals that Richard and I have put forward put attention to use 
cases where content may be animated and/or overlapping.
Developers following WCAG 2.0 practices should have little difficulty 
incorporating these shadow dom management techniques into their projects.

-Charles
Received on Wednesday, 22 June 2011 21:55:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:10:30 UTC