Skip to content

Commit

Permalink
Merge pull request #215 from LinkunGao/release/v1.14.6
Browse files Browse the repository at this point in the history
Release/v1.14.6
  • Loading branch information
LinkunGao authored Apr 19, 2023
2 parents dc551a1 + ce903d0 commit a2c9adc
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'LinkunGao'

# The full version, including alpha/beta/rc tags
release = 'v1.14.5'
release = 'v1.14.6'


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/source/release/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
19 changes: 19 additions & 0 deletions src/Scene/commonSceneMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
copperVolumeType,
loadingBarType,
dicomLoaderOptsType,
mouseMovePositionType
} from "../types/types";
import * as THREE from "three";
import { GUI } from "dat.gui";
Expand All @@ -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;
Expand Down Expand Up @@ -119,6 +121,23 @@ export default class commonScene {
);
}

pickSpecifiedModel(
content: THREE.Mesh | Array<THREE.Mesh>,
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
*/
Expand Down
32 changes: 16 additions & 16 deletions src/Scene/copperMScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,22 @@ export default class copperMScene extends commonScene {
);
}

pickSpecifiedModel(
content: THREE.Mesh | Array<THREE.Mesh>,
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<THREE.Mesh>,
// 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,
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
Expand Down

0 comments on commit a2c9adc

Please sign in to comment.