프로젝트
GitHub에서 보기
alphardex/kokomi.js
소개
계속 확장되는 three.js 헬퍼 라이브러리입니다.
개발 도구What you can do
- You can simply extend kokomi.Base class to kickstart a simple scene without writing any boilerplate codes.
- Either you can write all your three.js code in a single file, or encapsulate your code into individual classes in a large project. By extending kokomi.Component, you can make your components keep their own state and animation.
- kokomi.AssetManager can handle the preloads of assets (gltfModel, texture, cubeTexture, font, etc). You can just write a simple js object to config your assets without caring about various loaders.
- Integrated with three.interactive, which can handle mouse and touch interactions easily.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
kokomi.js
A growing three.js helper library.
Sangonomiya Kokomi, the young Divine Priestess of Watatsumi Island.
Install
npm i kokomi.js
Also, make sure to install three.js.
npm i three
Check the documentation: https://kokomi-docs.netlify.app/
Hello world
With just several lines, you can make a most basic 3D scene :d
index.html
<div id="sketch"></div>
style.css
#sketch {
width: 100vw;
height: 100vh;
background: black;
overflow: hidden;
}
script.js
import * as kokomi from "kokomi.js";
class Sketch extends kokomi.Base {
create() {
new kokomi.OrbitControls(this);
const box = new kokomi.Box(this);
box.addExisting();
this.update((time) => {
box.spin(time);
});
}
}
const createSketch = () => {
const sketch = new Sketch();
sketch.create();
return sketch;
};
createSketch();

Online Sandbox: https://kokomi-sandbox.netlify.app/
Features
- You can simply extend
kokomi.Baseclass to kickstart a simple scene without writing any boilerplate codes. - Either you can write all your three.js code in a single file, or encapsulate your code into individual classes in a large project. By extending
kokomi.Component, you can make your components keep their own state and animation. kokomi.AssetManagercan handle the preloads of assets (gltfModel, texture, cubeTexture, font, etc). You can just write a simple js object to config your assets without caring about various loaders.- Integrated with three.interactive, which can handle mouse and touch interactions easily.
- Many more useful components for you to discover!
Previews
Model Showcase

Shadertoy Integration

Persistence Effect

Render Texture

Reflector

Infinite Gallery

Credits
- three.js
- drei
- Various articles from codrops and other amazing blogs
- Various video tutorials from youtube
Author
👤 alphardex
- Website: https://alphardex.netlify.app
- Twitter: @alphardex007
- Github: @alphardex
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator
관련 프로젝트 살펴보기
불러오는 중…