Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Tencent/vap
Browse files Browse the repository at this point in the history
  • Loading branch information
hexleo committed Aug 10, 2022
2 parents 2f988d6 + 5823cc4 commit 73833fa
Show file tree
Hide file tree
Showing 22 changed files with 3,362 additions and 1,000 deletions.
2 changes: 1 addition & 1 deletion Android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ repositories {
}
dependencies {
implementation "io.github.tencent:vap:2.0.25"
implementation "io.github.tencent:vap:2.0.26"
}
```

Expand Down
4 changes: 4 additions & 0 deletions web/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# dependencies
node_modules
dist
demo
17 changes: 17 additions & 0 deletions web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
browser: true,
},
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended', // @extends prettier
],
plugins: ['@typescript-eslint', 'prettier'],
};
3 changes: 3 additions & 0 deletions web/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/**
dist/**
demo/**
14 changes: 14 additions & 0 deletions web/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"semi": true,
"trailingComma": "es5",
"arrowParens": "always",
"singleQuote": true,
"bracketSpacing": true,
"useTabs": false,
"tabWidth": 2,
"printWidth": 120,
"proseWrap": "preserve",
"endOfLine": "lf",
"eslintIntegration": true,
"htmlWhitespaceSensitivity": "strict"
}
2 changes: 1 addition & 1 deletion web/demo/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
return
}
const that = this
this.vap = new Vap(Object.assign({}, {
this.vap = new Vap().play(Object.assign({}, {
container: this.$refs.anim,
// 素材视频链接
src: this.url,
Expand Down
13 changes: 9 additions & 4 deletions web/dist/gl-util.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export declare function createShader(gl: any, type: any, source: any): any;
export declare function createProgram(gl: any, vertexShader: any, fragmentShader: any): any;
export declare function createTexture(gl: any, index: number, imgData?: TexImageSource): any;
export declare function cleanWebGL(gl: any, shaders: any, program: any, textures: any, buffers: any): void;
export declare function createShader(gl: WebGLRenderingContext, type: number, source: string): WebGLShader;
export declare function createProgram(gl: WebGLRenderingContext, vertexShader: WebGLShader, fragmentShader: WebGLShader): WebGLProgram;
export declare function createTexture(gl: WebGLRenderingContext, index: number, imgData?: TexImageSource): WebGLTexture;
export declare function cleanWebGL(gl: WebGLRenderingContext, { shaders, program, textures, buffers }: {
shaders?: any[];
program?: any;
textures?: any[];
buffers?: any[];
}): void;
5 changes: 3 additions & 2 deletions web/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { VapConfig } from "./type";
import { VapConfig } from './type';
import WebglRenderVap from './webgl-render-vap';
/**
* @param options
* @constructor
* @return {null}
*/
export default function (options: VapConfig): WebglRenderVap;
export default function (options?: VapConfig): WebglRenderVap;
export declare function canWebGL(): boolean;
4 changes: 2 additions & 2 deletions web/dist/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export interface VapConfig {
config: string | {
[key: string]: any;
};
width: number;
height: number;
fps?: number;
loop: boolean;
mute?: boolean;
precache?: boolean;
accurate: boolean;
onLoadError?: (e: ErrorEvent) => void;
onDestory?: () => void;
[key: string]: any;
Expand Down
52 changes: 26 additions & 26 deletions web/dist/vap-frame-parser.d.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
export default class FrameParser {
constructor(source: any, headData: any);
private config;
private headData;
private frame;
private textureMap;
private canvas;
private ctx;
private srcData;
init(): Promise<this>;
initCanvas(): void;
loadImg(url: string): Promise<unknown>;
parseSrc(dataJson: any): Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>;
/**
* 下载json文件
* @param jsonUrl json外链
* @returns {Promise}
*/
getConfigBySrc(jsonUrl: string): Promise<unknown>;
/**
* 文字转换图片
* @param item
*/
makeTextImg(item: any): ImageData;
getFrame(frame: any): any;
}
export default class FrameParser {
constructor(source: any, headData: any);
config: any;
private headData;
private frame;
textureMap: any;
private canvas;
private ctx;
srcData: any;
init(): Promise<this>;
initCanvas(): void;
loadImg(url: string): Promise<unknown>;
parseSrc(dataJson: any): Promise<void>;
/**
* 下载json文件
* @param jsonUrl json外链
* @returns {Promise}
*/
getConfigBySrc(jsonUrl: string): Promise<unknown>;
/**
* 文字转换图片
* @param item
*/
makeTextImg(item: any): ImageData;
getFrame(frame: any): any;
}
Loading

0 comments on commit 73833fa

Please sign in to comment.