Forum Discussion

Shards632's avatar
Shards632
MHCP Mentor
11 months ago

Using HorizonHub.info to move from Codeblocks to Typescript

Hi Creators!

For those moving from CodeBlocks and VR Creation into the new world of TypeScript Desktop Creation, a common question is "How do I easily lift and shift all my existing CodeBlock algorithms and mechanics over to this new system?" 

Fortunately, the creator wafflecopters generously built a whole CodeBlock drafting system on the web. And it can import code from your existing horizon worlds! And, it can automatically convert it to TypeScript! Check it out at https://horizonhub.info 

Note: this is not a Meta sponsored or maintained website. You will need to create a new Horizon Hub specific account at the site, as it does not use your Meta account. It is a 3rd party creation entirely by wafflecopters.

The conversion isn't perfect, but, due to the hours of effort wafflecopters put into the tooling, it does produce runnable typescript that mimics the CodeBlock behavior in almost all common use cases.

It's a great place to start learning how the CodeBlocks you love manifest as TypeScript code. And it's a great way to get all those constants and equations you've refined in your CodeBlock code over to the new TypeScript way of doing things, without having to hand copy them out via your headset!To import from Horizon Worlds, you'll need to access your Meta Horizon creator portal page at https://horizon.meta.com/creator/worlds_all/. Make sure that works for you first.

From the horizon hub editor window, choose File -> World -> Import from Horizon. That will bring you to an instructions page with detailed technical details on how to proceed.

https://www.horizonhub.info/editor?importGraphQLDataBlob=fromClipboard 

Once you complete import, you should see your scripts in the horizon hub web editor! Click on Settings -> Non-Horizon Features -> Show TypeScript Equivalent to see the TypeScript on the far right side of the page! You can just copy and paste that into your TypeScript editor of choice (e.g. VSCode).

The Horizon Hub also has a number of other useful guides in the Navigate menu.

Head over to the Horizon Hub now!
https://horizonhub.info

2 Replies

  • Thank you for this information! This tool has helped me so much on my TS learning journey!! This is great additional information! 

  • It is a great tool to see what something from Codeblock might look like in Typescript if you're just getting started. Eventually, you will notice that the path you took in your codeblock scripts don't always make sense when considered within the scope of Typescript. Keep that in mind as you move forward, often there is a better way to write it when your options are not so restricted by codeblocks anymore.