cocosjs 3.16js CCClipping.js 移动stencil 闪烁的bug 修复

这里的主要问题就是stencil 在创建的时候没有给他添加父亲,他没有父亲,在改变属性的时候转换矩阵变了,世界坐标里的位置也就变了。
修复如下:

    ctor: function (stencil) {
        stencil = stencil || null;
        cc.Node.prototype.ctor.call(this);
        this._stencil = stencil;
        // 在这里给他指定个父亲
        this._stencil.parent = this;
        if (stencil) {
            this._originStencilProgram = stencil.getShaderProgram();
        }
        this.alphaThreshold = 1;
        this.inverted = false;
        this._renderCmd.initStencilBits();
    },
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
'绑定对象数据 If SMTStencilDetails.Stencil IsNot Nothing Then txtStencil.Text = SMTStencilDetails.Stencil.StencilName txtStencilID.Text = SMTStencilDetails.Stencil.StencilID TimeStart.Value = IIf(SMTStencilDetails.Stencil.StartDate = Nothing, Date.Now, SMTStencilDetails.Stencil.StartDate) cmbState.SelectedIndex = SMTStencilDetails.Stencil.StateID - 1 txtThickness.Text = SMTStencilDetails.Stencil.Thickness TimeMake.Value = SMTStencilDetails.Stencil.MakeDate txtLocation.Text = SMTStencilDetails.Stencil.Location txtUsesCount.Text = SMTStencilDetails.Stencil.StencilUseCount cmbWorkShop.Text = SMTStencilDetails.Stencil.WorkShop txtNotes.Text = SMTStencilDetails.Stencil.Notes dtpMaintenanceTime.Value = IIf(SMTStencilDetails.Stencil.RepairDate = Nothing, Date.Now, SMTStencilDetails.Stencil.RepairDate) If SMTStencilDetails.Stencil.ProductName.Count = 0 Then txtTip.Text = "" prdList = Nothing Else For i = 0 To SMTStencilDetails.Stencil.ProductName.Count - 1 For j = 0 To cklProductName.Items.Count - 1 Dim s = cklProductName.GetItemText(cklProductName.Items(j)) If s = SMTStencilDetails.Stencil.ProductName(i) Then cklProductName.SetItemChecked(j, True) strPart += "," & SMTStencilDetails.Stencil.ProductName(i) End If Next Next txtTip.Text = strPart.Substring(1) prdList = strPart.Substring(1) End If Else cmbState.SelectedIndex = 0 End If 保持原有逻辑情况下优化该代码,让代码具有更好的可读性,可维护性,具有更好的性能,并说明理由
最新发布
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值