cullable) { this._renderWithCulling(renderer); } else { this._render(renderer); for (let i = 0, j = this.children.length; i < j; ++i) { this.children[i].render(renderer); } } } 这个render 方法很简单,它接受一个 renderer 调用自己的 _render 后再遍历子显示对象调用子显示对象公开...
render(renderer: Renderer): void { // 检测是否需要渲染 if (!this.visible || this.worldAlpha <= 0 || !this.renderable) { return; } // 如果是特殊的对象需要特殊的渲染逻辑 if (this._mask || this.filters?.length) { this.renderAdvanced(renderer); } else if (this.cullable) { this._...
Passing in the option useContextAlpha: false and antialias: false to the Renderer or Application can help with performance Culling is disabled by default as it's often better to do this at an application level or set objects to be cullable = true. If you are GPU-bound it will improve ...