diff --git a/scene/lobby.pr b/scene/lobby.pr index 713e4ac..7befe5d 100644 --- a/scene/lobby.pr +++ b/scene/lobby.pr @@ -142,10 +142,8 @@ SetPen Home - [ 1.414 1 1 PenScale ] to big - [ 1 1 1 PenScale ] to normal [ 1 to k k / [dup F] k times drop ] to ff - [ 2 / dup R big 0 F R normal 0 F ] to rr + [ 2 / dup R 0 F R 0 F ] to rr PenDown 1 ff 90 rr 1 ff 90 rr 1 ff 90 rr 1 ff 90 rr diff --git a/src/turtle.ts b/src/turtle.ts index f580ca5..65dbf43 100644 --- a/src/turtle.ts +++ b/src/turtle.ts @@ -13,7 +13,6 @@ import { VM as BaseVM, Input, Primitives, Environment } from './cat.js'; export class PenState { templatePath: Vector3[] = [new Vector3()]; paths: Vector3[][] | null = null; - templateScale = new Vector3(1, 1, 1); get isDown(): boolean { return this.paths !== null; @@ -37,8 +36,9 @@ export class PenState { push(pos: Vector3, q: Quaternion) { this.templatePath.forEach((p, i) => { const r = new Vector3(); - p.multiplyToRef(this.templateScale, r); - r.rotateByQuaternionToRef(q, r); + // p.multiplyToRef(this.templateScale, r); + // r.rotateByQuaternionToRef(q, r); + p.rotateByQuaternionToRef(q, r); r.addInPlace(pos); this.paths![i].push(r); }); @@ -162,10 +162,6 @@ export const TurtlePrimitives: Environment = Object.assign({}, Primiti 'ClearPen'() { this.pen.clear(); return []; }, 'SetPen'() { this.pen.set(); return []; }, - 'PenScale'(sx, sy, sz) { - this.pen.templateScale = new Vector3(sx as number, sy as number, sz as number); - return []; - }, 'PenDown'() { this.penDown(); return []; }, 'PenUp'() { this.penUp(false); return []; }, 'Close'() { this.penUp(true); return []; },