mirror of
				https://github.com/unanmed/HumanBreak.git
				synced 2025-11-04 07:02:58 +08:00 
			
		
		
		
	fix: transform引起一直更新 & 丰富注释
This commit is contained in:
		
							parent
							
								
									c6cbdae5d5
								
							
						
					
					
						commit
						3d1e0a45c3
					
				@ -138,6 +138,9 @@ export class MotaOffscreenCanvas2D extends EventEmitter<OffscreenCanvasEvent> {
 | 
			
		||||
        MotaOffscreenCanvas2D.list.delete(this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 冻结这个画布的属性,之后便不能被修改,同时会从画布列表中删去。
 | 
			
		||||
     */
 | 
			
		||||
    freeze() {
 | 
			
		||||
        this._freezed = true;
 | 
			
		||||
        MotaOffscreenCanvas2D.list.delete(this);
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,9 @@ export interface IRenderUpdater {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface IRenderAnchor {
 | 
			
		||||
    /** 锚点横坐标,0表示最左端,1表示最右端 */
 | 
			
		||||
    anchorX: number;
 | 
			
		||||
    /** 锚点纵坐标,0表示最上端,1表示最下端 */
 | 
			
		||||
    anchorY: number;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@ -53,6 +55,7 @@ interface IRenderConfig {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IRenderChildable {
 | 
			
		||||
    /** 当前元素的子元素 */
 | 
			
		||||
    children: Set<RenderItem>;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@ -312,7 +315,7 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
 | 
			
		||||
        if (this.hidden) return;
 | 
			
		||||
        this.emit('beforeRender', transform);
 | 
			
		||||
        this.needUpdate = false;
 | 
			
		||||
        const tran = this.transformFallThrough ? transform : this.transform;
 | 
			
		||||
        const tran = this.transformFallThrough ? transform : this._transform;
 | 
			
		||||
 | 
			
		||||
        const ax = -this.anchorX * this.width;
 | 
			
		||||
        const ay = -this.anchorY * this.height;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user