Overlays.getOverlayObject() is being removed from the API


#1

The Overlays.getOverlayObject() JavaScript API function is not used in any High Fidelity scripts. So, unless there is objection, it is deprecated and will be removed from the API after a couple of releases.


#2

Not even sure what that one did, considering getProperties exists too


#3

I wish these were put somewhere else than the forums, Cause now I have just run until this being removed which breaks my vrTool which uses it for the eventbridge connection. If there is another way to do this on a web3d overlay please let me know.


#4

@FluffyJenkins How have you been using Overlays.getOverlayObject(), exactly? Perhaps code snippets of the overlay creation and the use of the Overlays.getOverlayObject() value, each side of the event bridge?


#5
obj = Overlays.getOverlayObject(vrToolOverlay_TOOL);
obj.webEventReceived.connect(onWebEventReceived);

#6

Thanks. And vrToolOverlay_TOOL was created using what function call?


#7

vrToolOverlay_TOOL = Overlays.addOverlay(‘web3d’, {
visible: true,
url: “about:blank”,
dpi: 68,
dimensions: Vec3.multiply(MyAvatar.sensorToWorldScale,PANEL_SIZE),
parentID: MyAvatar.sessionUUID,
parentJointIndex: jointI,
showKeyboardFocusHighlight: false,
localPosition: {x: 0, y: 0.0, z: -0.095},
localRotation: Quat.fromPitchYawRollDegrees(0, 180, -90),
alpha: 1
});


#8

Thanks. I’m having a look.


#9

I couldn’t find a work-around, unfortunately.

I’ve submitted the following PR which reinstates the function: https://github.com/highfidelity/hifi/pull/12689


#10

Hi David.

My team is also making use of Overlays. If this aspect of the API is getting removed; what is the anticipated work-around?

Thanks in advance.


#11

The PR has been merged and will be available in release 67.