点绘制不出来 当把primitiveType改为Cesium.PrimitiveType.LINES 可以绘制 但是为Cesium.PrimitiveType.POINTS绘制不出来
Hi @LiuGaoMeng,
Thanks for your post and welcome to the Cesium community.
Could you please provide more information to help us understand the problem you have run in to? What would be best is if you could provide an example using our sandcastle tool https://sandcastle.cesium.com/ that reproduces the error so we can see exactly how you are trying to use the CesiumJS API and where you have run into an issue.
Thanks and I hope we can address your problem as soon as possible.
Best,
Luke
Thanks @Luke_McKinstry
I have resolve this question but I have another question,when I draw a line with a width of 50
when add code “vec3 poi=position + normal*expandAndWidth.x * expandAndWidth.y;“ in vertex shader,line will render ,but it have an angle with ground.if not add line cann’t render.
https://sandcastle.cesium.com/#c=lVlpU9xGGv4rCh9Sg5cIae4Z23EIOC6qMLCG2LWVSTlipge00UhTkgaMHarAGAMOV9Zg8A3YXshhwGfMZf7MSJr55L+wb6t19BywictFoe5+j37euxFzeUXVmVOMoDGtSBMLOSarKjkm1ZC2v1INp1NySk4rsqYzgyIaQipzlpHRkHOavWyvBdzzrYqsC6KM1FRDo02ZkpubmeLRlvF8trz23rq5az0eLU2/Nu5vfjqYKh49tpbup6/nruaUDJIwr25V+TdK66IifzqYITJKk78ZdzbNN5vGxItPB9MpeVBQmUEN9PghJYsyM4jSISavaCKmOu0vyYqaEyRvIciga3lBzrTImStiRh+AjUFFzDA50DfQeCMlMzTZFUWVMviq9pd4HQUCnp4M4AVHwwGy2cRwLNfYyF4bvk7uzLgqiWddtZh/OJxOVSrBXgNeVUvDpzGLfulqt0t8ljkGI1cRENXE8KCFTTryg426ufrBOBon2H86eGCufDQO5o1nO+bKnDU9aUyMe6YofbxrTO4Z8yvlyXmloF/9RhX6WxVJUQnWWQfrvIrSoobF5lAGDJNnspIi6KcZEGasPzHurFqvPxp7/yUywH7GxIGxtVs8BHlT5qM/rqC+Cx1gdmN+uzw6XTy8bc5tlmYXiE2rTFGhBoi3rwk3tMF2ftgXxsKtvXW4SPHDbHl0nki29leMqfcgqLQxlpJHUvIPg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obqmjMHEIujpASZAj2W4HikSYpHTQNU8i5C6RwW32zo9SDU0MaiRHitGamaqrSfW3A7jv7HAcGPMP8OB9PGh+/Bo3J4oj2+a2zACjRofNqBUQAWtP3t9Ax/IjqsRXMic36kJrJDPwELA36sz2bsTYmPlYISDbm0LAtyprKSJNm4745fxy2Fx/7nP67OabPj555RO59jq8c/Jn5Uzok/gna+c07BT2pKdnn7Z7lb+3Met/9QOwEV2janl0tomFUIPnNfT6Y3S2gwdS/VGdqw6uU/FMwqleoWeNk2HqOlsvqAN1L6XVLkE/MeNbl4RtbPu3CVAwtZEQQ7ZNbsN9asIaXYCD3xHqPkgzyZC0TgfDgV5Lhjmw06UhDg2EYzEw8FoPBZJcFzI3SAUMS4YD8bDfDDOBSmKSDQaDnNxLhFJRIM0ARdLxBN8PBiOhBM8RRCLhMLRWCwRC3F8lCKIh7kQyE2Ew8DSk8CzXCwWjMBiMBHiYiGagA9zfCQYiQUT8VDMJ+CDIDoaC/FhYMlFU/L3jeTBHYejpPTjx10Nluwpoc8JS6fk1kTpMRM4ZmFLtJMAecdnNUgqyC8RGitkMgFXADGeczINRlcFVkM6fn52ZeAAEmUnGZ1o0ICrFMYhFgOrRCOxGBcNhWNeysNI8KEgF42GQsEY2Mnb4SMcx5GPRmdRUUVIiI5o78oDSMBtQZKJssEox/ExLg4eEwpHeDupw2o8xMcjwVgkHAxFgmGXLi9COkwyX/BsOI69BsjCfJyLBsM2HcN8wbHRBBeNc+FoPBoC+8US3puKggsPZs3zfJSPJoKJaCjquuKIC3pDU8MZTR+W0Jd44SuR/NmloEoBlm3WUS4vQUhpzX2F9I9IZ9OahvE/0+ySnMmIg4yYOVvnzyzkGRt2slACe8TrKNXw5ZlmOF9BJik2NF3QIUnCMD4ywH/ZQRZZlj3TDJ+1VLqiSH2CSnH8Hw
Hi @LiuGaoMeng,
I don’t have a direct answer to your questions, but I have a few suggestions that will help us help you:
- The sandcastle you provided relies heavily on private APIs. E.g.
BufferUsage,DrawCommand,ShaderProgram, and more. These are not meant to be used externally, and so we can’t make any guarantees about how your particular usage of them ought to work. - The sandcastle is quite complex. There are comments but they’re not easily understandable without frequent google translate. For something of this complexity, it would help to provide a more detailed explanation in your post of what you’re trying to achieve, what you’ve tried, and what isn’t working. Pictures or videos help a lot too. A minimal reproduction in sandcastle is even better.
Also, since this question is different from the topic of the original post, please consider opening a new issue. That helps keep the forum organized and searchable for others who may have the same question.
Best,
Matt
Hi @mzschwartz5 I want the line I draw to stick to the ground, but the line has an angle with the ground. The example code can be found at the following address.