MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / createBox

Function createBox

public/iframe/lib/js/mixinsCesiumEarth.js:862–908  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

860 })
861 },
862 async createBox (item) {
863 // 创建box
864 const config = {
865 "position": [item.position[0] * Math.PI / 180, item.position[1] * Math.PI / 180, 300],
866 "scale": [150, 150, 100],
867 "positions": [0, -1, 0, 0, 1, 0, 0, 1, 2, 0, -1, 2, 0, 1, 0, 0, -1, 0, 0, -1, 2, 0, 1, 2],
868 rotation: [-90 * Math.PI / 180, 0, 0],
869 "sts": [0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1],
870 "indices": [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7],
871 "renderState": {
872 "cull": {
873 "enabled": true
874 },
875 "polygonOffset": {},
876 "scissorTest": {
877 "rectangle": {}
878 },
879 "depthRange": {},
880 "depthTest": {
881 "enabled": true
882 },
883 "colorMask": {},
884 "depthMask": true,
885 "blending": {
886 "enabled": true,
887 "color": {},
888 "equationRgb": 32774,
889 "equationAlpha": 32774,
890 "functionSourceRgb": 770,
891 "functionDestinationRgb": 771,
892 "functionDestinationAlpha": 771
893 },
894 "stencilTest": {
895 "frontOperation": {},
896 "backOperation": {}
897 },
898 "sampleCoverage": {}
899 },
900 "canvasWidth": 980,
901 "canvasHeight": 560,
902 "autoRegisterEditing": false
903 }
904
905 const customP = new XE.Obj.CustomPrimitive(this.earth);
906 customP.xbsjFromJSON(config);
907 await this.setDiv(customP, item)
908 },
909 async createODLines3 () {
910 const p = []
911 for (const item of this.reportData) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected