From 9ce493063b3a99629479e732ecb29244fc9f9c80 Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Fri, 3 Jul 2020 12:43:41 +0800 Subject: [PATCH] docs: update WebGLRenderer doc --- src/renderer/WebGLRenderer.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/renderer/WebGLRenderer.js b/src/renderer/WebGLRenderer.js index e72443ae..517ac3ba 100644 --- a/src/renderer/WebGLRenderer.js +++ b/src/renderer/WebGLRenderer.js @@ -427,19 +427,28 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ { extensions.init(gl); capabilities.init(gl); Shader.init(this); + + /** + * state,初始化后生成。 + * @type {WebGLState} + * @default null + */ this.state = new WebGLState(gl); if (!extensions.instanced) { this.useInstanced = false; } - this.renderList.useInstanced = this.useInstanced; - if (!extensions.vao) { this.useVao = false; } if (this.useFramebuffer) { + /** + * framebuffer,只在 useFramebuffer 为 true 时初始化后生成 + * @type {Framebuffer} + * @default null + */ this.framebuffer = new Framebuffer(this, Object.assign({ useVao: this.useVao, width: this.width,