Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using earcut instead of libtess #7492

Open
wants to merge 5 commits into
base: dev-2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/empty-example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
background-color: #1b1b1b;
}
</style>
<script src="../p5.rollup.min.js"></script>
<script src="../p5.min.js"></script>
<!-- <script src="../addons/p5.sound.js"></script> -->
<script src="sketch.js"></script>
</head>
Expand Down
12 changes: 6 additions & 6 deletions lib/empty-example/sketch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function setup() {
// put setup code here
}

function draw() {
// put drawing code here
}
// put setup code here
}
function draw() {
// put drawing code here
}
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"acorn": "^8.12.1",
"acorn-walk": "^8.3.4",
"colorjs.io": "^0.5.2",
"earcut": "^3.0.1",
"file-saver": "^1.3.8",
"gifenc": "^1.0.3",
"i18next": "^19.0.2",
"i18next-browser-languagedetector": "^4.0.1",
"libtess": "^1.2.2",
"omggif": "^1.0.10",
"pako": "^2.1.0",
"zod": "^3.23.8"
Expand Down
6 changes: 3 additions & 3 deletions src/type/p5.Font.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function font(p5, fn) {
for (const { x, y } of contour) {
this._pInst.vertex(x, y);
}
this._pInst.endContour(this._pInst.CLOSE);
this._pInst.endContour();
}
this._pInst.endShape();
} else {
Expand All @@ -138,7 +138,7 @@ function font(p5, fn) {
for (const { x, y } of contour) {
this._pInst.vertex(x, y, side * extrude * 0.5);
}
this._pInst.endContour(this._pInst.CLOSE);
this._pInst.endContour();
}
this._pInst.endShape();
this._pInst.beginShape();
Expand Down Expand Up @@ -792,4 +792,4 @@ export default font;

if (typeof p5 !== 'undefined') {
font(p5, p5.prototype);
}
}
Loading
Loading