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.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepbox8646 committed Aug 10, 2024
1 parent cf88457 commit 2fe7fbf
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 53 deletions.
24 changes: 15 additions & 9 deletions examples/scene1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,34 @@ await useFont('./default.ttf')
export default importScene(

`{
"$schema": "../schema.json",
"root": {
"type": "Circle",
"arguments": [100],
"arguments": [150],
"options": {
"style": {
"fill": false,
"border": true
"border": true,
"fill": false
},
"x": 100,
"y": 100
"x": 800,
"y": 450
},
"animations": [
{
"type": "create",
"type": "stroke",
"parameters": {
"duration": 1
"duration": 4
}
},
{
"type": "destroy",
"parameters": {
"duration": 2
}
}
]
}
}`,
}
`,
nc as any,
nc as any,
)
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-beta.4",
"version": "2.0.0-beta.5",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion mods/mod-layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newcar/mod-layout",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
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-beta.4",
"version": "2.0.0-beta.5",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion mods/mod-skottie/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@newcar/mod-skottie",
"type": "module",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
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-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"description": "The core of newcar.",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class App {
audioContext: AudioContext = new AudioContext()
reactiveFramePerSecond: number
private playing = false
private lastFrameTime = performance.now()
private lastFrameTime: number
/**
* The App config.
*/
Expand Down Expand Up @@ -150,6 +150,7 @@ export class App {
`[Newcar Warn] Current scene is undefined, please checkout a usable scene.`,
)
}
this.lastFrameTime = performance.now()
this.scene.startTime = performance.now()
this.scene.elapsed ??= frame
this.playing = true
Expand Down
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@newcar/json",
"type": "module",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "The core of newcar.",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
18 changes: 17 additions & 1 deletion packages/json/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,25 @@
"items": {
"$ref": "#/properties/root"
}
},
"animations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"parameters": {
"type": "object"
}
}
}
}
}
}
},
"required": ["root"]
"required": [
"root"
]
}
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-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"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-beta.4",
"version": "2.0.0-beta.5",
"description": "",
"author": "BugDuck Team",
"license": "Apache-2.0",
Expand Down
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2fe7fbf

Please sign in to comment.