Communitygithub.com

Intégration de l'Éditeur Pascal

Construisez et étendez des applications d'édition de bâtiments 3D en utilisant l'architecture de l'Éditeur Pascal (React Three Fiber + graphe de scène Zustand). À utiliser lors de la création d'outils architecturaux 3D, de la création d'éditeurs de type BIM, de l'extension de l'Éditeur Pascal avec des fonctionnalités personnalisées, ou de la construction de générateurs de plans d'étage.

Qu'est-ce que Intégration de l'Éditeur Pascal ?

Cette compétence fournit une intégration complète avec l'Éditeur Pascal ([pascalorg/editor](https://github.com/pascalorg/editor)), un éditeur de bâtiments 3D open source construit avec React Three Fiber et WebGPU. Elle permet aux agents IA de créer, manipuler et exporter des géométries architecturales en utilisant un graphe de scène hiérarchique de nœuds typés (Site, Bâtiment, Niveau, Mur, Ouverture, Dalle, Zone, Élément) et une gestion d'état Zustand. Les développeurs peuvent rapidement démarrer avec des extraits de code pour créer des murs avec ouvertures, des niveaux et des pièces, et exporter des scènes au format JSON. La compétence prend en charge les snapshots de grille, les rendus avec React Three Fiber, et permet de créer des systèmes de validation personnalisés qui s'exécutent automatiquement lorsque les nœuds sont modifiés. Elle est conçue pour les outils architecturaux 3D, les éditeurs de type BIM, et les générateurs de plans d'étage, en utilisant les packages `@pascal-app/core`, `@pascal-app/ui`, et l'écosystème React Three Fiber.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/pascal-editor

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Que fait Intégration de l'Éditeur Pascal ?

Aperçu

L'Éditeur Pascal (pascalorg/editor) est un éditeur de bâtiments 3D open source construit avec React Three Fiber et WebGPU. Il fournit un graphe de scène basé sur des nœuds, la gestion d'état Zustand et une architecture de systèmes idéale pour la génération architecturale pilotée par IA. Cette compétence couvre l'API de base pour créer, manipuler et exporter la géométrie des bâtiments.

Instructions

Démarrage rapide

npx create-next-app@latest my-building-app
cd my-building-app
npm install @pascal-app/core @pascal-app/ui @react-three/fiber @react-three/drei three zustand

Hiérarchie des nœuds

Pascal utilise un arbre de nœuds typés :

Site -> Bâtiment -> Niveau -> Mur -> Ouverture (porte/fenêtre)
                          -> Dalle (sol/plafond)
                          -> Zone (limite de pièce)
                          -> Élément (meuble, accessoire)

Chaque nœud possède : id (UUID), type, parentId, children (IDs enfants), props (spécifiques au type) et dirty (marque pour reconstruction).

Stores Zustand

import { useScene, useViewer, useEditor } from '@pascal-app/core'

// useScene -- graphe de scène (nœuds, relations)
const { nodes, createNode, updateNode, deleteNode } = useScene()

// useViewer -- état de la vue (caméra, sélection)
const { selectedIds, camera, setSelection } = useViewer()

// useEditor -- mode outil et état de l'interface utilisateur
const { activeTool, setTool, history } = useEditor()

Création de murs avec ouvertures

const scene = useScene.getState()

// Mur extérieur : 4,5 m de long, 200 mm d'épaisseur, 2,7 m de hauteur sous plafond
const wall = await scene.createNode({
  type: 'wall',
  props: {
    start: { x: 0, y: 0 }, end: { x: 4.5, y: 0 },
    thickness: 0.20, height: 2.7,
    isExterior: true, material: 'masonry',
  }
}, levelId)

// Ajouter une fenêtre : 1,2 m de large, appui à 900 mm
await scene.createNode({
  type: 'item',
  props: {
    itemType: 'window', wallId: wall.id,
    offsetFromStart: 1.5, width: 1.2, height: 1.2, sillHeight: 0.9,
  }
}, wall.id)

// Ajouter une porte : 900 mm de large
await scene.createNode({
  type: 'item',
  props: {
    itemType: 'door', wallId: wall.id,
    offsetFromStart: 3.0, width: 0.9, height: 2.1, sillHeight: 0,
  }
}, wall.id)

Création de niveaux et de pièces

const level = await scene.createNode({
  type: 'level',
  props: { name: 'Rez-de-chaussée', elevation: 0, height: 2.7, index: 0 }
}, buildingId)

// Dalle de sol
await scene.createNode({
  type: 'slab',
  props: {
    polygon: [{ x: 0, y: 0 }, { x: 10, y: 0 }, { x: 10, y: 8 }, { x: 0, y: 8 }],
    thickness: 0.25, isRoof: false,
  }
}, level.id)

// Zone de pièce pour étiquetage et calcul de surface
await scene.createNode({
  type: 'zone',
  props: {
    name: 'Salon', roomType: 'living',
    polygon: [{ x: 0.1, y: 0.1 }, { x: 5.4, y: 0.1 }, { x: 5.4, y: 7.9 }, { x: 0.1, y: 7.9 }],
  }
}, level.id)

Exportation de la scène au format JSON

function exportScene(): BuildingExport {
  const { nodes } = useScene.getState()
  const allNodes = Object.values(nodes)
  const site = allNodes.find(n => n.type === 'site')
  const building = allNodes.find(n => n.type === 'building')
  const levels = allNodes
    .filter(n => n.type === 'level' && n.parentId === building.id)
    .sort((a, b) => a.props.elevation - b.props.elevation)

  return {
    units: 'meters',
    site: { width: site.props.width, depth: site.props.depth },
    building: {
      levels: levels.map(level => ({
        name: level.props.name,
        elevation: level.props.elevation,
        height: level.props.height,
        walls: getChildrenByType(level.id, 'wall', allNodes),
        rooms: getChildrenByType(level.id, 'zone', allNodes),
      }))
    }
  }
}

Rendu avec React Three Fiber

import { Canvas } from '@react-three/fiber'
import { PascalScene, PascalCamera, PascalControls } from '@pascal-app/ui'

export function BuildingViewer() {
  return (
    <Canvas camera={{ position: [0, 20, 20], fov: 45 }}>
      <PascalScene />
      <PascalCamera />
      <PascalControls />
      <ambientLight intensity={0.5} />
      <directionalLight position={[10, 20, 10]} castShadow />
    </Canvas>
  )
}

Accrochage à la grille

Par défaut, Pascal utilise une grille de 100 mm (0.1 m) :

const snapToGrid = (value: number, gridSize = 0.1) =>
  Math.round(value / gridSize) * gridSize

Exemples

Exemple 1 : Construire un rez-de-chaussée de 10 m x 8 m

Créez un rez-de-chaussée complet avec murs extérieurs, une cloison intérieure séparant le salon des chambres, et des ouvertures appropriées :

  1. Créez un nœud de niveau avec elevation 0, height 2.7 m
  2. Créez une dalle de sol : polygone 10 m x 8 m, épaisseur 0,25 m
  3. Créez 4 murs extérieurs (0,20 m d'épaisseur, maçonnerie) : nord (10 m), est (8 m), sud (10 m), ouest (8 m)
  4. Ajoutez une cloison intérieure à x=5.5 (0,10 m d'épaisseur, bois) sur toute la profondeur
  5. Ajoutez une porte d'entrée sur le mur nord : 1,0 m x 2,1 m à un décalage de 3,5 m
  6. Ajoutez des fenêtres sur le mur est : deux fenêtres de 1,2 m x 1,2 m avec appui à 0,9 m, décalages de 1,2 m et 4,5 m
  7. Créez des zones : Salon (5,3 m x 7,8 m = 41,3 m2), Zone chambres (4,3 m x 7,8 m = 33,5 m2)
  8. Exportez au format JSON pour validation selon les règles architectural-dimensions

Exemple 2 : Enregistrer un système de validation personnalisé

Créez un système qui vérifie l'épaisseur des murs à chaque modification d'un nœud de mur :

import { registerSystem, useScene } from '@pascal-app/core'

registerSystem({
  name: 'wall-validator',
  nodeTypes: ['wall'],
  priority: 100,
  process(dirtyNodes) {
    for (const node of dirtyNodes) {
      const { thickness, isExterior, height } = node.props
      if (isExterior && thickness < 0.14)
        console.warn(`Mur ${node.id}: extérieur ${thickness}m < 0.14m minimum`)
      if (height < 2.1)
        console.warn(`Mur ${node.id}: hauteur ${height}m < 2.1m minimum`)
    }
  }
})

Ce système s'exécute automatiquement lorsque les nœuds de mur sont marqués comme sales, avant que les systèmes de géométrie ne reconstruisent les maillages.

Directives

  • Toutes les dimensions sont en mètres -- Pascal utilise le système métrique en interne
  • Utilisez useScene pour toutes les opérations CRUD sur les nœuds, useViewer pour la sélection/caméra, useEditor pour les outils
  • Accrochez les coordonnées à la grille de 0,1 m pour une géométrie propre
  • Épaisseur des murs : 0,20 m pour les murs extérieurs, 0,10 m pour les cloisons intérieures
  • La hauteur du seuil de porte est toujours 0 (au niveau du sol) ; la hauteur d'appui de fenêtre par défaut est de 0,9 m
  • Enregistrez les systèmes personnalisés avec une priorité > 50 pour qu'ils s'exécutent avant la reconstruction de la géométrie (0-50)
  • Combinez avec la compétence architectural-dimensions pour la validation des mesures réelles
  • Packages clés : @pascal-app/core, @pascal-app/ui, @react-three/fiber, three, zustand
  • GitHub : github.com/pascalorg/editor

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

TerminalSkills/skills

>- Run GitHub Actions locally with act. Use when a user asks to test GitHub Actions workflows locally, debug CI pipelines without pushing, or run workflows offline.

TerminalSkills/skills

>- You are an expert in AG2 (formerly AutoGen), the open-source multi-agent conversation framework. You help developers build systems where multiple AI agents collaborate through structured conversations — with tool use, human-in-the-loop, code execution, group chat orchestration, and nested conversations — for complex tasks like software development, research, and data analysis.

TerminalSkills/skills

>- Generate short-form videos with AI — script writing, text-to-speech narration, stock footage selection, subtitle generation, and video assembly. Use when: creating TikTok/YouTube Shorts/Reels content, automating video production, building content pipelines.

TerminalSkills/skills

>- Animate 3D objects and characters in Blender with Python. Use when the user wants to keyframe properties, create armatures and rigs, set up IK/FK chains, animate shape keys for facial animation, edit F-Curves, use the NLA editor to blend actions, add drivers for expression-based animation, or script any animation workflow in Blender.

TerminalSkills/skills

>- Automate motion capture and tracking workflows in Blender with Python. Use when the user wants to import BVH or FBX mocap data, retarget motion to armatures, track camera or object motion from video, solve camera motion, clean up motion capture data, or script any tracking pipeline in Blender.

TerminalSkills/skills

>- You are an expert in Bolt.new by StackBlitz, the AI-powered full-stack development environment that runs entirely in the browser. You help developers go from idea to deployed app in minutes using natural language prompts — Bolt generates complete applications with frontend, backend, database, and deployment, all running in a WebContainer without local setup.

TerminalSkills/skills

>- Assists with using Bun as an all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building HTTP servers, managing packages, running tests, or migrating from Node.js. Trigger words: bun, bun serve, bun install, bun test, bun build, javascript runtime, bun runtime.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.

TerminalSkills/skills

When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Assists with building custom interactive data visualizations using D3.js. Use when creating charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained control beyond what charting libraries provide. Trigger words: d3, data visualization, chart, svg, scales, force graph, treemap, choropleth.

TerminalSkills/skills

dbt (data build tool) transforms data in your warehouse using SQL SELECT statements. Learn project setup, models, tests, documentation, incremental materializations, and integration with data warehouses like PostgreSQL, BigQuery, and Snowflake.

TerminalSkills/skills

>- You are an expert in dlt, the open-source Python library for building data pipelines. You help developers load data from any API, file, or database into warehouses and lakes using simple Python decorators — with automatic schema inference, incremental loading, and built-in data contracts. dlt is the "requests library for data pipelines.

TerminalSkills/skills

Data Version Control for ML projects. Track large datasets and models alongside Git, build reproducible ML pipelines, and run experiments with metric comparison. Works with any storage backend including S3, GCS, Azure, and local filesystems.

TerminalSkills/skills

>- You are an expert in E2B, the cloud platform for running AI-generated code in secure sandboxes. You help developers give AI agents the ability to execute code, install packages, read/write files, and run long processes in isolated cloud environments — each sandbox is a lightweight VM that boots in ~150ms with full Linux, filesystem, and networking.

TerminalSkills/skills

>- Transcode, convert, edit, and process audio and video with FFmpeg. Use when a user asks to convert video formats (webm to mp4, mkv to mp4), extract audio from video, compress video files, trim or cut clips, concatenate videos, add subtitles, create thumbnails, apply filters, change resolution or bitrate, re-encode media, create GIFs from video, add watermarks, normalize audio, stream media, or build automated media processing pipelines.

TerminalSkills/skills

>- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities.

TerminalSkills/skills

>- Generate deterministic MP4 videos from HTML, CSS, media, and seekable animations using HeyGen's HyperFrames framework. Use when someone asks to "render HTML to video", "make a video with HyperFrames", "create a programmatic video", "turn an animation into MP4", "build a launch/product video from HTML", "render GSAP/Lottie/Three.js to video", or set up an agent-driven video pipeline. Covers init/preview/render/add/lint/inspect commands, data-* timing attributes, animation adapters, and the component catalog.

TerminalSkills/skills

When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium.

Skills associés