Logo von Threejs Syntax Materials

Threejs Syntax Materials

Organisation
Impertio-Studio
threejs-syntax-materials

Use when choosing or configuring materials, loading textures, or setting up PBR workflows in Three.js. Prevents the common mistake of wrong color space on textures, forgetting material.dispose(), or not calling material.needsUpdate after changes. Covers all 15+ material types, PBR metalness/roughness, MeshPhysicalMaterial, texture maps, color space. Keywords: MeshStandardMaterial, MeshPhysicalMaterial, material, texture, PBR, metalness, roughness, normalMap, color space, SRGBColorSpace, blurry texture, pixelated, texture quality, filtering.

Übersicht

HerausgeberImpertio-Studio
RepositoryThree.js-Claude-Skill-Package
Skill-Namethreejs-syntax-materials
Sterne
29
Forks
3
Mitgelieferte Dateien
3
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 3 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von Impertio-Studio auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Threejs Syntax Materials in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-syntax/threejs-syntax-materials
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package.git /tmp/Three.js-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Three.js-Claude-Skill-Package/skills/source/threejs-syntax/threejs-syntax-materials .claude/skills/threejs-syntax-materials
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Threejs Syntax Materials in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Threejs Syntax Materials automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Threejs Syntax Materials nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

threejs-syntax-materials

Quick Reference

Material Type Decision Tree

Use CaseMaterialWhy
UI elements, unlit scenesMeshBasicMaterialCheapest, no light computation
Matte diffuse (low-end devices)MeshLambertMaterialFast diffuse, no specular
Legacy specular highlightsMeshPhongMaterialBlinn-Phong model, not physically correct
General-purpose 3D (recommended)MeshStandardMaterialPBR metalness/roughness, industry standard
Glass, car paint, fabric, soap bubblesMeshPhysicalMaterialAdvanced PBR (clearcoat, transmission, sheen, iridescence)
Cartoon/anime styleMeshToonMaterialDiscrete cel-shading steps
Sculpting previews, no lightsMeshMatcapMaterialMatcap texture, zero light setup
Debug normalsMeshNormalMaterialRGB = surface normal direction
Invisible shadow receiverShadowMaterialTransparent shadow catcher
Solid linesLineBasicMaterialSimple colored lines
Dashed linesLineDashedMaterialRequires line.computeLineDistances()
ParticlesPointsMaterialPoint cloud rendering
BillboardsSpriteMaterialAlways-facing-camera quads

Base Material Properties (All Materials)

PropertyTypeDefaultDescription
sidenumberFrontSideFrontSide, BackSide, or DoubleSide
transparentbooleanfalseEnable alpha blending
opacitynumber1Requires transparent: true to take effect below 1
depthWritebooleantrueWrite to depth buffer
depthTestbooleantrueTest against depth buffer
blendingnumberNormalBlendingNoBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending
alphaTestnumber0Discard fragments with alpha below this value
visiblebooleantrueWhether to render this material
wireframebooleanfalseWireframe rendering mode
fogbooleantrueAffected by scene fog
clippingPlanesPlane[]nullArray of clipping planes
clipIntersectionbooleanfalseClip where ALL planes intersect (vs union)
needsUpdatebooleanfalseSet true to trigger shader recompilation
toneMappedbooleantrueApply renderer tone mapping

Base Material Methods

MethodSignatureDescription
clone(): MaterialClone the material
copy(source: Material): MaterialCopy properties from source
dispose(): voidFree GPU resources -- ALWAYS call when removing
onBeforeCompile(shader, renderer): voidHook to modify shader before compilation
setValues(values: Object): voidSet multiple properties at once

Critical Warnings

NEVER set opacity < 1 without transparent: true -- the opacity value is silently ignored. ALWAYS pair them together.

NEVER use MeshPhysicalMaterial when MeshStandardMaterial suffices -- Physical compiles a significantly larger shader. ONLY use it when you need clearcoat, transmission, sheen, iridescence, or anisotropy.

NEVER set SRGBColorSpace on normal maps, roughness maps, metalness maps, or any data texture -- this corrupts the data and causes incorrect lighting. ONLY set SRGBColorSpace on diffuse/color/emissive textures.

NEVER forget to call material.dispose() and texture.dispose() when removing objects -- GPU memory leaks accumulate and crash the application.

NEVER set linewidth > 1 on LineBasicMaterial -- it is silently ignored on most platforms due to WebGL limitations. ALWAYS use Line2 + LineMaterial from three/addons/lines/ for thick lines.

ALWAYS set material.needsUpdate = true after changing properties that affect shader compilation (e.g., toggling flatShading, changing side, adding/removing texture maps at runtime).

ALWAYS set wrapS and wrapT to RepeatWrapping when using texture.repeat values other than (1, 1) -- the default ClampToEdgeWrapping does NOT tile textures.


MeshStandardMaterial (PBR)

The recommended material for most 3D scenes. Uses physically-based metalness/roughness workflow.

javascript
import { MeshStandardMaterial, TextureLoader, SRGBColorSpace, RepeatWrapping } from 'three';

const loader = new TextureLoader();
const material = new MeshStandardMaterial({
  color: 0xffffff,
  roughness: 0.7,           // 0 = mirror, 1 = fully rough
  metalness: 0.0,           // 0 = dielectric, 1 = metal
  map: null,                // Diffuse/albedo texture
  roughnessMap: null,       // Per-pixel roughness
  metalnessMap: null,       // Per-pixel metalness
  normalMap: null,          // Surface normal perturbation
  normalScale: new Vector2(1, 1),
  aoMap: null,              // Ambient occlusion (requires uv2)
  aoMapIntensity: 1.0,
  emissive: 0x000000,       // Emissive color
  emissiveMap: null,        // Emissive texture
  emissiveIntensity: 1.0,
  envMap: null,             // Environment reflection map
  envMapIntensity: 1.0,
  bumpMap: null,            // Grayscale height map
  bumpScale: 1.0,
  displacementMap: null,    // Vertex displacement map
  displacementScale: 1.0,
  displacementBias: 0.0,
  alphaMap: null,           // Per-pixel transparency
  lightMap: null,           // Baked lighting (requires uv2)
  lightMapIntensity: 1.0,
  flatShading: false,
  wireframe: false,
  fog: true
});

MeshPhysicalMaterial (Advanced PBR)

Extends MeshStandardMaterial with ALL its properties, plus:

PropertyTypeDefaultDescription
clearcoatfloat0.0Clear coat layer intensity (0-1)
clearcoatRoughnessfloat0.0Clear coat roughness
clearcoatMapTexturenullClear coat intensity map
clearcoatNormalMapTexturenullClear coat normal map
transmissionfloat0.0Physically-based transparency (0-1)
transmissionMapTexturenullTransmission map
thicknessfloat0.0Volume thickness for transmission
thicknessMapTexturenullThickness map
iorfloat1.5Index of refraction (1.0-2.333)
attenuationDistancefloatInfinityLight attenuation distance in volume
attenuationColorColorwhiteLight attenuation tint
sheenfloat0.0Sheen layer intensity (fabric-like)
sheenColorColor0x000000Sheen tint color
sheenRoughnessfloat1.0Sheen roughness
iridescencefloat0.0Thin-film interference (0-1)
iridescenceIORfloat1.3Iridescence index of refraction
iridescenceThicknessRange[float, float][100, 400]Thin-film thickness range (nm)
anisotropyfloat0.0Anisotropic reflection strength
anisotropyRotationfloat0.0Anisotropy rotation (radians)
specularIntensityfloat1.0Specular layer intensity
specularColorColorwhiteSpecular tint color
dispersionfloat0.0Chromatic dispersion (rainbow effect)
reflectivityfloat0.5Reflectivity at normal incidence

Texture System

Color Space Rules (Critical)

Map TypeColor SpaceChannels Used
map (diffuse/albedo)SRGBColorSpaceRGB(A)
emissiveMapSRGBColorSpaceRGB
lightMapSRGBColorSpaceRGB
envMapSRGBColorSpaceRGB
sheenColorMapSRGBColorSpaceRGB
specularColorMapSRGBColorSpaceRGB
normalMapNoColorSpaceRGB
roughnessMapNoColorSpaceG channel
metalnessMapNoColorSpaceB channel
aoMapNoColorSpaceR channel
bumpMapNoColorSpaceR channel
displacementMapNoColorSpaceR channel
alphaMapNoColorSpaceR channel
clearcoatMapNoColorSpaceR channel
clearcoatRoughnessMapNoColorSpaceR channel
clearcoatNormalMapNoColorSpaceRGB
transmissionMapNoColorSpaceR channel
thicknessMapNoColorSpaceR channel
iridescenceMapNoColorSpaceR channel
iridescenceThicknessMapNoColorSpaceR channel
sheenRoughnessMapNoColorSpaceR channel
anisotropyMapNoColorSpaceRG channels
specularIntensityMapNoColorSpaceA channel

Rule: Diffuse/emissive/color textures = SRGBColorSpace. ALL data textures = NoColorSpace. Getting this wrong causes washed-out or over-saturated rendering.

Texture Loaders

LoaderFormatImport
TextureLoaderPNG, JPG, WebPthree core
CubeTextureLoader6x PNG/JPG cube mapsthree core
RGBELoader.hdr (Radiance HDR)three/addons/loaders/RGBELoader.js
EXRLoader.exr (OpenEXR HDR)three/addons/loaders/EXRLoader.js
KTX2Loader.ktx2 (GPU compressed)three/addons/loaders/KTX2Loader.js

Wrapping Modes

ConstantDescription
ClampToEdgeWrappingEdge texels stretched (default)
RepeatWrappingTexture tiles/repeats
MirroredRepeatWrappingTiles with alternating mirror

Filter Modes

ConstantTypeDescription
NearestFilterMag/MinPixelated, crisp (retro, toon gradients)
LinearFilterMag/MinSmooth interpolation
LinearMipmapLinearFilterMinTrilinear filtering (default, best quality)

Texture Properties

PropertyTypeDefaultDescription
wrapS / wrapTnumberClampToEdgeWrappingWrapping mode
magFilternumberLinearFilterMagnification filter
minFilternumberLinearMipmapLinearFilterMinification filter
anisotropynumber1Anisotropic filtering (max = renderer.capabilities.getMaxAnisotropy())
repeatVector2(1, 1)UV repeat count
offsetVector2(0, 0)UV offset
rotationnumber0UV rotation in radians
centerVector2(0, 0)Center of rotation
flipYbooleantrueFlip vertically on upload
colorSpacestringNoColorSpaceColor space interpretation
generateMipmapsbooleantrueAuto-generate mipmaps
needsUpdatebooleanfalseTrigger GPU re-upload

flipY Rules

  • flipY = true (default): Correct for loaded image textures (PNG, JPG)
  • flipY = false: ALWAYS use for WebGLRenderTarget textures, DataTexture, and framebuffer textures

Material Disposal

javascript
// ALWAYS dispose materials and textures when removing objects
function disposeMesh(mesh) {
  if (mesh.material) {
    // Dispose all texture maps
    for (const key of Object.keys(mesh.material)) {
      const value = mesh.material[key];
      if (value && value.isTexture) {
        value.dispose();
      }
    }
    mesh.material.dispose();
  }
  if (mesh.geometry) {
    mesh.geometry.dispose();
  }
}

needsUpdate Flag

ALWAYS set material.needsUpdate = true after changing these at runtime:

  • Toggling flatShading
  • Changing side (FrontSide/BackSide/DoubleSide)
  • Adding or removing a texture map (e.g., setting map from null to a texture)
  • Changing transparent or alphaTest
  • Toggling wireframe
  • Any property that changes the compiled shader variant

NEVER set needsUpdate = true every frame -- it forces expensive shader recompilation. ONLY set it once after the property change.

For textures: set texture.needsUpdate = true after modifying texture.image data to trigger GPU re-upload.


Toon Material Special Rule

When using MeshToonMaterial, ALWAYS set gradientMap.minFilter = NearestFilter and gradientMap.magFilter = NearestFilter. Linear filtering blurs the discrete shading steps into smooth gradients, defeating the toon effect.


Reference Links

Official Sources

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Threejs Syntax Materials?

Use when choosing or configuring materials, loading textures, or setting up PBR workflows in Three.js. Prevents the common mistake of wrong color space on textures, forgetting material.dispose(), or not calling material.needsUpdate after changes. Covers all 15+ material types, PBR metalness/roughness, MeshPhysicalMaterial, texture maps, color space. Keywords: MeshStandardMaterial, MeshPhysicalMaterial, material, texture, PBR, metalness, roughness, normalMap, color space, SRGBColorSpace, blurry texture, pixelated, texture quality, filtering.

Warum Threejs Syntax Materials in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Threejs Syntax Materials besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Threejs Syntax Materials in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/Impertio-Studio/Three.js-Claude-Skill-Package/tree/master/skills/source/threejs-syntax/threejs-syntax-materials ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Threejs Syntax Materials nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Threejs Syntax Materials verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Threejs Syntax Materials damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Threejs Syntax Materials kostenlos?

Ja. Der Skill wird von Impertio-Studio auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇