open-index/open-npm huggingface dataset:
npm package: @ocio/three-camera-utils
Description: `npm i @ocio/three-camera-utils`
Latest version: 2.5.2

## Install

`npm i @ocio/three-camera-utils`

## Example

```js
import * as THREE from 'three'
import OrbitControls from 'three-orbitcontrols'
import {
    changeRotation,
    changePosition,
    createLimitPan,
} from '@ocio/three-camera-utils'

const camera = new THREE.PerspectiveCamera(
    fov: 10,
    window.innerWidth / window.innerHeight,
    near: 1,
    far: 9999
)
const controls = new OrbitControls(camera, renderer.domElement);

// changeRotation
changeRotation({ angleV: 45, angleH: 45, distance:100, controls, camera });

// changePosition
changePosition({ x: 0, z: 0, camera, controls })

// limitPan
const limitPan = createLimitPan({ camera, controls, THREE });
controls.addEventListener("change", e => {
  limitPan({ maxX: 25, maxZ: 25 });
});
```

## Demo

https://codesandbox.io/s/funny-bhabha-kjyfw
npm package: @ocio/three-spriteanimated
Description: `npm i @ocio/three-spriteanimated`
Latest version: 2.0.1

# Install

`npm i @ocio/three-spriteanimated`

# API

```js
import SpriteAnimated from '@ocio/three-spriteanimated'
const soldier = SpriteAnimated()
```

## Methods

### .play()

### .pause()

### .goto(number)

### .update(delta)

### .addFrames({ material, framesHorizontal, framesVertical, [flipHorizontal, flipVertical, frameDisplayDuration ]})

```js
soldier.addFrames({
    material,
    framesHorizontal: 30,
    framesVertical: 2,
    // flipHorizontal: false,
    // flipVertical: false,
    // frameDisplayDuration: 1000 / 30
})
```

### .sprites

```js
scene.add(soldier.sprites) // .sprites is a THREE.Group
```

### .setKeyFrame(number, { onLeaveFrame })

```js
// When the 29 frame is about to end we move to the 0 frame to generate a loop
soldier.setKeyFrame(29, {
    onLeaveFrame: () => 0,
})
```

# Quick Example

```js
// https://www.codeandweb.com/free-sprite-sheet-packer
import * as THREE from 'three'
import SpriteAnimated from '@ocio/three-spriteanimated'

// BASIC THREE WORLD
const scene = new THREE.Scene()
const renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true })
const camera = new THREE.PerspectiveCamera(
    25,
    window.innerWidth / window.innerHeight,
    1,
    999999
)
camera.position.set(5, 5, 5)
camera.lookAt(new THREE.Vector3(0, 0, 0))
renderer.setSize(window.innerWidth, window.innerHeight)
document.body.appendChild(renderer.domElement)
// BASIC THREE WORLD

// Importing texture
const url = 'https://i.ibb.co/k0sw5NS/60.png'
const loader = new THREE.TextureLoader()
const material = new THREE.SpriteMaterial({ map: loader.load(url) })

// Creating sprite
const soldier = SpriteAnimated()
soldier.addFrames({
    material,
    framesHorizontal: 30,
    framesVertical: 2,
})
scene.add(soldier.sprites)

// animate
const clock = new THREE.Clock()
function animate(time) {
    renderer.render(scene, camera)
    requestAnimationFrame(animate)

    soldier.update(clock.getDelta()) // We must update our sprite any time
}
animate()
```

# Demos

`npm run dev`

# Tools (Texture Packers)

https://www.codeandweb.com/free-sprite-sheet-packer
https://www.codeandweb.com/texturepacker
http://free-tex-packer.com/download/
npm package: @ocis/code-review
Description: This is a program that auto review code changes from gitlab MR by LLM.
Latest version: 1.0.4

# @ocis/code-review

This is a program that auto review code changes from gitlab MR by LLM.

## Prerequisites

- Node.js >= 12

## Install

```sh
npm install -g @twsc/code-review
```

## Quick Start

To quick start the code review, run the following command:

```sh
code-review start <options>
```

Where <options> are:
- `--llm`: llm code review tool select, tool list:
  - chatgpt
  - codellama
- `--llmtoken`: llm api token (You can also set environment variables `LLM_TOKEN`)
- `--gitlab`: gitlab api token (You can also set environment variables `GITLAB_TOKEN`)
- `--mr`: gitlab mr url
- `--model`: llm model (default is "codellama-34b-instruct")
- `--language`: llm language (default is "Traditional Chinese")
- `--automode`: Automatic mode does not do Q&A (default is "0")
- `--reviewmode`: Review mode select, can choose "debug" or "suggestion" (default is "debug")
- `--temperature`: LLM temperature (default is "1")
- `--top_k`: LLM top_k (default is "1")
- `--top_p`: LLM top_p (default is "1")

## Usage on gitlab CI/CD

### Step 1:
Setting gitlab CI/CD variables
- `GITLAB_TOKEN`
- `LLM_TOKEN`
- `CODE_LLAMA_URL`
- `CODE_LLAMA_MODEL`

### Step 2:
Update `gitlab.ci`

```
stages:
  - auto-code-review

auto-code-review:codellama:
  stage: auto-code-review
  image: node:18-alpine
  script:
    - npm install -g @twsc/code-review
    - code-review start --automode 1 --llm codellama --mr ${CI_PROJECT_URL}/-/merge_requests/${CI_MERGE_REQUEST_IID}
  tags:
    - normal
  rules:
    - if: $CI_MERGE_REQUEST_ID
      changes: *change_list
      when: manual
```