-
Notifications
You must be signed in to change notification settings - Fork 192
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
bug: 官方例子中CustomPrimitive不显示问题 #79
Comments
我也发现而且是mac 不显示,windows 正常 |
是不是因为Mac没有显卡的原因,Mac还有一些bug,比如有些实体设置颜色,设置白色永远显示的是黄色,Windows上正常 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
官方例子--数字城市(earth-digitalCity.html)中createBasePoint方法中的效果不显示
// 底面动态辐射波
{
const evalString =
p.canvasWidth = 512; p.canvasHeight = 512; setTimeout(() => { p.drawCanvas(ctx => { ctx.clearRect(0, 0, 512, 512); ctx.strokeStyle = "rgb(255, 0, 0)"; ctx.setLineDash([80, 80]); ctx.lineWidth = 30; ctx.arc(256, 256, 241, 0, Math.PI * 2, true); ctx.stroke(); }); }, 0)
;const preUpdateEvalString =
if (typeof p.dAngle === 'undefined') p.dAngle = 0.0; if (typeof p.dt === 'undefined') p.dt = 0.01; p.dAngle += 10.0; if (p.dAngle > 360.0) { p.dAngle = 0.0; } p.rotation[0] = p.dAngle / 180.0 * Math.PI; p.dt += 0.02; if (p.dt > 1.0) p.dt = 0.01; p.scale[0] = 50 * p.dt; p.scale[1] = 50 * p.dt;
;const config = {
evalString,
preUpdateEvalString,
position: position,
scale: [50, 50, 1],
positions: [...XE.Obj.CustomPrimitive.Geometry.unitSquare.positions],
sts: [...XE.Obj.CustomPrimitive.Geometry.unitSquare.sts],
indices: [...XE.Obj.CustomPrimitive.Geometry.unitSquare.indices],
renderState: XE.Obj.CustomPrimitive.getRenderState(false, false),
color: [1, 1, 1, 1],
canvasWidth: 512,
canvasHeight: 512
};
let p = new XE.Obj.CustomPrimitive(this.earth);
p.xbsjFromJSON(config);
}
The text was updated successfully, but these errors were encountered: