Skip to content

Commit

Permalink
chore: bump dwm & gluten
Browse files Browse the repository at this point in the history
  • Loading branch information
load1n9 committed Nov 4, 2024
1 parent b85b83d commit 27281d8
Show file tree
Hide file tree
Showing 75 changed files with 4,071 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
with:
project: caviar
entrypoint: https://deno.land/std/http/file_server.ts
root: ./docs/build
root: ./docs/build
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Dean Srebnik
Copyright (c) 2024 Dean Srebnik

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</p>
<hr/>

## blazing fast game engine built on top of [gluten](https://github.com/deno-windowing/gluten) & [dwm](https://github.com/deno-windowing/dwm) with WebGPU & WebGL rendering
## native and web game engine built on top of [gluten](https://github.com/deno-windowing/gluten) & [dwm](https://github.com/deno-windowing/dwm) with WebGPU & WebGL rendering

<img src="https://raw.githubusercontent.com/load1n9/caviar/main/assets/demo.png" width="800rem" />

Expand All @@ -34,10 +34,10 @@ class Game extends Scene {
test = new Rectangle(0, 0, 100, 100, "#00ff00");
test2 = new Rectangle(0, 0, 100, 100, "#00ff00");

setup() {
override setup() {
this.addChild([this.test, this.test2]);
}
update() {
override update() {
this.test.x += 5;
this.test2.x += 2;
}
Expand Down Expand Up @@ -70,7 +70,7 @@ class Game extends Scene {
chunkSize = 16;
tileSize = 16;

setup() {
override setup() {
const group = new Group(this, 0, 0);
this.world.loadPlugin("perlin", PerlinNoise);

Expand Down Expand Up @@ -160,10 +160,10 @@ class Game extends Scene {
palette: PICO8,
});

setup() {
override setup() {
this.addChild(this.test);
}
update() {
override update() {
this.test.setX(this.test.x + 10);
}
}
Expand All @@ -178,13 +178,11 @@ const world = new World({
await world.start();
```

As Caviar uses the Deno FFI, you will need to add the flags
`--allow-ffi --unstable` to run the programs. You can also add other flags to
skip the permissions check the Deno does. An example of starting the program in
Deno with all these flags is
As Caviar uses the Deno FFI, you will need to add the flags `--allow-ffi` to
your Deno command.

```sh
deno run --allow-ffi --allow-env --allow-read --allow-write --allow-net --unstable test.ts
deno run --allow-env --allow-read --allow-write --allow-ffi test.ts
```

### Tools
Expand All @@ -194,7 +192,7 @@ deno run --allow-ffi --allow-env --allow-read --allow-write --allow-net --unstab

### Maintainers

- Loading ([@load1n9](https://github.com/load1n9))
- Dean Srebnik ([@load1n9](https://github.com/load1n9))
- CarrotzRule ([@carrotzrule123](https://github.com/CarrotzRule123))

### License
Expand Down
19 changes: 13 additions & 6 deletions cli/caviar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ import { genHelp, genPlugin, genProject, genScene } from "./commands.ts";

switch (Deno.args[0]) {
case "generate": {
if (Deno.args[1] === "plugin") {
await genPlugin();
} else if (Deno.args[1] === "scene") {
await genScene();
} else {
await genProject();
switch (Deno.args[1]) {
case "plugin": {
await genPlugin();
break;
}
case "scene": {
await genScene();
break;
}
default: {
await genProject();
break;
}
}
break;
}
Expand Down
10 changes: 3 additions & 7 deletions cli/commands.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
Confirm,
Input,
Number,
} from "https://deno.land/x/cliffy@v0.25.7/prompt/mod.ts";
import { Confirm, Input, Number } from "jsr:@cliffy/prompt@1.0.0-rc.7";
import { createScene } from "./structs/Scene.ts";
import { createWorld } from "./structs/World.ts";
import { HTML } from "./structs/html.ts";
Expand Down Expand Up @@ -47,8 +43,8 @@ export const genPlugin = async () => {
});
const content = `import { World, Plugin } from ${
web
? `"https://deno.land/x/caviar@${VERSION}/web/dist/mod.js"`
: `"https://deno.land/x/caviar@${VERSION}/mod.ts"`
? `"https://deno.land/x/caviar/web/dist/mod.js"`
: `"https://deno.land/x/caviar/mod.ts"`
};
export class ${name} extends Plugin {
constructor(world${web ? "" : ": World"}) {
Expand Down
2 changes: 1 addition & 1 deletion cli/example/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { World } from "https://deno.land/x/caviar@2.6.4/mod.ts";
import { World } from "https://deno.land/x/caviar@2.6.9/mod.ts";
import { Boot } from "./src/scenes/Boot.ts";

const example = new World({
Expand Down
2 changes: 1 addition & 1 deletion cli/example/src/scenes/Boot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Scene } from "https://deno.land/x/caviar@2.6.4/mod.ts";
import { Scene } from "https://deno.land/x/caviar@2.6.9/mod.ts";

export class Boot extends Scene {
setup() {
Expand Down
2 changes: 1 addition & 1 deletion cli/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "2.6.7";
export const VERSION = "2.6.9";
48 changes: 26 additions & 22 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
{
"name": "@loading/caviar",
"version": "2.6.9",
"exports": {
".": "./mod.ts",
"./plugins/Perlin": "./src/plugins/Perlin.ts",
"./web": "./web/dist/mod.js",
"./web/plugins/Perlin": "./web/src/plugins/Perlin.ts"
},
"tasks": {
"example_atlas": "deno run -A --unstable examples/atlas.ts",
"example_frame": "deno run -A --unstable examples/frame.ts",
"example_godot": "deno run -A --unstable examples/godot.ts",
"example_image": "deno run -A --unstable examples/image.ts",
"example_movingsquare": "deno run -A --unstable examples/movingsquare.ts",
"example_perlin": "deno run -A --unstable examples/perlin.ts",
"example_onclick": "deno run -A --unstable examples/onclick.ts",
"example_sprite": "deno run -A --unstable examples/sprite.ts",
"example_texturesprite": "deno run -A --unstable examples/texturesprite.ts",
"example_transparent_window": "deno run -A --unstable examples/transparent_window.ts"
"example:atlas": "deno run -A examples/atlas.ts",
"example:frame": "deno run -A examples/frame.ts",
"example:godot": "deno run -A examples/godot.ts",
"example:image": "deno run -A examples/image.ts",
"example:movingsquare": "deno run -A examples/movingsquare.ts",
"example:perlin": "deno run -A examples/perlin.ts",
"example:onclick": "deno run -A examples/onclick.ts",
"example:sprite": "deno run -A examples/sprite.ts",
"example:texturesprite": "deno run -A examples/texturesprite.ts",
"example:transparent_window": "deno run -A examples/transparent_window.ts"
},
"lint": {
"files": {
"exclude": [
"./web",
"./docs"
]
}
"exclude": [
"./web",
"./docs"
]
},
"check": {
"files": {
"exclude": [
"./web",
"./docs"
]
}
"exclude": [
"./web",
"./docs"
]
}
}
6 changes: 3 additions & 3 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { fromFileUrl } from "https://deno.land/std@0.179.0/path/mod.ts";
export * from "https://deno.land/x/gluten@0.1.6/mod.ts";
export * from "https://deno.land/x/dwm@0.3.3/mod.ts";
export { fromFileUrl } from "jsr:@std/path@1.0.8";
export * from "https://deno.land/x/gluten@0.1.9/mod.ts";
export * from "jsr:@gfx/dwm@0.3.8";
1,695 changes: 1,694 additions & 1 deletion docs/build/_pyro/bundle.css

Large diffs are not rendered by default.

Loading

0 comments on commit 27281d8

Please sign in to comment.