HTML and CSS Reference
In-Depth Information
wallFixture
.
shape
.
SetAsBox
(
wallDefs
[
i
].
w
/
scaleFactor
,
wallDefs
[
i
].
h
/
scaleFactor
);
newWall
.
CreateFixture
(
wallFixture
);
walls
.
push
(
newWall
);
}
new
b2DebugDraw
();
debugDraw
.
SetSprite
(
context2
);
debugDraw
.
SetDrawScale
(
scaleFactor
);
var
var
debugDraw
=
new
//define scale
debugDraw
.
SetFillAlpha
(
0.3
);
//define transparency
debugDraw
.
SetLineThickness
(
1.0
);
debugDraw
.
SetFlags
(
b2DebugDraw
.
e_shapeBit
|
b2DebugDraw
.
e_jointBit
);
world
.
SetDebugDraw
(
debugDraw
);
function
function
gameLoop
() {
window
.
setTimeout
(
gameLoop
,
20
);
drawScreen
()
}
gameLoop
();
}
<
/script>
</head>
</head>
<body>
<body>
<canvas
<canvas id=
"canvasOne"
width=
"450"
height=
"350"
style=
"position: absolute;
top: 0px; left: 0px;"
>
Your browser does not support the HTML 5 Canvas.
</canvas>
</canvas>
<canvas
<canvas id=
"canvasTwo"
width=
"450"
height=
"350"
style=
"position: absolute;
top: 0px; left: 451px;"
>
Your browser does not support the HTML 5 Canvas.
</canvas>
</canvas>
</body>
</body>
</html>
</html>