更新
This commit is contained in:
1 parent
5cd551a08e
commit
40cde540d6
33 files changed
+547
-319
No files matched your search
@@ -1,9 +1,13 @@
|
||||
---
|
||||
title: egret引用Animate CC发布的HTML5 Canvas
|
||||
tags: []
|
||||
id: '252'
|
||||
categories:
|
||||
- - 分享
|
||||
- 分享
|
||||
tags:
|
||||
- egret
|
||||
- Animate CC
|
||||
- Canvas
|
||||
- swf
|
||||
date: 2017-12-15 18:04:34
|
||||
---
|
||||
|
||||
@@ -17,7 +21,7 @@ date: 2017-12-15 18:04:34
|
||||
|
||||
|
||||
|
||||
# 1.建立引用路径
|
||||
# 1. 建立引用路径
|
||||
|
||||

|
||||
|
||||
@@ -25,13 +29,14 @@ date: 2017-12-15 18:04:34
|
||||
|
||||
|
||||
|
||||
# 2.动画采集器
|
||||
# 2. 动画采集器
|
||||
|
||||
通过外部引用html,然后获取页面的canvas的bitmap,然后添加到egret的舞台上。
|
||||
|
||||
新创建一个类,命名为CollectAnimation.ts
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
class CollectAnimation extends egret.DisplayObjectContainer {
|
||||
|
||||
private _iframe:any;
|
||||
@@ -144,11 +149,12 @@ this.parent.removeChild(this);
|
||||
|
||||
|
||||
|
||||
# 3.在egret中使用
|
||||
# 3. 在egret中使用
|
||||
|
||||
在Main.ts中使用我们刚刚创建的类
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
class Main extends egret.DisplayObjectContainer {
|
||||
|
||||
public constructor() {
|
||||
@@ -178,4 +184,4 @@ class Main extends egret.DisplayObjectContainer {
|
||||
|
||||
以上就是在egret中引用HTML5 Canvas的一些尝试,还有别的东西可能要等我慢慢挖掘了。
|
||||
|
||||
效果->[传送门](https://demo.dengtongyu.com/pages/walkman/)
|
||||
效果->[传送门](https://demo.dengtongyu.com/pages/walkman/)
|
||||
Reference in new issue
Block a user