import { ViewRanges } from "@here/harp-datasource-protocol/lib/ViewRanges" ; import { applyMixinsWithoutProperties , assert , chainCallbacks } from "@here/harp-utils" ; import * as THREE from "three" ; import { DisplacementFeature , DisplacementFeatureParameters } from "./DisplacementFeature" ; import { ExtrusionFeatureDefs } from "./MapMeshMaterialsDefs" ; import extrusionShaderChunk from "./ShaderChunks/ExtrusionChunks" ; import fadingShaderChunk from "./ShaderChunks/FadingChunks" ; import { simpleLightingShadowChunk } from "./ShaderChunks/ShadowChunks" ; import { disableBlending , enableBlending , insertShaderInclude , setShaderDefine } from "./Utils" ; const emptyTexture = new THREE . Texture ( ) ; /**
 * The MapMeshMaterials [[MapMeshBasicMaterial]] and [[MapMeshStandardMaterial]] are the standard
 * [[THREE.MeshBasicMaterial]] and [[THREE.MeshStandardMaterial]], with the addition functionality
 * of fading out the geometry between a fadeNear and fadeFar value.
 *
 * The implementation is designed around a mixin class  FadingFeatureMixin , which requires
 * a bit of care when adding the FadingFeature to the existing mesh classes, but it is safe to use
 * and also reduces code duplication.
  /**
 * Parameters used when constructing a new implementor of  FadingFeature .
  export interface FadingFeatureParameters { /**
     * Distance to the camera (range: `[0.0, 1.0]`) from which the objects start fading out.
     */ fadeNear ? : number ; /**
     * Distance to the camera (range: `[0.0, 1.0]`) from which the objects are transparent.
     */ fadeFar ? : number ; } /**
 * Parameter used to control patching the standard material shader to ensure that the materials
 * color isn't affected by the light direction, only valid for techniques that are "fill"
 */ export interface ShadowFeatureParameters { /**
     * Whether the diffuse light component is removed (i.e. the materials color is therefore just
     * the ambient + shadow).
     */ removeDiffuseLight ? : boolean ; } /**
 * Parameters used when constructing a new implementor of  ExtrusionFeature .
  export interface ExtrusionFeatureParameters { /**
     * Ratio of the extruded objects, where `1.0` is the default value
     */ extrusionRatio ? : number ; /**
     * Enable z-fighting workaround that doesn't animate buildings with `height <
     * [[ExtrusionFeatureDefs.MIN_BUILDING_HEIGHT]]`.
     *
     * Should be applied to `polygon` materials using this feature.
     */ zFightingWorkaround ? : boolean ; } hidden export interface UniformsType { [ index ] : THREE . IUniform ; } hidden type CompileCallback = ( shader : THREE . Shader , renderer : any ) => void ; /**
 * Material properties used from THREE, which may not be defined in the type.
 */ export interface HiddenThreeJSMaterialProperties { /**
     * Informs THREE.js to re-compile material shader (due to change in code or defines).
     */ needsUpdate ? : boolean ; deprecated uniformsNeedUpdate ? : boolean ; /**
     * Available in all materials in ThreeJS.
     */ transparent ? : boolean ; /**
     * Used internally for material shader defines.
     */ defines ? : any ; /**
     * Defines callback available in THREE.js materials.
     *
     * Called before shader program compilation to generate vertex & fragment shader output code.
     */ onBeforeCompile ? : CompileCallback ; } hidden export interface MixinShaderProperties { /**
     * Used internally for material shader defines.
     */ shaderDefines ? : any ; see needsUpdate shaderUniforms ? : UniformsType ; } param distance param visibilityRange function cameraToWorldDistance ( distance , visibilityRange ) { return distance * visibilityRange . maximum ; } param mixin param material function linkMixinWithMaterial ( mixin , material ) { if ( material . defines === undefined ) { material . defines = { } ; } mixin . shaderDefines = material . defines ; if ( mixin . shaderUniforms === undefined ) { mixin . shaderUniforms = { } ; } } param mixin param shader function linkMixinWithShader ( mixin , shader ) { Object . assign ( shader . uniforms , mixin . shaderUniforms ) ; mixin . shaderUniforms = shader . uniforms ; } /**
 * Base interface for all objects that should fade in the distance. The implementation of the actual
 * FadingFeature is done with the help of the mixin class  FadingFeatureMixin and a set of
 * supporting functions in the namespace of the same name.
  export interface FadingFeature extends HiddenThreeJSMaterialProperties , MixinShaderProperties { /**
     * Distance to the camera (range: `[0.0, 1.0]`) from which the objects start fading out.
     */ fadeNear ? : number ; /**
     * Distance to the camera (range: `[0.0, 1.0]`) from which the objects are transparent. A value
     * of <= 0.0 disables fading.
     */ fadeFar ? : number ; } remarks The implementation of the actual ExtrusionFeature is done with
 * the help of the mixin class  ExtrusionFeatureMixin * and a set of supporting functions in the namespace of the same name.
  export interface ExtrusionFeature extends HiddenThreeJSMaterialProperties , MixinShaderProperties { /**
     * Ratio of the extruded objects, where `1.0` is the default value. Minimum suggested value
     * is `0.01`
     */ extrusionRatio ? : number ; } param material returns export function hasExtrusionFeature ( material ) { return "extrusionRatio" in material ; } namespace DisplacementFeature { param displacementMaterial export function isEnabled ( displacementMaterial ) { return displacementMaterial . displacementMap !== null ; } param displacementMaterial export function updateDisplacementFeature ( displacementMaterial ) { assert ( displacementMaterial . shaderDefines !== undefined ) ; assert ( displacementMaterial . shaderUniforms !== undefined ) ; const useDisplacementMap = isEnabled ( displacementMaterial ) ; const needsUpdate = setShaderDefine ( displacementMaterial . shaderDefines , "USE_DISPLACEMENTMAP" , useDisplacementMap ) ; displacementMaterial . needsUpdate = needsUpdate ; if ( useDisplacementMap ) { const texture = displacementMaterial . displacementMap ! ; texture . needsUpdate = true ; displacementMaterial . shaderUniforms ! . displacementMap . value = texture ; } else if ( needsUpdate ) { displacementMaterial . shaderUniforms ! . displacementMap . value = emptyTexture ; } } param displacementMaterial param shader export function onBeforeCompile ( displacementMaterial , shader ) { if ( ! isEnabled ( displacementMaterial ) ) { return ; } assert ( displacementMaterial . shaderUniforms !== undefined ) ; linkMixinWithShader ( displacementMaterial , shader ) ; shader . vertexShader = shader . vertexShader . replace ( "#include <skinbase_vertex>" , `#include <skinbase_vertex>
#ifndef USE_ENVMAP
    vec3 objectNormal = vec3( normal );
#endif` ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "uv2_pars_vertex" , "displacementmap_pars_vertex" ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "skinning_vertex" , "displacementmap_vertex" , true ) ; } } export class DisplacementFeatureMixin implements DisplacementFeature , MixinShaderProperties { needsUpdate ? : boolean ; uniformsNeedUpdate ? : boolean ; defines ? : any ; shaderDefines ? : any ; shaderUniforms ? : UniformsType ; onBeforeCompile ? : CompileCallback ; private m_displacementMap : THREE . Texture | null = null ; get displacementMap ( ) : THREE . Texture | null { return this . m_displacementMap ; } set displacementMap ( map ) { this . setDisplacementMap ( map ) ; } protected getDisplacementMap ( ) { return this . m_displacementMap ; } protected setDisplacementMap ( map ) { if ( map !== this . m_displacementMap ) { this . m_displacementMap = map ; DisplacementFeature . updateDisplacementFeature ( this ) ; } } /**
     * The mixin class should call this method to register the property [[displacementMap]]
     */ protected addDisplacementProperties ( ) { Object . defineProperty ( this , "displacementMap" , { get : ( ) => { return this . getDisplacementMap ( ) ; } , set : val => { this . setDisplacementMap ( val ) ; } } ) ; } /**
     * Apply the displacementMap value from the parameters to the respective properties.
     */ protected applyDisplacementParameters ( params ? ) { linkMixinWithMaterial ( this , this ) ; assert ( this . shaderDefines !== undefined ) ; assert ( this . shaderUniforms !== undefined ) ; const uniforms = this . shaderUniforms ! ; uniforms . displacementMap = new THREE . Uniform ( emptyTexture ) ; uniforms . displacementScale = new THREE . Uniform ( 1 ) ; uniforms . displacementBias = new THREE . Uniform ( 0 ) ; if ( params !== undefined ) { if ( params . displacementMap !== undefined ) { this . setDisplacementMap ( params . displacementMap ) ; } } this . onBeforeCompile = chainCallbacks ( this . onBeforeCompile , ( shader ) => { DisplacementFeature . onBeforeCompile ( this , shader ) ; } ) ; this . needsUpdate = DisplacementFeature . isEnabled ( this ) ; } param source protected copyDisplacementParameters ( source ) { this . setDisplacementMap ( source . displacementMap ) ; return this ; } } /**
 * Namespace with support functions for implementors of `FadingFeature`.
 */ export namespace FadingFeature { export const DEFAULT_FADE_NEAR = - 1.0 ; export const DEFAULT_FADE_FAR = - 1.0 ; param fadingMaterial export function isEnabled ( fadingMaterial ) { return ( fadingMaterial . fadeNear !== undefined && fadingMaterial . fadeFar !== undefined && fadingMaterial . fadeFar > 0 ) ; } param fadingMaterial export function isDefined ( fadingMaterial ) { return fadingMaterial . fadeNear !== undefined && fadingMaterial . fadeFar !== undefined ; } /**
     * Patch the THREE.ShaderChunk on first call with some extra shader chunks.
     */ export function patchGlobalShaderChunks ( ) { if ( THREE . ShaderChunk . fading_pars_vertex === undefined ) { Object . assign ( THREE . ShaderChunk , fadingShaderChunk ) ; } } param fadingMaterial export function updateFadingFeature ( fadingMaterial ) { assert ( fadingMaterial . shaderDefines !== undefined ) ; assert ( fadingMaterial . shaderUniforms !== undefined ) ; const useFading = isEnabled ( fadingMaterial ) ; const needsUpdate = setShaderDefine ( fadingMaterial . shaderDefines , "FADING_MATERIAL" , useFading ) ; fadingMaterial . needsUpdate = needsUpdate ; assert ( fadingMaterial . shaderUniforms ! . fadeNear !== undefined && fadingMaterial . shaderUniforms ! . fadeFar !== undefined ) ; if ( useFading ) { fadingMaterial . shaderUniforms ! . fadeNear . value = fadingMaterial . fadeNear ; fadingMaterial . shaderUniforms ! . fadeFar . value = fadingMaterial . fadeFar ; if ( needsUpdate ) { enableBlending ( fadingMaterial as THREE . Material ) ; } } else if ( needsUpdate ) { fadingMaterial . shaderUniforms ! . fadeNear . value = FadingFeature . DEFAULT_FADE_NEAR ; fadingMaterial . shaderUniforms ! . fadeFar . value = FadingFeature . DEFAULT_FADE_FAR ; disableBlending ( fadingMaterial as THREE . Material ) ; } } param fadingMaterial param shader export function onBeforeCompile ( fadingMaterial , shader ) { if ( ! isEnabled ( fadingMaterial ) ) { return ; } assert ( fadingMaterial . shaderUniforms !== undefined ) ; linkMixinWithShader ( fadingMaterial , shader ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "fog_pars_vertex" , "fading_pars_vertex" ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "fog_vertex" , "fading_vertex" , true ) ; shader . fragmentShader = insertShaderInclude ( shader . fragmentShader , "fog_pars_fragment" , "fading_pars_fragment" ) ; shader . fragmentShader = insertShaderInclude ( shader . fragmentShader , "fog_fragment" , "fading_fragment" , true ) ; } param object param viewRanges param fadeNear param fadeFar param updateUniforms param additionalCallback export function addRenderHelper ( object , viewRanges , fadeNear , fadeFar , updateUniforms , additionalCallback ? ) { object . onBeforeRender = chainCallbacks ( object . onBeforeRender , ( renderer , scene , camera , geometry , material , group ) => { const fadingMaterial = material as FadingFeature ; fadingMaterial . fadeNear = fadeNear === undefined || fadeNear === FadingFeature . DEFAULT_FADE_NEAR ? FadingFeature . DEFAULT_FADE_NEAR : cameraToWorldDistance ( fadeNear , viewRanges ) ; fadingMaterial . fadeFar = fadeFar === undefined || fadeFar === FadingFeature . DEFAULT_FADE_FAR ? FadingFeature . DEFAULT_FADE_FAR : cameraToWorldDistance ( fadeFar , viewRanges ) ; if ( additionalCallback !== undefined ) { additionalCallback ( renderer , material ) ; } } ) ; } } see export class FadingFeatureMixin implements FadingFeature { needsUpdate ? : boolean ; uniformsNeedUpdate ? : boolean ; defines ? : any ; shaderDefines ? : any ; shaderUniforms ? : UniformsType ; onBeforeCompile ? : CompileCallback ; private m_fadeNear : number = FadingFeature . DEFAULT_FADE_NEAR ; private m_fadeFar : number = FadingFeature . DEFAULT_FADE_FAR ; see protected getFadeNear ( ) { return this . m_fadeNear ; } see protected setFadeNear ( value ) { const needsUpdate = value !== this . m_fadeNear ; if ( needsUpdate ) { this . m_fadeNear = value ; FadingFeature . updateFadingFeature ( this ) ; } } see protected getFadeFar ( ) { return this . m_fadeFar ; } see protected setFadeFar ( value ) { const needsUpdate = value !== this . m_fadeFar ; if ( needsUpdate ) { this . m_fadeFar = value ; FadingFeature . updateFadingFeature ( this ) ; } } /**
     * The mixin classes should call this method to register the properties [[fadeNear]] and
     * [[fadeFar]].
     */ protected addFadingProperties ( ) { Object . defineProperty ( this , "fadeNear" , { get : ( ) => { return this . getFadeNear ( ) ; } , set : val => { this . setFadeNear ( val ) ; } } ) ; Object . defineProperty ( this , "fadeFar" , { get : ( ) => { return this . getFadeFar ( ) ; } , set : val => { this . setFadeFar ( val ) ; } } ) ; } param params protected applyFadingParameters ( params ? ) { linkMixinWithMaterial ( this , this ) ; assert ( this . shaderDefines !== undefined ) ; assert ( this . shaderUniforms !== undefined ) ; this . shaderUniforms ! . fadeNear = new THREE . Uniform ( FadingFeature . DEFAULT_FADE_NEAR ) ; this . shaderUniforms ! . fadeFar = new THREE . Uniform ( FadingFeature . DEFAULT_FADE_FAR ) ; if ( params !== undefined ) { if ( params . fadeNear !== undefined ) { this . setFadeNear ( params . fadeNear ) ; } if ( params . fadeFar !== undefined ) { this . setFadeFar ( params . fadeFar ) ; } } this . onBeforeCompile = chainCallbacks ( this . onBeforeCompile , ( shader ) => { FadingFeature . onBeforeCompile ( this , shader ) ; } ) ; this . needsUpdate = FadingFeature . isEnabled ( this ) ; } param source protected copyFadingParameters ( source ) { this . setFadeNear ( source . fadeNear === undefined ? FadingFeature . DEFAULT_FADE_NEAR : source . fadeNear ) ; this . setFadeFar ( source . fadeFar === undefined ? FadingFeature . DEFAULT_FADE_FAR : source . fadeFar ) ; return this ; } } export namespace ExtrusionFeature { /**
     * Checks if feature is enabled based on  ExtrusionFeature properties.
     *
     *  param extrusionMaterial export function isEnabled ( extrusionMaterial ) { return ( extrusionMaterial . extrusionRatio !== undefined && extrusionMaterial . extrusionRatio >= ExtrusionFeatureDefs . DEFAULT_RATIO_MIN ) ; } /**
     * Patch the THREE.ShaderChunk on first call with some extra shader chunks.
     */ export function patchGlobalShaderChunks ( ) { if ( THREE . ShaderChunk . extrusion_pars_vertex === undefined ) { Object . assign ( THREE . ShaderChunk , extrusionShaderChunk ) ; } } param ExtrusionMaterial export function updateExtrusionFeature ( extrusionMaterial ) { assert ( extrusionMaterial . shaderDefines !== undefined ) ; assert ( extrusionMaterial . shaderUniforms !== undefined ) ; const useExtrusion = isEnabled ( extrusionMaterial ) ; const needsUpdate = setShaderDefine ( extrusionMaterial . shaderDefines , "EXTRUSION_MATERIAL" , useExtrusion ) ; extrusionMaterial . needsUpdate = needsUpdate ; if ( useExtrusion ) { extrusionMaterial . shaderUniforms ! . extrusionRatio . value = extrusionMaterial . extrusionRatio ; } else if ( needsUpdate ) { extrusionMaterial . shaderUniforms ! . extrusionRatio . value = ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ; } } param extrusionMaterial param shader export function onBeforeCompile ( extrusionMaterial , shader ) { if ( ! isEnabled ( extrusionMaterial ) ) { return ; } assert ( extrusionMaterial . shaderUniforms !== undefined ) ; linkMixinWithShader ( extrusionMaterial , shader ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "common" , "extrusion_pars_vertex" ) ; shader . vertexShader = insertShaderInclude ( shader . vertexShader , "begin_vertex" , "extrusion_vertex" , true ) ; shader . fragmentShader = insertShaderInclude ( shader . fragmentShader , "fog_pars_fragment" , "extrusion_pars_fragment" ) ; shader . fragmentShader = shader . fragmentShader . replace ( "#include <normal_fragment_begin>" , "#include <extrusion_normal_fragment_begin>" ) ; shader . fragmentShader = insertShaderInclude ( shader . fragmentShader , "fog_fragment" , "extrusion_fragment" , true ) ; } } remarks There is some special handling for the extrusionRatio property, which is animated via
 *  {@link @here/harp-mapview#AnimatedExtrusionHandler} that is
 * using [[extrusionRatio]] setter and getter to update
 * extrusion in a way that works well with the mixin and EdgeMaterial.
  export class ExtrusionFeatureMixin implements ExtrusionFeature { needsUpdate ? : boolean ; uniformsNeedUpdate ? : boolean ; defines ? : any ; shaderDefines ? : any ; shaderUniforms ? : UniformsType ; onBeforeCompile ? : CompileCallback ; private m_extrusion : number = ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ; see protected getExtrusionRatio ( ) { return this . m_extrusion ; } see protected setExtrusionRatio ( value ) { const needsUpdate = value !== this . m_extrusion ; if ( needsUpdate ) { this . m_extrusion = value ; ExtrusionFeature . updateExtrusionFeature ( this ) ; } } /**
     * The mixin class should call this method to register the property [[extrusionRatio]]
     */ protected addExtrusionProperties ( ) { Object . defineProperty ( this , "extrusionRatio" , { get : ( ) => { return this . getExtrusionRatio ( ) ; } , set : val => { this . setExtrusionRatio ( val ) ; } } ) ; } /**
     * Apply the extrusionRatio value from the parameters to the respective properties.
     */ protected applyExtrusionParameters ( params ? ) { linkMixinWithMaterial ( this , this ) ; assert ( this . shaderDefines !== undefined ) ; assert ( this . shaderUniforms !== undefined ) ; if ( params && params . zFightingWorkaround === true ) { this . shaderDefines . ZFIGHTING_WORKAROUND = "" ; } this . shaderUniforms ! . extrusionRatio = new THREE . Uniform ( ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ) ; if ( params !== undefined ) { if ( params . extrusionRatio !== undefined ) { this . setExtrusionRatio ( params . extrusionRatio ) ; } } this . onBeforeCompile = chainCallbacks ( this . onBeforeCompile , ( shader ) => { ExtrusionFeature . onBeforeCompile ( this , shader ) ; } ) ; this . needsUpdate = ExtrusionFeature . isEnabled ( this ) ; } param source protected copyExtrusionParameters ( source ) { if ( source . extrusionRatio !== undefined ) { this . setExtrusionRatio ( source . extrusionRatio ) ; } return this ; } } see export class MapMeshBasicMaterial extends THREE . MeshBasicMaterial implements FadingFeature , ExtrusionFeature , DisplacementFeature { param params constructor ( params ? ) { super ( params ) ; FadingFeature . patchGlobalShaderChunks ( ) ; this . addFadingProperties ( ) ; this . applyFadingParameters ( params ) ; ExtrusionFeature . patchGlobalShaderChunks ( ) ; this . addExtrusionProperties ( ) ; this . applyExtrusionParameters ( { ... params , zFightingWorkaround : true } ) ; this . addDisplacementProperties ( ) ; this . applyDisplacementParameters ( params ) ; } clone ( ) { return new MapMeshBasicMaterial ( ) . copy ( this ) ; } copy ( source ) { super . copy ( source ) ; this . copyFadingParameters ( source ) ; this . copyExtrusionParameters ( source ) ; this . copyDisplacementParameters ( source ) ; return this ; } get fadeNear ( ) : number { return FadingFeature . DEFAULT_FADE_NEAR ; } set fadeNear ( value ) { } get fadeFar ( ) : number { return FadingFeature . DEFAULT_FADE_FAR ; } set fadeFar ( value ) { } get extrusionRatio ( ) : number { return ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ; } set extrusionRatio ( value ) { } get displacementMap ( ) : THREE . Texture | null { return null ; } set displacementMap ( value ) { } setDisplacementMap ( value ) { } protected addFadingProperties ( ) { } protected applyFadingParameters ( params ? ) { } protected copyFadingParameters ( source ) { } protected addExtrusionProperties ( ) { } protected applyExtrusionParameters ( params ? ) { } protected copyExtrusionParameters ( source ) { } protected addDisplacementProperties ( ) { } protected applyDisplacementParameters ( params ? ) { } protected copyDisplacementParameters ( source ) { } } export class MapMeshDepthMaterial extends THREE . MeshDepthMaterial implements ExtrusionFeature { constructor ( params ? ) { super ( params ) ; ExtrusionFeature . patchGlobalShaderChunks ( ) ; this . addExtrusionProperties ( ) ; this . applyExtrusionParameters ( { ... params , zFightingWorkaround : false } ) ; } get extrusionRatio ( ) : number { return ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ; } set extrusionRatio ( value ) { } protected addExtrusionProperties ( ) { } protected applyExtrusionParameters ( params ? ) { } protected copyExtrusionParameters ( source ) { } } see export class MapMeshStandardMaterial extends THREE . MeshStandardMaterial implements FadingFeature , ExtrusionFeature , DisplacementFeature { uniformsNeedUpdate ? : boolean ; param params constructor ( params ? ) { super ( params ) ; FadingFeature . patchGlobalShaderChunks ( ) ; this . addFadingProperties ( ) ; this . applyFadingParameters ( params ) ; ExtrusionFeature . patchGlobalShaderChunks ( ) ; this . addExtrusionProperties ( ) ; this . applyExtrusionParameters ( { ... params , zFightingWorkaround : true } ) ; if ( params ?. removeDiffuseLight === true ) { this . onBeforeCompile = chainCallbacks ( this . onBeforeCompile , shaderParameters => { const shader = shaderParameters as THREE . Shader ; shader . fragmentShader = THREE . ShaderChunk . meshphysical_frag . replace ( "#include <lights_physical_pars_fragment>" , simpleLightingShadowChunk ) ; } ) ; } } clone ( ) { return new MapMeshStandardMaterial ( ) . copy ( this ) ; } copy ( source ) { super . copy ( source ) ; this . copyFadingParameters ( source ) ; this . copyExtrusionParameters ( source ) ; return this ; } get fadeNear ( ) : number { return FadingFeature . DEFAULT_FADE_NEAR ; } set fadeNear ( value ) { } get fadeFar ( ) : number { return FadingFeature . DEFAULT_FADE_FAR ; } set fadeFar ( value ) { } get extrusionRatio ( ) : number { return ExtrusionFeatureDefs . DEFAULT_RATIO_MAX ; } set extrusionRatio ( value ) { } internal get removeDiffuseLight ( ) : boolean { return false ; } internal set removeDiffuseLight ( val ) { } protected addFadingProperties ( ) { } protected applyFadingParameters ( params ? ) { } protected copyFadingParameters ( source ) { } protected addExtrusionProperties ( ) { } protected applyExtrusionParameters ( params ? ) { } protected copyExtrusionParameters ( source ) { } } /**
 * Finish the classes MapMeshBasicMaterial and MapMeshStandardMaterial by assigning them the actual
 * implementations of the mixed in functions.
 */ applyMixinsWithoutProperties ( MapMeshBasicMaterial , [ FadingFeatureMixin ] ) ; applyMixinsWithoutProperties ( MapMeshStandardMaterial , [ FadingFeatureMixin ] ) ; applyMixinsWithoutProperties ( MapMeshBasicMaterial , [ ExtrusionFeatureMixin ] ) ; applyMixinsWithoutProperties ( MapMeshStandardMaterial , [ ExtrusionFeatureMixin ] ) ; applyMixinsWithoutProperties ( MapMeshDepthMaterial , [ ExtrusionFeatureMixin ] ) ; applyMixinsWithoutProperties ( MapMeshBasicMaterial , [ DisplacementFeatureMixin ] ) ;