|
| 1 | +const PBR = { |
| 2 | + name: 'Physically-based Rendering', |
| 3 | + type: 'group', |
| 4 | + props: [{ |
| 5 | + name: 'Physically Correct Lights', |
| 6 | + prop: 'physicallyCorrectLights', |
| 7 | + type: 'boolean', |
| 8 | + default: false, |
| 9 | + }, { |
| 10 | + name: 'Gamma', |
| 11 | + prop: 'gammaFactor', |
| 12 | + type: 'number', |
| 13 | + default: 2, |
| 14 | + }, { |
| 15 | + // @TODO |
| 16 | + name: 'Output Encoding', |
| 17 | + prop: 'outputEncoding', |
| 18 | + type: 'enum' |
| 19 | + }] |
| 20 | +}; |
| 21 | + |
| 22 | +const ToneMapping = { |
| 23 | + name: 'Tone Mapping', |
| 24 | + type: 'group', |
| 25 | + props: [{ |
| 26 | + // @TODO |
| 27 | + name: 'Type', |
| 28 | + prop: 'toneMapping', |
| 29 | + type: 'enum', |
| 30 | + }, { |
| 31 | + name: 'Exposure', |
| 32 | + prop: 'toneMappingExposure', |
| 33 | + type: 'number', |
| 34 | + default: 1, |
| 35 | + }], |
| 36 | +}; |
| 37 | + |
| 38 | +const ShadowMap = { |
| 39 | + name: 'Shadow Map', |
| 40 | + type: 'group', |
| 41 | + props: [{ |
| 42 | + name: 'Enabled', |
| 43 | + prop: 'shadowMap.enabled', |
| 44 | + type: 'boolean', |
| 45 | + default: false, |
| 46 | + }, { |
| 47 | + name: 'Auto Update', |
| 48 | + prop: 'shadowMap.autoUpdate', |
| 49 | + type: 'boolean', |
| 50 | + default: true, |
| 51 | + }, { |
| 52 | + // @TODO enum |
| 53 | + name: 'Shadow Type', |
| 54 | + prop: 'shadowMap.type', |
| 55 | + type: 'enum' |
| 56 | + }], |
| 57 | +}; |
| 58 | + |
| 59 | +const BufferClearing = { |
| 60 | + name: 'Buffer Clearing', |
| 61 | + type: 'group', |
| 62 | + props: [{ |
| 63 | + name: 'Auto Clear', |
| 64 | + prop: 'autoClear', |
| 65 | + type: 'boolean', |
| 66 | + default: true, |
| 67 | + }, { |
| 68 | + name: 'Auto Clear Color', |
| 69 | + prop: 'autoClearColor', |
| 70 | + type: 'boolean', |
| 71 | + default: true, |
| 72 | + }, { |
| 73 | + name: 'Auto Clear Depth', |
| 74 | + prop: 'autoClearDepth', |
| 75 | + type: 'boolean', |
| 76 | + default: true, |
| 77 | + }, { |
| 78 | + name: 'Auto Clear Stencil', |
| 79 | + prop: 'autoClearStencil', |
| 80 | + type: 'boolean', |
| 81 | + default: true, |
| 82 | + }] |
| 83 | +}; |
| 84 | + |
| 85 | + |
| 86 | +// Does not have a further classification yet |
| 87 | +const Capabilities = { |
| 88 | + name: 'Capabilities', |
| 89 | + type: 'group', |
| 90 | + props: [{ |
| 91 | + name: 'WebGL2', |
| 92 | + prop: 'capabilities.isWebGL2', |
| 93 | + type: 'boolean', |
| 94 | + readonly: true, |
| 95 | + }, { |
| 96 | + name: 'Precision', |
| 97 | + prop: 'capabilities.precision', |
| 98 | + type: 'string', |
| 99 | + readonly: true, |
| 100 | + }, { |
| 101 | + name: 'Float Fragment Textures', |
| 102 | + prop: 'capabilities.floatFragmentTextures', |
| 103 | + type: 'boolean', |
| 104 | + readonly: true, |
| 105 | + }, { |
| 106 | + name: 'Float Vertex Textures', |
| 107 | + prop: 'capabilities.floatVertexTextures', |
| 108 | + type: 'boolean', |
| 109 | + readonly: true, |
| 110 | + }, { |
| 111 | + name: 'Logarithmic Depth Buffer', |
| 112 | + prop: 'capabilities.logarithmicDepthBuffer', |
| 113 | + type: 'boolean', |
| 114 | + readonly: true, |
| 115 | + }, { |
| 116 | + name: 'Max Anisotropy', |
| 117 | + prop: 'capabilities.maxAnisotropy', |
| 118 | + type: 'number', |
| 119 | + readonly: true, |
| 120 | + }, { |
| 121 | + name: 'Max Precision', |
| 122 | + prop: 'capabilities.maxPrecision', |
| 123 | + type: 'string', |
| 124 | + readonly: true, |
| 125 | + }, { |
| 126 | + name: 'Max Attributes', |
| 127 | + prop: 'capabilities.maxAttributes', |
| 128 | + type: 'int', |
| 129 | + readonly: true, |
| 130 | + }, { |
| 131 | + name: 'Max Cubemap Size', |
| 132 | + prop: 'capabilities.maxCubemapSize', |
| 133 | + type: 'int', |
| 134 | + readonly: true, |
| 135 | + }, { |
| 136 | + name: 'Max Fragment Uniforms', |
| 137 | + prop: 'capabilities.maxFragmentUniforms', |
| 138 | + type: 'int', |
| 139 | + readonly: true, |
| 140 | + }, { |
| 141 | + name: 'Max Texture Size', |
| 142 | + prop: 'capabilities.maxTextureSize', |
| 143 | + type: 'int', |
| 144 | + readonly: true, |
| 145 | + }, { |
| 146 | + name: 'Max Textures', |
| 147 | + prop: 'capabilities.maxTextures', |
| 148 | + type: 'int', |
| 149 | + readonly: true, |
| 150 | + }, { |
| 151 | + name: 'Max Varyings', |
| 152 | + prop: 'capabilities.maxVaryings', |
| 153 | + type: 'int', |
| 154 | + readonly: true, |
| 155 | + }, { |
| 156 | + name: 'Max Vertex Textures', |
| 157 | + prop: 'capabilities.maxVertexTextures', |
| 158 | + type: 'int', |
| 159 | + readonly: true, |
| 160 | + }, { |
| 161 | + name: 'Max Vertex Uniforms', |
| 162 | + prop: 'capabilities.maxVertexUniforms', |
| 163 | + type: 'int', |
| 164 | + readonly: true, |
| 165 | + }, { |
| 166 | + name: 'Vertex Textures', |
| 167 | + prop: 'capabilities.vertexTextures', |
| 168 | + type: 'boolean', |
| 169 | + readonly: true, |
| 170 | + }] |
| 171 | +}; |
| 172 | + |
| 173 | +// @TODO clippingPlanes |
| 174 | +const Clipping = { |
| 175 | + name: 'Clipping', |
| 176 | + type: 'group', |
| 177 | + props: [{ |
| 178 | + name: 'Local Clipping', |
| 179 | + prop: 'localClippingEnabled', |
| 180 | + type: 'boolean', |
| 181 | + default: false, |
| 182 | + }], |
| 183 | +}; |
| 184 | + |
| 185 | +const Scene = { |
| 186 | + name: 'Scene', |
| 187 | + type: 'group', |
| 188 | + props: [{ |
| 189 | + name: 'Sort Objects', |
| 190 | + prop: 'sortObjects', |
| 191 | + type: 'boolean', |
| 192 | + default: true, |
| 193 | + }], |
| 194 | +}; |
| 195 | + |
| 196 | +const MorphLimits = { |
| 197 | + name: 'Morph Limits', |
| 198 | + type: 'group', |
| 199 | + props: [{ |
| 200 | + name: 'Max Morph Targets', |
| 201 | + prop: 'maxMorphTargets', |
| 202 | + type: 'int', |
| 203 | + default: 8, |
| 204 | + min: 0, |
| 205 | + max: 8, |
| 206 | + }, { |
| 207 | + name: 'Max Morph Normals', |
| 208 | + prop: 'maxMorphNormals', |
| 209 | + type: 'int', |
| 210 | + default: 4, |
| 211 | + min: 0, |
| 212 | + max: 4, |
| 213 | + }], |
| 214 | +}; |
| 215 | + |
| 216 | +const WebGLRenderer = { |
| 217 | + type: 'renderer', |
| 218 | + props: [ |
| 219 | + { |
| 220 | + name: 'Check Shader Errors', |
| 221 | + prop: 'debug.checkShaderErrors', |
| 222 | + type: 'boolean', |
| 223 | + default: true, |
| 224 | + }, |
| 225 | + PBR, |
| 226 | + ToneMapping, |
| 227 | + ShadowMap, |
| 228 | + BufferClearing, |
| 229 | + Capabilities, |
| 230 | + Clipping, |
| 231 | + Scene, |
| 232 | + MorphLimits, |
| 233 | + ], |
| 234 | +}; |
| 235 | + |
| 236 | +export default { |
| 237 | + WebGLRenderer: WebGLRenderer, |
| 238 | + WebGL1Renderer: WebGLRenderer, |
| 239 | +}; |
0 commit comments