本文整理汇总了TypeScript中THREE.Vector3.equals方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Vector3.equals方法的具体用法?TypeScript Vector3.equals怎么用?TypeScript Vector3.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类THREE.Vector3
的用法示例。
在下文中一共展示了Vector3.equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: prepare
prepare (callback: () => void) {
if (this.volume) {
let isolevel
if (this.isolevelType === 'sigma') {
isolevel = this.volume.getValueForSigma(this.isolevel)
} else {
isolevel = this.isolevel
}
if (this.negateIsolevel) isolevel *= -1
if (!this.surface ||
this.__isolevel !== isolevel ||
this.__smooth !== this.smooth ||
this.__contour !== this.contour ||
this.__wrap !== this.wrap ||
this.__boxSize !== this.boxSize ||
(this.boxSize > 0 &&
!this.__boxCenter.equals(this.boxCenter))
) {
this.__isolevel = isolevel
this.__smooth = this.smooth
this.__contour = this.contour
this.__wrap = this.wrap
this.__boxSize = this.boxSize
this.__boxCenter.copy(this.boxCenter)
this.__box.copy(this.box)
const onSurfaceFinish = (surface: Surface) => {
this.surface = surface
callback()
}
if (this.useWorker) {
this.volume.getSurfaceWorker(
isolevel, this.smooth, this.boxCenter, this.boxSize,
this.contour, this.wrap, onSurfaceFinish
)
} else {
onSurfaceFinish(
this.volume.getSurface(
isolevel, this.smooth, this.boxCenter, this.boxSize,
this.contour, this.wrap
)
)
}
} else {
callback()
}
} else {
callback()
}
}
示例2: setBox
this.setBox = function setBox () {
this._position.copy(viewer.translationGroup.position).negate()
if (!this._position.equals(this.boxCenter)) {
this.setParameters({ 'boxCenter': this._position })
}
}