プロジェクト
概要
Evan WによるCSG.jsのC#ポート(http://evanw.github.io/csg.js/)。
ゲーム・エミュレーター計測したスター増加
- 24時間
- -1
- 7日間
- -1
- 15日間
- -2
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルpb_CSG
A C# port of CSG.js by Evan W for use in the Unity game engine.
Install
To install, simply check out this repository in the My Project/Packages directory.
cd My\ Project/Packages
git clone https://github.com/karl-/pb_CSG.git co.parabox.csg
Quick Start
pb_CSG provides an interface in the CSG class for creating new meshes from boolean operations. Each function (Union, Subtract, Intersect) accepts 2 gameObjects: the left and right side. A new mesh is returned.
Example use:
// Include the library
using Parabox.CSG;
...
// Initialize two new meshes in the scene
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.transform.localScale = Vector3.one * 1.3f;
// Perform boolean operation
Model result = CSG.Subtract(cube, sphere);
// Create a gameObject to render the result
var composite = new GameObject();
composite.AddComponent<MeshFilter>().sharedMesh = result.mesh;
composite.AddComponent<MeshRenderer>().sharedMaterials = result.materials.ToArray();
Result:
関連プロジェクトを探す
読み込み中…