pixifact 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/compiler/builtinScenes.d.ts +0 -5
- package/dist/compiler/builtinScenes.js +0 -26
- package/dist/compiler/commands/index.js +8 -5
- package/dist/compiler/compileScenes.d.ts +4 -1
- package/dist/compiler/compileScenes.js +40 -11
- package/dist/compiler/index.d.ts +0 -5
- package/dist/compiler/index.js +0 -5
- package/dist/compiler/pixiNodeSchema.d.ts +4 -3
- package/dist/compiler/pixiNodeSchema.js +60 -6
- package/dist/compiler/sceneValidation.d.ts +3 -1
- package/dist/compiler/sceneValidation.js +105 -6
- package/dist/compiler/spec.d.ts +19 -8
- package/dist/compiler/spec.js +3 -1
- package/dist/compiler/templateParser.js +19 -0
- package/dist/compiler/templateSerializer.js +7 -1
- package/dist/compiler/typescriptCompiler.js +118 -51
- package/dist/compiler-node/builtinSceneInterfaces.d.ts +6 -0
- package/dist/compiler-node/builtinSceneInterfaces.js +27 -0
- package/dist/compiler-node/index.d.ts +2 -0
- package/dist/compiler-node/index.js +2 -0
- package/dist/{compiler → compiler-node}/scriptInterfaceExtractor.d.ts +1 -1
- package/dist/{compiler → compiler-node}/scriptInterfaceExtractor.js +157 -25
- package/dist/compiler-node/vite.d.ts +2 -1
- package/dist/compiler-node/vite.js +29 -2
- package/dist/platform/wechat/adapter.d.ts +316 -0
- package/dist/platform/wechat/adapter.js +26 -0
- package/dist/platform/wechat/application.d.ts +32 -0
- package/dist/platform/wechat/application.js +79 -0
- package/dist/platform/wechat/fetch.d.ts +1 -0
- package/dist/platform/wechat/fetch.js +145 -0
- package/dist/platform/wechat/index.d.ts +4 -0
- package/dist/platform/wechat/index.js +3 -0
- package/dist/platform/wechat/input.d.ts +12 -0
- package/dist/platform/wechat/input.js +93 -0
- package/dist/platform/wechat/lifecycle.d.ts +14 -0
- package/dist/platform/wechat/lifecycle.js +42 -0
- package/dist/platform/wechat/runtime.d.ts +49 -0
- package/dist/platform/wechat/runtime.js +189 -0
- package/dist/platform/wechat/subpackage.d.ts +1 -0
- package/dist/platform/wechat/subpackage.js +27 -0
- package/dist/platform/wechat/types.d.ts +105 -0
- package/dist/platform/wechat/types.js +3 -0
- package/dist/project/index.d.ts +23 -0
- package/dist/project/index.js +69 -0
- package/dist/runtime/BitmapLabel.d.ts +9 -0
- package/dist/runtime/BitmapLabel.js +7 -0
- package/dist/runtime/Label.d.ts +9 -0
- package/dist/runtime/Label.js +7 -0
- package/dist/runtime/ScrollContainer.d.ts +2 -0
- package/dist/runtime/ScrollContainer.js +12 -2
- package/dist/runtime/TextBoxControl.d.ts +48 -0
- package/dist/runtime/TextBoxControl.js +162 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/runtimeBehavior.d.ts +3 -0
- package/dist/runtime/runtimeBehavior.js +11 -0
- package/dist/{compiler → scene}/decorators.d.ts +2 -1
- package/dist/{compiler → scene}/decorators.js +12 -7
- package/dist/scene/index.d.ts +6 -0
- package/dist/scene/index.js +6 -0
- package/dist/scene/sceneAssetRuntime.d.ts +11 -0
- package/dist/scene/sceneAssetRuntime.js +43 -0
- package/dist/scene/sceneBindingRuntime.d.ts +10 -0
- package/dist/scene/sceneBindingRuntime.js +124 -0
- package/dist/{compiler → scene}/sceneRuntime.d.ts +7 -0
- package/dist/scene/sceneRuntime.js +85 -0
- package/package.json +11 -1
- package/dist/compiler/sceneRuntime.js +0 -22
- /package/dist/{compiler → scene}/eventRuntime.d.ts +0 -0
- /package/dist/{compiler → scene}/eventRuntime.js +0 -0
- /package/dist/{compiler → scene}/slotRuntime.d.ts +0 -0
- /package/dist/{compiler → scene}/slotRuntime.js +0 -0
|
@@ -15,6 +15,7 @@ function extractSceneScriptClasses(source, fileName, options) {
|
|
|
15
15
|
const sourceId = normalizeScriptSourceId(fileName);
|
|
16
16
|
const imports = collectNamedImports(sourceFile, sourceId);
|
|
17
17
|
const structClasses = collectStructClasses(sourceFile);
|
|
18
|
+
const variantDeclarations = collectVariantDeclarations(sourceFile);
|
|
18
19
|
const classes = [];
|
|
19
20
|
for (const statement of sourceFile.statements) {
|
|
20
21
|
if (!ts.isClassDeclaration(statement)) {
|
|
@@ -42,7 +43,8 @@ function extractSceneScriptClasses(source, fileName, options) {
|
|
|
42
43
|
}
|
|
43
44
|
const prop = memberDecoratorOptions(member, 'prop');
|
|
44
45
|
if (prop) {
|
|
45
|
-
|
|
46
|
+
assertStaticPropMember(member, name);
|
|
47
|
+
props[name] = propContract(prop, member, structClasses, variantDeclarations);
|
|
46
48
|
}
|
|
47
49
|
const event = memberDecoratorOptions(member, 'event');
|
|
48
50
|
if (event) {
|
|
@@ -318,6 +320,88 @@ function memberName(name) {
|
|
|
318
320
|
}
|
|
319
321
|
return undefined;
|
|
320
322
|
}
|
|
323
|
+
function collectVariantDeclarations(sourceFile) {
|
|
324
|
+
const variants = new Map();
|
|
325
|
+
for (const statement of sourceFile.statements) {
|
|
326
|
+
if (!ts.isVariableStatement(statement)) {
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
330
|
+
if (!ts.isIdentifier(declaration.name) || !declaration.initializer) {
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
const initializer = unwrapExpression(declaration.initializer);
|
|
334
|
+
if (!ts.isCallExpression(initializer)
|
|
335
|
+
|| !ts.isIdentifier(initializer.expression)
|
|
336
|
+
|| initializer.expression.text !== 'defineVariants') {
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
if (initializer.arguments.length !== 1) {
|
|
340
|
+
throw new Error('defineVariants accepts exactly one argument.');
|
|
341
|
+
}
|
|
342
|
+
variants.set(declaration.name.text, variantObjectValue(initializer.arguments[0], 'defineVariants argument'));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return variants;
|
|
346
|
+
}
|
|
347
|
+
function variantObjectValue(expression, label) {
|
|
348
|
+
const object = unwrapExpression(expression);
|
|
349
|
+
if (!ts.isObjectLiteralExpression(object)) {
|
|
350
|
+
throw new Error(`${label} must be an object literal.`);
|
|
351
|
+
}
|
|
352
|
+
const variants = {};
|
|
353
|
+
let expectedFields;
|
|
354
|
+
for (const property of object.properties) {
|
|
355
|
+
if (!ts.isPropertyAssignment(property)) {
|
|
356
|
+
throw new Error(`${label} only supports property assignments.`);
|
|
357
|
+
}
|
|
358
|
+
const name = memberName(property.name);
|
|
359
|
+
if (!name) {
|
|
360
|
+
throw new Error(`${label} only supports literal case names.`);
|
|
361
|
+
}
|
|
362
|
+
const caseExpression = unwrapExpression(property.initializer);
|
|
363
|
+
if (!ts.isObjectLiteralExpression(caseExpression)) {
|
|
364
|
+
throw new Error(`${label}.${name} must be an object literal.`);
|
|
365
|
+
}
|
|
366
|
+
const fields = {};
|
|
367
|
+
for (const field of caseExpression.properties) {
|
|
368
|
+
if (!ts.isPropertyAssignment(field)) {
|
|
369
|
+
throw new Error(`${label}.${name} only supports property assignments.`);
|
|
370
|
+
}
|
|
371
|
+
const fieldName = memberName(field.name);
|
|
372
|
+
if (!fieldName) {
|
|
373
|
+
throw new Error(`${label}.${name} only supports literal field names.`);
|
|
374
|
+
}
|
|
375
|
+
fields[fieldName] = literalValue(field.initializer, `${label}.${name}.${fieldName}`);
|
|
376
|
+
}
|
|
377
|
+
const fieldTypes = Object.fromEntries(Object.entries(fields).map(([field, value]) => [field, typeof value]));
|
|
378
|
+
if (!expectedFields) {
|
|
379
|
+
expectedFields = fieldTypes;
|
|
380
|
+
}
|
|
381
|
+
else if (!sameFieldTypes(expectedFields, fieldTypes)) {
|
|
382
|
+
throw new Error(`defineVariants case "${name}" must contain the same fields and field types as the first case.`);
|
|
383
|
+
}
|
|
384
|
+
variants[name] = fields;
|
|
385
|
+
}
|
|
386
|
+
if (Object.keys(variants).length === 0) {
|
|
387
|
+
throw new Error('defineVariants requires at least one case.');
|
|
388
|
+
}
|
|
389
|
+
return variants;
|
|
390
|
+
}
|
|
391
|
+
function sameFieldTypes(left, right) {
|
|
392
|
+
const leftEntries = Object.entries(left);
|
|
393
|
+
return leftEntries.length === Object.keys(right).length
|
|
394
|
+
&& leftEntries.every(([name, type]) => right[name] === type);
|
|
395
|
+
}
|
|
396
|
+
function unwrapExpression(expression) {
|
|
397
|
+
if (ts.isAsExpression(expression)
|
|
398
|
+
|| ts.isTypeAssertionExpression(expression)
|
|
399
|
+
|| ts.isSatisfiesExpression(expression)
|
|
400
|
+
|| ts.isParenthesizedExpression(expression)) {
|
|
401
|
+
return unwrapExpression(expression.expression);
|
|
402
|
+
}
|
|
403
|
+
return expression;
|
|
404
|
+
}
|
|
321
405
|
function collectStructClasses(sourceFile) {
|
|
322
406
|
const classes = new Map();
|
|
323
407
|
for (const statement of sourceFile.statements) {
|
|
@@ -355,65 +439,113 @@ function structFields(node) {
|
|
|
355
439
|
}
|
|
356
440
|
return fields;
|
|
357
441
|
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
442
|
+
function assertStaticPropMember(member, name) {
|
|
443
|
+
const isDeclareProperty = ts.isPropertyDeclaration(member)
|
|
444
|
+
&& member.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.DeclareKeyword)
|
|
445
|
+
&& !member.modifiers.some((modifier) => modifier.kind === ts.SyntaxKind.AccessorKeyword)
|
|
446
|
+
&& !member.initializer;
|
|
447
|
+
if (!isDeclareProperty) {
|
|
448
|
+
throw new Error(`@prop "${name}" must decorate a declare property without an initializer.`);
|
|
449
|
+
}
|
|
450
|
+
if (!member.type) {
|
|
451
|
+
throw new Error(`@prop "${name}" requires an explicit TypeScript property type.`);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
function propContract(prop, member, structClasses, variantDeclarations) {
|
|
455
|
+
if (!ts.isPropertyDeclaration(member) || !member.type) {
|
|
456
|
+
throw new Error('@prop requires a typed declare property.');
|
|
363
457
|
}
|
|
364
|
-
if (
|
|
365
|
-
throw new Error('@prop type
|
|
458
|
+
if (prop.type !== undefined) {
|
|
459
|
+
throw new Error('@prop type is inferred from the TypeScript property declaration; remove the type option.');
|
|
460
|
+
}
|
|
461
|
+
const defaultValue = prop.default;
|
|
462
|
+
const variantsReference = prop.variants;
|
|
463
|
+
if (variantsReference !== undefined) {
|
|
464
|
+
if (!isIdentifierValue(variantsReference)) {
|
|
465
|
+
throw new Error('@prop variants must reference a local defineVariants declaration.');
|
|
466
|
+
}
|
|
467
|
+
const variants = variantDeclarations.get(variantsReference.text);
|
|
468
|
+
if (!variants) {
|
|
469
|
+
throw new Error(`@prop variants "${variantsReference.text}" must reference a local defineVariants declaration.`);
|
|
470
|
+
}
|
|
471
|
+
if (typeof defaultValue !== 'string' || !variants[defaultValue]) {
|
|
472
|
+
throw new Error('@prop Variant default must name an existing defineVariants case.');
|
|
473
|
+
}
|
|
474
|
+
assertVariantPropertyType(member.type, variantsReference.text);
|
|
475
|
+
return {
|
|
476
|
+
type: 'variant',
|
|
477
|
+
default: defaultValue,
|
|
478
|
+
variants,
|
|
479
|
+
};
|
|
366
480
|
}
|
|
367
|
-
const primitiveType =
|
|
481
|
+
const primitiveType = primitivePropertyType(member.type);
|
|
368
482
|
if (primitiveType) {
|
|
369
483
|
if (defaultValue !== undefined && (!isSceneTemplateScalarValue(defaultValue) || sceneTemplateScalarType(defaultValue) !== primitiveType)) {
|
|
370
|
-
throw new Error(`@prop default
|
|
484
|
+
throw new Error(`@prop default must be a ${primitiveType} literal.`);
|
|
371
485
|
}
|
|
372
486
|
return {
|
|
373
487
|
type: primitiveType,
|
|
374
488
|
...(defaultValue !== undefined ? { default: defaultValue } : {}),
|
|
375
489
|
};
|
|
376
490
|
}
|
|
377
|
-
const
|
|
491
|
+
const structName = typeReferenceName(member.type);
|
|
492
|
+
if (!structName) {
|
|
493
|
+
throw new Error('@prop type must be string, number, boolean, a local struct class, or keyof a local defineVariants declaration.');
|
|
494
|
+
}
|
|
495
|
+
const structClass = structClasses.get(structName);
|
|
378
496
|
if (!structClass) {
|
|
379
|
-
throw new Error(`Struct prop type ${
|
|
497
|
+
throw new Error(`Struct prop type ${structName} was not found.`);
|
|
380
498
|
}
|
|
381
499
|
if (!structClass.exported) {
|
|
382
|
-
throw new Error(`Struct prop type ${
|
|
500
|
+
throw new Error(`Struct prop type ${structName} must be exported.`);
|
|
383
501
|
}
|
|
384
502
|
if (defaultValue !== undefined) {
|
|
385
503
|
throw new Error('@prop default is only supported for primitive props.');
|
|
386
504
|
}
|
|
387
505
|
const struct = structContractInfo(structClass.node);
|
|
388
506
|
if (struct.hasRequiredConstructorParameters) {
|
|
389
|
-
throw new Error(`Struct prop type ${
|
|
507
|
+
throw new Error(`Struct prop type ${structName} must be constructable with no required parameters.`);
|
|
390
508
|
}
|
|
391
509
|
return {
|
|
392
510
|
type: 'struct',
|
|
393
|
-
struct:
|
|
511
|
+
struct: structName,
|
|
394
512
|
fields: struct.fields,
|
|
395
513
|
};
|
|
396
514
|
}
|
|
397
|
-
function
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
515
|
+
function assertVariantPropertyType(type, variantsName) {
|
|
516
|
+
if (!ts.isTypeOperatorNode(type)
|
|
517
|
+
|| type.operator !== ts.SyntaxKind.KeyOfKeyword
|
|
518
|
+
|| !ts.isTypeQueryNode(type.type)
|
|
519
|
+
|| !ts.isIdentifier(type.type.exprName)
|
|
520
|
+
|| type.type.exprName.text !== variantsName) {
|
|
521
|
+
throw new Error(`@prop Variant type must be "keyof typeof ${variantsName}".`);
|
|
522
|
+
}
|
|
402
523
|
}
|
|
403
|
-
function
|
|
404
|
-
if (
|
|
524
|
+
function primitivePropertyType(type) {
|
|
525
|
+
if (type.kind === ts.SyntaxKind.StringKeyword) {
|
|
405
526
|
return 'string';
|
|
406
527
|
}
|
|
407
|
-
if (
|
|
528
|
+
if (type.kind === ts.SyntaxKind.NumberKeyword) {
|
|
408
529
|
return 'number';
|
|
409
530
|
}
|
|
410
|
-
if (
|
|
531
|
+
if (type.kind === ts.SyntaxKind.BooleanKeyword) {
|
|
411
532
|
return 'boolean';
|
|
412
533
|
}
|
|
413
534
|
return undefined;
|
|
414
535
|
}
|
|
536
|
+
function typeReferenceName(type) {
|
|
537
|
+
return ts.isTypeReferenceNode(type) && ts.isIdentifier(type.typeName)
|
|
538
|
+
? type.typeName.text
|
|
539
|
+
: undefined;
|
|
540
|
+
}
|
|
541
|
+
function structContractInfo(node) {
|
|
542
|
+
return {
|
|
543
|
+
fields: structFields(node),
|
|
544
|
+
hasRequiredConstructorParameters: node.members.some((member) => ts.isConstructorDeclaration(member) && member.parameters.some((parameter) => !parameter.questionToken && !parameter.initializer)),
|
|
545
|
+
};
|
|
546
|
+
}
|
|
415
547
|
function isIdentifierValue(value) {
|
|
416
|
-
return ts.isIdentifier(value);
|
|
548
|
+
return typeof value === 'object' && ts.isIdentifier(value);
|
|
417
549
|
}
|
|
418
550
|
function isSceneTemplateScalarValue(value) {
|
|
419
551
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
@@ -4,5 +4,6 @@ export interface PixifactScenesPluginOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function pixifactScenesPlugin(options?: PixifactScenesPluginOptions): {
|
|
6
6
|
name: string;
|
|
7
|
-
resolveId(id: string):
|
|
7
|
+
resolveId(id: string): "\0pixifact:scenes" | undefined;
|
|
8
|
+
load(id: string): Promise<string | undefined>;
|
|
8
9
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
1
2
|
import path from 'node:path';
|
|
2
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { generatedSceneAssetsFileName } from '../compiler/compileScenes.js';
|
|
3
5
|
function projectRootPath(projectRoot) {
|
|
4
6
|
if (typeof projectRoot === 'string') {
|
|
5
7
|
return projectRoot;
|
|
@@ -10,12 +12,37 @@ function projectRootPath(projectRoot) {
|
|
|
10
12
|
return process.cwd();
|
|
11
13
|
}
|
|
12
14
|
export function pixifactScenesPlugin(options = {}) {
|
|
13
|
-
const
|
|
15
|
+
const projectRoot = projectRootPath(options.projectRoot);
|
|
16
|
+
const generatedDir = path.resolve(projectRoot, options.generatedDir ?? '.pixifact/generated');
|
|
14
17
|
const sceneRegistry = path.join(generatedDir, 'scenes.generated.ts');
|
|
18
|
+
const sceneAssets = path.join(generatedDir, generatedSceneAssetsFileName);
|
|
19
|
+
const virtualSceneRegistry = '\0pixifact:scenes';
|
|
15
20
|
return {
|
|
16
21
|
name: 'pixifact-scenes',
|
|
17
22
|
resolveId(id) {
|
|
18
|
-
return id === 'pixifact:scenes' ?
|
|
23
|
+
return id === 'pixifact:scenes' ? virtualSceneRegistry : undefined;
|
|
24
|
+
},
|
|
25
|
+
async load(id) {
|
|
26
|
+
if (id !== virtualSceneRegistry) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const assets = JSON.parse(await readFile(sceneAssets, 'utf8'));
|
|
30
|
+
const imports = assets.map((asset, index) => `import __pixifactAsset${index + 1} from ${JSON.stringify(viteFileImport(path.resolve(projectRoot, asset), '?url'))};`);
|
|
31
|
+
const manifest = Object.fromEntries(assets.map((asset, index) => [
|
|
32
|
+
asset,
|
|
33
|
+
{ src: `__pixifactAsset${index + 1}` },
|
|
34
|
+
]));
|
|
35
|
+
const manifestSource = JSON.stringify(manifest, null, 2)
|
|
36
|
+
.replace(/"src": "(__pixifactAsset\d+)"/g, '"src": $1');
|
|
37
|
+
return [
|
|
38
|
+
...imports,
|
|
39
|
+
"import { configureSceneAssets } from 'pixifact/scene';",
|
|
40
|
+
`import ${JSON.stringify(viteFileImport(sceneRegistry))};`,
|
|
41
|
+
`configureSceneAssets(${manifestSource});`,
|
|
42
|
+
].join('\n');
|
|
19
43
|
},
|
|
20
44
|
};
|
|
21
45
|
}
|
|
46
|
+
function viteFileImport(filePath, suffix = '') {
|
|
47
|
+
return `/@fs/${filePath.replaceAll(path.sep, '/')}${suffix}`;
|
|
48
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { fetchWechatResource } from './fetch.js';
|
|
2
|
+
import type { WechatRuntime } from './runtime.js';
|
|
3
|
+
export declare function createWechatPixiAdapter(runtime: WechatRuntime): {
|
|
4
|
+
createCanvas(width?: number, height?: number): import("./types").WechatCanvas;
|
|
5
|
+
createImage: () => import("./types").WechatImage;
|
|
6
|
+
getCanvasRenderingContext2D: () => ObjectConstructor;
|
|
7
|
+
getWebGLRenderingContext: () => {
|
|
8
|
+
new (): WebGLRenderingContext;
|
|
9
|
+
prototype: WebGLRenderingContext;
|
|
10
|
+
readonly DEPTH_BUFFER_BIT: 256;
|
|
11
|
+
readonly STENCIL_BUFFER_BIT: 1024;
|
|
12
|
+
readonly COLOR_BUFFER_BIT: 16384;
|
|
13
|
+
readonly POINTS: 0;
|
|
14
|
+
readonly LINES: 1;
|
|
15
|
+
readonly LINE_LOOP: 2;
|
|
16
|
+
readonly LINE_STRIP: 3;
|
|
17
|
+
readonly TRIANGLES: 4;
|
|
18
|
+
readonly TRIANGLE_STRIP: 5;
|
|
19
|
+
readonly TRIANGLE_FAN: 6;
|
|
20
|
+
readonly ZERO: 0;
|
|
21
|
+
readonly ONE: 1;
|
|
22
|
+
readonly SRC_COLOR: 768;
|
|
23
|
+
readonly ONE_MINUS_SRC_COLOR: 769;
|
|
24
|
+
readonly SRC_ALPHA: 770;
|
|
25
|
+
readonly ONE_MINUS_SRC_ALPHA: 771;
|
|
26
|
+
readonly DST_ALPHA: 772;
|
|
27
|
+
readonly ONE_MINUS_DST_ALPHA: 773;
|
|
28
|
+
readonly DST_COLOR: 774;
|
|
29
|
+
readonly ONE_MINUS_DST_COLOR: 775;
|
|
30
|
+
readonly SRC_ALPHA_SATURATE: 776;
|
|
31
|
+
readonly FUNC_ADD: 32774;
|
|
32
|
+
readonly BLEND_EQUATION: 32777;
|
|
33
|
+
readonly BLEND_EQUATION_RGB: 32777;
|
|
34
|
+
readonly BLEND_EQUATION_ALPHA: 34877;
|
|
35
|
+
readonly FUNC_SUBTRACT: 32778;
|
|
36
|
+
readonly FUNC_REVERSE_SUBTRACT: 32779;
|
|
37
|
+
readonly BLEND_DST_RGB: 32968;
|
|
38
|
+
readonly BLEND_SRC_RGB: 32969;
|
|
39
|
+
readonly BLEND_DST_ALPHA: 32970;
|
|
40
|
+
readonly BLEND_SRC_ALPHA: 32971;
|
|
41
|
+
readonly CONSTANT_COLOR: 32769;
|
|
42
|
+
readonly ONE_MINUS_CONSTANT_COLOR: 32770;
|
|
43
|
+
readonly CONSTANT_ALPHA: 32771;
|
|
44
|
+
readonly ONE_MINUS_CONSTANT_ALPHA: 32772;
|
|
45
|
+
readonly BLEND_COLOR: 32773;
|
|
46
|
+
readonly ARRAY_BUFFER: 34962;
|
|
47
|
+
readonly ELEMENT_ARRAY_BUFFER: 34963;
|
|
48
|
+
readonly ARRAY_BUFFER_BINDING: 34964;
|
|
49
|
+
readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965;
|
|
50
|
+
readonly STREAM_DRAW: 35040;
|
|
51
|
+
readonly STATIC_DRAW: 35044;
|
|
52
|
+
readonly DYNAMIC_DRAW: 35048;
|
|
53
|
+
readonly BUFFER_SIZE: 34660;
|
|
54
|
+
readonly BUFFER_USAGE: 34661;
|
|
55
|
+
readonly CURRENT_VERTEX_ATTRIB: 34342;
|
|
56
|
+
readonly FRONT: 1028;
|
|
57
|
+
readonly BACK: 1029;
|
|
58
|
+
readonly FRONT_AND_BACK: 1032;
|
|
59
|
+
readonly CULL_FACE: 2884;
|
|
60
|
+
readonly BLEND: 3042;
|
|
61
|
+
readonly DITHER: 3024;
|
|
62
|
+
readonly STENCIL_TEST: 2960;
|
|
63
|
+
readonly DEPTH_TEST: 2929;
|
|
64
|
+
readonly SCISSOR_TEST: 3089;
|
|
65
|
+
readonly POLYGON_OFFSET_FILL: 32823;
|
|
66
|
+
readonly SAMPLE_ALPHA_TO_COVERAGE: 32926;
|
|
67
|
+
readonly SAMPLE_COVERAGE: 32928;
|
|
68
|
+
readonly NO_ERROR: 0;
|
|
69
|
+
readonly INVALID_ENUM: 1280;
|
|
70
|
+
readonly INVALID_VALUE: 1281;
|
|
71
|
+
readonly INVALID_OPERATION: 1282;
|
|
72
|
+
readonly OUT_OF_MEMORY: 1285;
|
|
73
|
+
readonly CW: 2304;
|
|
74
|
+
readonly CCW: 2305;
|
|
75
|
+
readonly LINE_WIDTH: 2849;
|
|
76
|
+
readonly ALIASED_POINT_SIZE_RANGE: 33901;
|
|
77
|
+
readonly ALIASED_LINE_WIDTH_RANGE: 33902;
|
|
78
|
+
readonly CULL_FACE_MODE: 2885;
|
|
79
|
+
readonly FRONT_FACE: 2886;
|
|
80
|
+
readonly DEPTH_RANGE: 2928;
|
|
81
|
+
readonly DEPTH_WRITEMASK: 2930;
|
|
82
|
+
readonly DEPTH_CLEAR_VALUE: 2931;
|
|
83
|
+
readonly DEPTH_FUNC: 2932;
|
|
84
|
+
readonly STENCIL_CLEAR_VALUE: 2961;
|
|
85
|
+
readonly STENCIL_FUNC: 2962;
|
|
86
|
+
readonly STENCIL_FAIL: 2964;
|
|
87
|
+
readonly STENCIL_PASS_DEPTH_FAIL: 2965;
|
|
88
|
+
readonly STENCIL_PASS_DEPTH_PASS: 2966;
|
|
89
|
+
readonly STENCIL_REF: 2967;
|
|
90
|
+
readonly STENCIL_VALUE_MASK: 2963;
|
|
91
|
+
readonly STENCIL_WRITEMASK: 2968;
|
|
92
|
+
readonly STENCIL_BACK_FUNC: 34816;
|
|
93
|
+
readonly STENCIL_BACK_FAIL: 34817;
|
|
94
|
+
readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818;
|
|
95
|
+
readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819;
|
|
96
|
+
readonly STENCIL_BACK_REF: 36003;
|
|
97
|
+
readonly STENCIL_BACK_VALUE_MASK: 36004;
|
|
98
|
+
readonly STENCIL_BACK_WRITEMASK: 36005;
|
|
99
|
+
readonly VIEWPORT: 2978;
|
|
100
|
+
readonly SCISSOR_BOX: 3088;
|
|
101
|
+
readonly COLOR_CLEAR_VALUE: 3106;
|
|
102
|
+
readonly COLOR_WRITEMASK: 3107;
|
|
103
|
+
readonly UNPACK_ALIGNMENT: 3317;
|
|
104
|
+
readonly PACK_ALIGNMENT: 3333;
|
|
105
|
+
readonly MAX_TEXTURE_SIZE: 3379;
|
|
106
|
+
readonly MAX_VIEWPORT_DIMS: 3386;
|
|
107
|
+
readonly SUBPIXEL_BITS: 3408;
|
|
108
|
+
readonly RED_BITS: 3410;
|
|
109
|
+
readonly GREEN_BITS: 3411;
|
|
110
|
+
readonly BLUE_BITS: 3412;
|
|
111
|
+
readonly ALPHA_BITS: 3413;
|
|
112
|
+
readonly DEPTH_BITS: 3414;
|
|
113
|
+
readonly STENCIL_BITS: 3415;
|
|
114
|
+
readonly POLYGON_OFFSET_UNITS: 10752;
|
|
115
|
+
readonly POLYGON_OFFSET_FACTOR: 32824;
|
|
116
|
+
readonly TEXTURE_BINDING_2D: 32873;
|
|
117
|
+
readonly SAMPLE_BUFFERS: 32936;
|
|
118
|
+
readonly SAMPLES: 32937;
|
|
119
|
+
readonly SAMPLE_COVERAGE_VALUE: 32938;
|
|
120
|
+
readonly SAMPLE_COVERAGE_INVERT: 32939;
|
|
121
|
+
readonly COMPRESSED_TEXTURE_FORMATS: 34467;
|
|
122
|
+
readonly DONT_CARE: 4352;
|
|
123
|
+
readonly FASTEST: 4353;
|
|
124
|
+
readonly NICEST: 4354;
|
|
125
|
+
readonly GENERATE_MIPMAP_HINT: 33170;
|
|
126
|
+
readonly BYTE: 5120;
|
|
127
|
+
readonly UNSIGNED_BYTE: 5121;
|
|
128
|
+
readonly SHORT: 5122;
|
|
129
|
+
readonly UNSIGNED_SHORT: 5123;
|
|
130
|
+
readonly INT: 5124;
|
|
131
|
+
readonly UNSIGNED_INT: 5125;
|
|
132
|
+
readonly FLOAT: 5126;
|
|
133
|
+
readonly DEPTH_COMPONENT: 6402;
|
|
134
|
+
readonly ALPHA: 6406;
|
|
135
|
+
readonly RGB: 6407;
|
|
136
|
+
readonly RGBA: 6408;
|
|
137
|
+
readonly LUMINANCE: 6409;
|
|
138
|
+
readonly LUMINANCE_ALPHA: 6410;
|
|
139
|
+
readonly UNSIGNED_SHORT_4_4_4_4: 32819;
|
|
140
|
+
readonly UNSIGNED_SHORT_5_5_5_1: 32820;
|
|
141
|
+
readonly UNSIGNED_SHORT_5_6_5: 33635;
|
|
142
|
+
readonly FRAGMENT_SHADER: 35632;
|
|
143
|
+
readonly VERTEX_SHADER: 35633;
|
|
144
|
+
readonly MAX_VERTEX_ATTRIBS: 34921;
|
|
145
|
+
readonly MAX_VERTEX_UNIFORM_VECTORS: 36347;
|
|
146
|
+
readonly MAX_VARYING_VECTORS: 36348;
|
|
147
|
+
readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661;
|
|
148
|
+
readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660;
|
|
149
|
+
readonly MAX_TEXTURE_IMAGE_UNITS: 34930;
|
|
150
|
+
readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349;
|
|
151
|
+
readonly SHADER_TYPE: 35663;
|
|
152
|
+
readonly DELETE_STATUS: 35712;
|
|
153
|
+
readonly LINK_STATUS: 35714;
|
|
154
|
+
readonly VALIDATE_STATUS: 35715;
|
|
155
|
+
readonly ATTACHED_SHADERS: 35717;
|
|
156
|
+
readonly ACTIVE_UNIFORMS: 35718;
|
|
157
|
+
readonly ACTIVE_ATTRIBUTES: 35721;
|
|
158
|
+
readonly SHADING_LANGUAGE_VERSION: 35724;
|
|
159
|
+
readonly CURRENT_PROGRAM: 35725;
|
|
160
|
+
readonly NEVER: 512;
|
|
161
|
+
readonly LESS: 513;
|
|
162
|
+
readonly EQUAL: 514;
|
|
163
|
+
readonly LEQUAL: 515;
|
|
164
|
+
readonly GREATER: 516;
|
|
165
|
+
readonly NOTEQUAL: 517;
|
|
166
|
+
readonly GEQUAL: 518;
|
|
167
|
+
readonly ALWAYS: 519;
|
|
168
|
+
readonly KEEP: 7680;
|
|
169
|
+
readonly REPLACE: 7681;
|
|
170
|
+
readonly INCR: 7682;
|
|
171
|
+
readonly DECR: 7683;
|
|
172
|
+
readonly INVERT: 5386;
|
|
173
|
+
readonly INCR_WRAP: 34055;
|
|
174
|
+
readonly DECR_WRAP: 34056;
|
|
175
|
+
readonly VENDOR: 7936;
|
|
176
|
+
readonly RENDERER: 7937;
|
|
177
|
+
readonly VERSION: 7938;
|
|
178
|
+
readonly NEAREST: 9728;
|
|
179
|
+
readonly LINEAR: 9729;
|
|
180
|
+
readonly NEAREST_MIPMAP_NEAREST: 9984;
|
|
181
|
+
readonly LINEAR_MIPMAP_NEAREST: 9985;
|
|
182
|
+
readonly NEAREST_MIPMAP_LINEAR: 9986;
|
|
183
|
+
readonly LINEAR_MIPMAP_LINEAR: 9987;
|
|
184
|
+
readonly TEXTURE_MAG_FILTER: 10240;
|
|
185
|
+
readonly TEXTURE_MIN_FILTER: 10241;
|
|
186
|
+
readonly TEXTURE_WRAP_S: 10242;
|
|
187
|
+
readonly TEXTURE_WRAP_T: 10243;
|
|
188
|
+
readonly TEXTURE_2D: 3553;
|
|
189
|
+
readonly TEXTURE: 5890;
|
|
190
|
+
readonly TEXTURE_CUBE_MAP: 34067;
|
|
191
|
+
readonly TEXTURE_BINDING_CUBE_MAP: 34068;
|
|
192
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069;
|
|
193
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070;
|
|
194
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071;
|
|
195
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072;
|
|
196
|
+
readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073;
|
|
197
|
+
readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074;
|
|
198
|
+
readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076;
|
|
199
|
+
readonly TEXTURE0: 33984;
|
|
200
|
+
readonly TEXTURE1: 33985;
|
|
201
|
+
readonly TEXTURE2: 33986;
|
|
202
|
+
readonly TEXTURE3: 33987;
|
|
203
|
+
readonly TEXTURE4: 33988;
|
|
204
|
+
readonly TEXTURE5: 33989;
|
|
205
|
+
readonly TEXTURE6: 33990;
|
|
206
|
+
readonly TEXTURE7: 33991;
|
|
207
|
+
readonly TEXTURE8: 33992;
|
|
208
|
+
readonly TEXTURE9: 33993;
|
|
209
|
+
readonly TEXTURE10: 33994;
|
|
210
|
+
readonly TEXTURE11: 33995;
|
|
211
|
+
readonly TEXTURE12: 33996;
|
|
212
|
+
readonly TEXTURE13: 33997;
|
|
213
|
+
readonly TEXTURE14: 33998;
|
|
214
|
+
readonly TEXTURE15: 33999;
|
|
215
|
+
readonly TEXTURE16: 34000;
|
|
216
|
+
readonly TEXTURE17: 34001;
|
|
217
|
+
readonly TEXTURE18: 34002;
|
|
218
|
+
readonly TEXTURE19: 34003;
|
|
219
|
+
readonly TEXTURE20: 34004;
|
|
220
|
+
readonly TEXTURE21: 34005;
|
|
221
|
+
readonly TEXTURE22: 34006;
|
|
222
|
+
readonly TEXTURE23: 34007;
|
|
223
|
+
readonly TEXTURE24: 34008;
|
|
224
|
+
readonly TEXTURE25: 34009;
|
|
225
|
+
readonly TEXTURE26: 34010;
|
|
226
|
+
readonly TEXTURE27: 34011;
|
|
227
|
+
readonly TEXTURE28: 34012;
|
|
228
|
+
readonly TEXTURE29: 34013;
|
|
229
|
+
readonly TEXTURE30: 34014;
|
|
230
|
+
readonly TEXTURE31: 34015;
|
|
231
|
+
readonly ACTIVE_TEXTURE: 34016;
|
|
232
|
+
readonly REPEAT: 10497;
|
|
233
|
+
readonly CLAMP_TO_EDGE: 33071;
|
|
234
|
+
readonly MIRRORED_REPEAT: 33648;
|
|
235
|
+
readonly FLOAT_VEC2: 35664;
|
|
236
|
+
readonly FLOAT_VEC3: 35665;
|
|
237
|
+
readonly FLOAT_VEC4: 35666;
|
|
238
|
+
readonly INT_VEC2: 35667;
|
|
239
|
+
readonly INT_VEC3: 35668;
|
|
240
|
+
readonly INT_VEC4: 35669;
|
|
241
|
+
readonly BOOL: 35670;
|
|
242
|
+
readonly BOOL_VEC2: 35671;
|
|
243
|
+
readonly BOOL_VEC3: 35672;
|
|
244
|
+
readonly BOOL_VEC4: 35673;
|
|
245
|
+
readonly FLOAT_MAT2: 35674;
|
|
246
|
+
readonly FLOAT_MAT3: 35675;
|
|
247
|
+
readonly FLOAT_MAT4: 35676;
|
|
248
|
+
readonly SAMPLER_2D: 35678;
|
|
249
|
+
readonly SAMPLER_CUBE: 35680;
|
|
250
|
+
readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338;
|
|
251
|
+
readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339;
|
|
252
|
+
readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340;
|
|
253
|
+
readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341;
|
|
254
|
+
readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922;
|
|
255
|
+
readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373;
|
|
256
|
+
readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975;
|
|
257
|
+
readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738;
|
|
258
|
+
readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739;
|
|
259
|
+
readonly COMPILE_STATUS: 35713;
|
|
260
|
+
readonly LOW_FLOAT: 36336;
|
|
261
|
+
readonly MEDIUM_FLOAT: 36337;
|
|
262
|
+
readonly HIGH_FLOAT: 36338;
|
|
263
|
+
readonly LOW_INT: 36339;
|
|
264
|
+
readonly MEDIUM_INT: 36340;
|
|
265
|
+
readonly HIGH_INT: 36341;
|
|
266
|
+
readonly FRAMEBUFFER: 36160;
|
|
267
|
+
readonly RENDERBUFFER: 36161;
|
|
268
|
+
readonly RGBA4: 32854;
|
|
269
|
+
readonly RGB5_A1: 32855;
|
|
270
|
+
readonly RGBA8: 32856;
|
|
271
|
+
readonly RGB565: 36194;
|
|
272
|
+
readonly DEPTH_COMPONENT16: 33189;
|
|
273
|
+
readonly STENCIL_INDEX8: 36168;
|
|
274
|
+
readonly DEPTH_STENCIL: 34041;
|
|
275
|
+
readonly RENDERBUFFER_WIDTH: 36162;
|
|
276
|
+
readonly RENDERBUFFER_HEIGHT: 36163;
|
|
277
|
+
readonly RENDERBUFFER_INTERNAL_FORMAT: 36164;
|
|
278
|
+
readonly RENDERBUFFER_RED_SIZE: 36176;
|
|
279
|
+
readonly RENDERBUFFER_GREEN_SIZE: 36177;
|
|
280
|
+
readonly RENDERBUFFER_BLUE_SIZE: 36178;
|
|
281
|
+
readonly RENDERBUFFER_ALPHA_SIZE: 36179;
|
|
282
|
+
readonly RENDERBUFFER_DEPTH_SIZE: 36180;
|
|
283
|
+
readonly RENDERBUFFER_STENCIL_SIZE: 36181;
|
|
284
|
+
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048;
|
|
285
|
+
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049;
|
|
286
|
+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050;
|
|
287
|
+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051;
|
|
288
|
+
readonly COLOR_ATTACHMENT0: 36064;
|
|
289
|
+
readonly DEPTH_ATTACHMENT: 36096;
|
|
290
|
+
readonly STENCIL_ATTACHMENT: 36128;
|
|
291
|
+
readonly DEPTH_STENCIL_ATTACHMENT: 33306;
|
|
292
|
+
readonly NONE: 0;
|
|
293
|
+
readonly FRAMEBUFFER_COMPLETE: 36053;
|
|
294
|
+
readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054;
|
|
295
|
+
readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055;
|
|
296
|
+
readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057;
|
|
297
|
+
readonly FRAMEBUFFER_UNSUPPORTED: 36061;
|
|
298
|
+
readonly FRAMEBUFFER_BINDING: 36006;
|
|
299
|
+
readonly RENDERBUFFER_BINDING: 36007;
|
|
300
|
+
readonly MAX_RENDERBUFFER_SIZE: 34024;
|
|
301
|
+
readonly INVALID_FRAMEBUFFER_OPERATION: 1286;
|
|
302
|
+
readonly UNPACK_FLIP_Y_WEBGL: 37440;
|
|
303
|
+
readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441;
|
|
304
|
+
readonly CONTEXT_LOST_WEBGL: 37442;
|
|
305
|
+
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443;
|
|
306
|
+
readonly BROWSER_DEFAULT_WEBGL: 37444;
|
|
307
|
+
};
|
|
308
|
+
getNavigator: () => {
|
|
309
|
+
gpu: null;
|
|
310
|
+
userAgent: string;
|
|
311
|
+
};
|
|
312
|
+
getBaseUrl: () => string;
|
|
313
|
+
getFontFaceSet: () => null;
|
|
314
|
+
fetch: typeof fetchWechatResource;
|
|
315
|
+
parseXML: () => Document;
|
|
316
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { fetchWechatResource } from './fetch.js';
|
|
2
|
+
import { wechatApi } from './types.js';
|
|
3
|
+
export function createWechatPixiAdapter(runtime) {
|
|
4
|
+
const wx = wechatApi();
|
|
5
|
+
const webGL1Constructor = globalThis.WebGLRenderingContext
|
|
6
|
+
?? (runtime.webGLVersion === 1 ? runtime.context.constructor : class WebGLRenderingContextFallback {
|
|
7
|
+
});
|
|
8
|
+
return {
|
|
9
|
+
createCanvas(width = 1, height = 1) {
|
|
10
|
+
const canvas = wx.createOffscreenCanvas?.({ type: '2d', width, height }) ?? wx.createCanvas();
|
|
11
|
+
canvas.width = width;
|
|
12
|
+
canvas.height = height;
|
|
13
|
+
return canvas;
|
|
14
|
+
},
|
|
15
|
+
createImage: () => wx.createImage(),
|
|
16
|
+
getCanvasRenderingContext2D: () => Object,
|
|
17
|
+
getWebGLRenderingContext: () => webGL1Constructor,
|
|
18
|
+
getNavigator: () => ({ gpu: null, userAgent: runtime.userAgent }),
|
|
19
|
+
getBaseUrl: () => '',
|
|
20
|
+
getFontFaceSet: () => null,
|
|
21
|
+
fetch: fetchWechatResource,
|
|
22
|
+
parseXML: () => {
|
|
23
|
+
throw new Error('XML parsing is not implemented for the WeChat target.');
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import 'pixi.js/unsafe-eval';
|
|
2
|
+
import 'pixi.js/events';
|
|
3
|
+
import { Container, Rectangle, Ticker, WebGLRenderer, type ColorSource, type EventSystemFeatures } from 'pixi.js';
|
|
4
|
+
import { type WechatPointerBinding } from './input.js';
|
|
5
|
+
import { type WechatLifecycleBinding } from './lifecycle.js';
|
|
6
|
+
import { type WechatRuntime } from './runtime.js';
|
|
7
|
+
import type { WechatCanvas } from './types.js';
|
|
8
|
+
export interface WechatPixiApplicationOptions {
|
|
9
|
+
antialias?: boolean;
|
|
10
|
+
autoStart?: boolean;
|
|
11
|
+
backgroundAlpha?: number;
|
|
12
|
+
backgroundColor?: ColorSource;
|
|
13
|
+
eventFeatures?: Partial<EventSystemFeatures>;
|
|
14
|
+
onHide?(): void;
|
|
15
|
+
onShow?(): void;
|
|
16
|
+
resolution?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface WechatPixiApplication {
|
|
19
|
+
readonly canvas: WechatCanvas;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
readonly input: WechatPointerBinding;
|
|
22
|
+
readonly lifecycle: WechatLifecycleBinding;
|
|
23
|
+
render(): void;
|
|
24
|
+
readonly renderer: WebGLRenderer;
|
|
25
|
+
readonly runtime: WechatRuntime;
|
|
26
|
+
readonly screen: Rectangle;
|
|
27
|
+
readonly stage: Container;
|
|
28
|
+
start(): void;
|
|
29
|
+
stop(): void;
|
|
30
|
+
readonly ticker: Ticker;
|
|
31
|
+
}
|
|
32
|
+
export declare function createWechatPixiApplication(options?: WechatPixiApplicationOptions): Promise<WechatPixiApplication>;
|