mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
Brush works with colors need size slider.
This commit is contained in:
1 parent
f821d12cdf
commit
e99baccdb2
3 files changed
+10
-12
No files matched your search
@@ -649,7 +649,6 @@ export class Engine {
|
||||
console.debug("Added shapenode:", shapeNode);
|
||||
console.debug("Added node's ID:", shapeNode.kNode._id);
|
||||
|
||||
//this.realTimeDrawEngine.addNodes(shapeNode);
|
||||
}
|
||||
|
||||
public addImage(imageFile: File) {
|
||||
@@ -665,7 +664,7 @@ export class Engine {
|
||||
});
|
||||
imageNode.kNode.zIndex(1);
|
||||
this.commandManager.createNode(imageNode);
|
||||
//this.realTimeDrawEngine.addNodes(imageNode);
|
||||
|
||||
}
|
||||
public addPaintNode(canvas: HTMLCanvasElement,lineBounds:{
|
||||
width: number;
|
||||
@@ -681,7 +680,6 @@ export class Engine {
|
||||
await this.realTimeDrawEngine.render()
|
||||
}})
|
||||
this.commandManager.createNode(node);
|
||||
//this.realTimeDrawEngine.addNodes(node);
|
||||
}
|
||||
|
||||
public addVideo(
|
||||
|
||||
@@ -47,9 +47,9 @@ export class PaintNode extends NetworkedNode {
|
||||
image: imageObj,
|
||||
listening: false, // Disable event listening to allow captureCanvas to receive events
|
||||
draggable: true,
|
||||
stroke: '#000000',
|
||||
strokeWidth: 2,
|
||||
dash: [5, 5], // Creates dotted outline THIS IS FOR DEBUG
|
||||
// stroke: '#000000',
|
||||
// strokeWidth: 2,
|
||||
// dash: [5, 5], // Creates dotted outline THIS IS FOR DEBUG
|
||||
globalCompositeOperation: 'source-over',
|
||||
fill: 'transparent'
|
||||
});
|
||||
|
||||
@@ -738,12 +738,12 @@ export class RealTimeDrawEngine {
|
||||
})) as ImageBitmap;
|
||||
|
||||
// Test code
|
||||
if (true) {
|
||||
this.outputBitmap = bitmap;
|
||||
this.previewCanvas.image(bitmap);
|
||||
this.isProcessing = false;
|
||||
return;
|
||||
}
|
||||
// if (true) {
|
||||
// this.outputBitmap = bitmap;
|
||||
// this.previewCanvas.image(bitmap);
|
||||
// this.isProcessing = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
try {
|
||||
const base64Bitmap = await this.imageBitmapToBase64(bitmap);
|
||||
|
||||
Reference in new issue
Block a user