UNPKG

image-in-browser

Version:

Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)

83 lines 1.73 kB
import { ArrayUtils } from '../common/array-utils.js'; export class OctreeNode { get r() { return this._r; } set r(v) { this._r = v; } get g() { return this._g; } set g(v) { this._g = v; } get b() { return this._b; } set b(v) { this._b = v; } get count() { return this._count; } set count(v) { this._count = v; } get heapIndex() { return this._heapIndex; } set heapIndex(v) { this._heapIndex = v; } get paletteIndex() { return this._paletteIndex; } set paletteIndex(v) { this._paletteIndex = v; } get parent() { return this._parent; } get children() { return this._children; } get childCount() { return this._childCount; } set childCount(v) { this._childCount = v; } get childIndex() { return this._childIndex; } get flags() { return this._flags; } set flags(v) { this._flags = v; } get depth() { return this._depth; } constructor(childIndex, depth, parent) { this._r = 0; this._g = 0; this._b = 0; this._count = 0; this._heapIndex = 0; this._paletteIndex = 0; this._children = ArrayUtils.fill(8, undefined); this._childCount = 0; this._childIndex = 0; this._flags = 0; this._depth = 0; this._childIndex = childIndex; this._depth = depth; this._parent = parent; if (parent !== undefined) { parent._childCount++; } } } //# sourceMappingURL=octree-node.js.map