@soonspacejs/plugin-transform-controls 2.5.0-rc.6 → 2.5.0
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/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{constructor(t){this.ssp=t,this.control=null,this.options=null}start(t,s={}){const{mode:o="translate",onUpdate:n,onDragStart:l,onDragEnd:e}=s;return this.options=s,this.control=new this.ssp.THREE_PLUGINS.TransformControls(this.ssp.viewport.camera,this.ssp.viewport.rendererManager.interactiveContainer),this.control.attach(t),this.control.setMode(o),this.control.addEventListener("dragging-changed",(s=>{this.ssp.viewport.controls.enabled=!s.value,s.value?null==l||l(t):null==e||e(t)})),this.control.addEventListener("objectChange",(()=>{null==n||n(t),this.ssp.signals.objectChanged.dispatch(t)})),this.ssp.addObject(this.control),this.control}close(){var t,s;this.control&&(this.ssp.removeObject(this.control),this.control.detach(),this.control=null,null===(s=null===(t=this.options)||void 0===t?void 0:t.onClose)||void 0===s||s.call(t))}changeMode(t){var s,o;t&&(null===(o=null===(s=this.control)||void 0===s?void 0:s.setMode)||void 0===o||o.call(s,t),this.ssp.signals.objectChanged.dispatch())}}export{t as default};
|
|
1
|
+
class t{constructor(t){this.ssp=t,this.control=null,this.options=null}start(t,s={}){const{mode:o="translate",onUpdate:n,onDragStart:l,onDragEnd:e}=s;return this.options=s,this.control=new this.ssp.THREE_PLUGINS.TransformControls(this.ssp.viewport.camera,this.ssp.viewport.rendererManager.interactiveContainer),this.control.attach(t),this.control.setMode(o),this.control.addEventListener("dragging-changed",(s=>{this.ssp.viewport.controls.currentControls.enabled=!s.value,s.value?null==l||l(t):null==e||e(t)})),this.control.addEventListener("objectChange",(()=>{null==n||n(t),this.ssp.signals.objectChanged.dispatch(t)})),this.ssp.addObject(this.control),this.control}close(){var t,s;this.control&&(this.ssp.removeObject(this.control),this.control.detach(),this.control=null,null===(s=null===(t=this.options)||void 0===t?void 0:t.onClose)||void 0===s||s.call(t))}changeMode(t){var s,o;t&&(null===(o=null===(s=this.control)||void 0===s?void 0:s.setMode)||void 0===o||o.call(s,t),this.ssp.signals.objectChanged.dispatch())}}export{t as default};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).TransformControlsPlugin=o()}(this,(function(){"use strict";return class{constructor(t){this.ssp=t,this.control=null,this.options=null}start(t,o={}){const{mode:s="translate",onUpdate:n,onDragStart:e,onDragEnd:i}=o;return this.options=o,this.control=new this.ssp.THREE_PLUGINS.TransformControls(this.ssp.viewport.camera,this.ssp.viewport.rendererManager.interactiveContainer),this.control.attach(t),this.control.setMode(s),this.control.addEventListener("dragging-changed",(o=>{this.ssp.viewport.controls.enabled=!o.value,o.value?null==e||e(t):null==i||i(t)})),this.control.addEventListener("objectChange",(()=>{null==n||n(t),this.ssp.signals.objectChanged.dispatch(t)})),this.ssp.addObject(this.control),this.control}close(){var t,o;this.control&&(this.ssp.removeObject(this.control),this.control.detach(),this.control=null,null===(o=null===(t=this.options)||void 0===t?void 0:t.onClose)||void 0===o||o.call(t))}changeMode(t){var o,s;t&&(null===(s=null===(o=this.control)||void 0===o?void 0:o.setMode)||void 0===s||s.call(o,t),this.ssp.signals.objectChanged.dispatch())}}}));
|
|
1
|
+
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).TransformControlsPlugin=o()}(this,(function(){"use strict";return class{constructor(t){this.ssp=t,this.control=null,this.options=null}start(t,o={}){const{mode:s="translate",onUpdate:n,onDragStart:e,onDragEnd:i}=o;return this.options=o,this.control=new this.ssp.THREE_PLUGINS.TransformControls(this.ssp.viewport.camera,this.ssp.viewport.rendererManager.interactiveContainer),this.control.attach(t),this.control.setMode(s),this.control.addEventListener("dragging-changed",(o=>{this.ssp.viewport.controls.currentControls.enabled=!o.value,o.value?null==e||e(t):null==i||i(t)})),this.control.addEventListener("objectChange",(()=>{null==n||n(t),this.ssp.signals.objectChanged.dispatch(t)})),this.ssp.addObject(this.control),this.control}close(){var t,o;this.control&&(this.ssp.removeObject(this.control),this.control.detach(),this.control=null,null===(o=null===(t=this.options)||void 0===t?void 0:t.onClose)||void 0===o||o.call(t))}changeMode(t){var o,s;t&&(null===(s=null===(o=this.control)||void 0===o?void 0:o.setMode)||void 0===s||s.call(o,t),this.ssp.signals.objectChanged.dispatch())}}}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soonspacejs/plugin-transform-controls",
|
|
3
3
|
"pluginName": "TransformControlsPlugin",
|
|
4
|
-
"version": "2.5.0
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"description": "Transform-controls plugin for SoonSpace.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "xuek",
|
|
15
15
|
"license": "UNLICENSED",
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "61b7ed6ce3e0d761a30fb65d64a4eeb22acbfef9"
|
|
17
17
|
}
|