Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>TroisJS SnippetsNew to Visual Studio Code? Get it now.
TroisJS Snippets

TroisJS Snippets

oneWaveStudios

|
162 installs
| (0) | Free
Snippets for common TroisJS functions and attributes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TroisJS-Snippets

These snippets were built to improve your workflow when setting up a new or working on an existing TroisJS project.

Included are the pieces I got tired of typing over and over again, plus a boilerplate that is helpful to start implementing your next idea right away.

They are based on common use and official documentation. I am not affiliated with the makers of TroisJS, this is an independent project, an attempt to give back to the community. 🌊  Adrian

overview

Snippets

Boilerplate

Command Description
troisjs Boilerplate to get you started
skytjs Creates skydome, ready for your 360º texture

Attributes

.color Color attribute
:pos position
:prop empty props array
:rot rotation
:scale scale

Meshes

boxtjs Box Mesh
gltfjs GLTF Model
group Mesh Group
planetjs Plane Mesh
ringtjs Ring Mesh

Lights

ambl AmbientLight
dirl DirectionalLight
heml HemisphereLight
pointl PointLIght
rectl RectAreaLight
spotl SpotLight

Lights Common Props

.castShadow castShadow prop
.intensity intensity prop
.shadowMapSize shadowMapSize prop

Materials

matbasic Basic Material
matlamb Mesh Lambert Material
matphong Phong Material
matshader Shader Material
matstandard Standard Material

Material Props

.depthtest depthTest prop
.depthwrite depthWrite prop
.flatshading flatShading prop
.fog fog prop
.opacity opacity prop
.side side prop
.transparent transparent prop
.vertexcolors vertexColors prop

Textures

tex Empty texture element

Release Notes

See Changelog

License

Creative Commons Licence
TroisJS VSCode Snippets by oneWave Studios is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://gitlab.com/onewave-public/troisjs-snippets.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft