aentity.js 701 B

12345678910111213141516171819202122232425262728293031323334
  1. this.setGizmoMode = function (mode) {
  2. if (this.gizmo) {
  3. this.gizmo.properties.mode = mode
  4. }
  5. }
  6. this.showCloseGizmo = function () {
  7. let gizmoNode =
  8. {
  9. "extends": "http://vwf.example.com/aframe/gizmoComponent.vwf",
  10. "type": "component",
  11. "properties":
  12. {
  13. "mode": "translate"
  14. }
  15. }
  16. if (this.properties.edit) {
  17. this.children.create("gizmo", gizmoNode);
  18. } else {
  19. if (this.gizmo) {
  20. this.children.delete(this.gizmo)
  21. }
  22. }
  23. }
  24. this.updateSrc = function(srcID){
  25. if (srcID) {
  26. debugger;
  27. this.src = "";
  28. this.src = srcID;
  29. }
  30. }