claygl-next
Advanced tools
Comparing version 2.0.0-alpha.27 to 2.0.0-alpha.28
@@ -30,2 +30,4 @@ import { GLEnum } from '../core/type'; | ||
getProgramKey?(): string; | ||
beforeCompileShader?(): void; | ||
afterCompileShader?(): void; | ||
} | ||
@@ -32,0 +34,0 @@ /** |
@@ -133,2 +133,3 @@ import { keys } from '../core/util'; | ||
} | ||
material.beforeCompileShader && material.beforeCompileShader(); | ||
const _gl = renderer.gl; | ||
@@ -159,12 +160,2 @@ let commonDefineCode = ''; | ||
const versionStr = shader.version === 3 ? `#version 300 es\n` : ''; | ||
// const extensions = [ | ||
// ['OES_standard_derivatives', 'STANDARD_DERIVATIVES'], | ||
// ].filter(function (ext) { | ||
// return renderer.getWebGLExtension(ext[0]) != null; | ||
// }); | ||
// for (let i = 0; i < extensions.length; i++) { | ||
// const extDefineCode = '\n#define SUPPORT_' + extensions[i][1]; | ||
// fragmentDefineStr += extDefineCode; | ||
// vertexDefineStr += extDefineCode; | ||
// } | ||
const vertexCode = versionStr + vertexDefineStr + '\n' + shader.vertex; | ||
@@ -185,2 +176,3 @@ const fragmentCode = versionStr + | ||
cache[key] = program; | ||
material.afterCompileShader && material.afterCompileShader(); | ||
return program; | ||
@@ -187,0 +179,0 @@ } |
@@ -52,2 +52,4 @@ import Shader, { ShaderDefineValue, ShaderPrecision, ShaderType, VertexShader, FragmentShader, UniformType } from './Shader'; | ||
interface Material extends Omit<MaterialOpts, 'shader'> { | ||
beforeCompileShader?(): void; | ||
afterCompileShader?(): void; | ||
} | ||
@@ -54,0 +56,0 @@ /** |
{ | ||
"name": "claygl-next", | ||
"version": "2.0.0-alpha.27", | ||
"version": "2.0.0-alpha.28", | ||
"description": "A 3D graphic library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6982916
105977