diff --git a/docs/source/conf.py b/docs/source/conf.py index 388eefe..869c3d3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'LinkunGao' # The full version, including alpha/beta/rc tags -release = 'v1.14.5' +release = 'v1.14.6' # -- General configuration --------------------------------------------------- diff --git a/docs/source/release/release.md b/docs/source/release/release.md index 07f7288..cdcb46f 100644 --- a/docs/source/release/release.md +++ b/docs/source/release/release.md @@ -1619,3 +1619,7 @@ sceneIn?.loadNrrd(url, loadBar1, false, funa, opts); ## Release v1.14.5 - Fixed GUI overload issue in copperNrrdLoader. + +## Release v1.14.6 + +- move pickSpecifiedModel function into commonSceneMethod class. diff --git a/package-lock.json b/package-lock.json index 86098c6..40e3025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "copper3d_visualisation", - "version": "1.14.5", + "version": "1.14.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "copper3d_visualisation", - "version": "1.14.5", + "version": "1.14.6", "license": "Apache-2.0", "dependencies": { "@types/dat.gui": "^0.7.9", diff --git a/package.json b/package.json index 9a0d605..acfec0d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "copper3d_visualisation", "description": "A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.", - "version": "1.14.5", + "version": "1.14.6", "main": "dist/bundle.umd.js", "moudle": "dist/bundle.esm.js", "types": "dist/types/index.d.ts", diff --git a/src/Scene/commonSceneMethod.ts b/src/Scene/commonSceneMethod.ts index e760818..302e0cc 100644 --- a/src/Scene/commonSceneMethod.ts +++ b/src/Scene/commonSceneMethod.ts @@ -6,6 +6,7 @@ import { copperVolumeType, loadingBarType, dicomLoaderOptsType, + mouseMovePositionType } from "../types/types"; import * as THREE from "three"; import { GUI } from "dat.gui"; @@ -15,6 +16,7 @@ import { copperNrrdLoader, optsType } from "../Loader/copperNrrdLoader"; import { pickModelDefault } from "../Utils/raycaster"; import { Controls } from "../Controls/copperControls"; import { objLoader } from "../Loader/copperOBJLoader"; +import { isPickedModel} from "../Utils/raycaster"; export default class commonScene { container: HTMLDivElement; @@ -119,6 +121,23 @@ export default class commonScene { ); } + pickSpecifiedModel( + content: THREE.Mesh | Array, + mousePosition: mouseMovePositionType + ) { + if (Array.isArray(content)) { + this.pickableObjects = content; + } else { + this.pickableObjects.push(content); + } + return isPickedModel( + this.camera as THREE.PerspectiveCamera, + this.container, + this.pickableObjects, + mousePosition + ); + } + /** * create a new sub view to display models */ diff --git a/src/Scene/copperMScene.ts b/src/Scene/copperMScene.ts index 402fcb3..749f194 100644 --- a/src/Scene/copperMScene.ts +++ b/src/Scene/copperMScene.ts @@ -189,22 +189,22 @@ export default class copperMScene extends commonScene { ); } - pickSpecifiedModel( - content: THREE.Mesh | Array, - mousePosition: mouseMovePositionType - ) { - if (Array.isArray(content)) { - this.pickableObjects = content; - } else { - this.pickableObjects.push(content); - } - return isPickedModel( - this.camera as THREE.PerspectiveCamera, - this.container, - this.pickableObjects, - mousePosition - ); - } + // pickSpecifiedModel( + // content: THREE.Mesh | Array, + // mousePosition: mouseMovePositionType + // ) { + // if (Array.isArray(content)) { + // this.pickableObjects = content; + // } else { + // this.pickableObjects.push(content); + // } + // return isPickedModel( + // this.camera as THREE.PerspectiveCamera, + // this.container, + // this.pickableObjects, + // mousePosition + // ); + // } setViewPoint( camera: THREE.PerspectiveCamera, diff --git a/src/index.ts b/src/index.ts index 668f33f..742b015 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,10 +36,10 @@ import { import "./css/style.css"; -export const REVISION = "v1.14.5"; +export const REVISION = "v1.14.6"; console.log( - "%cCopper3D Visualisation %cBeta:v1.14.5", + "%cCopper3D Visualisation %cBeta:v1.14.6", "padding: 3px;color:white; background:#023047", "padding: 3px;color:white; background:#f50a25" );