htmlgames / htmlgames.github.io

HTML Games
5 stars 7 forks source link

FIXED: Scratch Effect blocks... #3

Closed htmlgames closed 6 years ago

htmlgames commented 7 years ago

I've had a go at creating the scratch effects. (I've added the demo project to the dropdown list)

The current implementation is pretty fast, but could be coded more efficiently...

htmlgames commented 7 years ago

... use int8Arrays (Type) - should give ~25% speed up

See this example:

jsfiddle.net/andrewjbaker/Fnx2w

htmlgames commented 7 years ago

UPDATE: also added effects to stage as well (as sprite). Have fun!

htmlgames commented 6 years ago

Note for mobile performance stage effects are disabled.

Console hack to (force) turn them on / off:

P.hasTouchEvents = !P.hasTouchEvents;