Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
release: v2.0.0-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepbox8646 committed Jul 22, 2024
1 parent 4bf8a45 commit 542b1fe
Show file tree
Hide file tree
Showing 14 changed files with 1,719 additions and 1,916 deletions.
2 changes: 1 addition & 1 deletion mods/mod-geometry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/mod-geometry",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion mods/mod-markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/mod-markdown",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
5 changes: 0 additions & 5 deletions mods/mod-markdown/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ export class Markdown extends Widget {
canvas.drawParagraph(this.paragraph, 0, 0)
}

predraw(ck: CanvasKit, propertyChanged: string): void {
if (propertyChanged === 'text' || propertyChanged.match('textStyle.'))
this.init(ck)
}

private parseMarkdown(
text: string,
builder: ParagraphBuilder,
Expand Down
2 changes: 1 addition & 1 deletion mods/mod-math/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@newcar/mod-math",
"type": "module",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preversion": "pnpm clean && pnpm build",
"build": "pnpm run --filter=./packages/** build",
"build": "pnpm run --filter=* build",
"dev": "pnpm run --parallel --filter=* dev",
"test": "pnpm run --filter=* test",
"serve": "vite ./examples/",
Expand Down
2 changes: 1 addition & 1 deletion packages/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/basic",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "The basic objects, animations and interpolators of newcar.",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@newcar/core",
"type": "module",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "The core of newcar.",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/core/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class Widget {
isRotating: boolean
isScaling: boolean

private paint: Paint
private p: Paint

constructor(options?: WidgetOptions) {
options ??= {}
Expand Down Expand Up @@ -148,9 +148,9 @@ export class Widget {
[this.x.value, this.y.value] = this.pos.value.resolve(this.parent?.x.value ?? 0, this.parent?.y.value ?? 0)
}

this.paint = new ck.Paint()
this.paint.setColor(ck.WHITE)
this.paint.setAntiAlias(true)
this.p = new ck.Paint()
this.p.setColor(ck.WHITE)
this.p.setAntiAlias(true)

changed(this.pos, (pos: Ref<Position>) => {
if (this.parent instanceof RootWidget) {
Expand Down Expand Up @@ -196,13 +196,13 @@ export class Widget {
canvas.save()
canvas.translate(this.x.value, this.y.value)
if (this.isControllerVisible.value) {
this.paint.setStyle(ck.PaintStyle.Fill)
canvas.drawCircle(-10, -10, 5, this.paint)
canvas.drawCircle(this.calculateCorrectedRange()[2] + 10, -10, 5, this.paint)
canvas.drawCircle(-10, this.calculateCorrectedRange()[3] + 10, 5, this.paint)
canvas.drawCircle(this.calculateCorrectedRange()[2] + 10, this.calculateCorrectedRange()[3] + 10, 5, this.paint)
this.paint.setStyle(ck.PaintStyle.Stroke)
canvas.drawRect4f(-10, -10, this.calculateCorrectedRange()[2] + 10, this.calculateCorrectedRange()[3] + 10, this.paint)
this.p.setStyle(ck.PaintStyle.Fill)
canvas.drawCircle(-10, -10, 5, this.p)
canvas.drawCircle(this.calculateCorrectedRange()[2] + 10, -10, 5, this.p)
canvas.drawCircle(-10, this.calculateCorrectedRange()[3] + 10, 5, this.p)
canvas.drawCircle(this.calculateCorrectedRange()[2] + 10, this.calculateCorrectedRange()[3] + 10, 5, this.p)
this.p.setStyle(ck.PaintStyle.Stroke)
canvas.drawRect4f(-10, -10, this.calculateCorrectedRange()[2] + 10, this.calculateCorrectedRange()[3] + 10, this.p)
}
canvas.restore()

Expand Down
2 changes: 1 addition & 1 deletion packages/newcar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "newcar",
"type": "module",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "A Highly configurable universal advanced engine, Born for creating animation rapidly.",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/recorder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/recorder",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "The utils of newcar",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/utils",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "The utils of newcar",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/plugin-debug",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-timeview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/plugin-timeview",
"version": "2.0.0-alpha.4",
"version": "2.0.0-beta.0",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
Loading

0 comments on commit 542b1fe

Please sign in to comment.