# A 3d thing

**URL:** <https://forum.makecode.com/t/a-3d-thing/41142>\
**Category:** Show & Tell\
**Tags:** game, graphics-and-math\
**Created:** [December 20, 2025, 1:36am UTC](https://forum.makecode.com/t/a-3d-thing/41142 "2025-12-20T01:36:09Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 8, 2026, 11:43pm UTC](https://forum.makecode.com/t/a-3d-thing/41142/41 "2026-04-08T23:43:53Z")

</div>

@not_a_lemon see my answer here:

> [@star SAMMY: Text-To-Speech / Speech Synthesizer Extension!](https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499/39):
>
> if the data you’re including in your extension is lots of number arrays, then you should absolutely use buffers instead. they are way more efficient than arrays in terms of both memory usage and code size. however, if your data is a bunch of strings or images then you probably won’t gain anything by converting them to hex buffers. here’s a little bit of code to get you started if you do have some number arrays you want to convert. this code will convert a number array into the string representa…

or if you just want to convert one number:

```ts
const hexChars = "0123456789ABCDEF";

function toHex(int: number) {
    return toHexByte(int >> 24) + toHexByte((int >> 16) & 0xffff) + toHexByte((int >> 8) & 0xffff) + toHexByte(int & 0xffff)
}

function toHexByte(byte: number) {
    return hexChars.charAt(byte >> 4) + hexChars.charAt(byte & 0xf);
}

```

---

_[View the full topic](https://forum.makecode.com/t/a-3d-thing/41142)._
