Codels
252 ポリゴン0.28 × 0.46 × 0.45 m
自己完結型の ES モジュールで、依存先は three のみです。ファクトリー関数を呼び出し、返された group をシーンに追加してください。
/**
 * Chicken — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 252 · Size (W × H × D): 0.28 × 0.46 × 0.45 m
 *
 * Usage:
 *   import { createChicken } from './chicken.js';
 *   
 *   const model = createChicken();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

export function createChicken() {
  const root = new THREE.Group();
  root.name = 'Chicken';

  // Materials
  const featherMat = new THREE.MeshStandardMaterial({ name: 'feather', color: 0xf7f3ea, roughness: 0.9, flatShading: true });
  const wingMat = new THREE.MeshStandardMaterial({ name: 'wing', color: 0xdedbd3, roughness: 0.9, flatShading: true });
  const combMat = new THREE.MeshStandardMaterial({ name: 'comb', color: 0xe0402f, roughness: 0.7, flatShading: true });
  const beakMat = new THREE.MeshStandardMaterial({ name: 'beak', color: 0xf4a62a, roughness: 0.6, flatShading: true });
  const eyeMat = new THREE.MeshStandardMaterial({ name: 'eye', color: 0x26221f, roughness: 0.4, flatShading: true });

  // Shared geometries
  const boxGeo = new THREE.BoxGeometry(0.026, 0.085, 0.026);
  const boxGeo2 = new THREE.BoxGeometry(0.06, 0.016, 0.075);
  const boxGeo3 = new THREE.BoxGeometry(0.03, 0.1, 0.17);
  const boxGeo4 = new THREE.BoxGeometry(0.026, 0.05, 0.08);
  const boxGeo5 = new THREE.BoxGeometry(0.028, 0.036, 0.028);

  // Parts
  const legL = new THREE.Group();
  legL.name = 'legL';
  legL.position.set(0.055, 0.085, -0.01);
  root.add(legL);
  const shinL = new THREE.Mesh(boxGeo, beakMat);
  shinL.name = 'shinL';
  shinL.position.set(0, -0.0425, 0);
  legL.add(shinL);
  const footL = new THREE.Mesh(boxGeo2, beakMat);
  footL.name = 'footL';
  footL.position.set(0, -0.077, 0.022);
  legL.add(footL);
  const legR = new THREE.Group();
  legR.name = 'legR';
  legR.position.set(-0.055, 0.085, -0.01);
  root.add(legR);
  const shinR = new THREE.Mesh(boxGeo, beakMat);
  shinR.name = 'shinR';
  shinR.position.set(0, -0.0425, 0);
  legR.add(shinR);
  const footR = new THREE.Mesh(boxGeo2, beakMat);
  footR.name = 'footR';
  footR.position.set(0, -0.077, 0.022);
  legR.add(footR);
  const body = new THREE.Group();
  body.name = 'body';
  body.position.set(0, 0.085, -0.01);
  root.add(body);
  const torso = new THREE.Mesh(new THREE.BoxGeometry(0.22, 0.165, 0.27), featherMat);
  torso.name = 'torso';
  torso.position.set(0, 0.0825, 0);
  body.add(torso);
  const chest = new THREE.Mesh(new THREE.BoxGeometry(0.19, 0.12, 0.03), featherMat);
  chest.name = 'chest';
  chest.position.set(0, 0.075, 0.145);
  body.add(chest);
  const belly = new THREE.Mesh(new THREE.BoxGeometry(0.19, 0.02, 0.24), featherMat);
  belly.name = 'belly';
  belly.position.set(0, -0.008, 0);
  body.add(belly);
  const tail = new THREE.Mesh(new THREE.BoxGeometry(0.12, 0.11, 0.06), featherMat);
  tail.name = 'tail';
  tail.position.set(0, 0.15, -0.15);
  tail.rotation.set(deg(-28), 0, 0);
  body.add(tail);
  const tailTip = new THREE.Mesh(new THREE.BoxGeometry(0.08, 0.07, 0.05), wingMat);
  tailTip.name = 'tailTip';
  tailTip.position.set(0, 0.21, -0.17);
  tailTip.rotation.set(deg(-35), 0, 0);
  body.add(tailTip);
  const wingL = new THREE.Group();
  wingL.name = 'wingL';
  wingL.position.set(0.113, 0.235, -0.01);
  root.add(wingL);
  const wingPanelL = new THREE.Mesh(boxGeo3, wingMat);
  wingPanelL.name = 'wingPanelL';
  wingPanelL.position.set(0.012, -0.05, -0.015);
  wingL.add(wingPanelL);
  const wingTipL = new THREE.Mesh(boxGeo4, wingMat);
  wingTipL.name = 'wingTipL';
  wingTipL.position.set(0.01, -0.085, -0.1);
  wingTipL.rotation.set(deg(-20), 0, 0);
  wingL.add(wingTipL);
  const wingR = new THREE.Group();
  wingR.name = 'wingR';
  wingR.position.set(-0.113, 0.235, -0.01);
  root.add(wingR);
  const wingPanelR = new THREE.Mesh(boxGeo3, wingMat);
  wingPanelR.name = 'wingPanelR';
  wingPanelR.position.set(-0.012, -0.05, -0.015);
  wingR.add(wingPanelR);
  const wingTipR = new THREE.Mesh(boxGeo4, wingMat);
  wingTipR.name = 'wingTipR';
  wingTipR.position.set(-0.01, -0.085, -0.1);
  wingTipR.rotation.set(deg(-20), 0, 0);
  wingR.add(wingTipR);
  const head = new THREE.Group();
  head.name = 'head';
  head.position.set(0, 0.235, 0.06);
  root.add(head);
  const skull = new THREE.Mesh(new THREE.BoxGeometry(0.17, 0.16, 0.155), featherMat);
  skull.name = 'skull';
  skull.position.set(0, 0.075, 0.035);
  head.add(skull);
  const combFront = new THREE.Mesh(new THREE.BoxGeometry(0.035, 0.05, 0.05), combMat);
  combFront.name = 'combFront';
  combFront.position.set(0, 0.177, 0.08);
  head.add(combFront);
  const combMid = new THREE.Mesh(new THREE.BoxGeometry(0.035, 0.07, 0.055), combMat);
  combMid.name = 'combMid';
  combMid.position.set(0, 0.187, 0.033);
  head.add(combMid);
  const combBack = new THREE.Mesh(new THREE.BoxGeometry(0.035, 0.045, 0.045), combMat);
  combBack.name = 'combBack';
  combBack.position.set(0, 0.173, -0.015);
  head.add(combBack);
  const beak = new THREE.Mesh(new THREE.BoxGeometry(0.065, 0.04, 0.06), beakMat);
  beak.name = 'beak';
  beak.position.set(0, 0.08, 0.1385);
  head.add(beak);
  const wattle = new THREE.Mesh(new THREE.BoxGeometry(0.036, 0.055, 0.032), combMat);
  wattle.name = 'wattle';
  wattle.position.set(0, 0.03, 0.1245);
  head.add(wattle);
  const eyeL = new THREE.Mesh(boxGeo5, eyeMat);
  eyeL.name = 'eyeL';
  eyeL.position.set(0.076, 0.105, 0.1035);
  head.add(eyeL);
  const eyeR = new THREE.Mesh(boxGeo5, eyeMat);
  eyeR.name = 'eyeR';
  eyeR.position.set(-0.076, 0.105, 0.1035);
  head.add(eyeR);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createChicken;

評価とコメント

—
まだ評価はありません。最初の評価をしてみましょう。
5
0
4
0
3
0
2
0
1
0

評価やコメントをするにはログインしてください。

0 件のコメント

まだコメントはありません。このモデルの使い方や改善できる点を共有しましょう。

関連モデル

同じカテゴリまたは似たタグ