Updates: New Front Page, Painter Fixes, and API Additions

Posted: by Joe under Play My Code Announcements

We very recently rolled out a Play My Code update featuring additions to the API, keyboard shortcuts for our integrated paint application SkyBrush, a refreshed front page and a whole range of other bugfixes and tweaks. Read on for details…

API Additions

Mouse Pressed & Key Raised

Long-time member Giorgio suggested we add more methods for detecting the precise state of the mouse and keyboard. These come in the form of isLeftPressed, isMiddlePressed, isRightPressed and isKeyReleased, and allow more precise control over how you detect user interaction. Click into each one for full details on how they work.

setTransform & transform functions

Requested by Krakatomato following his recent (excellent) 3D engine building experiment, we’ve added setTransform and transform functions.

Also, check out just one of his wonderful demos below- find more in our experiments section.

setTransform and transform are both intended for advanced users, and they allow manipulation of the ‘transformation matrix’ used when drawing- this is what allows you to rotate, skew or scale graphics. setTransform replaces the current matrix, whilst transform applies the given matrix against the current matrix. Not to worry if you don’t understand this- it’s relatively advanced stuff.

SkyBrush Keyboard Shortcuts

As well as a range of bugfixes, we’ve spent a considerable amount of time adding keyboard shortcuts to SkyBrush, our (recently rebranded) integrated painting app. You can now switch to any tool using the keyboard, which makes life much easier for more experienced users.

The colour picker can be accessed by holding down the alt key, and some tools now have an alternate command through holding shift- for example, the zoom tool will zoom in the opposite direction, the pencil and brush will switch to the eraser, rectangles and circles will toggle between drawing outline or filled, and the line will change between smooth and pixelated.

You can find a full list of the shortcuts right here. Incidentally, SkyBrush was recently accepted as a Chrome Experiment!

We hope everyone likes the new changes, more will be coming from Play My Code over the rest of the year. Do please keep in touch via the forum or @playmycode on Twitter- we love hearing your suggestions and take note of every last scrap of feedback we receive.

3 Responses to Updates: New Front Page, Painter Fixes, and API Additions

Giorgio_Sotiro

The new front page is better/more decent than the previous. Note: it is not "isKeyRaised" but "isKeyReleased", the first one does not run and it is not documented (unless if you change that). [Personally, I prefer "isKeyReleased", it is generally a common name of this function.]

Joe

You are right, it is 'isKeyReleased', not raised. I've corrected that typo, thanks!

  • Pingback: Play My Code Updates: New Front Page, Painter Fixes, and API Additions | HTML5 Game Development

  • Leave a Response

    Your email address will not be published. Required fields are marked *