未验证 提交 3ff792c4 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #18135 from bastienrobert/material-define-types

Material define types
......@@ -30,6 +30,7 @@ export interface MaterialParameters {
clippingPlanes?: Plane[];
clipShadows?: boolean;
colorWrite?: boolean;
defines?: any;
depthFunc?: DepthModes;
depthTest?: boolean;
depthWrite?: boolean;
......@@ -126,6 +127,12 @@ export class Material extends EventDispatcher {
*/
colorWrite: boolean;
/**
* Custom defines to be injected into the shader. These are passed in form of an object literal, with key/value pairs. { MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }.
* The pairs are defined in both vertex and fragment shaders. Default is undefined.
*/
defines: any;
/**
* Which depth function to use. Default is {@link LessEqualDepth}. See the depth mode constants for all possible values.
*/
......
......@@ -22,7 +22,6 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
constructor( parameters: MeshPhysicalMaterialParameters );
defines: any;
reflectivity: number;
clearcoat: number;
clearcoatRoughness: number;
......
......@@ -41,7 +41,6 @@ export class MeshStandardMaterial extends Material {
constructor( parameters?: MeshStandardMaterialParameters );
defines: any;
color: Color;
roughness: number;
metalness: number;
......
......@@ -12,7 +12,6 @@ import { MaterialParameters, Material } from './Material';
*/
export interface ShaderMaterialParameters extends MaterialParameters {
defines?: any;
uniforms?: any;
vertexShader?: string;
fragmentShader?: string;
......@@ -36,7 +35,6 @@ export class ShaderMaterial extends Material {
constructor( parameters?: ShaderMaterialParameters );
defines: any;
uniforms: { [uniform: string]: IUniform };
vertexShader: string;
fragmentShader: string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册