three-render-objects 1.26.4 → 1.26.5
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.
- package/dist/three-render-objects.common.js +13 -6
- package/dist/three-render-objects.d.ts +1 -2
- package/dist/three-render-objects.js +312 -199
- package/dist/three-render-objects.js.map +1 -1
- package/dist/three-render-objects.min.js +2 -2
- package/dist/three-render-objects.module.js +9 -2
- package/package.json +13 -13
|
@@ -160,7 +160,7 @@ var three = window.THREE ? window.THREE // Prefer consumption from global THREE,
|
|
|
160
160
|
Spherical: three$1.Spherical,
|
|
161
161
|
Clock: three$1.Clock
|
|
162
162
|
};
|
|
163
|
-
var threeRenderObjects = Kapsule__default[
|
|
163
|
+
var threeRenderObjects = Kapsule__default["default"]({
|
|
164
164
|
props: {
|
|
165
165
|
width: {
|
|
166
166
|
"default": window.innerWidth,
|
|
@@ -266,12 +266,12 @@ var threeRenderObjects = Kapsule__default['default']({
|
|
|
266
266
|
|
|
267
267
|
if (topObject !== state.hoverObj) {
|
|
268
268
|
state.onHover(topObject, state.hoverObj);
|
|
269
|
-
state.toolTipElem.innerHTML = topObject ? accessorFn__default[
|
|
269
|
+
state.toolTipElem.innerHTML = topObject ? accessorFn__default["default"](state.tooltipContent)(topObject) || '' : '';
|
|
270
270
|
state.hoverObj = topObject;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
TWEEN__default[
|
|
274
|
+
TWEEN__default["default"].update(); // update camera animation tweens
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
return this;
|
|
@@ -303,9 +303,9 @@ var threeRenderObjects = Kapsule__default['default']({
|
|
|
303
303
|
} else {
|
|
304
304
|
var camPos = Object.assign({}, camera.position);
|
|
305
305
|
var camLookAt = getLookAt();
|
|
306
|
-
new TWEEN__default[
|
|
306
|
+
new TWEEN__default["default"].Tween(camPos).to(finalPos, transitionDuration).easing(TWEEN__default["default"].Easing.Quadratic.Out).onUpdate(setCameraPos).start(); // Face direction in 1/3rd of time
|
|
307
307
|
|
|
308
|
-
new TWEEN__default[
|
|
308
|
+
new TWEEN__default["default"].Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(TWEEN__default["default"].Easing.Quadratic.Out).onUpdate(setLookAt).start();
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
return this;
|
|
@@ -326,7 +326,14 @@ var threeRenderObjects = Kapsule__default['default']({
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
function setLookAt(lookAt) {
|
|
329
|
-
|
|
329
|
+
var lookAtVect = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);
|
|
330
|
+
|
|
331
|
+
if (state.controls.target) {
|
|
332
|
+
state.controls.target = lookAtVect;
|
|
333
|
+
} else {
|
|
334
|
+
// Fly controls doesn't have target attribute
|
|
335
|
+
camera.lookAt(lookAtVect); // note: lookAt may be overridden by other controls in some cases
|
|
336
|
+
}
|
|
330
337
|
}
|
|
331
338
|
|
|
332
339
|
function getLookAt() {
|
|
@@ -81,5 +81,4 @@ type ThreeRenderObjectsInstance = ThreeRenderObjectsGenericInstance<ThreeRenderO
|
|
|
81
81
|
|
|
82
82
|
declare function ThreeRenderObjects(configOptions?: ConfigOptions): ThreeRenderObjectsInstance;
|
|
83
83
|
|
|
84
|
-
export default
|
|
85
|
-
export { ConfigOptions, ThreeRenderObjectsGenericInstance, ThreeRenderObjectsInstance };
|
|
84
|
+
export { ConfigOptions, ThreeRenderObjectsGenericInstance, ThreeRenderObjectsInstance, ThreeRenderObjects as default };
|