Skip to content

Commit 5953774

Browse files
committed
Make create gizmos ungrabbable
1 parent cb3f0f3 commit 5953774

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

scripts/system/create/editModes/editVoxels.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ EditVoxels = function() {
511511
alpha: 0.5,
512512
dimensions: sphereDimensions,
513513
collisionless: true,
514-
},"world");
514+
ignorePickIntersection: true,
515+
grab: { grabbable: false },
516+
}, "domain");
515517
}
516518

517519
function stopSphereResizing() {

scripts/system/create/entitySelectionTool/entitySelectionTool.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,7 @@ SelectionDisplay = (function() {
981981
primitiveMode: "solid",
982982
visible: false,
983983
ignorePickIntersection: true,
984+
grab: { grabbable: false },
984985
renderLayer: "front",
985986
unlit: true
986987
};
@@ -991,6 +992,7 @@ SelectionDisplay = (function() {
991992
primitiveMode: "solid",
992993
visible: false,
993994
ignorePickIntersection: true,
995+
grab: { grabbable: false },
994996
renderLayer: "front",
995997
unlit: true
996998
};
@@ -1024,6 +1026,7 @@ SelectionDisplay = (function() {
10241026
primitiveMode: "solid",
10251027
visible: false,
10261028
ignorePickIntersection: true,
1029+
grab: { grabbable: false },
10271030
renderLayer: "front"
10281031
};
10291032

@@ -1082,6 +1085,7 @@ SelectionDisplay = (function() {
10821085
primitiveMode: "solid",
10831086
visible: false,
10841087
ignorePickIntersection: true,
1088+
grab: { grabbable: false },
10851089
renderLayer: "front"
10861090
}, "local");
10871091
toolEntityMaterial.push(addUnlitMaterialOnToolEntity(handleRotateCurrentRing));
@@ -1097,6 +1101,7 @@ SelectionDisplay = (function() {
10971101
billboardMode: "full",
10981102
renderLayer: "front",
10991103
ignorePickIntersection: true,
1104+
grab: { grabbable: false },
11001105
dimensions: { x: 0, y: 0, z: 0.01 },
11011106
lineHeight: 0.0,
11021107
topMargin: 0,
@@ -1112,6 +1117,7 @@ SelectionDisplay = (function() {
11121117
primitiveMode: "solid",
11131118
visible: false,
11141119
ignorePickIntersection: true,
1120+
grab: { grabbable: false },
11151121
renderLayer: "front",
11161122
unlit: true
11171123
};
@@ -1130,6 +1136,7 @@ SelectionDisplay = (function() {
11301136
alpha: 0.5,
11311137
visible: false,
11321138
ignorePickIntersection: true,
1139+
grab: { grabbable: false },
11331140
renderLayer: "front",
11341141
unlit: true
11351142
};
@@ -1148,6 +1155,7 @@ SelectionDisplay = (function() {
11481155
color: COLOR_SCALE_CUBE,
11491156
visible: false,
11501157
ignorePickIntersection: true,
1158+
grab: { grabbable: false },
11511159
renderLayer: "front",
11521160
unlit: true
11531161
}, "local");
@@ -1160,6 +1168,7 @@ SelectionDisplay = (function() {
11601168
color: COLOR_BOUNDING_EDGE,
11611169
visible: false,
11621170
ignorePickIntersection: true,
1171+
grab: { grabbable: false },
11631172
renderLayer: "front",
11641173
unlit: true
11651174
}, "local");
@@ -1173,6 +1182,7 @@ SelectionDisplay = (function() {
11731182
color: COLOR_DUPLICATOR,
11741183
visible: false,
11751184
ignorePickIntersection: true,
1185+
grab: { grabbable: false },
11761186
renderLayer: "front",
11771187
unlit: true
11781188
}, "local");
@@ -1188,6 +1198,7 @@ SelectionDisplay = (function() {
11881198
alpha: 0,
11891199
visible: false,
11901200
ignorePickIntersection: true,
1201+
grab: { grabbable: false },
11911202
unlit: true
11921203
}, "local");
11931204

@@ -1202,6 +1213,7 @@ SelectionDisplay = (function() {
12021213
alpha: 0,
12031214
visible: false,
12041215
ignorePickIntersection: true,
1216+
grab: { grabbable: false },
12051217
unlit: true
12061218
}, "local");
12071219

@@ -1214,7 +1226,8 @@ SelectionDisplay = (function() {
12141226
green: 0,
12151227
blue: 0
12161228
},
1217-
ignorePickIntersection: true // always ignore this
1229+
ignorePickIntersection: true, // always ignore this
1230+
grab: { grabbable: false },
12181231
}, "local");
12191232
var yRailToolEntity = Entities.addEntity({
12201233
type: "PolyLine",
@@ -1225,7 +1238,8 @@ SelectionDisplay = (function() {
12251238
green: 255,
12261239
blue: 0
12271240
},
1228-
ignorePickIntersection: true // always ignore this
1241+
ignorePickIntersection: true, // always ignore this
1242+
grab: { grabbable: false },
12291243
}, "local");
12301244
var zRailToolEntity = Entities.addEntity({
12311245
type: "PolyLine",
@@ -1236,7 +1250,8 @@ SelectionDisplay = (function() {
12361250
green: 0,
12371251
blue: 255
12381252
},
1239-
ignorePickIntersection: true // always ignore this
1253+
ignorePickIntersection: true, // always ignore this
1254+
grab: { grabbable: false },
12401255
}, "local");
12411256

12421257
var allToolEntities = [
@@ -1314,6 +1329,7 @@ SelectionDisplay = (function() {
13141329
primitiveMode: "solid",
13151330
visible: false,
13161331
ignorePickIntersection: true,
1332+
grab: { grabbable: false },
13171333
renderLayer: "front"
13181334
}, "local");
13191335
var debugPickPlaneHits = [];
@@ -2446,6 +2462,7 @@ SelectionDisplay = (function() {
24462462
primitiveMode: "solid",
24472463
visible: true,
24482464
ignorePickIntersection: true,
2465+
grab: { grabbable: false },
24492466
renderLayer: "front",
24502467
color: COLOR_DEBUG_PICK_PLANE_HIT,
24512468
position: pickHitPosition,

scripts/system/create/modules/entityShapeVisualizer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ EntityShape.prototype = {
144144
priority: 1,
145145
materialMappingMode: PROJECTED_MATERIALS ? "projected" : "uv",
146146
materialURL: Script.resolvePath("../../assets/images/materials/GridPattern.json"),
147-
ignorePickIntersection: true
147+
ignorePickIntersection: true,
148+
grab: { grabbable: false },
148149
}, "local");
149150
},
150151
update: function() {

0 commit comments

Comments
 (0)