@archvisioninc/canvas 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1174,14 +1174,16 @@ export const updateLighting = inboundData => {
|
|
|
1174
1174
|
dirY,
|
|
1175
1175
|
dirZ
|
|
1176
1176
|
} = transforms;
|
|
1177
|
-
|
|
1178
|
-
|
|
1177
|
+
const isPosition = tx !== undefined && ty !== undefined && tz !== undefined;
|
|
1178
|
+
const isDirection = dirX !== undefined && dirY !== undefined && dirZ !== undefined;
|
|
1179
|
+
if (isPosition) light.position = newVector(tx, ty, tz);
|
|
1180
|
+
if (isDirection) light.direction = newVector(dirX, dirY, dirZ);
|
|
1179
1181
|
}
|
|
1180
1182
|
if (target) {
|
|
1181
1183
|
light.setDirectionToTarget(target);
|
|
1182
1184
|
}
|
|
1183
1185
|
if (enable !== undefined) {
|
|
1184
|
-
light.
|
|
1186
|
+
light.setEnabled(enable);
|
|
1185
1187
|
}
|
|
1186
1188
|
if (radius !== undefined) {
|
|
1187
1189
|
light.radius = radius;
|
package/package.json
CHANGED
|
@@ -1175,8 +1175,10 @@ export const updateLighting = inboundData => {
|
|
|
1175
1175
|
|
|
1176
1176
|
if (!_.isEmpty(transforms)) {
|
|
1177
1177
|
const { tx, ty, tz, dirX, dirY, dirZ } = transforms;
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
const isPosition = tx !== undefined && ty !== undefined && tz !== undefined;
|
|
1179
|
+
const isDirection = dirX !== undefined && dirY !== undefined && dirZ !== undefined;
|
|
1180
|
+
if (isPosition) light.position = newVector(tx, ty, tz);
|
|
1181
|
+
if (isDirection) light.direction = newVector(dirX, dirY, dirZ);
|
|
1180
1182
|
}
|
|
1181
1183
|
|
|
1182
1184
|
if (target) {
|
|
@@ -1184,7 +1186,7 @@ export const updateLighting = inboundData => {
|
|
|
1184
1186
|
}
|
|
1185
1187
|
|
|
1186
1188
|
if (enable !== undefined) {
|
|
1187
|
-
light.
|
|
1189
|
+
light.setEnabled(enable);
|
|
1188
1190
|
}
|
|
1189
1191
|
|
|
1190
1192
|
if (radius !== undefined) {
|