안녕하세요 저는 kineticjs를 사용하고 있으며, 지정된 클래스 캔버스에 도형을 떨어 뜨리는 것이 가능한지 궁금합니다. 그래서 같은 클래스의 5 캔버스를 가지고 있다면 이것이 제 모양을 떨어 뜨릴 수있는 곳입니다. 그것들이이 캔버스 중 하나에 떨어지지 않으면 그것이 있던 곳으로 되돌아갑니다! 지금 당장 가지고있는 유일한 코드는 제가 만든 모양입니다.지정된 클래스 캔버스에 도형을 떨어 뜨리는 방법
var stage = new Kinetic.Stage({
container: 'container',
width: 965,
height: 200
});
var layer = new Kinetic.Layer();
var poly = new Kinetic.Rect({
x: 75,
y: 75,
width: 100,
height: 50,
fill: '#00D2FF',
stroke: 'white',
strokeWidth: 4,
draggable: true
});
// add the shape to the layer
layer.add(poly);
// add the layer to the stage
stage.add(layer);
이것이 도움이되었는지 알려주십시오. – SoluableNonagon