Cesium: Custom MaterialProperty

        When applying Cesium.js in a project, we often encounter application scenarios that need to expand the Material material or MaterialProperty material properties of Cesium.js. If you are familiar with GLSL (openGL Shading Language), that is: OpenGL Shading Language, refer to the official Cesium documentation, it must not be difficult to build a new Material . The MaterialProperty material property is usually used to set the material for the Cesium.Entity entity. How to expand it according to actual needs?

MaterialProperty: an overview of the built-in API

         The MaterialProperty material property is actually an abstract interface level API provided by Cesium, which cannot be used directly. Therefore, Cesium provides several built-in objects for Color color material properties, Image map/texture properties, and Glow luminous line properties.

MaterialProperty material properties: basic structure

        So, how to complete the coding of custom material properties? We can first look at the basic structure of the root interface MaterialProperty provided by Cesium.js ,

members: member attributes

        Member properties:

        ①definitionChanged&

Guess you like

Origin blog.csdn.net/weixin_43524214/article/details/130096339