本文整理匯總了TypeScript中neuroglancer/util/geom.vec3.add方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript vec3.add方法的具體用法?TypeScript vec3.add怎麽用?TypeScript vec3.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類neuroglancer/util/geom.vec3
的用法示例。
在下文中一共展示了vec3.add方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: stableStringify
return this.scales.map(scaleInfo => {
return Array
.from(VolumeChunkSpecification.getDefaults({
voxelSize: scaleInfo.resolution,
dataType: this.dataType,
numChannels: this.numChannels,
lowerVoxelBound: scaleInfo.voxelOffset,
upperVoxelBound: vec3.add(vec3.create(), scaleInfo.voxelOffset, scaleInfo.size),
volumeType: this.volumeType,
chunkDataSizes: scaleInfo.chunkSizes,
compressedSegmentationBlockSize: scaleInfo.compressedSegmentationBlockSize
}))
.map(spec => {
let path = `${this.path}/${scaleInfo.key}`;
let cacheKey = stableStringify({
'spec': spec,
'baseUrls': this.baseUrls,
'path': path,
'encoding': scaleInfo.encoding
});
return chunkManager.getChunkSource(
VolumeChunkSource, cacheKey,
() => new VolumeChunkSource(
chunkManager, spec, this.baseUrls, path, scaleInfo.encoding));
});
});
示例2: getStaticAnnotations
getStaticAnnotations() {
const baseScale = this.scales[0];
const annotationSet =
new AnnotationSource(mat4.fromScaling(mat4.create(), baseScale.resolution));
annotationSet.readonly = true;
annotationSet.add(makeDataBoundsBoundingBox(
baseScale.voxelOffset, vec3.add(vec3.create(), baseScale.voxelOffset, baseScale.size)));
return annotationSet;
}