Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fyge_for_tb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王剑峰
fyge_for_tb
Commits
ca623d15
Commit
ca623d15
authored
Sep 27, 2021
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.38
parent
5a1aa8a3
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35 additions
and
57 deletions
+35
-57
FYGE.d.ts
build/FYGE.d.ts
+1
-1
fyge.min.js
build/fyge.min.js
+1
-1
fyge.min.js.map
build/fyge.min.js.map
+1
-1
types.d.ts
build/types.d.ts
+1
-1
package.json
package.json
+1
-1
record.txt
record.txt
+22
-13
const.ts
src/2d/const.ts
+1
-1
Mesh.ts
src/2d/mesh/Mesh.ts
+2
-2
TextField.ts
src/2d/text/TextField.ts
+3
-1
index.ts
src/3d/index.ts
+1
-0
index.ts
src/index.ts
+1
-35
No files found.
build/FYGE.d.ts
View file @
ca623d15
declare
namespace
FYGE
{
export
const
VERSION
=
"2.0.3
7
"
;
declare
namespace
FYGE
{
export
const
VERSION
=
"2.0.3
8
"
;
export
const
osType
:
"ios"
|
"android"
|
"pc"
;
export
const
osType
:
"ios"
|
"android"
|
"pc"
;
...
...
build/fyge.min.js
View file @
ca623d15
This diff is collapsed.
Click to expand it.
build/fyge.min.js.map
View file @
ca623d15
This diff is collapsed.
Click to expand it.
build/types.d.ts
View file @
ca623d15
export
const
VERSION
=
"2.0.3
7
"
;
export
const
VERSION
=
"2.0.3
8
"
;
export
const
osType
:
"ios"
|
"android"
|
"pc"
;
export
const
osType
:
"ios"
|
"android"
|
"pc"
;
...
...
package.json
View file @
ca623d15
{
{
"name"
:
"fyge"
,
"name"
:
"fyge"
,
"version"
:
"2.0.3
7
"
,
"version"
:
"2.0.3
8
"
,
"description"
:
"canvas渲染引擎"
,
"description"
:
"canvas渲染引擎"
,
"main"
:
"./build/fyge.min.js"
,
"main"
:
"./build/fyge.min.js"
,
"types"
:
"./build/types.d.ts"
,
"types"
:
"./build/types.d.ts"
,
...
...
record.txt
View file @
ca623d15
...
@@ -437,8 +437,17 @@
...
@@ -437,8 +437,17 @@
Lottie文件里的LottieVisibleTrack的setValue方法里的判断改成了前闭后开(否则对于一些序列帧动画会闪,主要后时间判断不能加等号)
Lottie文件里的LottieVisibleTrack的setValue方法里的判断改成了前闭后开(否则对于一些序列帧动画会闪,主要后时间判断不能加等号)
tbminiAdapte的createCanvas修改为根据getEnv()判断(因为Texture.WHITE上一版本修改为get方法了),且加了个独立的createTbOffscreenCanvas方法
tbminiAdapte的createCanvas修改为根据getEnv()判断(因为Texture.WHITE上一版本修改为get方法了),且加了个独立的createTbOffscreenCanvas方法
2.0.38 Mesh构造加了_instanceType,索引_indices默认值修改
TextField的updateText方法,把s._text += ""提到s._text判断前,为了赋值的0
3d的index添加导出OrthographicCamera
外层canvas标签的transform数据在获取鼠标坐标时并未考虑,比如旋转
外层canvas标签的transform数据在获取鼠标坐标时并未考虑,比如旋转
记录为了trim过的纹理,需要处理片元着色器,浮点数就是纹理原uv,再trim矩形内部的才绘制,考虑是否用discard,考虑用宏定义还是if,还是所有的都传都计算
"vec2 s = step(vec2(0.6669921875,0.4111328125),vTextureCoord) - step(vec2(0.951171875,0.65625),vTextureCoord);",
"color *= abs(s.x * s.y);",
大尺寸纹理首次传gpu使用时会掉帧,越大耗时越多。考虑如何处理(图片解析还是啥)
大尺寸纹理首次传gpu使用时会掉帧,越大耗时越多。考虑如何处理(图片解析还是啥)
...
@@ -477,16 +486,16 @@ spine.animationManager.showAni有闪烁,考虑调用下返回值的rectify
...
@@ -477,16 +486,16 @@ spine.animationManager.showAni有闪烁,考虑调用下返回值的rectify
//FloatDisplay的updateStyle方法并不会在父级visible改变时修改,考虑如何解决
//FloatDisplay的updateStyle方法并不会在父级visible改变时修改,考虑如何解决
3d的灯光应该遍历整个scene
//
3d的灯光应该遍历整个scene
到时手动排序,透明和不透明分开,然后根据材质
到时手动排序,透明和不透明分开,然后根据材质
影子,先确定那些物体能投射影子
//
影子,先确定那些物体能投射影子
以后要改成和three一样的几何数据处理方式,为了数据能修改
以后要改成和three一样的几何数据处理方式,为了数据能修改
以后光照要改成和three一样的处理方式
以后光照要改成和three一样的处理方式
Scene3D的renderWebgl里的viewport需要修改,参数计算考虑缓存,viewport必执行
//
Scene3D的renderWebgl里的viewport需要修改,参数计算考虑缓存,viewport必执行
uViewMatrix * uModelMatrix等一些量,到时都用传入,减轻着色器计算负担
uViewMatrix * uModelMatrix等一些量,到时都用传入,减轻着色器计算负担
...
@@ -497,14 +506,14 @@ uViewMatrix * uModelMatrix等一些量,到时都用传入,减轻着色器计
...
@@ -497,14 +506,14 @@ uViewMatrix * uModelMatrix等一些量,到时都用传入,减轻着色器计
createContext到时整理下,改成createGlContext,以后所有webgl上下文获取都用这个,
createContext到时整理下,改成createGlContext,以后所有webgl上下文获取都用这个,
CanvasRanderer里的插件注册,以后开个静态方法,方便扩展
CanvasRanderer里的插件注册,以后开个静态方法,方便扩展
Spine是否把showAni方法挂出来
Spine是否把showAni方法挂出来
loadSpine考虑返回的是数据而不是Spine对象
//
loadSpine考虑返回的是数据而不是Spine对象
Lottie以后有时间考虑用track的方式来封装,和3d及spine的方式一致,显示对象上挂AnimationClip,部分方法挂出来,有办法多继承?
//
Lottie以后有时间考虑用track的方式来封装,和3d及spine的方式一致,显示对象上挂AnimationClip,部分方法挂出来,有办法多继承?
shape作为遮罩在webgl模式下_boundsID不变。所以滤镜的getBound只会计算一次,到时看Shape里怎么解决;(其实所有的计算bound都有这问题)
//
shape作为遮罩在webgl模式下_boundsID不变。所以滤镜的getBound只会计算一次,到时看Shape里怎么解决;(其实所有的计算bound都有这问题)
Texture里的removeAllHandlers是否考虑加上tex.removeEventListener = function _emptyOn() { /* empty */ };
Texture里的removeAllHandlers是否考虑加上tex.removeEventListener = function _emptyOn() { /* empty */ };
//bitmapText 考虑添加垂直居中方法(还没写),简单起见,没标记过dirty,所以有需要先设置对齐,再设置text
//bitmapText 考虑添加垂直居中方法(还没写),简单起见,没标记过dirty,所以有需要先设置对齐,再设置text
//graphics的canvas模式渲染,会把子级的也缓存,现在做法,尽量不在矢量图添加子级(已改,预存子级置空,绘制后还原,待测试)
//graphics的canvas模式渲染,会把子级的也缓存,现在做法,尽量不在矢量图添加子级(已改,预存子级置空,绘制后还原,待测试)
shape的beginFill待兼容"#ff0000"和"0xff0000",还有链式方法
//
shape的beginFill待兼容"#ff0000"和"0xff0000",还有链式方法
ScrollPage在isSpringBack为false也做判断,触发SCROLL_TO_END或SCROLL_TO_HEAD事件
ScrollPage在isSpringBack为false也做判断,触发SCROLL_TO_END或SCROLL_TO_HEAD事件
...
@@ -513,18 +522,18 @@ scrollList里不放数据时默认显示了一条(其实n条叠一起),待
...
@@ -513,18 +522,18 @@ scrollList里不放数据时默认显示了一条(其实n条叠一起),待
//shape作为遮罩时并未计算过_localBoundSelf,导致遮罩加遮罩物的点击有问题,后续考虑分开计算_localBoundSelf,暂时手动执行updateShape()
//shape作为遮罩时并未计算过_localBoundSelf,导致遮罩加遮罩物的点击有问题,后续考虑分开计算_localBoundSelf,暂时手动执行updateShape()
//shape在webgl模式下作为遮罩并未绘制过离屏canvas,暂时手动执行updateShape()
//shape在webgl模式下作为遮罩并未绘制过离屏canvas,暂时手动执行updateShape()
多page上的canvas,存在资源干扰的情况,考虑RES单独缓存,不进TextureCache缓存,createTextureSheet也不缓存进TextureCache
多page上的canvas,存在资源干扰的情况,考虑RES单独缓存,不进TextureCache缓存,createTextureSheet也不缓存进TextureCache
,暂时不改,影响大
淘宝小程序的canvas路径api没用非零环绕原则,必须逆时针绘制想绘制的,顺时针绘制镂空的
淘宝小程序的canvas路径api没用非零环绕原则,必须逆时针绘制想绘制的,顺时针绘制镂空的
文本在fillText没修复前,空格用\t替代
文本在fillText没修复前,空格用\t替代
Lottie的loopout的pingpong和cycle模式,后续循环有问题,layerData的op可能比rawData的op大,暂时用补间数据用MovieClip的方式处理
//
Lottie的loopout的pingpong和cycle模式,后续循环有问题,layerData的op可能比rawData的op大,暂时用补间数据用MovieClip的方式处理
Texture.WHITE得修改下,在canvas下不能用imageData去drawImage
//
Texture.WHITE得修改下,在canvas下不能用imageData去drawImage
//h5下webgl上下丢失情况需要处理事件,待加,到时可能要加在stage上了,因为渲染器里拿不到canvas标签了
//h5下webgl上下丢失情况需要处理事件,待加,到时可能要加在stage上了,因为渲染器里拿不到canvas标签了
音频待处理,不考虑加入渲染引擎,单独搞个npm包吧,用的时候引入
//
音频待处理,不考虑加入渲染引擎,单独搞个npm包吧,用的时候引入
//Graphics的_canvasRender绘制模式下也要加finishPoly
//Graphics的_canvasRender绘制模式下也要加finishPoly
...
@@ -532,7 +541,7 @@ Texture.WHITE得修改下,在canvas下不能用imageData去drawImage
...
@@ -532,7 +541,7 @@ Texture.WHITE得修改下,在canvas下不能用imageData去drawImage
//3D模块分支dev3D,只需要里面的./src/3D文件夹和./test文件夹,暂时不会把dev的修改合并到dev3D
//3D模块分支dev3D,只需要里面的./src/3D文件夹和./test文件夹,暂时不会把dev的修改合并到dev3D
D3Renderer到时要考虑重新addAttr,重新bindVao,重新传数据upload,到时改造下vao,
//
D3Renderer到时要考虑重新addAttr,重新bindVao,重新传数据upload,到时改造下vao,
FloatDisplay会阻止鼠标事件,因为现在stage的鼠标事件是在canvas的,
FloatDisplay会阻止鼠标事件,因为现在stage的鼠标事件是在canvas的,
如果自行监听到canvas的父级上或body上,此时非全屏的canvas的鼠标事件会有问题,因为stage里只算了canvas包围盒,pageXY又不是canvas上的
如果自行监听到canvas的父级上或body上,此时非全屏的canvas的鼠标事件会有问题,因为stage里只算了canvas包围盒,pageXY又不是canvas上的
...
...
src/2d/const.ts
View file @
ca623d15
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @name VERSION
* @name VERSION
* @type {string}
* @type {string}
*/
*/
export
const
VERSION
=
"2.0.3
7
"
;
export
const
VERSION
=
"2.0.3
8
"
;
/**
/**
...
...
src/2d/mesh/Mesh.ts
View file @
ca623d15
...
@@ -105,7 +105,7 @@ export class Mesh extends Container {
...
@@ -105,7 +105,7 @@ export class Mesh extends Container {
*/
*/
constructor
(
texture
?:
Texture
,
vertices
?:
Float32Array
,
uvs
?:
Float32Array
,
indices
?:
Uint16Array
)
{
constructor
(
texture
?:
Texture
,
vertices
?:
Float32Array
,
uvs
?:
Float32Array
,
indices
?:
Uint16Array
)
{
super
();
super
();
this
.
_instanceType
=
"Mesh"
;
/**
/**
* 赋值有问题,再处理
* 赋值有问题,再处理
*/
*/
...
@@ -123,7 +123,7 @@ export class Mesh extends Container {
...
@@ -123,7 +123,7 @@ export class Mesh extends Container {
100
,
100
,
100
,
100
,
0
,
100
]);
0
,
100
]);
this
.
_indices
=
indices
||
new
Uint16Array
([
0
,
1
,
3
,
2
]);
this
.
_indices
=
indices
||
new
Uint16Array
([
0
,
1
,
3
,
2
,
3
,
1
]);
this
.
_vertexDirty
=
0
;
this
.
_vertexDirty
=
0
;
...
...
src/2d/text/TextField.ts
View file @
ca623d15
...
@@ -502,6 +502,8 @@ export class TextField extends Sprite {
...
@@ -502,6 +502,8 @@ export class TextField extends Sprite {
}
}
s
.
dirty
=
false
;
s
.
dirty
=
false
;
s
.
_boundsID
++
;
//为了Container里calculateBounds的判断;
s
.
_boundsID
++
;
//为了Container里calculateBounds的判断;
//强转字符
s
.
_text
+=
""
;
//如果没有文本
//如果没有文本
if
(
!
s
.
_text
)
{
if
(
!
s
.
_text
)
{
// if (osType == "ios") {
// if (osType == "ios") {
...
@@ -516,7 +518,7 @@ export class TextField extends Sprite {
...
@@ -516,7 +518,7 @@ export class TextField extends Sprite {
s
.
texture
.
update
()
s
.
texture
.
update
()
return
return
}
}
s
.
_text
+=
""
;
let
can
=
s
.
canvas
;
let
can
=
s
.
canvas
;
let
ctx
:
CanvasRenderingContext2D
=
/*backupCanvasContext*/
s
.
context
;
let
ctx
:
CanvasRenderingContext2D
=
/*backupCanvasContext*/
s
.
context
;
// ctx.save();
// ctx.save();
...
...
src/3d/index.ts
View file @
ca623d15
...
@@ -24,6 +24,7 @@ export * from "./helpers";
...
@@ -24,6 +24,7 @@ export * from "./helpers";
//相机
//相机
export
*
from
"./cameras/PerspectiveCamera"
;
export
*
from
"./cameras/PerspectiveCamera"
;
export
*
from
"./cameras/OrthographicCamera"
;
//渲染插件
//渲染插件
export
*
from
"./D3Renderer"
;
export
*
from
"./D3Renderer"
;
...
...
src/index.ts
View file @
ca623d15
...
@@ -36,38 +36,4 @@ export * from "./3d";
...
@@ -36,38 +36,4 @@ export * from "./3d";
export
*
from
"./spine"
;
export
*
from
"./spine"
;
//如果是浏览器环境,声明个my为null,为了无声明不报错
// export * from "./Stats";
// if (window) window["my"] = null
\ No newline at end of file
// export * from "./Stats";
/**
* ios端canvas现在是永远根据设置的width和height(不是style里的)乘以dpi返回的尺寸
*
* 安卓端测试包已根据实际尺寸返回canvas尺寸,style里的能缩放canvas
* 2d渲染模式ios的canvas没被style缩小,安卓测试包已被缩小(所以正常)
*
* 安卓正式包和ios的表现一样
*
*
*
* 待测的东西,滤镜,Mesh,
*/
/**
* 和web引擎的区别,
* 1、baseTexture上和texture有修改,
* 2、TextureManager上多了uploadData
* 3、stage上有大修改(鼠标事件名等等等)
* 4、const常用属性dpi,osType有修改
* 5、utils里添加了tbminiAdapte方法
* 6、text有大修改
* 7、loader有大修改
* 8、去掉了svga,到时能取外域文件再说
* 9、ios一帧多buffer绘制在小程序上有问题,先去掉了,原因在查,暂时应该无影响,有影响再说
* 10、安卓端createImage()返回的对象拿不到src属性,注意
* 11、
*/
// function aa(){
// HashObject
// }
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment