<script src="https://cdn.jsdelivr.net/npm/three@0.152.2/build/three.min.js"></script>
<script src="https://unpkg.com/flame-special-effects@1.0.0/flame-special-effects.js"></script>
除了常规的引入写法之外,还需要下载https://unpkg.com/flame-special-effects@1.0.0/flame-apperance.png并放到网页同一目录下。
$ npm install three flame-special-effects
three.js
import * as THREE from 'three';
import FlameSpecialEffects from 'path/to/flame-special-effects';
除了常规的引入写法之外,还需要下载https://unpkg.com/flame-special-effects@1.0.0/flame-apperance.png并放到网页同一目录下。
three.js不支持require引入。此时需要使用three.js的bundled CDN库文件,像CDN引入一样。
const FlameSpecialEffectsExport = require("path/to/flame-special-effects");
除了常规的引入写法之外,还需要下载https://unpkg.com/flame-special-effects@1.0.0/flame-apperance.png并放到网页同一目录下。
var flame = window.FlameSpecialEffects;
flame.init(containerId);
containerId: 火焰div的容器DOM元素ID
flame.changeLevel(level);
level: 火焰的强度,范围为0-100
flame.destroy();
本项目有逼真的火焰特效,特别适合广告牌的文字和图片展示
HTML5游戏中常常需要炫酷的火焰特效来吸引玩家的注意
本项目使用three.js API,相比于传统的CSS有更具表现力的特效,更适合用于开发高端网站
@misc{CNOCTAVE2025, author = {Yu Hongbo, }, title = {flame-special-effects}, year = {2025}, howpublished = {\url{https://github.com/CNOCTAVE/flame-special-effects}}, }
@techreport{CNOCTAVE2025, author = {Yu Hongbo, }, title = {flame-special-effects Document}, institution = {BA DU XIN SHANG}, year = {2025}, number = {25}, month = {6}, url = {https://cnoctave.github.io/flame-special-effects/index.html}, urldate = {2025-06-25}, }
@article{https://doi.org/10.31224/4734, doi = {10.31224/4734}, url = {https://engrxiv.org/preprint/view/4734}, author = {Yu Hongbo, }, keywords = {CNOCTAVE, flame-special-effects, special effects, industry, visual effects, brand visibility, audience engagement, three.js, CSS, HTML5}, title = {Breakthrough Progress of flame-special-effects in the Advertising Industry}, publisher = {engrxiv}, year = {2025}, copyright = {Creative Commons Attribution 4.0 International} }