スキル一覧に戻る
PhantasticUniverse

advanced

by PhantasticUniverse

0🍴 0📅 2026年1月18日
GitHubで見るManusで実行

SKILL.md


name: advanced description: Particle-Lenia hybrid systems, bioelectric patterns, and Flow-Lenia mass-conserving dynamics. Use when implementing hybrid simulations, reaction-diffusion systems, or mass-conserving CA.

Advanced Features

Particle-Lenia Hybrid

import {
  createParticleSystem,
  addParticle,
  spawnRandomParticles,
  updateParticleSystem,
  depositToField,
  calculateFieldGradient,
  INTERACTION_PRESETS,
} from "./core/particles";

// Create particle system
const state = createParticleSystem({
  maxParticles: 500,
  numTypes: 3,
  gridWidth: 512,
  gridHeight: 512,
});

// Spawn particles
spawnRandomParticles(state, 100, { spread: 50 });

// Set interaction preset
state.interactionMatrix = INTERACTION_PRESETS.clustering(3);

// Physics step
updateParticleSystem(state, fieldGradient);

// Deposit particles to Lenia field
depositToField(state, field);

Interaction Presets

PresetBehavior
attractiveAll types attract each other
clusteringSame types attract, others repel
chainSequential attraction (A→B→C→A)
randomRandom interaction matrix

Field Coupling

// Particles add mass to Lenia field
depositToField(state, leniaField);

// Particles respond to field gradients
const gradient = calculateFieldGradient(leniaField, width, height);
updateParticleSystem(state, gradient);

GPU Particle Pipeline

import { createParticlePipeline } from "./compute/webgpu/particle-pipeline";

const pipeline = createParticlePipeline(device, {
  maxParticles: 1000,
  numTypes: 4,
});

pipeline.setParticles(particles);
pipeline.step(commandEncoder);
const positions = await pipeline.getPositions();

Bioelectric Patterns

import {
  createBioelectricState,
  applyStimulus,
  stepBioelectric,
  stepBioelectricN,
  createVoltageWave,
  createGradient,
  bioelectricToRGB,
  BIOELECTRIC_PRESETS,
} from "./core/bioelectric";

// Create bioelectric simulation
const state = createBioelectricState({
  width: 256,
  height: 256,
  ...BIOELECTRIC_PRESETS["voltage-calcium"],
});

// Apply stimulus to channel 0
applyStimulus(state, 0, 128, 128, 20, 0.5);

// Create patterns
createVoltageWave(state, 0, "radial", 30, 0.3);
createGradient(state, 1, "left-right", 0, 1);

// Step simulation
stepBioelectricN(state, 100);

// Render to RGB
const rgba = bioelectricToRGB(state, true);

Bioelectric Presets

PresetChannelsDescription
voltage-only1Simple membrane potential
voltage-calcium2Vm + Ca2+ signaling
ion-channels3Vm + Na+ + K+ full model
morphogen-gradient2Diffusible signaling molecules
turing-pattern2Activator-inhibitor reaction-diffusion

Flow-Lenia (Mass-Conserving)

import {
  createFlowLeniaPipeline,
  type FlowLeniaConfig,
} from "./compute/webgpu/flow-lenia-pipeline";

// Create flow pipeline
const flowPipeline = createFlowLeniaPipeline(device, {
  flowStrength: 0.5, // How much growth gradient affects flow
  diffusion: 0.01, // Smoothing coefficient
  useReintegration: true, // Better mass conservation
  growthType: 1, // 0=polynomial, 1=gaussian
});

// Execute step (requires external convolution result)
flowPipeline.step(commandEncoder, convolutionTexture);

// Verify mass conservation
const currentMass = await flowPipeline.getMass();

Flow Modes

ModeDescription
mainStandard advection
flow_reintegrationExplicit flux tracking (better conservation)

Flow Parameters

interface FlowLeniaConfig {
  flowStrength: number; // 0-1, gradient response strength
  diffusion: number; // 0-0.1, smoothing
  useReintegration: boolean; // Better mass tracking
  growthType: 0 | 1; // 0=polynomial, 1=gaussian
}

Core Files

FilePurpose
core/particles.tsParticle system implementation
core/bioelectric.tsBioelectric simulation
compute/webgpu/particle-pipeline.tsGPU particle physics
compute/webgpu/flow-lenia-pipeline.tsMass-conserving flow

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です