Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/effekseer/playcanvas-effekseer
https://github.com/effekseer/playcanvas-effekseer
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/effekseer/playcanvas-effekseer
- Owner: effekseer
- License: mit
- Created: 2019-12-15T13:06:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-03T09:17:06.000Z (over 1 year ago)
- Last Synced: 2024-05-01T11:42:56.821Z (7 months ago)
- Language: JavaScript
- Size: 2.9 MB
- Stars: 12
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PlayCanvas with EffekseerForWebGL
- [Official website](http://effekseer.github.io)
- [Effekseer repository](https://github.com/effekseer/Effekseer)
- [EffekseerForWebGL repository](https://github.com/effekseer/EffekseerForWebGL)## How to use
### PlayCanvas Editor
Import all files in src/
Specify a name and a script into effekseer_native.wasm
![](docs/images/wasmModule.png)
Add entities
![](docs/images/AddEntity.png)
Add EffekseerSystem to an entity. Set the Entity of the camera to the Camera attribute.
![](docs/images/EffekseerSyatemScript.png)
Add EffekseerEmitter to an entity
Specify efkefc file.
![](docs/images/EffekseerEmitterScript.png)
Effect can be played with this code
```
this.entity.script.effekseerEmitter.play();
```Please look at PlayCanvas Project in a detail.
[Project](https://playcanvas.com/project/649529/overview/effekseersimplesample)
## Development
### How to copy from EffekseerForWebGL
- Rename
effekseer.wasm -> effekseer_native.wasm
- Fix code
Get a module directly
```
var _initalize_wasm = function _initalize_wasm(url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = "arraybuffer";
xhr.onload = function () {
var params = {};
params.wasmBinary = xhr.response;
// params.onRuntimeInitialized = _onRuntimeInitialized;
Module = window["effekseer_native"];
_onRuntimeInitialized();
};
xhr.onerror = function () {
_onerrorAssembly();
};
xhr.send(null);
};
```