hello guys, hope you all right.
i am struggling with this situation
pen can't draw any thing !!
have many pages, the user will be able to draw in specific page,
and the pages effected by the motion of pen which it's drawing doesn't even exist.
some pieces of my code:
// page -6-
var page6 = new Page(stageW, stageH);
new Sprite({
image: "cat.png",
cols: 2,
rows: 2,
spacingY: 16,
})
.sca(1.2).loc(100, 210, page6)
.run({
loop: true,
time: .6,
waitedCall: .4,
rewind: true,
rewindWait: .3
})
new Label({
text: "أكتب العدد المناسب",
align: RIGHT,
size: 80,
backgroundBorderColor: red,
color: blue,
rollColor: red,
bold: true,
italic: true
}).loc(700, 60, page6);
const pen = new Pen({
damp: 0.5,
color: "black",
}).center(page6);
const motionController = new MotionController({
target:pen.center(page6),
type:"pressmove",
speed:60,
damp:.5,
});
///////// list of pages
var pages = new Pages([
{ page: page1, swipe: [page5, page2, page5, page2] },
{ page: page2, swipe: [page1, page3, page1, page3] },
{ page: page3, swipe: [page2, page4, page2, page4] },
{ page: page4, swipe: [page3, page5, page3, page5] },
{ page: page5, swipe: [page4, page6, page4, page6] },
{ page: page6, swipe: [page5, page1, page5, page1] },
], "bubbleZIM", .5, [
[page2, page3, "pixelZIM"],
[page3, page2, "pixelZIM"],
[page3, page4, "fan"],
[page4, page3, "fan"],
[page4, page5, "explodeDark"],
[page5, page4, "explodeZIM"],
[page5, page6, "fan"],
[page6, page5, "lineDark"],
]).addTo();