By continuing to use the site, you agree to the use of cookies. You can find out more by following this link. I Accept
navi icon
...but can you see it? No, sorry ,it is in the code. I'm proud to introduce to you : 'types'.
2013-01-29 17:59:15 Types make inner structure much
better. A normal memo can have the type 'text', 'audio' or 'image'.
A memo of the type 'plugin' is interpreted as a javascript. So now you can
program, write, compose and use your drawings.

Here is a the source for a simple plugin:

\r\n/* \r\nplugin that shows all memos */\r\nconsole.log('this plugin -> '+uid);\r\n//the width of the memos retangles is also their height\r\nvar w = screenwidth / 10;\r\n//now we gather all memos of the game\r\nvar memos = game.getAllMemos();\r\nconsole.log('memos 
length = '+memos.length);\r\n//set the context's color styles \r\ncontext.fillStyle = '#ff6';\r\ncontext.strokeStyle = '#ff6';\r\nfor (var
i = 0; i < memos.length; i++) {\r\n//now we draw all memos \r\ncontext.strokeRect(10 + (i%5)*(w+10),10 + (i%4)*(w+10),w, w);
context.fillText(memos.uid, 10 + (i%5)*(w+10),30 + (i%4)*(w+10));\r\n}\r\ncontext.stroke();\r\ncontext.fill();\r\nupdate = true;\r\n
\r\n

By the way the board has a new background image.




Share the article: 




comments powered by Disqus
Progamming Manifest N.one

Progamming Manifest N.one

My (not so) stupid, simple ideas about programming and maybe other stuff if you like to replace programming with something else.

In 8 months is XMas

In 8 months is XMas

Do you feel the spirit? Lazy days in springtime. It is time to come on board.