mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 02:13:58 +01:00
13 lines
532 B
JavaScript
13 lines
532 B
JavaScript
import {CurveBasedView} from './curveBasedView';
|
|
|
|
export class SketchObjectView extends CurveBasedView {
|
|
|
|
constructor(ctx, mSketchObject, sketchToWorldTransformation) {
|
|
const color = mSketchObject.construction ? 0x777777 : 0x0000FF;
|
|
const tess = mSketchObject.sketchPrimitive.tessellate(10).map(sketchToWorldTransformation.apply).map(v => v.data());
|
|
super(ctx, mSketchObject, tess, 3, 4, color, 0x49FFA5, true);
|
|
this.picker.onDblclick = () => {
|
|
ctx.sketcherService.sketchFace(this.model.face);
|
|
}
|
|
}
|
|
}
|