CefInterface.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function setSurface(cubeWidth, cubeHeight, cubeDepth, surfaceFolder) {
  2. EventCenter.emit("SetSurface", {
  3. cubeWidth,
  4. cubeHeight,
  5. cubeDepth,
  6. surfaceFolder,
  7. });
  8. return true;
  9. }
  10. /// surfacesList 是六个数据
  11. function changeSurface(cubeWidth, cubeHeight, cubeDepth, ...surfacesList) {
  12. EventCenter.emit("ChangeSurface", {
  13. cubeWidth,
  14. cubeHeight,
  15. cubeDepth,
  16. surfacesList: surfacesList,
  17. });
  18. return true;
  19. }
  20. // 传入 sourceenum == "Carotid" && docarotidaiclip=="True";
  21. function mdlFileLoaded(sourceenum, docarotidaiclip) {
  22. SpriteManager.mdlFileLoaded(sourceenum, docarotidaiclip);
  23. }
  24. /// 修改锐度、明暗度、对比度
  25. function adjustedImageByFlutter(sharpness, brightness, contrast) {
  26. EventCenter.emit("AdjustedCubeImage", [sharpness, brightness, contrast]);
  27. ClipPlaneManager.adjustedClipPlanesMesh([sharpness, brightness, contrast]);
  28. shaderUniformsManager.Sharpness = sharpness;
  29. shaderUniformsManager.Brightness = brightness;
  30. shaderUniformsManager.Contrast = contrast;
  31. }
  32. function getCurrentClipInformation() {
  33. return JSON.stringify(ClipPlaneManager.getSelectedClipInfo());
  34. }
  35. function release() {
  36. EventCenter.emit("RemoveCube");
  37. }