Skip to content

Commit

Permalink
refactor(examples): update to new geom API
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 5, 2023
1 parent 3a45c5f commit b7c1b03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/fiber-basics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const cell = (
for (let [a, hh] of zip(alpha, symmetric(height))) {
// add cell rect to scene
const attribs = { fill: setAlpha(null, col, a) };
scene.children.push(
scene.add(
isVertical
? rect([x, y], [w, hh], attribs)
: rect([y, x], [hh, w], attribs)
Expand Down Expand Up @@ -84,7 +84,7 @@ const cell = (
// fiber to clear given geometry group on each iteration
function* beginFrame(scene: Group) {
while (true) {
scene.children.length = 0;
scene.clear();
yield;
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/trace-bitmap/src/state/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const main = sync({
}
if (lines && lines.length) {
numLines += lines.length;
root.children.push(
root.add(
splitArcLength(
group(
{
Expand All @@ -147,7 +147,7 @@ export const main = sync({
}
if (pts && pts.length) {
numPoints += pts.length;
root.children.push(
root.add(
points(pts, {
fill: layer.color,
__axi: <AxiDrawAttribs>{
Expand Down

0 comments on commit b7c1b03

Please sign in to comment.