Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Comprobar si el objeto está pintado

Estoy tratando de crear un juego de colorear para niños usando animate cc. Use el siguiente código:

 var drawingCanvas; var oldPt; var oldMidPt; var color; var stroke = 50; var index; var that = this; this.colorArray = ["#FF0000", "#009900", "#FFFF00", "#0000FF", "#000000", "#FF00FF"]; function init() { index = 0; createjs.Touch.enable(stage); drawingCanvas = new createjs.Shape(); stage.addEventListener("stagemousedown", handleMouseDown); stage.addEventListener("stagemouseup", handleMouseUp); that.obj1.addChild(drawingCanvas); //that.obj1.update(); } function handleMouseDown(event) { color = that.colorArray[(index++) % that.colorArray.length]; oldPt = that.obj1.globalToLocal(stage.mouseX, stage.mouseY); oldMidPt = oldPt.clone(); stage.addEventListener("stagemousemove", handleMouseMove); } function handleMouseMove(event) { var midPt = that.obj1.globalToLocal(stage.mouseX, stage.mouseY); drawingCanvas.graphics.setStrokeStyle(stroke, 'round', 'round').beginStroke(color).moveTo(midPt.x, midPt.y).curveTo(oldPt.x, oldPt.y, oldMidPt.x, oldMidPt.y); oldPt.x = midPt.x; oldPt.y = midPt.y; oldMidPt.x = midPt.x; oldMidPt.y = midPt.y; //stage.update(); } function handleMouseUp(event) { stage.removeEventListener("stagemousemove", handleMouseMove); } init();

Hay un clip de película donde se aplicará el color y otro clip de película encima que es solo el contorno del objeto. Mi pregunta es, ¿es posible verificar si el objeto está completamente coloreado? ¿O hay alguna forma de obtener el color de la forma?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!