- This topic has 3 replies, 2 voices, and was last updated 2 years, 9 months ago by jamjam.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
2022-01-20 at 1:52 pm #48773jamjamCustomer
Hey,
is it possible to set this variable in initObjectPicking inside visuals_logic.js from false to true with puzzles?
Its the variable in the last line:
}, 'mousemove', false);
Right now, we change it manually inside the .js file, but would prefer to set it in puzzles.
// whenHovered puzzle initObjectPicking(function(intersects, event) { var prevHovered = _pGlob.hoveredObject; var currHovered = ''; // the event might happen before hover registration _pGlob.objHoverInfo = _pGlob.objHoverInfo || []; // search for closest hovered object var lastIntersectIndex = Infinity; _pGlob.objHoverInfo.forEach(function(el) { var maxIntersects = el.xRay ? intersects.length : Math.min(1, intersects.length); for (var i = 0; i < maxIntersects; i++) { var obj = intersects.object; var objName = getPickedObjectName(obj); if (objectsIncludeObj(retrieveObjectNames(el.objSelector), objName) && i <= lastIntersectIndex) { currHovered = objName; lastIntersectIndex = i; } } }); if (prevHovered == currHovered) return; // first - all "out" callbacks, then - all "over" _pGlob.objHoverInfo.forEach(function(el) { if (objectsIncludeObj(retrieveObjectNames(el.objSelector), prevHovered)) { // ensure the correct value of the hoveredObject block _pGlob.hoveredObject = prevHovered; el.callbacks[1](event); } }); _pGlob.objHoverInfo.forEach(function(el) { if (objectsIncludeObj(retrieveObjectNames(el.objSelector), currHovered)) { // ensure the correct value of the hoveredObject block _pGlob.hoveredObject = currHovered; el.callbacks[0](event); } }); _pGlob.hoveredObject = currHovered; }, 'mousemove', true);
Thanks
2022-01-31 at 7:52 am #48893jamjamCustomerBump, in case it got overlooked.
2022-01-31 at 8:39 am #48894Yuri KovelenovStaffHi and sorry for the delay. I think there were reasons why this setting is not exposed in the puzzle. Yet it is possible to modify the puzzle’s underlying code by creating a custom puzzle. It should be straightforward: you could possibly copy the code from the original puzzle and only modify that setting.
See here for more details: https://www.soft8soft.com/docs/manual/en/puzzles/Plugins.html2022-01-31 at 9:53 am #48895jamjamCustomerThanks Yuri
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.