Skip to content

Commit

Permalink
dev: update README.test.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Sep 29, 2024
1 parent ee12d75 commit a7e02a4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/renderer/src/render/pixglyph_canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ impl Canvas {
acc += c;
let a = (255.0 * acc.abs().min(1.0)) as u8;
// Method 1: Use the same alpha for all channels.
// clamped[i * 4 + 3] = if a > 0 { 255 } else { 0 };
clamped[i * 4 + 3] = if a > 0 { 255 } else { 0 };
// Method 2: Keep alpha.
// clamped[i * 4 + 3] = a;
}
Expand Down
26 changes: 26 additions & 0 deletions packages/typst.ts/README.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Step1: bootstrap dev server:

```
// at root
yarn dev
```

Step2: watch and build dist/xxx.js (todo: merge):

```
cd packages/typst.ts && npx vite build --watch -c vite.config.mjs -- --component=main
cd packages/typst.ts && npx vite build --watch -c vite.config.mjs -- --component=main2
cd packages/typst.ts && npx vite build --watch -c vite.config.mjs -- --component=canvas-worker
```

Step3: Build wasm (if changed rust code)

```
cd packages/renderer && yarn build
```

Step4: Test in chrome

```
cd packages/renderer && yarn test:chrome
```

0 comments on commit a7e02a4

Please sign in to comment.