JSPM

@icanvas/core

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q108264F
  • License GPL-3.0-or-later

这是icanvas的核心包

Package Exports

  • @icanvas/core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@icanvas/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

iCanvas核心Api文档


Event

Event是EventEmitter3项目的实例


Component

Component是基础显示对象,所有显示对象(场景、图像、滚动界面等)都从它开始


Options = {}

Options下用来放置全局参数


Pos

Pos是用来获取全局定位坐标的


Api

Api下面包含了许多快捷方法的封装

方法 说明摘要
Api.Canvas 生成并返回canvas对象
Api.System 生成并返回部分系统信息
Api.Req 进行网络请求
Api.Touch 开始监听触摸事件
Api.Font 加载字体文件
Api.Toast 界面提示框
Api.Storage 内容缓存
Api.File 文件操作器
Api.Login 微信登陆
Api.Navigate 微信APPID跳转
Api.Share 微信分享

Res

Res下面包含了图片与音频资源控制器

控制器 说明摘要
Res.Image 图片资源控制器
Res.Audio 音频资源控制器

Math

Math包含了许多数学工具

控制器 说明摘要
Math.Random 随机工具
Math.Color 颜色转换工具
Math.Array 扩展数组
Math.Vector 不定纬度向量
Math.Vector2 二维向量
Math.Vector3 三维向量
Math.Matrix3 二维矩阵 3*3
Math.Matrix4 三维矩阵 4*4

其它

  • 开发模式下全局可以打印GAME对象,生产模式下全局GAME将被屏蔽