-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Tencent/vap
- Loading branch information
Showing
22 changed files
with
3,362 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# dependencies | ||
node_modules | ||
dist | ||
demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/** | ||
dist/** | ||
demo/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.