Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/examples/adding_up_to_10/js/lesson_multiple.js
blob: 53972a54d76286add864c193d7281bdc4404930b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$(document).ready(function(){
var k = $.karma ({container: "#karma-main"});
k.layer( {id:"card1", width:250, height:250} ), 
k.layer( {id:"card2", width:250, height:250} ),
k.layer( {id:"card3", width:250, height:250} )

k.init({
	images: [
		{id: "ball",   file: "ball.png",   localized : false },
		{id: "ballon", file: "ballon.png", localized : false },
		{id: "banana", file: "banana.png", localized : false },
		{id: "chilli", file: "chilli.png", localized : false },
		{id: "fish"  , file: "fish.png",   localized : false },
	    {id: "flower", file: "flower.png", localized : false },
	    {id: "plussign", file: "plussign.png", localized : false },
	    {id: "happyMonkey", file: "happyMonkey.jpg", localized : false },
	    {id: "scorebox", file: "scorebox.png", localized : false }
	]
	,
	sounds: [
		{id: "correct",  file: "correct.ogg"   },
		{id: "incorrect",file: "incorrect.ogg" }
	]
});
k.main(function() {
	var [library, layers ] = [k.library, k.layers];
	library.images["ball"].draw( layers["card1"].ctx );
	library.images["ballon"].draw( layers["card2"].ctx );
	library.images["banana"].draw( layers["card3"].ctx );
});
});