mirror of
https://github.com/galacean/engine.git
synced 2026-06-02 16:52:48 +08:00
Update README.md
This commit is contained in:
32
README.md
32
README.md
@@ -15,10 +15,20 @@
|
||||
- 🔮 **Graphics** - Advanced 2D + 3D graphics engine
|
||||
- 🏃 **Animation** - Powerful animation system
|
||||
- 🧱 **Physics** - Powerful and easy-to-use physical features
|
||||
- 🎨 **GUI** - Flexible UI system with drag-and-drop and dynamic interactions
|
||||
- 👆 **Input** - Easy-to-use interactive capabilities
|
||||
- 📑 **Scripts** - Use TypeScript to write logic efficiently
|
||||
|
||||
## npm
|
||||
## Usage
|
||||
|
||||
### Editor Approach
|
||||
|
||||
We recommend using [**Editor**](https://galacean.antgroup.com/editor) for a faster, **streamlined workflow** that enables seamless integration between artists and developers. Its intuitive visual tools allow artists to quickly **create scenes** and allow developers to **write custom logic**, with convenient **platform export**. You can even create projects based on pre-built case templates.
|
||||
|
||||

|
||||
|
||||
|
||||
### Pure Code Approach
|
||||
|
||||
The engine is published on npm with full typing support. To install, use:
|
||||
|
||||
@@ -26,21 +36,11 @@ The engine is published on npm with full typing support. To install, use:
|
||||
npm install @galacean/engine
|
||||
```
|
||||
|
||||
This will allow you to import engine entirely using:
|
||||
|
||||
```javascript
|
||||
import * as GALACEAN from "@galacean/engine";
|
||||
```
|
||||
|
||||
or individual classes using:
|
||||
|
||||
```javascript
|
||||
import { Engine, Scene, Entity } from "@galacean/engine";
|
||||
```
|
||||
|
||||
## Usage
|
||||
Create a simple scene:
|
||||
|
||||
```typescript
|
||||
import { BlinnPhongMaterial, Camera, DirectLight, MeshRenderer, WebGLEngine, PrimitiveMesh } from "@galacean/engine";
|
||||
|
||||
// Create engine by passing in the HTMLCanvasElement id and adjust canvas size
|
||||
const engine = await WebGLEngine.create({ canvas: "canvas-id" });
|
||||
engine.canvas.resizeByClientSize();
|
||||
@@ -78,9 +78,11 @@ Everyone is welcome to join us! Whether you find a bug, have a great feature req
|
||||
Make sure to read the [Contributing Guide](.github/HOW_TO_CONTRIBUTE.md) / [贡献指南](https://github.com/galacean/engine/wiki/%E5%A6%82%E4%BD%95%E4%B8%8E%E6%88%91%E4%BB%AC%E5%85%B1%E5%BB%BA-Oasis-%E5%BC%80%E6%BA%90%E4%BA%92%E5%8A%A8%E5%BC%95%E6%93%8E) before submitting changes.
|
||||
|
||||
## Clone
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- [git-lfs](https://git-lfs.com/) (Install by official website)
|
||||
|
||||
|
||||
Clone this repository:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user