X3D classic highlight and snippets for VSCode

A Visual Studio Code (vscode) extension for X3D classic format that I’ve maintained and use it privately for quite awhile. This extension, combined with a few others (omnipascal for linting, and Native Debug for debugging Free Pascal code) make it a great development environment for those who use vscode most of the time like me :slight_smile:

Snippets hasn’t completed yet, as I only add those that I often use. Maybe I could make a parser in the future to generate snippets directly from CGE’s nodes-specification directory.

Extension (offline installer for now, I will upload it to marketplace once the snippets is completed): Download link
Github: https://github.com/Kagamma/cge-x3d-vscode



1 Like

This looks very nice!

I will repost it to the x3d-public mailing list http://web3d.org/pipermail/x3d-public_web3d.org/ , as this is actually not Castle Game Engine-specific, and may be great for more people.

The classic syntax of X3D is part of X3D standard, we just implement it faithfully in CGE :slight_smile:

Note that, while you can use https://github.com/castle-engine/castle-engine/tree/master/tools/internal/x3d-nodes-to-pascal/nodes-specification for specification (and we have a parser for these text files in the neighbor directory), the Web3D consortium also maintains the nodes/fields list in various machine-friendly formats. Links:

CGE resources are of course probably best if you’re interested in this in context of CGE – as our files contain all CGE extensions, and all X3Dv4 features that we have. So CGE stuff corresponds 100% to what CGE tools can read.

Extension is now live on marketplace so everyone can install it via vscode Extensions :slight_smile: .

I also finish the parser for node-specification (ugly piece of Javascript code just to get the job done). That mean extension is now contained snippets for every X3D stuff supports by CGE. Source code for the parser is on the same repository with the extension.

1 Like