This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data type configuration constants with float support | |
const DATA_TYPES = { | |
int8: { size: 1, min: -128, max: 127, method: 'getInt8', isFloat: false }, | |
uint8: { size: 1, min: 0, max: 255, method: 'getUint8', isFloat: false }, | |
int16: { size: 2, min: -32768, max: 32767, method: 'getInt16', isFloat: false }, | |
uint16: { size: 2, min: 0, max: 65535, method: 'getUint16', isFloat: false }, | |
int32: { size: 4, min: -2147483648, max: 2147483647, method: 'getInt32', isFloat: false }, | |
uint32: { size: 4, min: 0, max: 4294967295, method: 'getUint32', isFloat: false }, | |
fp8_e4m3: { size: 1, method: 'getFloat8E4M3', isFloat: true }, | |
fp8_e5m2: { size: 1, method: 'getFloat8E5M2', isFloat: true }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tiledProjection(points, quantizationBits) { | |
const q = quantizationBits; | |
const qRange = Math.pow(2, q); | |
const sqrtQRange = Math.floor(Math.sqrt(qRange)); | |
const maxTiledCoord = Math.max(sqrtQRange * qRange + qRange - 1, 1); | |
// Create new projected points array | |
const projectedPoints = new Float32Array(points.length); | |
for (let i = 0; i < points.length; i += 3) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Quantized Mirror Cloud - PLY Exporter</title> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data type configuration constants | |
const DATA_TYPES = { | |
int8: { size: 1, min: -128, max: 127, method: 'getInt8' }, | |
uint8: { size: 1, min: 0, max: 255, method: 'getUint8' }, | |
int16: { size: 2, min: -32768, max: 32767, method: 'getInt16' }, | |
uint16: { size: 2, min: 0, max: 65535, method: 'getUint16' }, | |
int32: { size: 4, min: -2147483648, max: 2147483647, method: 'getInt32' }, | |
uint32: { size: 4, min: 0, max: 4294967295, method: 'getUint32' } | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>DataPrism - what's in your file?</title> | |
<style> | |
body { | |
margin: 0; | |
overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>B2Ply - Bytes To Points</title> | |
<style> | |
body { | |
margin: 0; | |
} | |
canvas { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>B2P - Bytes To Points</title> | |
<style> | |
body { | |
margin: 0; | |
} | |
canvas { | |
width: 100%; | |
height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rect { | |
constructor(left, top, right, bottom) { | |
this.left = left; | |
this.top = top; | |
this.right = right; | |
this.bottom = bottom; | |
} | |
width() { return this.right - this.left; } | |
height() { return this.bottom - this.top; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io, struct, argparse | |
class Chunk: | |
def __init__(self, id): | |
self.id = id | |
self.children = [] | |
def process_chunk( input, parent_chunk, remaining_data, depth = 0 ): | |
if None != parent_chunk.id and not parent_chunk.id in [ 'MULT', 'WRAP', 'TALK', 'TLKB', 'LECF', 'LFLF', 'SONG', 'NEST', 'SOUN', 'DIGI', 'AKOS', 'AWIZ' ]: | |
input.seek( input.tell() + remaining_data ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data type ranges and normalization functions | |
const DATA_RANGES = { | |
'int8': [-128, 127], | |
'uint8': [0, 255], | |
'int16': [-32768, 32767], | |
'uint16': [0, 65535], | |
'int32': [-2147483648, 2147483647], | |
'uint32': [0, 4294967295], | |
}; |
NewerOlder