open-index/open-npm huggingface dataset:
npm package: @oasis-engine/engine-spine
Description: oasis spine runtime
Latest version: 0.1.4

A simple, high-perfomance spine runtime using oasis-engine BufferMesh API ～

## Badges

[![TNPM version][tnpm-image]][tnpm-url]
[![TNPM downloads][tnpm-downloads-image]][tnpm-url]
[![install size][install-size-image]][install-size-url]

[tnpm-image]: https://npm.alibaba-inc.com/badge/v/@oasis-engine/engine-spine.svg
[tnpm-url]: https://npm.alibaba-inc.com/package/@oasis-engine/engine-spine
[tnpm-downloads-image]: https://npm.alibaba-inc.com/badge/d/@oasis-engine/engine-spine.svg

--------------------

## Install
```
npm i @oasis-engine/engine-spine --save
```
## 
## Usage
### Resource Load
```typescript
// import * as o3 from 'oasis-engine';
import '@oasis-engine/engine-spine';

init();

function init() {
	// oasis initial code: https://github.com/oasis-engine/engine#usage
  // root: Engine root entity.
  loadSpine(root);
  engine.run();
}

// When SpineAnimation is imported, a SpineLoader is automatically register to the engine loader.
// And then you can use engine.resourceManager to load spine file.

// You should specify resource type in 'spine' and pass resource cdn link.
// When pass single url, we assume that the .json(or .bin), .atlas and .png files
// that correspond to the spine file are in the same base URL and that the .json and .atlas files have the same name.
// When pass multiple url in an array, you need to pass three typeof files: .json(or .bin),.atlas and .png files.

async function loadSpine(root) {
  const spineEntity = await engine.resourceManager.load(
    {
      url: 'Your spine animation file(.json or .bin).',
      type: 'spine',
    },
    // {
      // urls: [
        // 'Your spine animation file(.json or .bin).',
    		// 'atlas file',
    		// 'texture image'
      // ],
      // type: 'spine',
    // }
  );
  root.addChild(spineEntity);
}

```


### Animation Play
```typescript
import { SpineAnimation } from '@oasis-engine/engine-spine';

const spineEntity = await engine.resourceManager.load(
  {
    url: 'Your spine animation file(.json or .bin).',
    type: 'spine',
  },
);
root.addChild(spineEntity);

// You can get skeleton and animationState from SpineAnimation component.
// And use spine-core API to play animation or do other things~
// spineAnimation.state(AnimationState): http://zh.esotericsoftware.com/spine-api-reference#AnimationState
// spineAnimation.skeleton(Skeleton): http://zh.esotericsoftware.com/spine-api-reference#Skeleton
const spineAnimation = spineEntity.getComponent(SpineAnimation);
spineAnimation.state.setAnimation(0, 'your_animation_name', true);

```


## Spine Version
oasis-engine 0.2 & engine-spine 0.1 - this branch, latest npm
npm package: @oasis-engine/lottie
Description: Lottie runtime of oasis engine
Latest version: 0.9.2

# Oasis Lottie

<a href="https://www.npmjs.com/package/@oasis-engine/lottie"><img src="https://img.shields.io/npm/v/@oasis-engine/lottie"/></a>
![npm-size](https://img.shields.io/bundlephobia/minzip/@oasis-engine/lottie)
![npm-download](https://img.shields.io/npm/dm/@oasis-engine/lottie)

This is a [lottie](https://airbnb.design/lottie/) runtime created by [oasis engine](https://github.com/oasis-engine/engine). Currently, It can only render **sprite elements** in the lottie tree. It is high-performance owing to drawing all sprites in batch, which is different from svg or canvas renderer of [lottie-web](https://github.com/airbnb/lottie-web). See more info: [documentation](https://oasisengine.cn/0.6/docs/lottie-cn).

## Features
- [x] Sprite element: transform and opacity animation.
- [x] 3D rotation: rotate element in 3D space.
- [x] Animation clip: play animation clip.

#### TODO
- [ ] Sprite mask
- [ ] Shape element
- [ ] Text
- [ ] Expression

## Usage

Before using the code below, you should transform original lottie JSON file ( images must be base64-encoding strings) to oasis standard lottie files. It's convenient to complete the task with [tool-atlas-lottie](https://www.npmjs.com/package/@oasis-engine/tool-atlas-lottie) which will generate a folder which contains three files: a processed lottie JSON file, an atlas file and an image.

```typescript
import { LottieAnimation } from "@oasis-engine/lottie";

// Load lottie json、atlas file with engine's `resourceManager`
engine.resourceManager.load({
  urls: [
    "https://gw.alipayobjects.com/os/bmw-prod/b46be138-e48b-4957-8071-7229661aba53.json",
    "https://gw.alipayobjects.com/os/bmw-prod/6447fc36-db32-4834-9579-24fe33534f55.atlas"
  ],
  type: 'lottie'
}).then((lottieEntity) => {
  // Add lottie entity created to scene 
  root.addChild(lottieEntity);

  // Get `LottieAnimation` component and play the animation
  const lottie = lottieEntity.getComponent(LottieAnimation);
  lottie.isLooping = true;
  lottie.speed = 1;
  lottie.play();
});
```
## Install

```bash
npm i @oasis-engine/lottie --save
```

## Contributing
This project is [work-in-progress](https://github.com/orgs/oasis-engine/projects/1). Everyone is welcome to create issues or submit pull requests. Make sure to read the [Contributing Guide](https://github.com/oasis-engine/engine/blob/main/.github/HOW_TO_CONTRIBUTE.md) before submitting changes.

## Dev

1.Clone this repository and install the dependencies:

```bash
npm i
```

2.Run the example:

```bash
npm run example
```
## License

MIT
npm package: @oasis-engine/mars
Description: my awesome project
Latest version: 0.5.0

# Oasis Mars

<a href="https://www.npmjs.com/package/@oasis-engine/mars"><img src="https://img.shields.io/npm/v/@oasis-engine/mars"/></a>
![npm-size](https://img.shields.io/bundlephobia/minzip/@oasis-engine/mars)
![npm-download](https://img.shields.io/npm/dm/@oasis-engine/mars)

This is a [mars](https://render.alipay.com/p/s/mars-editor) runtime created by [oasis engine](https://github.com/oasis-engine/engine).

## Badges

[![TNPM version][tnpm-image]][tnpm-url]
[![TNPM downloads][tnpm-downloads-image]][tnpm-url]

[tnpm-image]: https://npm.alibaba-inc.com/badge/v/@oasis-engine/mars.svg
[tnpm-url]: https://npm.alibaba-inc.com/package/@oasis-engine/mars
[tnpm-downloads-image]: https://npm.alibaba-inc.com/badge/d/@oasis-engine/mars.svg

--------------------

## Usage

```typescript
import { MarsComponent, MarsResource } from "@oasis-engine/mars";

const renderer = entity.addComponent(MarsComponent);
const marsJson = 'https://gw.alipayobjects.com/os/gltf-asset/o3-e/RVITQTIWPTYE/-2123982445-2341f.json';
MarsResource.loadSceneAsync(marsJson, {}, engine.resourceManager).then((resource) => {
  renderer.resource = resource;
  renderer.play();
});
```

## Install

```bask
tnpm i @oasis-engine/mars --save
```

## Dev

1、Clone this repository and install the dependencies:

```bash
tnpm i
```

2、Run the example:

```bash
tnpm run example
```

## License

MIT
npm package: @oasis-engine/miniprogram-adapter
Description: adapter of miniprogram
Latest version: 0.3.10

# miniprogram-adapter

帮助互动框架适配到阿里系小程序。抹平 dom api 和小程序 api 的差异，目前适配对象：

  - 'window',
  - 'atob',
  - 'devicePixelRatio',
  - 'document',
  - 'Element',
  - 'Event',
  - 'EventTarget',
  - 'HTMLCanvasElement',
  - 'HTMLElement',
  - 'HTMLMediaElement',
  - 'HTMLVideoElement',
  - 'Image',
  - 'navigator',
  - 'Node',
  - 'requestAnimationFrame',
  - 'cancelAnimationFrame',
  - 'screen',
  - 'XMLHttpRequest',
  - 'performance',

## 适配用法

**以 rollup 为例**，使用 webpack 方案找到对应的方法即可：

1. 安装 @rollup/plugin-inject 。

2. 利用 @rollup/plugin-inject 在打包的过程中注入适配对象到代码中。

3. (可选) 若使用的 monorepo 仓库，可使用 @rollup/plugin-modify 替换引用模块。l

下面是小程序 `rollup.miniprogram.plugin.js` 示例可以供参考：

``` JavaScript
import inject from 'rollup-plugin-inject';
import modify from 'rollup-plugin-modify';

const module = '@oasis-engine/miniprogram-adapter';

function register(name) {
  return [module, name];
}

const adapterArray = [
  'window',
  'atob',
  'devicePixelRatio',
  'document',
  'Element',
  'Event',
  'EventTarget',
  'HTMLCanvasElement',
  'HTMLElement',
  'HTMLMediaElement',
  'HTMLVideoElement',
  'Image',
  'navigator',
  'Node',
  'requestAnimationFrame',
  'cancelAnimationFrame',
  'screen',
  'XMLHttpRequest',
  'performance',
];
const adapterVars = {};

adapterArray.forEach(name => {
  adapterVars[name] = register(name);
});

export default [
  inject(adapterVars),
  modify({
    find: /@oasis-engine\/([\w-]*)/g,
    replace: (match, moduleName) => `@oasis-engine/${moduleName}/dist/miniprogram`
  }),
];
```