History

get ready for highlighting

Seth Alves committed 9 years ago

Commit 327bc231 parent e7437d67 files · +250 −141Browse files

Showing the changes to scripts/system/controllers/controllerModules/tabletStylusInput.js (1 of 7 files). Show all

Unified · Split

scripts/system/controllers/controllerModules/tabletStylusInput.js+13−6
@@ -6,7 +6,7 @@ · 5 unmodified lines
6// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html6// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 7
8/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,8/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
9 NULL_UUID, enableDispatcherModule, disableDispatcherModule,9 NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
10 Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,10 Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
11 AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset11 AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset
12*/12*/
@@ -643,7 +643,11 @@ Script.include("/~/system/libraries/controllers.js"); · 630 unmodified lines
643 };643 };
644 644
645 this.isReady = function (controllerData) {645 this.isReady = function (controllerData) {
646 return this.processStylus(controllerData);646 if (this.processStylus(controllerData)) {
647 return makeRunningValues(true, [], []);
648 } else {
649 return makeRunningValues(false, [], []);
650 }
647 };651 };
648 652
649 this.run = function (controllerData, deltaTime) {653 this.run = function (controllerData, deltaTime) {
@@ -660,7 +664,11 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines
660 if (this.stylusTouchingTarget) {664 if (this.stylusTouchingTarget) {
661 this.stylusTouching(controllerData, deltaTime);665 this.stylusTouching(controllerData, deltaTime);
662 }666 }
663 return this.processStylus(controllerData);667 if (this.processStylus(controllerData)) {
668 return makeRunningValues(true, [], []);
669 } else {
670 return makeRunningValues(false, [], []);
671 }
664 };672 };
665 673
666 this.cleanup = function () {674 this.cleanup = function () {
@@ -674,12 +682,11 @@ Script.include("/~/system/libraries/controllers.js"); · 7 unmodified lines
674 enableDispatcherModule("LeftTabletStylusInput", leftTabletStylusInput);682 enableDispatcherModule("LeftTabletStylusInput", leftTabletStylusInput);
675 enableDispatcherModule("RightTabletStylusInput", rightTabletStylusInput);683 enableDispatcherModule("RightTabletStylusInput", rightTabletStylusInput);
676 684
677
678 this.cleanup = function () {685 this.cleanup = function () {
679 disableDispatcherModule("LeftTabletStylusInput");
680 disableDispatcherModule("RightTabletStylusInput");
681 leftTabletStylusInput.cleanup();686 leftTabletStylusInput.cleanup();
682 rightTabletStylusInput.cleanup();687 rightTabletStylusInput.cleanup();
688 disableDispatcherModule("LeftTabletStylusInput");
689 disableDispatcherModule("RightTabletStylusInput");
683 };690 };
684 Script.scriptEnding.connect(this.cleanup);691 Script.scriptEnding.connect(this.cleanup);
685}());692}());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t