You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
function polygon_out(R) {
let r = [];
for (let i = 0; i <= 180; i += 10) {
let x = Math.cos(i / 180 * Math.PI) * R;
let y = Math.sin(i / 180 * Math.PI) * R;
r.push({
x,
y
});
}
return r;
}
Current Behavior
Expected Behavior
Hope to be consistent
Steps to Reproduce
This is my code.
https://www.pixiplayground.com/#/edit/TicuUam_jZ3pfDLDAcXdD
`
function polygon_out(R) {
let r = [];
for (let i = 0; i <= 180; i += 10) {
let x = Math.cos(i / 180 * Math.PI) * R;
let y = Math.sin(i / 180 * Math.PI) * R;
r.push({
x,
y
});
}
return r;
}
const app = new PIXI.Application({
width: window.innerWidth,
height: window.innerHeight,
backgroundColor: 0x2c3e50
});
document.body.appendChild(app.view);
draw1();
draw2();
function draw1() {
const g = new PIXI.Graphics();
g.lineStyle(5, 0xFF00FF);
g.x = 400;
g.y = 50;
app.stage.addChild(g);
const points = polygon_out(200);
let p = points.shift();
g.moveTo(p.x, p.y);
}
function draw2() {
const g = new PIXI.Graphics();
g.lineStyle(5, 0xFF00FF);
g.x = 400;
g.y = 400;
app.stage.addChild(g);
const points = polygon_out(200);
let p = points.shift();
g.moveTo(p.x, p.y);
}
`
draw1 and draw2 different .
Environment
pixi.js
version: e.g. 7.4.0Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: